diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index e8cffa9..297cd7a 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1360,7 +1360,7 @@
         }
 
         log("No modify permission, check carrier privilege next.");
-        if (hasCarrierPrivileges() != TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS) {
+        if (getCarrierPrivilegeStatus() != TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS) {
             loge("No Carrier Privilege.");
             throw new SecurityException("No modify permission or carrier privilege.");
         }
@@ -1372,7 +1372,7 @@
      * @throws SecurityException if the caller does not have the required permission
      */
     private void enforceCarrierPrivilege() {
-        if (hasCarrierPrivileges() != TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS) {
+        if (getCarrierPrivilegeStatus() != TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS) {
             loge("No Carrier Privilege.");
             throw new SecurityException("No Carrier Privilege.");
         }
@@ -1497,7 +1497,7 @@
      */
     @Override
     public boolean setVoiceMailNumber(int subId, String alphaTag, String number) {
-        enforceModifyPermissionOrCarrierPrivilege();
+        enforceCarrierPrivilege();
         Boolean success = (Boolean) sendRequest(CMD_SET_VOICEMAIL_NUMBER,
                 new Pair<String, String>(alphaTag, number), new Integer(subId));
         return success;
@@ -1928,10 +1928,10 @@
     }
 
     @Override
-    public int hasCarrierPrivileges() {
+    public int getCarrierPrivilegeStatus() {
         UiccCard card = UiccController.getInstance().getUiccCard();
         if (card == null) {
-            loge("hasCarrierPrivileges: No UICC");
+            loge("getCarrierPrivilegeStatus: No UICC");
             return TelephonyManager.CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED;
         }
         return card.getCarrierPrivilegeStatusForCurrentTransaction(
@@ -1975,7 +1975,7 @@
 
     @Override
     public void setLine1NumberForDisplayForSubscriber(int subId, String alphaTag, String number) {
-        enforceModifyPermissionOrCarrierPrivilege();
+        enforceCarrierPrivilege();
 
         String iccId = getIccId(subId);
         if (iccId != null) {
@@ -2023,7 +2023,7 @@
 
     @Override
     public boolean setOperatorBrandOverride(String brand) {
-        enforceModifyPermissionOrCarrierPrivilege();
+        enforceCarrierPrivilege();
         return mPhone.setOperatorBrandOverride(brand);
     }
 
