Merge "Remove WRITE_SETTINGS permission check from AudioManager getter APIs"
This commit is contained in:
@@ -2329,10 +2329,6 @@ public class AudioService extends IAudioService.Stub
|
|||||||
Log.w(TAG, "audioFormat to enable is not a surround format.");
|
Log.w(TAG, "audioFormat to enable is not a surround format.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SETTINGS)
|
|
||||||
!= PackageManager.PERMISSION_GRANTED) {
|
|
||||||
throw new SecurityException("Missing WRITE_SETTINGS permission");
|
|
||||||
}
|
|
||||||
|
|
||||||
final long token = Binder.clearCallingIdentity();
|
final long token = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
@@ -2400,11 +2396,6 @@ public class AudioService extends IAudioService.Stub
|
|||||||
/** @see AudioManager#getEncodedSurroundMode() */
|
/** @see AudioManager#getEncodedSurroundMode() */
|
||||||
@Override
|
@Override
|
||||||
public int getEncodedSurroundMode(int targetSdkVersion) {
|
public int getEncodedSurroundMode(int targetSdkVersion) {
|
||||||
if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SETTINGS)
|
|
||||||
!= PackageManager.PERMISSION_GRANTED) {
|
|
||||||
throw new SecurityException("Missing WRITE_SETTINGS permission");
|
|
||||||
}
|
|
||||||
|
|
||||||
final long token = Binder.clearCallingIdentity();
|
final long token = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
synchronized (mSettingsLock) {
|
synchronized (mSettingsLock) {
|
||||||
|
|||||||
Reference in New Issue
Block a user