Loading services/core/java/com/android/server/audio/AudioService.java +2 −1 Original line number Diff line number Diff line Loading @@ -1885,7 +1885,6 @@ public class AudioService extends IAudioService.Stub } mSpatializerHelper.reset(/* featureEnabled */ mHasSpatializerEffect); mSoundDoseHelper.reset(); // Restore rotation information. if (mMonitorRotation) { Loading @@ -1896,6 +1895,8 @@ public class AudioService extends IAudioService.Stub // indicate the end of reconfiguration phase to audio HAL AudioSystem.setParameters("restarting=false"); mSoundDoseHelper.reset(/*resetISoundDose=*/true); sendMsg(mAudioHandler, MSG_DISPATCH_AUDIO_SERVER_STATE, SENDMSG_QUEUE, 1, 0, null, 0); Loading services/core/java/com/android/server/audio/SoundDoseHelper.java +5 −4 Original line number Diff line number Diff line Loading @@ -856,11 +856,12 @@ public class SoundDoseHelper { pw.println(); } /*package*/void reset() { /*package*/void reset(boolean resetISoundDose) { Log.d(TAG, "Reset the sound dose helper"); mSoundDose.compareAndExchange(/*expectedValue=*/null, AudioSystem.getSoundDoseInterface(mSoundDoseCallback)); if (resetISoundDose) { mSoundDose.set(AudioSystem.getSoundDoseInterface(mSoundDoseCallback)); } synchronized (mCsdStateLock) { try { Loading Loading @@ -972,7 +973,7 @@ public class SoundDoseHelper { } } reset(); reset(/*resetISoundDose=*/false); } private void onConfigureSafeMedia(boolean force, String caller) { Loading Loading
services/core/java/com/android/server/audio/AudioService.java +2 −1 Original line number Diff line number Diff line Loading @@ -1885,7 +1885,6 @@ public class AudioService extends IAudioService.Stub } mSpatializerHelper.reset(/* featureEnabled */ mHasSpatializerEffect); mSoundDoseHelper.reset(); // Restore rotation information. if (mMonitorRotation) { Loading @@ -1896,6 +1895,8 @@ public class AudioService extends IAudioService.Stub // indicate the end of reconfiguration phase to audio HAL AudioSystem.setParameters("restarting=false"); mSoundDoseHelper.reset(/*resetISoundDose=*/true); sendMsg(mAudioHandler, MSG_DISPATCH_AUDIO_SERVER_STATE, SENDMSG_QUEUE, 1, 0, null, 0); Loading
services/core/java/com/android/server/audio/SoundDoseHelper.java +5 −4 Original line number Diff line number Diff line Loading @@ -856,11 +856,12 @@ public class SoundDoseHelper { pw.println(); } /*package*/void reset() { /*package*/void reset(boolean resetISoundDose) { Log.d(TAG, "Reset the sound dose helper"); mSoundDose.compareAndExchange(/*expectedValue=*/null, AudioSystem.getSoundDoseInterface(mSoundDoseCallback)); if (resetISoundDose) { mSoundDose.set(AudioSystem.getSoundDoseInterface(mSoundDoseCallback)); } synchronized (mCsdStateLock) { try { Loading Loading @@ -972,7 +973,7 @@ public class SoundDoseHelper { } } reset(); reset(/*resetISoundDose=*/false); } private void onConfigureSafeMedia(boolean force, String caller) { Loading