Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c6e7c75 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Clear calling identity before calling createContextAsUser." into udc-qpr-dev

parents 1bd76f9d 3cd16141
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 {