diff options
author | Eric Laurent <elaurent@google.com> | 2014-12-18 17:38:04 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-12-18 17:40:43 -0800 |
commit | 38edfda9bdd282228db08e3cc449b554b8744625 (patch) | |
tree | 2838941d29dc14eb18b57580caf8ab8850ca9bdf /media | |
parent | 8a0399c442522bf2dab20c688a99d92faa01f9b1 (diff) | |
download | frameworks_base-38edfda9bdd282228db08e3cc449b554b8744625.zip frameworks_base-38edfda9bdd282228db08e3cc449b554b8744625.tar.gz frameworks_base-38edfda9bdd282228db08e3cc449b554b8744625.tar.bz2 |
AudioService: fix permission check.
Clear caller identity before calling TelecomManager.isInCall().
Bug: 18702149.
Change-Id: Ie057f3f261fc0a36dff51840cc8390408621d3bd
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/AudioService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index 8a543ce..1c10422 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -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); } |