Loading api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -10775,6 +10775,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApnMetered(int); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApplicationOnUicc(int); method public boolean isCurrentSimOperator(@NonNull String, int, @Nullable String); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataAllowedInVoiceCall(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataConnectionEnabled(); method public boolean isDataConnectivityPossible(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataEnabledForApn(int); Loading Loading @@ -10811,6 +10812,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCdmaRoamingMode(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCdmaSubscriptionMode(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataActivationState(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setDataAllowedDuringVoiceCall(boolean); method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataEnabled(int, boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataRoamingEnabled(boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMultiSimCarrierRestriction(boolean); telephony/java/android/telephony/TelephonyManager.java +18 −5 Original line number Diff line number Diff line Loading @@ -12423,15 +12423,21 @@ public class TelephonyManager { } /** * Set allowing mobile data during voice call. * Set allowing mobile data during voice call. This is used for allowing data on the non-default * data SIM. When a voice call is placed on the non-default data SIM on DSDS devices, users will * not be able to use mobile data. By calling this API, data will be temporarily enabled on the * non-default data SIM during the life cycle of the voice call. * * @param allow {@code true} if allowing using data during voice call, {@code false} if * disallowed * disallowed. * * @return {@code false} if the setting is changed. * @return {@code true} if operation is successful. otherwise {@code false}. * * @throws SecurityException if the caller doesn't have the permission. * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setDataAllowedDuringVoiceCall(boolean allow) { try { Loading @@ -12440,6 +12446,7 @@ public class TelephonyManager { return service.setDataAllowedDuringVoiceCall(getSubId(), allow); } } catch (RemoteException ex) { // This could happen if binder process crashes. if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } Loading @@ -12448,13 +12455,18 @@ public class TelephonyManager { } /** * Check whether data is allowed during voice call. Note this is for dual sim device that * data might be disabled on non-default data subscription but explicitly turned on by settings. * Check whether data is allowed during voice call. This is used for allowing data on the * non-default data SIM. When a voice call is placed on the non-default data SIM on DSDS * devices, users will not be able to use mobile data. By calling this API, data will be * temporarily enabled on the non-default data SIM during the life cycle of the voice call. * * @return {@code true} if data is allowed during voice call. * * @throws SecurityException if the caller doesn't have the permission. * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataAllowedInVoiceCall() { try { Loading @@ -12463,6 +12475,7 @@ public class TelephonyManager { return service.isDataAllowedInVoiceCall(getSubId()); } } catch (RemoteException ex) { // This could happen if binder process crashes. if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } Loading Loading
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -10775,6 +10775,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApnMetered(int); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApplicationOnUicc(int); method public boolean isCurrentSimOperator(@NonNull String, int, @Nullable String); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataAllowedInVoiceCall(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataConnectionEnabled(); method public boolean isDataConnectivityPossible(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataEnabledForApn(int); Loading Loading @@ -10811,6 +10812,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCdmaRoamingMode(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCdmaSubscriptionMode(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataActivationState(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setDataAllowedDuringVoiceCall(boolean); method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataEnabled(int, boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataRoamingEnabled(boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMultiSimCarrierRestriction(boolean);
telephony/java/android/telephony/TelephonyManager.java +18 −5 Original line number Diff line number Diff line Loading @@ -12423,15 +12423,21 @@ public class TelephonyManager { } /** * Set allowing mobile data during voice call. * Set allowing mobile data during voice call. This is used for allowing data on the non-default * data SIM. When a voice call is placed on the non-default data SIM on DSDS devices, users will * not be able to use mobile data. By calling this API, data will be temporarily enabled on the * non-default data SIM during the life cycle of the voice call. * * @param allow {@code true} if allowing using data during voice call, {@code false} if * disallowed * disallowed. * * @return {@code false} if the setting is changed. * @return {@code true} if operation is successful. otherwise {@code false}. * * @throws SecurityException if the caller doesn't have the permission. * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setDataAllowedDuringVoiceCall(boolean allow) { try { Loading @@ -12440,6 +12446,7 @@ public class TelephonyManager { return service.setDataAllowedDuringVoiceCall(getSubId(), allow); } } catch (RemoteException ex) { // This could happen if binder process crashes. if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } Loading @@ -12448,13 +12455,18 @@ public class TelephonyManager { } /** * Check whether data is allowed during voice call. Note this is for dual sim device that * data might be disabled on non-default data subscription but explicitly turned on by settings. * Check whether data is allowed during voice call. This is used for allowing data on the * non-default data SIM. When a voice call is placed on the non-default data SIM on DSDS * devices, users will not be able to use mobile data. By calling this API, data will be * temporarily enabled on the non-default data SIM during the life cycle of the voice call. * * @return {@code true} if data is allowed during voice call. * * @throws SecurityException if the caller doesn't have the permission. * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataAllowedInVoiceCall() { try { Loading @@ -12463,6 +12475,7 @@ public class TelephonyManager { return service.isDataAllowedInVoiceCall(getSubId()); } } catch (RemoteException ex) { // This could happen if binder process crashes. if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } Loading