Loading api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -9096,6 +9096,7 @@ package android.content { field public static final java.lang.String ACTION_EDIT = "android.intent.action.EDIT"; field public static final java.lang.String ACTION_EXTERNAL_APPLICATIONS_AVAILABLE = "android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE"; field public static final java.lang.String ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE = "android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE"; field public static final java.lang.String ACTION_FACTORY_RESET = "android.intent.action.FACTORY_RESET"; field public static final java.lang.String ACTION_FACTORY_TEST = "android.intent.action.FACTORY_TEST"; field public static final java.lang.String ACTION_GET_CONTENT = "android.intent.action.GET_CONTENT"; field public static final java.lang.String ACTION_GET_RESTRICTION_ENTRIES = "android.intent.action.GET_RESTRICTION_ENTRIES"; Loading Loading @@ -9259,6 +9260,7 @@ package android.content { field public static final java.lang.String EXTRA_DONT_KILL_APP = "android.intent.extra.DONT_KILL_APP"; field public static final java.lang.String EXTRA_EMAIL = "android.intent.extra.EMAIL"; field public static final java.lang.String EXTRA_EXCLUDE_COMPONENTS = "android.intent.extra.EXCLUDE_COMPONENTS"; field public static final java.lang.String EXTRA_FORCE_FACTORY_RESET = "android.intent.extra.FORCE_FACTORY_RESET"; field public static final java.lang.String EXTRA_HTML_TEXT = "android.intent.extra.HTML_TEXT"; field public static final java.lang.String EXTRA_INDEX = "android.intent.extra.INDEX"; field public static final java.lang.String EXTRA_INITIAL_INTENTS = "android.intent.extra.INITIAL_INTENTS"; core/java/android/content/Intent.java +39 −3 Original line number Diff line number Diff line Loading @@ -3226,17 +3226,53 @@ public class Intent implements Parcelable, Cloneable { public static final String ACTION_DYNAMIC_SENSOR_CHANGED = "android.intent.action.DYNAMIC_SENSOR_CHANGED"; /** {@hide} */ /** * Deprecated - use {@link #ACTION_FACTORY_RESET} instead. * * {@hide} */ @Deprecated public static final String ACTION_MASTER_CLEAR = "android.intent.action.MASTER_CLEAR"; /** * Boolean intent extra to be used with {@link ACTION_MASTER_CLEAR} in order to force a factory * reset even if {@link android.os.UserManager.DISALLOW_FACTORY_RESET} is set. * Boolean intent extra to be used with {@link #ACTION_MASTER_CLEAR} in order to force a factory * reset even if {@link android.os.UserManager#DISALLOW_FACTORY_RESET} is set. * * <p>Deprecated - use {@link #EXTRA_FORCE_FACTORY_RESET} instead. * * @hide */ @Deprecated public static final String EXTRA_FORCE_MASTER_CLEAR = "android.intent.extra.FORCE_MASTER_CLEAR"; /** * A broadcast action to trigger a factory reset. * * <p> The sender must hold the {@link android.Manifest.permission#MASTER_CLEAR} permission. * * <p>Not for use by third-party applications. * * @see #EXTRA_FORCE_MASTER_CLEAR * * {@hide} */ @SystemApi @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_FACTORY_RESET = "android.intent.action.FACTORY_RESET"; /** * Boolean intent extra to be used with {@link #ACTION_MASTER_CLEAR} in order to force a factory * reset even if {@link android.os.UserManager#DISALLOW_FACTORY_RESET} is set. * * <p>Not for use by third-party applications. * * @hide */ @SystemApi public static final String EXTRA_FORCE_FACTORY_RESET = "android.intent.extra.FORCE_FACTORY_RESET"; /** * Broadcast action: report that a settings element is being restored from backup. The intent * contains three extras: EXTRA_SETTING_NAME is a string naming the restored setting, Loading core/res/AndroidManifest.xml +4 −1 Original line number Diff line number Diff line Loading @@ -3393,7 +3393,10 @@ android:permission="android.permission.MASTER_CLEAR"> <intent-filter android:priority="100" > <!-- For Checkin, Settings, etc.: action=MASTER_CLEAR --> <!-- For Checkin, Settings, etc.: action=FACTORY_RESET --> <action android:name="android.intent.action.FACTORY_RESET" /> <!-- As above until all the references to the deprecated MASTER_CLEAR get updated to FACTORY_RESET. --> <action android:name="android.intent.action.MASTER_CLEAR" /> <!-- MCS always uses REMOTE_INTENT: category=MASTER_CLEAR --> Loading services/core/java/com/android/server/MasterClearReceiver.java +10 −1 Original line number Diff line number Diff line Loading @@ -42,12 +42,21 @@ public class MasterClearReceiver extends BroadcastReceiver { return; } } if (Intent.ACTION_MASTER_CLEAR.equals(intent.getAction())) { Slog.w(TAG, "The request uses the deprecated Intent#ACTION_MASTER_CLEAR, " + "Intent#ACTION_FACTORY_RESET should be used instead."); } if (intent.hasExtra(Intent.EXTRA_FORCE_MASTER_CLEAR)) { Slog.w(TAG, "The request uses the deprecated Intent#EXTRA_FORCE_MASTER_CLEAR, " + "Intent#EXTRA_FORCE_FACTORY_RESET should be used instead."); } final boolean shutdown = intent.getBooleanExtra("shutdown", false); final String reason = intent.getStringExtra(Intent.EXTRA_REASON); final boolean wipeExternalStorage = intent.getBooleanExtra( Intent.EXTRA_WIPE_EXTERNAL_STORAGE, false); final boolean forceWipe = intent.getBooleanExtra(Intent.EXTRA_FORCE_MASTER_CLEAR, false); final boolean forceWipe = intent.getBooleanExtra(Intent.EXTRA_FORCE_MASTER_CLEAR, false) || intent.getBooleanExtra(Intent.EXTRA_FORCE_FACTORY_RESET, false); Slog.w(TAG, "!!! FACTORY RESET !!!"); // The reboot call is blocking, so we need to do it on another thread. Loading services/core/java/com/android/server/am/ActivityManagerService.java +1 −0 Original line number Diff line number Diff line Loading @@ -17869,6 +17869,7 @@ public class ActivityManagerService extends IActivityManager.Stub || Intent.ACTION_MEDIA_SCANNER_SCAN_FILE.equals(action) || Intent.ACTION_SHOW_KEYBOARD_SHORTCUTS.equals(action) || Intent.ACTION_MASTER_CLEAR.equals(action) || Intent.ACTION_FACTORY_RESET.equals(action) || AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.equals(action) || AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action) || LocationManager.HIGH_POWER_REQUEST_CHANGE_ACTION.equals(action) Loading
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -9096,6 +9096,7 @@ package android.content { field public static final java.lang.String ACTION_EDIT = "android.intent.action.EDIT"; field public static final java.lang.String ACTION_EXTERNAL_APPLICATIONS_AVAILABLE = "android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE"; field public static final java.lang.String ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE = "android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE"; field public static final java.lang.String ACTION_FACTORY_RESET = "android.intent.action.FACTORY_RESET"; field public static final java.lang.String ACTION_FACTORY_TEST = "android.intent.action.FACTORY_TEST"; field public static final java.lang.String ACTION_GET_CONTENT = "android.intent.action.GET_CONTENT"; field public static final java.lang.String ACTION_GET_RESTRICTION_ENTRIES = "android.intent.action.GET_RESTRICTION_ENTRIES"; Loading Loading @@ -9259,6 +9260,7 @@ package android.content { field public static final java.lang.String EXTRA_DONT_KILL_APP = "android.intent.extra.DONT_KILL_APP"; field public static final java.lang.String EXTRA_EMAIL = "android.intent.extra.EMAIL"; field public static final java.lang.String EXTRA_EXCLUDE_COMPONENTS = "android.intent.extra.EXCLUDE_COMPONENTS"; field public static final java.lang.String EXTRA_FORCE_FACTORY_RESET = "android.intent.extra.FORCE_FACTORY_RESET"; field public static final java.lang.String EXTRA_HTML_TEXT = "android.intent.extra.HTML_TEXT"; field public static final java.lang.String EXTRA_INDEX = "android.intent.extra.INDEX"; field public static final java.lang.String EXTRA_INITIAL_INTENTS = "android.intent.extra.INITIAL_INTENTS";
core/java/android/content/Intent.java +39 −3 Original line number Diff line number Diff line Loading @@ -3226,17 +3226,53 @@ public class Intent implements Parcelable, Cloneable { public static final String ACTION_DYNAMIC_SENSOR_CHANGED = "android.intent.action.DYNAMIC_SENSOR_CHANGED"; /** {@hide} */ /** * Deprecated - use {@link #ACTION_FACTORY_RESET} instead. * * {@hide} */ @Deprecated public static final String ACTION_MASTER_CLEAR = "android.intent.action.MASTER_CLEAR"; /** * Boolean intent extra to be used with {@link ACTION_MASTER_CLEAR} in order to force a factory * reset even if {@link android.os.UserManager.DISALLOW_FACTORY_RESET} is set. * Boolean intent extra to be used with {@link #ACTION_MASTER_CLEAR} in order to force a factory * reset even if {@link android.os.UserManager#DISALLOW_FACTORY_RESET} is set. * * <p>Deprecated - use {@link #EXTRA_FORCE_FACTORY_RESET} instead. * * @hide */ @Deprecated public static final String EXTRA_FORCE_MASTER_CLEAR = "android.intent.extra.FORCE_MASTER_CLEAR"; /** * A broadcast action to trigger a factory reset. * * <p> The sender must hold the {@link android.Manifest.permission#MASTER_CLEAR} permission. * * <p>Not for use by third-party applications. * * @see #EXTRA_FORCE_MASTER_CLEAR * * {@hide} */ @SystemApi @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_FACTORY_RESET = "android.intent.action.FACTORY_RESET"; /** * Boolean intent extra to be used with {@link #ACTION_MASTER_CLEAR} in order to force a factory * reset even if {@link android.os.UserManager#DISALLOW_FACTORY_RESET} is set. * * <p>Not for use by third-party applications. * * @hide */ @SystemApi public static final String EXTRA_FORCE_FACTORY_RESET = "android.intent.extra.FORCE_FACTORY_RESET"; /** * Broadcast action: report that a settings element is being restored from backup. The intent * contains three extras: EXTRA_SETTING_NAME is a string naming the restored setting, Loading
core/res/AndroidManifest.xml +4 −1 Original line number Diff line number Diff line Loading @@ -3393,7 +3393,10 @@ android:permission="android.permission.MASTER_CLEAR"> <intent-filter android:priority="100" > <!-- For Checkin, Settings, etc.: action=MASTER_CLEAR --> <!-- For Checkin, Settings, etc.: action=FACTORY_RESET --> <action android:name="android.intent.action.FACTORY_RESET" /> <!-- As above until all the references to the deprecated MASTER_CLEAR get updated to FACTORY_RESET. --> <action android:name="android.intent.action.MASTER_CLEAR" /> <!-- MCS always uses REMOTE_INTENT: category=MASTER_CLEAR --> Loading
services/core/java/com/android/server/MasterClearReceiver.java +10 −1 Original line number Diff line number Diff line Loading @@ -42,12 +42,21 @@ public class MasterClearReceiver extends BroadcastReceiver { return; } } if (Intent.ACTION_MASTER_CLEAR.equals(intent.getAction())) { Slog.w(TAG, "The request uses the deprecated Intent#ACTION_MASTER_CLEAR, " + "Intent#ACTION_FACTORY_RESET should be used instead."); } if (intent.hasExtra(Intent.EXTRA_FORCE_MASTER_CLEAR)) { Slog.w(TAG, "The request uses the deprecated Intent#EXTRA_FORCE_MASTER_CLEAR, " + "Intent#EXTRA_FORCE_FACTORY_RESET should be used instead."); } final boolean shutdown = intent.getBooleanExtra("shutdown", false); final String reason = intent.getStringExtra(Intent.EXTRA_REASON); final boolean wipeExternalStorage = intent.getBooleanExtra( Intent.EXTRA_WIPE_EXTERNAL_STORAGE, false); final boolean forceWipe = intent.getBooleanExtra(Intent.EXTRA_FORCE_MASTER_CLEAR, false); final boolean forceWipe = intent.getBooleanExtra(Intent.EXTRA_FORCE_MASTER_CLEAR, false) || intent.getBooleanExtra(Intent.EXTRA_FORCE_FACTORY_RESET, false); Slog.w(TAG, "!!! FACTORY RESET !!!"); // The reboot call is blocking, so we need to do it on another thread. Loading
services/core/java/com/android/server/am/ActivityManagerService.java +1 −0 Original line number Diff line number Diff line Loading @@ -17869,6 +17869,7 @@ public class ActivityManagerService extends IActivityManager.Stub || Intent.ACTION_MEDIA_SCANNER_SCAN_FILE.equals(action) || Intent.ACTION_SHOW_KEYBOARD_SHORTCUTS.equals(action) || Intent.ACTION_MASTER_CLEAR.equals(action) || Intent.ACTION_FACTORY_RESET.equals(action) || AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.equals(action) || AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action) || LocationManager.HIGH_POWER_REQUEST_CHANGE_ACTION.equals(action)