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

Commit c51d4e7d authored by Ján Sebechlebský's avatar Ján Sebechlebský Committed by Automerger Merge Worker
Browse files

Merge "Optimize attaching / detaching audio mixes." into udc-dev am: 12504654

parents 2d08f7c9 12504654
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -12478,20 +12478,16 @@ public class AudioService extends IAudioService.Stub
        }
        int addMixes(@NonNull ArrayList<AudioMix> mixes) {
            // TODO optimize to not have to unregister the mixes already in place
            synchronized (mMixes) {
                mAudioSystem.registerPolicyMixes(mMixes, false);
                this.add(mixes);
                return mAudioSystem.registerPolicyMixes(mMixes, true);
                return mAudioSystem.registerPolicyMixes(mixes, true);
            }
        }
        int removeMixes(@NonNull ArrayList<AudioMix> mixes) {
            // TODO optimize to not have to unregister the mixes already in place
            synchronized (mMixes) {
                mAudioSystem.registerPolicyMixes(mMixes, false);
                this.remove(mixes);
                return mAudioSystem.registerPolicyMixes(mMixes, true);
                return mAudioSystem.registerPolicyMixes(mixes, false);
            }
        }