Merge "Add a method to determine if a reboot is required to alter the modem config"
This commit is contained in:
@@ -10066,4 +10066,24 @@ public class TelephonyManager {
|
||||
Rlog.e(TAG, "switchMultiSimConfig RemoteException", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether reboot is required or not after making changes to modem configurations.
|
||||
* @Return {@code True} if reboot is required after making changes to modem configurations,
|
||||
* otherwise return {@code False}.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
|
||||
public boolean isRebootRequiredForModemConfigChange() {
|
||||
try {
|
||||
ITelephony service = getITelephony();
|
||||
if (service != null) {
|
||||
return service.isRebootRequiredForModemConfigChange();
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "isRebootRequiredForModemConfigChange RemoteException", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1840,4 +1840,8 @@ interface ITelephony {
|
||||
* @hide
|
||||
*/
|
||||
int getNumOfActiveSims();
|
||||
/**
|
||||
* Get if reboot is required upon altering modems configurations
|
||||
*/
|
||||
boolean isRebootRequiredForModemConfigChange();
|
||||
}
|
||||
|
||||
@@ -194,6 +194,13 @@ public interface TelephonyProperties
|
||||
*/
|
||||
static final String PROPERTY_MULTI_SIM_CONFIG = "persist.radio.multisim.config";
|
||||
|
||||
/**
|
||||
* 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";
|
||||
|
||||
/**
|
||||
* Property to store default subscription.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user