Merge "Add a method to determine if a reboot is required to alter the modem config"

This commit is contained in:
Nazanin Bakhshi
2019-01-31 05:23:43 +00:00
committed by Gerrit Code Review
3 changed files with 31 additions and 0 deletions

View File

@@ -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;
}
}

View File

@@ -1840,4 +1840,8 @@ interface ITelephony {
* @hide
*/
int getNumOfActiveSims();
/**
* Get if reboot is required upon altering modems configurations
*/
boolean isRebootRequiredForModemConfigChange();
}

View File

@@ -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.
*/