Merge "Hide CarrierPrivilege APIs in TelMgr." into lmp-dev
diff --git a/api/current.txt b/api/current.txt
index 047f8d5..147258c 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -28514,7 +28514,6 @@
method public java.lang.String getSubscriberId();
method public java.lang.String getVoiceMailAlphaTag();
method public java.lang.String getVoiceMailNumber();
- method public int hasCarrierPrivileges();
method public boolean hasIccCard();
method public boolean iccCloseLogicalChannel(int);
method public byte[] iccExchangeSimIO(int, int, int, int, int, java.lang.String);
@@ -28525,18 +28524,11 @@
method public boolean isSmsCapable();
method public void listen(android.telephony.PhoneStateListener, int);
method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
- method public boolean setGlobalPreferredNetworkType();
- method public void setLine1NumberForDisplay(java.lang.String, java.lang.String);
- method public boolean setOperatorBrandOverride(java.lang.String);
field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE";
field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE";
field public static final int CALL_STATE_IDLE = 0; // 0x0
field public static final int CALL_STATE_OFFHOOK = 2; // 0x2
field public static final int CALL_STATE_RINGING = 1; // 0x1
- field public static final int CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES = -2; // 0xfffffffe
- field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1
- field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0
- field public static final int CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED = -1; // 0xffffffff
field public static final int DATA_ACTIVITY_DORMANT = 4; // 0x4
field public static final int DATA_ACTIVITY_IN = 1; // 0x1
field public static final int DATA_ACTIVITY_INOUT = 3; // 0x3
diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java
index ffe787a..1d6d8bc 100644
--- a/telecomm/java/android/telecom/PhoneAccount.java
+++ b/telecomm/java/android/telecom/PhoneAccount.java
@@ -286,9 +286,6 @@
* The raw callback number used for this {@code PhoneAccount}, as distinct from
* {@link #getAddress()}. For the majority of {@code PhoneAccount}s this should be registered
* as {@code null}. It is used by the system for SIM-based {@code PhoneAccount} registration
- * where {@link android.telephony.TelephonyManager#setLine1NumberForDisplay(String, String)}
- * has been used to alter the callback number.
- * <p>
*
* @return The subscription number, suitable for display to the user.
*/
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 34b1454..6ba151f 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1746,6 +1746,7 @@
*
* @param alphaTag alpha-tagging of the dailing nubmer
* @param number The dialing number
+ * @hide
*/
public void setLine1NumberForDisplay(String alphaTag, String number) {
setLine1NumberForDisplayForSubscriber(getDefaultSubscription(), alphaTag, number);
@@ -2381,7 +2382,6 @@
*
* <p>Requires Permission:
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
*
* @param AID Application id. See ETSI 102.221 and 101.220.
* @return an IccOpenLogicalChannelResponse object.
@@ -2402,7 +2402,6 @@
*
* <p>Requires Permission:
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
*
* @param channel is the channel id to be closed as retruned by a successful
* iccOpenLogicalChannel.
@@ -2424,7 +2423,6 @@
*
* <p>Requires Permission:
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
*
* @param channel is the channel id to be closed as returned by a successful
* iccOpenLogicalChannel.
@@ -2456,7 +2454,6 @@
*
* <p>Requires Permission:
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
*
* @param cla Class of the APDU command.
* @param instruction Instruction of the APDU command.
@@ -2484,7 +2481,6 @@
*
* <p>Requires Permission:
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
*
* @param fileID
* @param command
@@ -2510,7 +2506,6 @@
*
* <p>Requires Permission:
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
*
* @param content String containing SAT/USAT response in hexadecimal
* format starting with command tag. See TS 102 223 for
@@ -2960,6 +2955,7 @@
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
*
* @return true on success; false on any failure.
+ * @hide
*/
public boolean setGlobalPreferredNetworkType() {
return setPreferredNetworkType(RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA);
@@ -2967,10 +2963,23 @@
/**
* Values used to return status for hasCarrierPrivileges call.
+ * @hide
*/
public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1;
+ /**
+ * Values used to return status for hasCarrierPrivileges call.
+ * @hide
+ */
public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0;
+ /**
+ * Values used to return status for hasCarrierPrivileges call.
+ * @hide
+ */
public static final int CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED = -1;
+ /**
+ * Values used to return status for hasCarrierPrivileges call.
+ * @hide
+ */
public static final int CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES = -2;
/**
@@ -2987,6 +2996,7 @@
* CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED if the carrier rules are not loaded.
* CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES if there was an error loading carrier
* rules (or if there are no rules).
+ * @hide
*/
public int hasCarrierPrivileges() {
try {
@@ -3013,6 +3023,7 @@
*
* @param brand The brand name to display/set.
* @return true if the operation was executed correctly.
+ * @hide
*/
public boolean setOperatorBrandOverride(String brand) {
try {