Grant default permissions to the setup app robustly.
There is a zoo of components that handle the home intent and
have different priority. There is no reliable way to distinguish
the setup app from the other apps that handle home as some of
them have lower priority than the setup app and some higher.
This change adds a dedicated category to recognize the default
setup app.
Uncommented the code that grants accounts permissions as the
get_accounts permission is now a runtime permission and can be
granted.
bug:22471024
bug:22501463
Change-Id: I41726751fa2567cbcd7d09c7acfa7615b8aba577
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index c9f9b56..5571662 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -3094,6 +3094,13 @@
@SdkConstant(SdkConstantType.INTENT_CATEGORY)
public static final String CATEGORY_HOME = "android.intent.category.HOME";
/**
+ * This is the setup wizard activity, that is the first activity that is displayed
+ * when the user sets up the device for the first time.
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.INTENT_CATEGORY)
+ public static final String CATEGORY_SETUP_WIZARD = "android.intent.category.SETUP_WIZARD";
+ /**
* This activity is a preference panel.
*/
@SdkConstant(SdkConstantType.INTENT_CATEGORY)