Check if package matches home package and allow exceptions.

This avoids playing the sound effect if other launcher activities come
to front and the user navigates back to home.
Exceptions are allowed for activity types dream and assistant and system
apps can set the manifest flag FLAG_NO_HOME_SOUND to avoid the home
sound effect from being played when the home app moves to front next.

Test: manual
Test: atest HomeSoundEffectControllerTest
Bug: 167946828
Bug: 157407957
Change-Id: I9a448e7ed769c48cc0d0448fa7b49cb95d2b7470
3 files changed