Loading services/core/java/com/android/server/audio/MusicFxHelper.java +9 −3 Original line number Diff line number Diff line Loading @@ -70,6 +70,8 @@ public class MusicFxHelper { // The binder token identifying the UidObserver registration. private IBinder mUidObserverToken = null; private boolean mIsBound; // Package name and list of open audio sessions for this package private static class PackageSessions { String mPackageName; Loading Loading @@ -110,6 +112,7 @@ public class MusicFxHelper { if (procState > ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND) { Intent bindIntent = new Intent().setClassName(mMusicFxPackageName, "com.android.musicfx.KeepAliveService"); mIsBound = true; mContext.bindServiceAsUser( bindIntent, mMusicFxBindConnection, Context.BIND_AUTO_CREATE, UserHandle.of(getCurrentUserId())); Loading Loading @@ -158,12 +161,15 @@ public class MusicFxHelper { Log.e(TAG, "RemoteException with unregisterUidObserver: " + e); } mUidObserverToken = null; if (mIsBound) { mContext.unbindService(mMusicFxBindConnection); mIsBound = false; Log.i(TAG, "last session closed, unregister UID observer, and unbind " + mMusicFxPackageName); } } } } // Hashmap of UID and list of open sessions for this UID. @GuardedBy("mClientUidMapLock") Loading Loading
services/core/java/com/android/server/audio/MusicFxHelper.java +9 −3 Original line number Diff line number Diff line Loading @@ -70,6 +70,8 @@ public class MusicFxHelper { // The binder token identifying the UidObserver registration. private IBinder mUidObserverToken = null; private boolean mIsBound; // Package name and list of open audio sessions for this package private static class PackageSessions { String mPackageName; Loading Loading @@ -110,6 +112,7 @@ public class MusicFxHelper { if (procState > ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND) { Intent bindIntent = new Intent().setClassName(mMusicFxPackageName, "com.android.musicfx.KeepAliveService"); mIsBound = true; mContext.bindServiceAsUser( bindIntent, mMusicFxBindConnection, Context.BIND_AUTO_CREATE, UserHandle.of(getCurrentUserId())); Loading Loading @@ -158,12 +161,15 @@ public class MusicFxHelper { Log.e(TAG, "RemoteException with unregisterUidObserver: " + e); } mUidObserverToken = null; if (mIsBound) { mContext.unbindService(mMusicFxBindConnection); mIsBound = false; Log.i(TAG, "last session closed, unregister UID observer, and unbind " + mMusicFxPackageName); } } } } // Hashmap of UID and list of open sessions for this UID. @GuardedBy("mClientUidMapLock") Loading