Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0ac5f99 authored by jianzhou's avatar jianzhou Committed by android-build-merger
Browse files

Merge "frameworks/base: Fix AudioService JNI leaks" into pi-dev

am: ec28b78c

Change-Id: I3a54e861c909baaabf0455206421f0c8865dc3b4
parents 18001f79 ec28b78c
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -1915,7 +1915,16 @@ public class AudioService extends IAudioService.Stub
                }
                mUserSelectedVolumeControlStream = false;
            } else {
                if (null == mForceControlStreamClient) {
                    mForceControlStreamClient = new ForceControlStreamClient(cb);
                } else {
                    if (mForceControlStreamClient.getBinder() == cb) {
                        Log.d(TAG, "forceVolumeControlStream cb:" + cb + " is already linked.");
                    } else {
                        mForceControlStreamClient.release();
                        mForceControlStreamClient = new ForceControlStreamClient(cb);
                    }
                }
            }
        }
    }
@@ -1955,6 +1964,10 @@ public class AudioService extends IAudioService.Stub
                mCb = null;
            }
        }

        public IBinder getBinder() {
            return mCb;
        }
    }

    private void sendBroadcastToAll(Intent intent) {