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

Commit 1953ea49 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "SDK API doesSwitchModemConfigTriggerReboot"

parents c55eedf2 29e8b772
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -43080,6 +43080,7 @@ package android.telephony {
    method public boolean canChangeDtmfToneLength();
    method public boolean canChangeDtmfToneLength();
    method @Nullable public android.telephony.TelephonyManager createForPhoneAccountHandle(android.telecom.PhoneAccountHandle);
    method @Nullable public android.telephony.TelephonyManager createForPhoneAccountHandle(android.telecom.PhoneAccountHandle);
    method public android.telephony.TelephonyManager createForSubscriptionId(int);
    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 @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public java.util.List<android.telephony.CellInfo> getAllCellInfo();
    method public int getCallState();
    method public int getCallState();
    method public int getCardIdForDefaultEuicc();
    method public int getCardIdForDefaultEuicc();
+0 −1
Original line number Original line Diff line number Diff line
@@ -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 @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 @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 @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 @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 @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);
    method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle);
+13 −9
Original line number Original line Diff line number Diff line
@@ -10926,24 +10926,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
     * The modem configuration change refers to switching from single SIM configuration to DSDS
     * or the other way around.
     * 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(Manifest.permission.READ_PHONE_STATE)
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    public boolean doesSwitchMultiSimConfigTriggerReboot() {
    public boolean isRebootRequiredForModemConfigChange() {
        try {
        try {
            ITelephony service = getITelephony();
            ITelephony service = getITelephony();
            if (service != null) {
            if (service != null) {
                return service.isRebootRequiredForModemConfigChange();
                return service.doesSwitchMultiSimConfigTriggerReboot(getSubId(),
                        getOpPackageName());
            }
            }
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            Log.e(TAG, "isRebootRequiredForModemConfigChange RemoteException", e);
            Log.e(TAG, "doesSwitchMultiSimConfigTriggerReboot RemoteException", e);
        }
        }
        return false;
        return false;
    }
    }
+2 −2
Original line number Original line Diff line number Diff line
@@ -1983,10 +1983,10 @@ interface ITelephony {
    void switchMultiSimConfig(int numOfSims);
    void switchMultiSimConfig(int numOfSims);


    /**
    /**
     * Get if reboot is required upon altering modems configurations
     * Get if altering modems configurations will trigger reboot.
     * @hide
     * @hide
     */
     */
    boolean isRebootRequiredForModemConfigChange();
    boolean doesSwitchMultiSimConfigTriggerReboot(int subId, String callingPackage);


    /**
    /**
     * Get the mapping from logical slots to physical slots.
     * Get the mapping from logical slots to physical slots.