Merge "Clear calling identify when persisting volume behavior"
This commit is contained in:
committed by
Android (Google) Code Review
commit
7c8dfa34a9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user