Add settings intent dialog (framework)
Add a dialog that can be launched via
an intent to prompt the user to enable
the provider for credman.
Test: make & atest & manual
Bug: 267816998
Change-Id: I5a07070a7e9e4110240186c05ae0ef74f7abdbd2
diff --git a/core/api/current.txt b/core/api/current.txt
index facb4b2..bc3055c 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -37071,6 +37071,7 @@
field public static final String ACTION_CAST_SETTINGS = "android.settings.CAST_SETTINGS";
field public static final String ACTION_CHANNEL_NOTIFICATION_SETTINGS = "android.settings.CHANNEL_NOTIFICATION_SETTINGS";
field public static final String ACTION_CONDITION_PROVIDER_SETTINGS = "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS";
+ field public static final String ACTION_CREDENTIAL_PROVIDER = "android.settings.CREDENTIAL_PROVIDER";
field public static final String ACTION_DATA_ROAMING_SETTINGS = "android.settings.DATA_ROAMING_SETTINGS";
field public static final String ACTION_DATA_USAGE_SETTINGS = "android.settings.DATA_USAGE_SETTINGS";
field public static final String ACTION_DATE_SETTINGS = "android.settings.DATE_SETTINGS";
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 01778f7..f8faafd 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -2428,6 +2428,24 @@
"android.settings.REQUEST_SET_AUTOFILL_SERVICE";
/**
+ * Activity Action: Show screen that let user enable a Credential Manager provider.
+ * <p>
+ * Input: Intent's data URI set with an application name, using the
+ * "package" schema (like "package:com.my.app").
+ *
+ * <p>
+ * Output: {@link android.app.Activity#RESULT_OK} if user selected a provider belonging
+ * to the caller package.
+ * <p>
+ * <b>NOTE: </b> Applications should call
+ * {@link android.credentials.CredentialManager#isEnabledCredentialProviderService()}
+ * and only use this action to start an activity if they return {@code false}.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_CREDENTIAL_PROVIDER =
+ "android.settings.CREDENTIAL_PROVIDER";
+
+ /**
* Activity Action: Show screen for controlling the Quick Access Wallet.
* <p>
* In some cases, a matching Activity may not exist, so ensure you