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

Commit 3c191b8b authored by msnider's avatar msnider
Browse files

Introducing clear package data intent

Clear data Intent can be called from any application and
executes in the PackageInstaller. The user will be asked
to verify that they truly want to clear package data via
an AlertDialog.

This was initially intended to be @SystemApi, but
conversations with API-Review led to it be public.

Test: Covered by a gts-test ag/1806256 and manually tested
by calling from com.android.vending (Play Store).

bug: 33017941
bug: 31008483

Change-Id: Ibeae6620303ba52cc2ebf0383756c9380d3fa013
parent 5559543e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8860,6 +8860,7 @@ package android.content {
    field public static final java.lang.String ACTION_CALL_BUTTON = "android.intent.action.CALL_BUTTON";
    field public static final java.lang.String ACTION_CAMERA_BUTTON = "android.intent.action.CAMERA_BUTTON";
    field public static final java.lang.String ACTION_CHOOSER = "android.intent.action.CHOOSER";
    field public static final java.lang.String ACTION_CLEAR_PACKAGE = "android.intent.action.CLEAR_PACKAGE";
    field public static final java.lang.String ACTION_CLOSE_SYSTEM_DIALOGS = "android.intent.action.CLOSE_SYSTEM_DIALOGS";
    field public static final java.lang.String ACTION_CONFIGURATION_CHANGED = "android.intent.action.CONFIGURATION_CHANGED";
    field public static final java.lang.String ACTION_CREATE_DOCUMENT = "android.intent.action.CREATE_DOCUMENT";
+1 −0
Original line number Diff line number Diff line
@@ -9248,6 +9248,7 @@ package android.content {
    field public static final java.lang.String ACTION_CALL_BUTTON = "android.intent.action.CALL_BUTTON";
    field public static final java.lang.String ACTION_CAMERA_BUTTON = "android.intent.action.CAMERA_BUTTON";
    field public static final java.lang.String ACTION_CHOOSER = "android.intent.action.CHOOSER";
    field public static final java.lang.String ACTION_CLEAR_PACKAGE = "android.intent.action.CLEAR_PACKAGE";
    field public static final java.lang.String ACTION_CLOSE_SYSTEM_DIALOGS = "android.intent.action.CLOSE_SYSTEM_DIALOGS";
    field public static final java.lang.String ACTION_CONFIGURATION_CHANGED = "android.intent.action.CONFIGURATION_CHANGED";
    field public static final java.lang.String ACTION_CREATE_DOCUMENT = "android.intent.action.CREATE_DOCUMENT";
+1 −0
Original line number Diff line number Diff line
@@ -8885,6 +8885,7 @@ package android.content {
    field public static final java.lang.String ACTION_CALL_BUTTON = "android.intent.action.CALL_BUTTON";
    field public static final java.lang.String ACTION_CAMERA_BUTTON = "android.intent.action.CAMERA_BUTTON";
    field public static final java.lang.String ACTION_CHOOSER = "android.intent.action.CHOOSER";
    field public static final java.lang.String ACTION_CLEAR_PACKAGE = "android.intent.action.CLEAR_PACKAGE";
    field public static final java.lang.String ACTION_CLOSE_SYSTEM_DIALOGS = "android.intent.action.CLOSE_SYSTEM_DIALOGS";
    field public static final java.lang.String ACTION_CONFIGURATION_CHANGED = "android.intent.action.CONFIGURATION_CHANGED";
    field public static final java.lang.String ACTION_CREATE_DOCUMENT = "android.intent.action.CREATE_DOCUMENT";
+13 −0
Original line number Diff line number Diff line
@@ -1627,6 +1627,19 @@ public class Intent implements Parcelable, Cloneable {
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_UNINSTALL_PACKAGE = "android.intent.action.UNINSTALL_PACKAGE";

    /**
     * Activity Action: Launch application uninstaller.
     * <p>
     * Input: The data must be a package: URI whose scheme specific part is
     * the package name of the current installed package to be uninstalled.
     * You can optionally supply {@link #EXTRA_RETURN_RESULT}.
     * <p>
     * Output: Nothing.
     * </p>
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_CLEAR_PACKAGE = "android.intent.action.CLEAR_PACKAGE";

    /**
     * Specify whether the package should be uninstalled for all users.
     * @hide because these should not be part of normal application flow.