Merge "AudioService: fix permission check." into lmp-mr1-dev

This commit is contained in:
Eric Laurent
2014-12-19 17:11:27 +00:00
committed by Android (Google) Code Review

View File

@@ -3248,7 +3248,10 @@ public class AudioService extends IAudioService.Stub {
TelecomManager telecomManager =
(TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
final long ident = Binder.clearCallingIdentity();
IsInCall = telecomManager.isInCall();
Binder.restoreCallingIdentity(ident);
return (IsInCall || getMode() == AudioManager.MODE_IN_COMMUNICATION);
}