Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 215383a8 authored by Nazanin Bakhshi's avatar Nazanin Bakhshi Committed by android-build-merger
Browse files

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

am: 34839832

Change-Id: Ifd643a44abfbb8cd9eab47279d14ad46c26a5dbc
parents c9ada872 34839832
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -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;
    }
}
+4 −0
Original line number Diff line number Diff line
@@ -1840,4 +1840,8 @@ interface ITelephony {
     * @hide
     */
    int getNumOfActiveSims();
    /**
     * Get if reboot is required upon altering modems configurations
     */
    boolean isRebootRequiredForModemConfigChange();
}
+7 −0
Original line number Diff line number Diff line
@@ -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.
     */