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

Commit 6b51863a authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Restore OP_READ_PHONE_STATE check

Now that PhoneInterfaceManager clears calling identity before calling
TelephonyManager, the app opp check can be restored.

Bug: 21726452
Bug: 21878243
Change-Id: Id4108b54fafafc64bb0f0204c486dd0f76591b94
parent b507a182
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -369,10 +369,7 @@ public class PhoneSubInfo {
        mContext.enforceCallingOrSelfPermission(
        mContext.enforceCallingOrSelfPermission(
                android.Manifest.permission.READ_PHONE_STATE, message);
                android.Manifest.permission.READ_PHONE_STATE, message);


        return true;
        return mAppOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, Binder.getCallingUid(),
        // TODO b/21726452 enforce OP_READ_PHONE_STATE once
                callingPackage) == AppOpsManager.MODE_ALLOWED;
        // PhoneInterfaceManager.getMergedSubscriberIds got fixed
        // return mAppOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, Binder.getCallingUid(),
        // callingPackage) == AppOpsManager.MODE_ALLOWED;
    }
    }
}
}