summaryrefslogtreecommitdiff
path: root/src/com/android/server/telecom/TelecomServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/server/telecom/TelecomServiceImpl.java')
-rw-r--r--src/com/android/server/telecom/TelecomServiceImpl.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/server/telecom/TelecomServiceImpl.java b/src/com/android/server/telecom/TelecomServiceImpl.java
index f33b18586..7d3eeb683 100644
--- a/src/com/android/server/telecom/TelecomServiceImpl.java
+++ b/src/com/android/server/telecom/TelecomServiceImpl.java
@@ -2707,6 +2707,7 @@ public class TelecomServiceImpl {
int packageUid = -1;
int callingUid = Binder.getCallingUid();
PackageManager pm;
+ long token = Binder.clearCallingIdentity();
try{
pm = mContext.createContextAsUser(
UserHandle.getUserHandleForUid(callingUid), 0).getPackageManager();
@@ -2715,6 +2716,8 @@ public class TelecomServiceImpl {
Log.i(this, "callingUidMatchesPackageManagerRecords:"
+ " createContextAsUser hit exception=[%s]", e.toString());
return false;
+ } finally {
+ Binder.restoreCallingIdentity(token);
}
if (pm != null) {
try {