summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author chen xu <fionaxu@google.com> 2019-04-02 23:40:14 -0700
committer Chen Xu <fionaxu@google.com> 2019-08-05 14:56:55 -0700
commit29e8b772d46b0df5e2c5c23f9fc8842f11fdf6d7 (patch)
tree540453dfb99a62bdea0f7feb482f5111d19dc7ef
parent434e4fdfdb49bbe4d9c15e13eddf9ee3b6ddf95a (diff)
SDK API doesSwitchModemConfigTriggerReboot
Bug: 129424775 Change-Id: If03e376ad0e91ad69f8444567700ed3fe76d66f6 Merged-in: If03e376ad0e91ad69f8444567700ed3fe76d66f6
-rwxr-xr-xapi/current.txt1
-rw-r--r--api/system-current.txt1
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java22
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl4
4 files changed, 16 insertions, 12 deletions
diff --git a/api/current.txt b/api/current.txt
index b22c949f8715..6a1069da0f61 100755
--- a/api/current.txt
+++ b/api/current.txt
@@ -43039,6 +43039,7 @@ package android.telephony {
method public boolean canChangeDtmfToneLength();
method @Nullable public android.telephony.TelephonyManager createForPhoneAccountHandle(android.telecom.PhoneAccountHandle);
method public android.telephony.TelephonyManager createForSubscriptionId(int);
+ method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean doesSwitchMultiSimConfigTriggerReboot();
method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public java.util.List<android.telephony.CellInfo> getAllCellInfo();
method public int getCallState();
method public int getCardIdForDefaultEuicc();
diff --git a/api/system-current.txt b/api/system-current.txt
index 593b45db5809..00026bbbdd99 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -6353,7 +6353,6 @@ package android.telephony {
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isOffhook();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isPotentialEmergencyNumber(@NonNull String);
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();
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging();
method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isVideoCallingEnabled();
method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle);
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index fe812151489b..c3b906b9893c 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -10922,24 +10922,28 @@ public class TelephonyManager {
}
/**
- * Get whether reboot is required or not after making changes to modem configurations.
+ * Get whether making changes to modem configurations by {@link #switchMultiSimConfig(int)} will
+ * trigger device reboot.
* The modem configuration change refers to switching from single SIM configuration to DSDS
* or the other way around.
- * @Return {@code true} if reboot is required after making changes to modem configurations,
- * otherwise return {@code false}.
*
- * @hide
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} or that the
+ * calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
+ * @return {@code true} if reboot will be triggered after making changes to modem
+ * configurations, otherwise return {@code false}.
*/
- @SystemApi
- @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
- public boolean isRebootRequiredForModemConfigChange() {
+ @RequiresPermission(Manifest.permission.READ_PHONE_STATE)
+ public boolean doesSwitchMultiSimConfigTriggerReboot() {
try {
ITelephony service = getITelephony();
if (service != null) {
- return service.isRebootRequiredForModemConfigChange();
+ return service.doesSwitchMultiSimConfigTriggerReboot(getSubId(),
+ getOpPackageName());
}
} catch (RemoteException e) {
- Log.e(TAG, "isRebootRequiredForModemConfigChange RemoteException", e);
+ Log.e(TAG, "doesSwitchMultiSimConfigTriggerReboot RemoteException", e);
}
return false;
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index da80774e8ed0..06f35a7d925b 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1983,10 +1983,10 @@ interface ITelephony {
void switchMultiSimConfig(int numOfSims);
/**
- * Get if reboot is required upon altering modems configurations
+ * Get if altering modems configurations will trigger reboot.
* @hide
*/
- boolean isRebootRequiredForModemConfigChange();
+ boolean doesSwitchMultiSimConfigTriggerReboot(int subId, String callingPackage);
/**
* Get the mapping from logical slots to physical slots.