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

Commit 4d4097eb authored by rambowang's avatar rambowang Committed by Rambo Wang
Browse files

Introduce activity action to launch Reset mobile network settings

Reset mobile network settings is the activity in Settings app (or
other system apps) to launch the flow to reset mobile networks
to factory default states.

The action can launch the page with startActivity or
startActivityForResult on devices that support it.

Help center or troubleshooter applications can help end user
resolving cellular network issues by going through the reset
flow, usually as a last resort solution.

Launching the reset mobile settings with action has the same
restrictions as from other UI path (e.g. only for primary users)
and it keeps exactly the same reset flow.

Bug: 271921464
Test: atest TelephonyManagerTest
Test: Feature functionality test
Change-Id: I8cc9727a745e2bdce29ad5aca22af817196e4bb8
parent 6ef08d0c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45659,6 +45659,7 @@ package android.telephony {
    field public static final String ACTION_MULTI_SIM_CONFIG_CHANGED = "android.telephony.action.MULTI_SIM_CONFIG_CHANGED";
    field public static final String ACTION_NETWORK_COUNTRY_CHANGED = "android.telephony.action.NETWORK_COUNTRY_CHANGED";
    field @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public static final String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE";
    field @FlaggedApi("com.android.internal.telephony.flags.reset_mobile_network_settings") public static final String ACTION_RESET_MOBILE_NETWORK_SETTINGS = "android.telephony.action.RESET_MOBILE_NETWORK_SETTINGS";
    field public static final String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE";
    field public static final String ACTION_SECRET_CODE = "android.telephony.action.SECRET_CODE";
    field public static final String ACTION_SHOW_VOICEMAIL_NOTIFICATION = "android.telephony.action.SHOW_VOICEMAIL_NOTIFICATION";
+14 −0
Original line number Diff line number Diff line
@@ -2115,6 +2115,20 @@ public class TelephonyManager {
    public static final String ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE =
            "com.android.omadm.service.CONFIGURATION_UPDATE";
    /**
     * Activity action: Show setting to reset mobile networks.
     *
     * <p>On devices with a settings activity to reset mobile networks, the activity should be
     * launched without additional permissions.
     *
     * <p>On some devices, this settings activity may not exist. Callers should ensure that this
     * case is appropriately handled.
     */
    @FlaggedApi(Flags.FLAG_RESET_MOBILE_NETWORK_SETTINGS)
    @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_RESET_MOBILE_NETWORK_SETTINGS =
            "android.telephony.action.RESET_MOBILE_NETWORK_SETTINGS";
    //
    //
    // Device Info