diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index b32782a4a1a7a..8ecd102f81989 100755 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -9002,10 +9002,15 @@ public class AudioService extends IAudioService.Stub if (DEBUG_VOL) { Log.d(TAG, "Persisting Volume Behavior for DeviceType: " + deviceType); } - System.putIntForUser(mContentResolver, - getSettingsNameForDeviceVolumeBehavior(deviceType), - deviceVolumeBehavior, - UserHandle.USER_CURRENT); + long callingIdentity = Binder.clearCallingIdentity(); + try { + System.putIntForUser(mContentResolver, + getSettingsNameForDeviceVolumeBehavior(deviceType), + deviceVolumeBehavior, + UserHandle.USER_CURRENT); + } finally { + Binder.restoreCallingIdentity(callingIdentity); + } } @AudioManager.DeviceVolumeBehaviorState