Merge "Clear calling identify when persisting volume behavior"

This commit is contained in:
TreeHugger Robot
2020-07-01 10:17:36 +00:00
committed by Android (Google) Code Review

View File

@@ -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