* commit '05fce092aa2b6a7f4a8cf4b0f33f7c003eb228f3': AudioService: fix permission check.
This commit is contained in:
@@ -3248,7 +3248,10 @@ public class AudioService extends IAudioService.Stub {
|
|||||||
|
|
||||||
TelecomManager telecomManager =
|
TelecomManager telecomManager =
|
||||||
(TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
|
(TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
|
||||||
|
|
||||||
|
final long ident = Binder.clearCallingIdentity();
|
||||||
IsInCall = telecomManager.isInCall();
|
IsInCall = telecomManager.isInCall();
|
||||||
|
Binder.restoreCallingIdentity(ident);
|
||||||
|
|
||||||
return (IsInCall || getMode() == AudioManager.MODE_IN_COMMUNICATION);
|
return (IsInCall || getMode() == AudioManager.MODE_IN_COMMUNICATION);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user