Add OrSelf to privileged permission check.

Bug: 22857263
Change-Id: Ide7105dfd653e3c271330822fb8cee7cf620e35d
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 39a7386..9907b9f 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1616,16 +1616,6 @@
         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
     }
 
-    /**
-     * Make sure the caller has the READ_PRIVILEGED_PHONE_STATE permission.
-     *
-     * @throws SecurityException if the caller does not have the required permission
-     */
-    private void enforcePrivilegedPhoneStatePermission() {
-        mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
-                null);
-    }
-
     private void enforceConnectivityInternalPermission() {
         mApp.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CONNECTIVITY_INTERNAL,
@@ -2720,10 +2710,10 @@
 
     private boolean canReadPhoneState(String callingPackage, String message) {
         try {
-            mApp.enforceCallingPermission(
+            mApp.enforceCallingOrSelfPermission(
                     android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, message);
 
-            // SKIP checking for run-time permission since obtained PRIVILEDGED
+            // SKIP checking for run-time permission since caller or self has PRIVILEDGED permission
             return true;
         } catch (SecurityException e) {
             mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_STATE,