Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -43089,6 +43089,7 @@ package android.telephony { method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean isDataEnabled(); method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isDataRoamingEnabled(); method public boolean isHearingAidCompatibilitySupported(); method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isMultisimSupported(); method public boolean isNetworkRoaming(); method public boolean isRttSupported(); method public boolean isSmsCapable(); api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -6369,7 +6369,6 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isCurrentPotentialEmergencyNumber(@NonNull String); method public boolean isDataConnectivityPossible(); method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isIdle(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isMultisimCarrierRestricted(); method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isOffhook(); method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRadioOn(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isRebootRequiredForModemConfigChange(); Loading telephony/java/android/telephony/TelephonyManager.java +12 −11 Original line number Diff line number Diff line Loading @@ -10219,24 +10219,25 @@ public class TelephonyManager { /** * Returns if the usage of multiple SIM cards at the same time to register on the network * (e.g. Dual Standby or Dual Active) is restricted. * (e.g. Dual Standby or Dual Active) is supported by the device and by the carrier. * * @return true if usage of multiple SIMs is restricted, false otherwise. * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}). * * @hide * @return true if usage of multiple SIMs is supported, false otherwise. */ @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isMultisimCarrierRestricted() { @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isMultisimSupported() { try { ITelephony service = getITelephony(); if (service != null) { return service.isMultisimCarrierRestricted(); return service.isMultisimSupported(getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "isMultisimCarrierRestricted RemoteException", e); Log.e(TAG, "isMultisimSupported RemoteException", e); } return true; return false; } /** Loading Loading @@ -10272,8 +10273,8 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void switchMultiSimConfig(int numOfSims) { //only proceed if multi-sim is not restricted if (isMultisimCarrierRestricted()) { Rlog.e(TAG, "switchMultiSimConfig not possible. It is restricted."); if (!isMultisimSupported()) { Rlog.e(TAG, "switchMultiSimConfig not possible. It is restricted or not supported."); return; } Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +5 −3 Original line number Diff line number Diff line Loading @@ -1826,10 +1826,12 @@ interface ITelephony { void setMultisimCarrierRestriction(boolean isMultisimCarrierRestricted); /** * Returns if the usage of multiple SIM cards at the same time is restricted. * @hide * Returns if the usage of multiple SIM cards at the same time is supported. * * @param callingPackage The package making the call. * @return true if multisim is supported, false otherwise. */ boolean isMultisimCarrierRestricted(); boolean isMultisimSupported(String callingPackage); /** * Switch configs to enable multi-sim or switch back to single-sim Loading telephony/java/com/android/internal/telephony/TelephonyProperties.java +3 −4 Original line number Diff line number Diff line Loading @@ -198,8 +198,7 @@ public interface TelephonyProperties * Property to indicate if reboot is required when changing modems configurations * Type: String(true, false) default is false; most devices don't need reboot */ String PROPERTY_REBOOT_REQUIRED_ON_MODEM_CHANGE = "persist.radio.reboot_on_modem_change"; String PROPERTY_REBOOT_REQUIRED_ON_MODEM_CHANGE = "persist.radio.reboot_on_modem_change"; /** * Property to store default subscription. Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -43089,6 +43089,7 @@ package android.telephony { method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean isDataEnabled(); method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isDataRoamingEnabled(); method public boolean isHearingAidCompatibilitySupported(); method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isMultisimSupported(); method public boolean isNetworkRoaming(); method public boolean isRttSupported(); method public boolean isSmsCapable();
api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -6369,7 +6369,6 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isCurrentPotentialEmergencyNumber(@NonNull String); method public boolean isDataConnectivityPossible(); method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isIdle(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isMultisimCarrierRestricted(); method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isOffhook(); method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRadioOn(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isRebootRequiredForModemConfigChange(); Loading
telephony/java/android/telephony/TelephonyManager.java +12 −11 Original line number Diff line number Diff line Loading @@ -10219,24 +10219,25 @@ public class TelephonyManager { /** * Returns if the usage of multiple SIM cards at the same time to register on the network * (e.g. Dual Standby or Dual Active) is restricted. * (e.g. Dual Standby or Dual Active) is supported by the device and by the carrier. * * @return true if usage of multiple SIMs is restricted, false otherwise. * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}). * * @hide * @return true if usage of multiple SIMs is supported, false otherwise. */ @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isMultisimCarrierRestricted() { @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isMultisimSupported() { try { ITelephony service = getITelephony(); if (service != null) { return service.isMultisimCarrierRestricted(); return service.isMultisimSupported(getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "isMultisimCarrierRestricted RemoteException", e); Log.e(TAG, "isMultisimSupported RemoteException", e); } return true; return false; } /** Loading Loading @@ -10272,8 +10273,8 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void switchMultiSimConfig(int numOfSims) { //only proceed if multi-sim is not restricted if (isMultisimCarrierRestricted()) { Rlog.e(TAG, "switchMultiSimConfig not possible. It is restricted."); if (!isMultisimSupported()) { Rlog.e(TAG, "switchMultiSimConfig not possible. It is restricted or not supported."); return; } Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +5 −3 Original line number Diff line number Diff line Loading @@ -1826,10 +1826,12 @@ interface ITelephony { void setMultisimCarrierRestriction(boolean isMultisimCarrierRestricted); /** * Returns if the usage of multiple SIM cards at the same time is restricted. * @hide * Returns if the usage of multiple SIM cards at the same time is supported. * * @param callingPackage The package making the call. * @return true if multisim is supported, false otherwise. */ boolean isMultisimCarrierRestricted(); boolean isMultisimSupported(String callingPackage); /** * Switch configs to enable multi-sim or switch back to single-sim Loading
telephony/java/com/android/internal/telephony/TelephonyProperties.java +3 −4 Original line number Diff line number Diff line Loading @@ -198,8 +198,7 @@ public interface TelephonyProperties * Property to indicate if reboot is required when changing modems configurations * Type: String(true, false) default is false; most devices don't need reboot */ String PROPERTY_REBOOT_REQUIRED_ON_MODEM_CHANGE = "persist.radio.reboot_on_modem_change"; String PROPERTY_REBOOT_REQUIRED_ON_MODEM_CHANGE = "persist.radio.reboot_on_modem_change"; /** * Property to store default subscription. Loading