Loading telephony/java/android/telephony/CellIdentityCdma.java +18 −47 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.annotation.Nullable; import android.os.Parcel; import android.telephony.cdma.CdmaCellLocation; import com.android.internal.telephony.flags.Flags; import com.android.internal.telephony.util.TelephonyUtils; import com.android.telephony.Rlog; Loading Loading @@ -103,30 +102,13 @@ public final class CellIdentityCdma extends CellIdentity { */ public CellIdentityCdma(int nid, int sid, int bid, int lon, int lat, @Nullable String alphal, @Nullable String alphas) { super(TAG, CellInfo.TYPE_CDMA, null, null, Flags.cleanupCdma() ? null : alphal, Flags.cleanupCdma() ? null : alphas); if (Flags.cleanupCdma()) { super(TAG, CellInfo.TYPE_CDMA, null, null, null, null); mNetworkId = CellInfo.UNAVAILABLE; mSystemId = CellInfo.UNAVAILABLE; mBasestationId = CellInfo.UNAVAILABLE; mLongitude = CellInfo.UNAVAILABLE; mLatitude = CellInfo.UNAVAILABLE; mGlobalCellId = null; } else { mNetworkId = inRangeOrUnavailable(nid, 0, NETWORK_ID_MAX); mSystemId = inRangeOrUnavailable(sid, 0, SYSTEM_ID_MAX); mBasestationId = inRangeOrUnavailable(bid, 0, BASESTATION_ID_MAX); lat = inRangeOrUnavailable(lat, LATITUDE_MIN, LATITUDE_MAX); lon = inRangeOrUnavailable(lon, LONGITUDE_MIN, LONGITUDE_MAX); if (!isNullIsland(lat, lon)) { mLongitude = lon; mLatitude = lat; } else { mLongitude = mLatitude = CellInfo.UNAVAILABLE; } updateGlobalCellId(); } } private CellIdentityCdma(@NonNull CellIdentityCdma cid) { Loading Loading @@ -302,7 +284,6 @@ public final class CellIdentityCdma extends CellIdentity { private CellIdentityCdma(Parcel in) { super(TAG, CellInfo.TYPE_CDMA, in); if (Flags.cleanupCdma()) { in.readInt(); mNetworkId = CellInfo.UNAVAILABLE; Loading @@ -319,16 +300,6 @@ public final class CellIdentityCdma extends CellIdentity { mLatitude = CellInfo.UNAVAILABLE; mGlobalCellId = null; } else { mNetworkId = in.readInt(); mSystemId = in.readInt(); mBasestationId = in.readInt(); mLongitude = in.readInt(); mLatitude = in.readInt(); updateGlobalCellId(); if (DBG) log(toString()); } } /** Loading telephony/java/android/telephony/CellSignalStrengthCdma.java +4 −29 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import android.os.Parcel; import android.os.Parcelable; import android.os.PersistableBundle; import com.android.internal.telephony.flags.Flags; import com.android.telephony.Rlog; import java.util.Objects; Loading Loading @@ -69,17 +68,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements */ public CellSignalStrengthCdma(int cdmaDbm, int cdmaEcio, int evdoDbm, int evdoEcio, int evdoSnr) { if (Flags.cleanupCdma()) { setDefaultValues(); } else { mCdmaDbm = inRangeOrUnavailable(cdmaDbm, -120, 0); mCdmaEcio = inRangeOrUnavailable(cdmaEcio, -160, 0); mEvdoDbm = inRangeOrUnavailable(evdoDbm, -120, 0); mEvdoEcio = inRangeOrUnavailable(evdoEcio, -160, 0); mEvdoSnr = inRangeOrUnavailable(evdoSnr, 0, 8); updateLevel(null, null); } } /** @hide */ Loading @@ -89,16 +78,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements /** @hide */ protected void copyFrom(CellSignalStrengthCdma s) { if (Flags.cleanupCdma()) { setDefaultValues(); return; } mCdmaDbm = s.mCdmaDbm; mCdmaEcio = s.mCdmaEcio; mEvdoDbm = s.mEvdoDbm; mEvdoEcio = s.mEvdoEcio; mEvdoSnr = s.mEvdoSnr; mLevel = s.mLevel; } /** @hide */ Loading Loading @@ -398,8 +378,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements /** @hide */ @Override public boolean isValid() { if (Flags.cleanupCdma()) return false; return !this.equals(sInvalid); return false; } @Override Loading Loading @@ -457,11 +436,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements mEvdoSnr = in.readInt(); mLevel = in.readInt(); if (Flags.cleanupCdma()) { setDefaultValues(); } else { if (DBG) log("CellSignalStrengthCdma(Parcel): " + toString()); } } /** Implement the Parcelable interface */ Loading telephony/java/android/telephony/TelephonyManager.java +18 −219 Original line number Diff line number Diff line Loading @@ -2508,8 +2508,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getMeid() { if (Flags.cleanupCdma()) return null; return getMeid(getSlotIndex()); return null; } /** Loading Loading @@ -2553,24 +2552,8 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getMeid(int slotIndex) { if (Flags.cleanupCdma()) return null; ITelephony telephony = getITelephony(); if (telephony == null) return null; try { String meid = telephony.getMeidForSlot(slotIndex, getOpPackageName(), getAttributionTag()); if (TextUtils.isEmpty(meid)) { Log.d(TAG, "getMeid: return null because MEID is not available"); return null; } return meid; } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { return null; } } /** * Returns the Manufacturer Code from the MEID. Return null if Manufacturer Code is not Loading @@ -2584,8 +2567,7 @@ public class TelephonyManager { @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) @Nullable public String getManufacturerCode() { if (Flags.cleanupCdma()) return null; return getManufacturerCode(getSlotIndex()); return null; } /** Loading @@ -2602,17 +2584,7 @@ public class TelephonyManager { @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) @Nullable public String getManufacturerCode(int slotIndex) { if (Flags.cleanupCdma()) return null; ITelephony telephony = getITelephony(); if (telephony == null) return null; try { return telephony.getManufacturerCodeForSlot(slotIndex); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { return null; } } /** Loading Loading @@ -7009,8 +6981,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public @EriIconIndex int getCdmaEnhancedRoamingIndicatorDisplayNumber() { if (Flags.cleanupCdma()) return -1; return getCdmaEriIconIndex(getSubId()); return -1; } /** Loading @@ -7022,20 +6993,8 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @UnsupportedAppUsage public @EriIconIndex int getCdmaEriIconIndex(int subId) { if (Flags.cleanupCdma()) return -1; try { ITelephony telephony = getITelephony(); if (telephony == null) return -1; return telephony.getCdmaEriIconIndexForSubscriber(subId, getOpPackageName(), getAttributionTag()); } catch (RemoteException ex) { // the phone process is restarting. return -1; } catch (NullPointerException ex) { return -1; } } /** * Returns the CDMA ERI icon mode for a subscription. Loading @@ -7049,19 +7008,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @UnsupportedAppUsage public @EriIconMode int getCdmaEriIconMode(int subId) { if (Flags.cleanupCdma()) return -1; try { ITelephony telephony = getITelephony(); if (telephony == null) return -1; return telephony.getCdmaEriIconModeForSubscriber(subId, getOpPackageName(), getAttributionTag()); } catch (RemoteException ex) { // the phone process is restarting. return -1; } catch (NullPointerException ex) { return -1; } } /** Loading @@ -7073,8 +7020,7 @@ public class TelephonyManager { @Deprecated @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getCdmaEriText() { if (Flags.cleanupCdma()) return null; return getCdmaEriText(getSubId()); return null; } /** Loading @@ -7087,20 +7033,8 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @UnsupportedAppUsage public String getCdmaEriText(int subId) { if (Flags.cleanupCdma()) return null; try { ITelephony telephony = getITelephony(); if (telephony == null) return null; return telephony.getCdmaEriTextForSubscriber(subId, getOpPackageName(), getAttributionTag()); } catch (RemoteException ex) { // the phone process is restarting. return null; } catch (NullPointerException ex) { return null; } } // Suppressing AndroidFrameworkCompatChange because we're querying vendor // partition SDK level, not application's target SDK version. Loading Loading @@ -8369,16 +8303,6 @@ public class TelephonyManager { @Deprecated @UnsupportedAppUsage public String nvReadItem(int itemID) { if (Flags.cleanupCdma()) return ""; try { ITelephony telephony = getITelephony(); if (telephony != null) return telephony.nvReadItem(itemID); } catch (RemoteException ex) { Rlog.e(TAG, "nvReadItem RemoteException", ex); } catch (NullPointerException ex) { Rlog.e(TAG, "nvReadItem NPE", ex); } return ""; } Loading @@ -8399,16 +8323,6 @@ public class TelephonyManager { */ @Deprecated public boolean nvWriteItem(int itemID, String itemValue) { if (Flags.cleanupCdma()) return false; try { ITelephony telephony = getITelephony(); if (telephony != null) return telephony.nvWriteItem(itemID, itemValue); } catch (RemoteException ex) { Rlog.e(TAG, "nvWriteItem RemoteException", ex); } catch (NullPointerException ex) { Rlog.e(TAG, "nvWriteItem NPE", ex); } return false; } Loading @@ -8428,16 +8342,6 @@ public class TelephonyManager { */ @Deprecated public boolean nvWriteCdmaPrl(byte[] preferredRoamingList) { if (Flags.cleanupCdma()) return false; try { ITelephony telephony = getITelephony(); if (telephony != null) return telephony.nvWriteCdmaPrl(preferredRoamingList); } catch (RemoteException ex) { Rlog.e(TAG, "nvWriteCdmaPrl RemoteException", ex); } catch (NullPointerException ex) { Rlog.e(TAG, "nvWriteCdmaPrl NPE", ex); } return false; } Loading @@ -8462,11 +8366,9 @@ public class TelephonyManager { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @Deprecated public boolean nvResetConfig(int resetType) { if (Flags.cleanupCdma()) { if (resetType != 1) { // 1: reload NV reset (reboot modem) return false; } } try { ITelephony telephony = getITelephony(); if (telephony != null) { Loading Loading @@ -8506,19 +8408,6 @@ public class TelephonyManager { @SystemApi @RequiresFeature(PackageManager.FEATURE_TELEPHONY_RADIO_ACCESS) public boolean resetRadioConfig() { if (Flags.cleanupCdma()) { return false; } try { ITelephony telephony = getITelephony(); if (telephony != null) { return telephony.resetModemConfig(getSlotIndex()); } } catch (RemoteException ex) { Rlog.e(TAG, "resetRadioConfig RemoteException", ex); } catch (NullPointerException ex) { Rlog.e(TAG, "resetRadioConfig NPE", ex); } return false; } Loading Loading @@ -10871,8 +10760,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getCdmaMdn() { if (Flags.cleanupCdma()) return null; return getCdmaMdn(getSubId()); return null; } /** Loading @@ -10886,17 +10774,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getCdmaMdn(int subId) { if (Flags.cleanupCdma()) return null; try { ITelephony telephony = getITelephony(); if (telephony == null) return null; return telephony.getCdmaMdn(subId); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { return null; } } /** Loading @@ -10910,8 +10788,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getCdmaMin() { if (Flags.cleanupCdma()) return null; return getCdmaMin(getSubId()); return null; } /** Loading @@ -10925,17 +10802,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getCdmaMin(int subId) { if (Flags.cleanupCdma()) return null; try { ITelephony telephony = getITelephony(); if (telephony == null) return null; return telephony.getCdmaMin(subId); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { return null; } } /** Loading Loading @@ -12218,20 +12085,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public @CdmaRoamingMode int getCdmaRoamingMode() { if (Flags.cleanupCdma()) return CDMA_ROAMING_MODE_RADIO_DEFAULT; int mode = CDMA_ROAMING_MODE_RADIO_DEFAULT; try { ITelephony telephony = getITelephony(); if (telephony != null) { mode = telephony.getCdmaRoamingMode(getSubId()); } else { throw new IllegalStateException("telephony service is null."); } } catch (RemoteException ex) { Log.e(TAG, "Error calling ITelephony#getCdmaRoamingMode", ex); ex.rethrowFromSystemServer(); } return mode; return CDMA_ROAMING_MODE_RADIO_DEFAULT; } /** Loading Loading @@ -12265,22 +12119,6 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public void setCdmaRoamingMode(@CdmaRoamingMode int mode) { if (Flags.cleanupCdma()) return; if (getPhoneType() != PHONE_TYPE_CDMA) { throw new IllegalStateException("Phone does not support CDMA."); } try { ITelephony telephony = getITelephony(); if (telephony != null) { boolean result = telephony.setCdmaRoamingMode(getSubId(), mode); if (!result) throw new IllegalStateException("radio is unavailable."); } else { throw new IllegalStateException("telephony service is null."); } } catch (RemoteException ex) { Log.e(TAG, "Error calling ITelephony#setCdmaRoamingMode", ex); ex.rethrowFromSystemServer(); } } /** @hide Loading Loading @@ -12347,20 +12185,7 @@ public class TelephonyManager { @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public @CdmaSubscription int getCdmaSubscriptionMode() { if (Flags.cleanupCdma()) return CDMA_SUBSCRIPTION_UNKNOWN; int mode = CDMA_SUBSCRIPTION_RUIM_SIM; try { ITelephony telephony = getITelephony(); if (telephony != null) { mode = telephony.getCdmaSubscriptionMode(getSubId()); } else { throw new IllegalStateException("telephony service is null."); } } catch (RemoteException ex) { Log.e(TAG, "Error calling ITelephony#getCdmaSubscriptionMode", ex); ex.rethrowFromSystemServer(); } return mode; return CDMA_SUBSCRIPTION_UNKNOWN; } /** Loading Loading @@ -12390,22 +12215,6 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public void setCdmaSubscriptionMode(@CdmaSubscription int mode) { if (Flags.cleanupCdma()) return; if (getPhoneType() != PHONE_TYPE_CDMA) { throw new IllegalStateException("Phone does not support CDMA."); } try { ITelephony telephony = getITelephony(); if (telephony != null) { boolean result = telephony.setCdmaSubscriptionMode(getSubId(), mode); if (!result) throw new IllegalStateException("radio is unavailable."); } else { throw new IllegalStateException("telephony service is null."); } } catch (RemoteException ex) { Log.e(TAG, "Error calling ITelephony#setCdmaSubscriptionMode", ex); ex.rethrowFromSystemServer(); } } /** Loading Loading @@ -14117,8 +13926,7 @@ public class TelephonyManager { @SystemApi @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getCdmaPrlVersion() { if (Flags.cleanupCdma()) return null; return getCdmaPrlVersion(getSubId()); return null; } /** Loading @@ -14133,15 +13941,6 @@ public class TelephonyManager { */ @Deprecated public String getCdmaPrlVersion(int subId) { if (Flags.cleanupCdma()) return null; try { ITelephony service = getITelephony(); if (service != null) { return service.getCdmaPrlVersion(subId); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelephony#getCdmaPrlVersion", e); } return null; } telephony/java/com/android/internal/telephony/ITelephony.aidl +0 −186 Original line number Diff line number Diff line Loading @@ -411,69 +411,6 @@ interface ITelephony { */ int getActivePhoneTypeForSlot(int slotIndex); /** * Returns the CDMA ERI icon index to display * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaEriIconIndex(String callingPackage, String callingFeatureId); /** * Returns the CDMA ERI icon index to display on particular subId. * @param subId user preferred subId. * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaEriIconIndexForSubscriber(int subId, String callingPackage, String callingFeatureId); /** * Returns the CDMA ERI icon mode, * 0 - ON * 1 - FLASHING * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaEriIconMode(String callingPackage, String callingFeatureId); /** * Returns the CDMA ERI icon mode on particular subId, * 0 - ON * 1 - FLASHING * @param subId user preferred subId. * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaEriIconModeForSubscriber(int subId, String callingPackage, String callingFeatureId); /** * Returns the CDMA ERI text, * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ String getCdmaEriText(String callingPackage, String callingFeatureId); /** * Returns the CDMA ERI text for particular subId, * @param subId user preferred subId. * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ String getCdmaEriTextForSubscriber(int subId, String callingPackage, String callingFeatureId); /** * Returns true if OTA service provisioning needs to run. * Only relevant on some technologies, others will always Loading Loading @@ -784,40 +721,6 @@ interface ITelephony { */ String sendEnvelopeWithStatus(int subId, String content); /** * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. * Used for device configuration by some CDMA operators. * * @param itemID the ID of the item to read. * @return the NV item as a String, or null on any failure. * * @deprecated Legacy CDMA is unsupported. */ String nvReadItem(int itemID); /** * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. * Used for device configuration by some CDMA operators. * * @param itemID the ID of the item to read. * @param itemValue the value to write, as a String. * @return true on success; false on any failure. * * @deprecated Legacy CDMA is unsupported. */ boolean nvWriteItem(int itemID, String itemValue); /** * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. * Used for device configuration by some CDMA operators. * * @param preferredRoamingList byte array containing the new PRL. * @return true on success; false on any failure. * * @deprecated Legacy CDMA is unsupported. */ boolean nvWriteCdmaPrl(in byte[] preferredRoamingList); /** * Rollback modem configurations to factory default except some config which are in whitelist. * Used for device configuration by some CDMA operators. Loading Loading @@ -1057,22 +960,6 @@ interface ITelephony { */ void setImsRegistrationState(boolean registered); /** * Return MDN string for CDMA phone. * @param subId user preferred subId. * * @deprecated Legacy CDMA is unsupported. */ String getCdmaMdn(int subId); /** * Return MIN string for CDMA phone. * @param subId user preferred subId. * * @deprecated Legacy CDMA is unsupported. */ String getCdmaMin(int subId); /** * Request that the next incoming call from a number matching {@code range} be intercepted. * @param range The range of phone numbers the caller expects a phone call from. Loading Loading @@ -1364,24 +1251,6 @@ interface ITelephony { */ String getTypeAllocationCodeForSlot(int slotIndex); /** * Returns the MEID for the given slot. * * @param slotIndex - device slot. * @param callingPackage The package making the call. * @param callingFeatureId The feature in the package * <p>Requires Permission: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} */ String getMeidForSlot(int slotIndex, String callingPackage, String callingFeatureId); /** * Returns the Manufacturer Code from the MEID for the given slot. * * @param slotIndex - Which slot to retrieve the Manufacturer Code from. */ String getManufacturerCodeForSlot(int slotIndex); /** * Returns the device software version. * Loading Loading @@ -1517,17 +1386,6 @@ interface ITelephony { */ String getEsn(int subId); /** * Return the Preferred Roaming List Version * * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission * @param subId the subscription ID that this request applies to. * @return PRLVersion or null if error. * @hide * @deprecated Legacy CDMA is unsupported. */ String getCdmaPrlVersion(int subId); /** * Get snapshot of Telephony histograms * @return List of Telephony histograms Loading Loading @@ -1825,50 +1683,6 @@ interface ITelephony { */ void setDataRoamingEnabled(int subId, boolean isEnabled); /** * Gets the roaming mode for the CDMA phone with the subscription id {@code subId}. * * @param the subscription id. * @return the roaming mode for CDMA phone. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaRoamingMode(int subId); /** * Sets the roaming mode on the CDMA phone with the subscription {@code subId} to the given * roaming mode {@code mode}. * * @param subId the subscription id. * @param mode the roaming mode should be set. * @return {@code true} if successed. * * @deprecated Legacy CDMA is unsupported. */ boolean setCdmaRoamingMode(int subId, int mode); /** * Gets the subscription mode for the CDMA phone with the subscription id {@code subId}. * * @param the subscription id. * @return the subscription mode for CDMA phone. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaSubscriptionMode(int subId); /** * Sets the subscription mode for CDMA phone with the subscription {@code subId} to the given * subscription mode {@code mode}. * * @param subId the subscription id. * @param mode the subscription mode should be set. * @return {@code true} if successed. * * @deprecated Legacy CDMA is unsupported. */ boolean setCdmaSubscriptionMode(int subId, int mode); /** * A test API to override carrier information including mccmnc, imsi, iccid, gid1, gid2, * plmn and spn. This would be handy for, eg, forcing a particular carrier id, carrier's config Loading Loading
telephony/java/android/telephony/CellIdentityCdma.java +18 −47 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.annotation.Nullable; import android.os.Parcel; import android.telephony.cdma.CdmaCellLocation; import com.android.internal.telephony.flags.Flags; import com.android.internal.telephony.util.TelephonyUtils; import com.android.telephony.Rlog; Loading Loading @@ -103,30 +102,13 @@ public final class CellIdentityCdma extends CellIdentity { */ public CellIdentityCdma(int nid, int sid, int bid, int lon, int lat, @Nullable String alphal, @Nullable String alphas) { super(TAG, CellInfo.TYPE_CDMA, null, null, Flags.cleanupCdma() ? null : alphal, Flags.cleanupCdma() ? null : alphas); if (Flags.cleanupCdma()) { super(TAG, CellInfo.TYPE_CDMA, null, null, null, null); mNetworkId = CellInfo.UNAVAILABLE; mSystemId = CellInfo.UNAVAILABLE; mBasestationId = CellInfo.UNAVAILABLE; mLongitude = CellInfo.UNAVAILABLE; mLatitude = CellInfo.UNAVAILABLE; mGlobalCellId = null; } else { mNetworkId = inRangeOrUnavailable(nid, 0, NETWORK_ID_MAX); mSystemId = inRangeOrUnavailable(sid, 0, SYSTEM_ID_MAX); mBasestationId = inRangeOrUnavailable(bid, 0, BASESTATION_ID_MAX); lat = inRangeOrUnavailable(lat, LATITUDE_MIN, LATITUDE_MAX); lon = inRangeOrUnavailable(lon, LONGITUDE_MIN, LONGITUDE_MAX); if (!isNullIsland(lat, lon)) { mLongitude = lon; mLatitude = lat; } else { mLongitude = mLatitude = CellInfo.UNAVAILABLE; } updateGlobalCellId(); } } private CellIdentityCdma(@NonNull CellIdentityCdma cid) { Loading Loading @@ -302,7 +284,6 @@ public final class CellIdentityCdma extends CellIdentity { private CellIdentityCdma(Parcel in) { super(TAG, CellInfo.TYPE_CDMA, in); if (Flags.cleanupCdma()) { in.readInt(); mNetworkId = CellInfo.UNAVAILABLE; Loading @@ -319,16 +300,6 @@ public final class CellIdentityCdma extends CellIdentity { mLatitude = CellInfo.UNAVAILABLE; mGlobalCellId = null; } else { mNetworkId = in.readInt(); mSystemId = in.readInt(); mBasestationId = in.readInt(); mLongitude = in.readInt(); mLatitude = in.readInt(); updateGlobalCellId(); if (DBG) log(toString()); } } /** Loading
telephony/java/android/telephony/CellSignalStrengthCdma.java +4 −29 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import android.os.Parcel; import android.os.Parcelable; import android.os.PersistableBundle; import com.android.internal.telephony.flags.Flags; import com.android.telephony.Rlog; import java.util.Objects; Loading Loading @@ -69,17 +68,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements */ public CellSignalStrengthCdma(int cdmaDbm, int cdmaEcio, int evdoDbm, int evdoEcio, int evdoSnr) { if (Flags.cleanupCdma()) { setDefaultValues(); } else { mCdmaDbm = inRangeOrUnavailable(cdmaDbm, -120, 0); mCdmaEcio = inRangeOrUnavailable(cdmaEcio, -160, 0); mEvdoDbm = inRangeOrUnavailable(evdoDbm, -120, 0); mEvdoEcio = inRangeOrUnavailable(evdoEcio, -160, 0); mEvdoSnr = inRangeOrUnavailable(evdoSnr, 0, 8); updateLevel(null, null); } } /** @hide */ Loading @@ -89,16 +78,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements /** @hide */ protected void copyFrom(CellSignalStrengthCdma s) { if (Flags.cleanupCdma()) { setDefaultValues(); return; } mCdmaDbm = s.mCdmaDbm; mCdmaEcio = s.mCdmaEcio; mEvdoDbm = s.mEvdoDbm; mEvdoEcio = s.mEvdoEcio; mEvdoSnr = s.mEvdoSnr; mLevel = s.mLevel; } /** @hide */ Loading Loading @@ -398,8 +378,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements /** @hide */ @Override public boolean isValid() { if (Flags.cleanupCdma()) return false; return !this.equals(sInvalid); return false; } @Override Loading Loading @@ -457,11 +436,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements mEvdoSnr = in.readInt(); mLevel = in.readInt(); if (Flags.cleanupCdma()) { setDefaultValues(); } else { if (DBG) log("CellSignalStrengthCdma(Parcel): " + toString()); } } /** Implement the Parcelable interface */ Loading
telephony/java/android/telephony/TelephonyManager.java +18 −219 Original line number Diff line number Diff line Loading @@ -2508,8 +2508,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getMeid() { if (Flags.cleanupCdma()) return null; return getMeid(getSlotIndex()); return null; } /** Loading Loading @@ -2553,24 +2552,8 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getMeid(int slotIndex) { if (Flags.cleanupCdma()) return null; ITelephony telephony = getITelephony(); if (telephony == null) return null; try { String meid = telephony.getMeidForSlot(slotIndex, getOpPackageName(), getAttributionTag()); if (TextUtils.isEmpty(meid)) { Log.d(TAG, "getMeid: return null because MEID is not available"); return null; } return meid; } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { return null; } } /** * Returns the Manufacturer Code from the MEID. Return null if Manufacturer Code is not Loading @@ -2584,8 +2567,7 @@ public class TelephonyManager { @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) @Nullable public String getManufacturerCode() { if (Flags.cleanupCdma()) return null; return getManufacturerCode(getSlotIndex()); return null; } /** Loading @@ -2602,17 +2584,7 @@ public class TelephonyManager { @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) @Nullable public String getManufacturerCode(int slotIndex) { if (Flags.cleanupCdma()) return null; ITelephony telephony = getITelephony(); if (telephony == null) return null; try { return telephony.getManufacturerCodeForSlot(slotIndex); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { return null; } } /** Loading Loading @@ -7009,8 +6981,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public @EriIconIndex int getCdmaEnhancedRoamingIndicatorDisplayNumber() { if (Flags.cleanupCdma()) return -1; return getCdmaEriIconIndex(getSubId()); return -1; } /** Loading @@ -7022,20 +6993,8 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @UnsupportedAppUsage public @EriIconIndex int getCdmaEriIconIndex(int subId) { if (Flags.cleanupCdma()) return -1; try { ITelephony telephony = getITelephony(); if (telephony == null) return -1; return telephony.getCdmaEriIconIndexForSubscriber(subId, getOpPackageName(), getAttributionTag()); } catch (RemoteException ex) { // the phone process is restarting. return -1; } catch (NullPointerException ex) { return -1; } } /** * Returns the CDMA ERI icon mode for a subscription. Loading @@ -7049,19 +7008,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @UnsupportedAppUsage public @EriIconMode int getCdmaEriIconMode(int subId) { if (Flags.cleanupCdma()) return -1; try { ITelephony telephony = getITelephony(); if (telephony == null) return -1; return telephony.getCdmaEriIconModeForSubscriber(subId, getOpPackageName(), getAttributionTag()); } catch (RemoteException ex) { // the phone process is restarting. return -1; } catch (NullPointerException ex) { return -1; } } /** Loading @@ -7073,8 +7020,7 @@ public class TelephonyManager { @Deprecated @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getCdmaEriText() { if (Flags.cleanupCdma()) return null; return getCdmaEriText(getSubId()); return null; } /** Loading @@ -7087,20 +7033,8 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @UnsupportedAppUsage public String getCdmaEriText(int subId) { if (Flags.cleanupCdma()) return null; try { ITelephony telephony = getITelephony(); if (telephony == null) return null; return telephony.getCdmaEriTextForSubscriber(subId, getOpPackageName(), getAttributionTag()); } catch (RemoteException ex) { // the phone process is restarting. return null; } catch (NullPointerException ex) { return null; } } // Suppressing AndroidFrameworkCompatChange because we're querying vendor // partition SDK level, not application's target SDK version. Loading Loading @@ -8369,16 +8303,6 @@ public class TelephonyManager { @Deprecated @UnsupportedAppUsage public String nvReadItem(int itemID) { if (Flags.cleanupCdma()) return ""; try { ITelephony telephony = getITelephony(); if (telephony != null) return telephony.nvReadItem(itemID); } catch (RemoteException ex) { Rlog.e(TAG, "nvReadItem RemoteException", ex); } catch (NullPointerException ex) { Rlog.e(TAG, "nvReadItem NPE", ex); } return ""; } Loading @@ -8399,16 +8323,6 @@ public class TelephonyManager { */ @Deprecated public boolean nvWriteItem(int itemID, String itemValue) { if (Flags.cleanupCdma()) return false; try { ITelephony telephony = getITelephony(); if (telephony != null) return telephony.nvWriteItem(itemID, itemValue); } catch (RemoteException ex) { Rlog.e(TAG, "nvWriteItem RemoteException", ex); } catch (NullPointerException ex) { Rlog.e(TAG, "nvWriteItem NPE", ex); } return false; } Loading @@ -8428,16 +8342,6 @@ public class TelephonyManager { */ @Deprecated public boolean nvWriteCdmaPrl(byte[] preferredRoamingList) { if (Flags.cleanupCdma()) return false; try { ITelephony telephony = getITelephony(); if (telephony != null) return telephony.nvWriteCdmaPrl(preferredRoamingList); } catch (RemoteException ex) { Rlog.e(TAG, "nvWriteCdmaPrl RemoteException", ex); } catch (NullPointerException ex) { Rlog.e(TAG, "nvWriteCdmaPrl NPE", ex); } return false; } Loading @@ -8462,11 +8366,9 @@ public class TelephonyManager { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @Deprecated public boolean nvResetConfig(int resetType) { if (Flags.cleanupCdma()) { if (resetType != 1) { // 1: reload NV reset (reboot modem) return false; } } try { ITelephony telephony = getITelephony(); if (telephony != null) { Loading Loading @@ -8506,19 +8408,6 @@ public class TelephonyManager { @SystemApi @RequiresFeature(PackageManager.FEATURE_TELEPHONY_RADIO_ACCESS) public boolean resetRadioConfig() { if (Flags.cleanupCdma()) { return false; } try { ITelephony telephony = getITelephony(); if (telephony != null) { return telephony.resetModemConfig(getSlotIndex()); } } catch (RemoteException ex) { Rlog.e(TAG, "resetRadioConfig RemoteException", ex); } catch (NullPointerException ex) { Rlog.e(TAG, "resetRadioConfig NPE", ex); } return false; } Loading Loading @@ -10871,8 +10760,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getCdmaMdn() { if (Flags.cleanupCdma()) return null; return getCdmaMdn(getSubId()); return null; } /** Loading @@ -10886,17 +10774,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getCdmaMdn(int subId) { if (Flags.cleanupCdma()) return null; try { ITelephony telephony = getITelephony(); if (telephony == null) return null; return telephony.getCdmaMdn(subId); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { return null; } } /** Loading @@ -10910,8 +10788,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getCdmaMin() { if (Flags.cleanupCdma()) return null; return getCdmaMin(getSubId()); return null; } /** Loading @@ -10925,17 +10802,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getCdmaMin(int subId) { if (Flags.cleanupCdma()) return null; try { ITelephony telephony = getITelephony(); if (telephony == null) return null; return telephony.getCdmaMin(subId); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { return null; } } /** Loading Loading @@ -12218,20 +12085,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public @CdmaRoamingMode int getCdmaRoamingMode() { if (Flags.cleanupCdma()) return CDMA_ROAMING_MODE_RADIO_DEFAULT; int mode = CDMA_ROAMING_MODE_RADIO_DEFAULT; try { ITelephony telephony = getITelephony(); if (telephony != null) { mode = telephony.getCdmaRoamingMode(getSubId()); } else { throw new IllegalStateException("telephony service is null."); } } catch (RemoteException ex) { Log.e(TAG, "Error calling ITelephony#getCdmaRoamingMode", ex); ex.rethrowFromSystemServer(); } return mode; return CDMA_ROAMING_MODE_RADIO_DEFAULT; } /** Loading Loading @@ -12265,22 +12119,6 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public void setCdmaRoamingMode(@CdmaRoamingMode int mode) { if (Flags.cleanupCdma()) return; if (getPhoneType() != PHONE_TYPE_CDMA) { throw new IllegalStateException("Phone does not support CDMA."); } try { ITelephony telephony = getITelephony(); if (telephony != null) { boolean result = telephony.setCdmaRoamingMode(getSubId(), mode); if (!result) throw new IllegalStateException("radio is unavailable."); } else { throw new IllegalStateException("telephony service is null."); } } catch (RemoteException ex) { Log.e(TAG, "Error calling ITelephony#setCdmaRoamingMode", ex); ex.rethrowFromSystemServer(); } } /** @hide Loading Loading @@ -12347,20 +12185,7 @@ public class TelephonyManager { @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public @CdmaSubscription int getCdmaSubscriptionMode() { if (Flags.cleanupCdma()) return CDMA_SUBSCRIPTION_UNKNOWN; int mode = CDMA_SUBSCRIPTION_RUIM_SIM; try { ITelephony telephony = getITelephony(); if (telephony != null) { mode = telephony.getCdmaSubscriptionMode(getSubId()); } else { throw new IllegalStateException("telephony service is null."); } } catch (RemoteException ex) { Log.e(TAG, "Error calling ITelephony#getCdmaSubscriptionMode", ex); ex.rethrowFromSystemServer(); } return mode; return CDMA_SUBSCRIPTION_UNKNOWN; } /** Loading Loading @@ -12390,22 +12215,6 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public void setCdmaSubscriptionMode(@CdmaSubscription int mode) { if (Flags.cleanupCdma()) return; if (getPhoneType() != PHONE_TYPE_CDMA) { throw new IllegalStateException("Phone does not support CDMA."); } try { ITelephony telephony = getITelephony(); if (telephony != null) { boolean result = telephony.setCdmaSubscriptionMode(getSubId(), mode); if (!result) throw new IllegalStateException("radio is unavailable."); } else { throw new IllegalStateException("telephony service is null."); } } catch (RemoteException ex) { Log.e(TAG, "Error calling ITelephony#setCdmaSubscriptionMode", ex); ex.rethrowFromSystemServer(); } } /** Loading Loading @@ -14117,8 +13926,7 @@ public class TelephonyManager { @SystemApi @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CDMA) public String getCdmaPrlVersion() { if (Flags.cleanupCdma()) return null; return getCdmaPrlVersion(getSubId()); return null; } /** Loading @@ -14133,15 +13941,6 @@ public class TelephonyManager { */ @Deprecated public String getCdmaPrlVersion(int subId) { if (Flags.cleanupCdma()) return null; try { ITelephony service = getITelephony(); if (service != null) { return service.getCdmaPrlVersion(subId); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelephony#getCdmaPrlVersion", e); } return null; }
telephony/java/com/android/internal/telephony/ITelephony.aidl +0 −186 Original line number Diff line number Diff line Loading @@ -411,69 +411,6 @@ interface ITelephony { */ int getActivePhoneTypeForSlot(int slotIndex); /** * Returns the CDMA ERI icon index to display * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaEriIconIndex(String callingPackage, String callingFeatureId); /** * Returns the CDMA ERI icon index to display on particular subId. * @param subId user preferred subId. * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaEriIconIndexForSubscriber(int subId, String callingPackage, String callingFeatureId); /** * Returns the CDMA ERI icon mode, * 0 - ON * 1 - FLASHING * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaEriIconMode(String callingPackage, String callingFeatureId); /** * Returns the CDMA ERI icon mode on particular subId, * 0 - ON * 1 - FLASHING * @param subId user preferred subId. * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaEriIconModeForSubscriber(int subId, String callingPackage, String callingFeatureId); /** * Returns the CDMA ERI text, * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ String getCdmaEriText(String callingPackage, String callingFeatureId); /** * Returns the CDMA ERI text for particular subId, * @param subId user preferred subId. * @param callingPackage package making the call. * @param callingFeatureId The feature in the package. * * @deprecated Legacy CDMA is unsupported. */ String getCdmaEriTextForSubscriber(int subId, String callingPackage, String callingFeatureId); /** * Returns true if OTA service provisioning needs to run. * Only relevant on some technologies, others will always Loading Loading @@ -784,40 +721,6 @@ interface ITelephony { */ String sendEnvelopeWithStatus(int subId, String content); /** * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. * Used for device configuration by some CDMA operators. * * @param itemID the ID of the item to read. * @return the NV item as a String, or null on any failure. * * @deprecated Legacy CDMA is unsupported. */ String nvReadItem(int itemID); /** * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. * Used for device configuration by some CDMA operators. * * @param itemID the ID of the item to read. * @param itemValue the value to write, as a String. * @return true on success; false on any failure. * * @deprecated Legacy CDMA is unsupported. */ boolean nvWriteItem(int itemID, String itemValue); /** * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. * Used for device configuration by some CDMA operators. * * @param preferredRoamingList byte array containing the new PRL. * @return true on success; false on any failure. * * @deprecated Legacy CDMA is unsupported. */ boolean nvWriteCdmaPrl(in byte[] preferredRoamingList); /** * Rollback modem configurations to factory default except some config which are in whitelist. * Used for device configuration by some CDMA operators. Loading Loading @@ -1057,22 +960,6 @@ interface ITelephony { */ void setImsRegistrationState(boolean registered); /** * Return MDN string for CDMA phone. * @param subId user preferred subId. * * @deprecated Legacy CDMA is unsupported. */ String getCdmaMdn(int subId); /** * Return MIN string for CDMA phone. * @param subId user preferred subId. * * @deprecated Legacy CDMA is unsupported. */ String getCdmaMin(int subId); /** * Request that the next incoming call from a number matching {@code range} be intercepted. * @param range The range of phone numbers the caller expects a phone call from. Loading Loading @@ -1364,24 +1251,6 @@ interface ITelephony { */ String getTypeAllocationCodeForSlot(int slotIndex); /** * Returns the MEID for the given slot. * * @param slotIndex - device slot. * @param callingPackage The package making the call. * @param callingFeatureId The feature in the package * <p>Requires Permission: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} */ String getMeidForSlot(int slotIndex, String callingPackage, String callingFeatureId); /** * Returns the Manufacturer Code from the MEID for the given slot. * * @param slotIndex - Which slot to retrieve the Manufacturer Code from. */ String getManufacturerCodeForSlot(int slotIndex); /** * Returns the device software version. * Loading Loading @@ -1517,17 +1386,6 @@ interface ITelephony { */ String getEsn(int subId); /** * Return the Preferred Roaming List Version * * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission * @param subId the subscription ID that this request applies to. * @return PRLVersion or null if error. * @hide * @deprecated Legacy CDMA is unsupported. */ String getCdmaPrlVersion(int subId); /** * Get snapshot of Telephony histograms * @return List of Telephony histograms Loading Loading @@ -1825,50 +1683,6 @@ interface ITelephony { */ void setDataRoamingEnabled(int subId, boolean isEnabled); /** * Gets the roaming mode for the CDMA phone with the subscription id {@code subId}. * * @param the subscription id. * @return the roaming mode for CDMA phone. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaRoamingMode(int subId); /** * Sets the roaming mode on the CDMA phone with the subscription {@code subId} to the given * roaming mode {@code mode}. * * @param subId the subscription id. * @param mode the roaming mode should be set. * @return {@code true} if successed. * * @deprecated Legacy CDMA is unsupported. */ boolean setCdmaRoamingMode(int subId, int mode); /** * Gets the subscription mode for the CDMA phone with the subscription id {@code subId}. * * @param the subscription id. * @return the subscription mode for CDMA phone. * * @deprecated Legacy CDMA is unsupported. */ int getCdmaSubscriptionMode(int subId); /** * Sets the subscription mode for CDMA phone with the subscription {@code subId} to the given * subscription mode {@code mode}. * * @param subId the subscription id. * @param mode the subscription mode should be set. * @return {@code true} if successed. * * @deprecated Legacy CDMA is unsupported. */ boolean setCdmaSubscriptionMode(int subId, int mode); /** * A test API to override carrier information including mccmnc, imsi, iccid, gid1, gid2, * plmn and spn. This would be handy for, eg, forcing a particular carrier id, carrier's config Loading