Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6111,6 +6111,7 @@ package android.telephony { method public void dial(String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean disableDataConnectivity(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean enableDataConnectivity(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean enableModemForSlot(int, boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void enableVideoCalling(boolean); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getAidForAppType(int); method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(int); Loading telephony/java/android/telephony/TelephonyManager.java +29 −0 Original line number Diff line number Diff line Loading @@ -9907,4 +9907,33 @@ public class TelephonyManager { } return ret; } /** * Enable or disable a logical modem stack. When a logical modem is disabled, the corresponding * SIM will still be visible to the user but its mapping modem will not have any radio activity. * For example, we will disable a modem when user or system believes the corresponding SIM * is temporarily not needed (e.g. out of coverage), and will enable it back on when needed. * * Requires that the calling app has permission * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}. * @param slotIndex which corresponding modem will operate on. * @param enable whether to enable or disable the modem stack. * @return whether the operation is successful. * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean enableModemForSlot(int slotIndex, boolean enable) { boolean ret = false; try { ITelephony telephony = getITelephony(); if (telephony != null) { ret = telephony.enableModemForSlot(slotIndex, enable); } } catch (RemoteException ex) { Log.e(TAG, "enableModem RemoteException", ex); } return ret; } } telephony/java/com/android/internal/telephony/ITelephony.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -1774,4 +1774,9 @@ interface ITelephony { * Set the String provisioning value for the provisioning key specified. */ int setImsProvisioningString(int subId, int key, String value); /** * Enable or disable a logical modem stack associated with the slotIndex. */ boolean enableModemForSlot(int slotIndex, boolean enable); } telephony/java/com/android/internal/telephony/RILConstants.java +1 −0 Original line number Diff line number Diff line Loading @@ -413,6 +413,7 @@ public interface RILConstants { int RIL_REQUEST_STOP_NETWORK_SCAN = 143; int RIL_REQUEST_START_KEEPALIVE = 144; int RIL_REQUEST_STOP_KEEPALIVE = 145; int RIL_REQUEST_ENABLE_MODEM = 146; /* The following requests are not defined in RIL.h */ int RIL_REQUEST_HAL_NON_RIL_BASE = 200; Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6111,6 +6111,7 @@ package android.telephony { method public void dial(String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean disableDataConnectivity(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean enableDataConnectivity(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean enableModemForSlot(int, boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void enableVideoCalling(boolean); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getAidForAppType(int); method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(int); Loading
telephony/java/android/telephony/TelephonyManager.java +29 −0 Original line number Diff line number Diff line Loading @@ -9907,4 +9907,33 @@ public class TelephonyManager { } return ret; } /** * Enable or disable a logical modem stack. When a logical modem is disabled, the corresponding * SIM will still be visible to the user but its mapping modem will not have any radio activity. * For example, we will disable a modem when user or system believes the corresponding SIM * is temporarily not needed (e.g. out of coverage), and will enable it back on when needed. * * Requires that the calling app has permission * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}. * @param slotIndex which corresponding modem will operate on. * @param enable whether to enable or disable the modem stack. * @return whether the operation is successful. * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean enableModemForSlot(int slotIndex, boolean enable) { boolean ret = false; try { ITelephony telephony = getITelephony(); if (telephony != null) { ret = telephony.enableModemForSlot(slotIndex, enable); } } catch (RemoteException ex) { Log.e(TAG, "enableModem RemoteException", ex); } return ret; } }
telephony/java/com/android/internal/telephony/ITelephony.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -1774,4 +1774,9 @@ interface ITelephony { * Set the String provisioning value for the provisioning key specified. */ int setImsProvisioningString(int subId, int key, String value); /** * Enable or disable a logical modem stack associated with the slotIndex. */ boolean enableModemForSlot(int slotIndex, boolean enable); }
telephony/java/com/android/internal/telephony/RILConstants.java +1 −0 Original line number Diff line number Diff line Loading @@ -413,6 +413,7 @@ public interface RILConstants { int RIL_REQUEST_STOP_NETWORK_SCAN = 143; int RIL_REQUEST_START_KEEPALIVE = 144; int RIL_REQUEST_STOP_KEEPALIVE = 145; int RIL_REQUEST_ENABLE_MODEM = 146; /* The following requests are not defined in RIL.h */ int RIL_REQUEST_HAL_NON_RIL_BASE = 200; Loading