summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jay Sullivan <jaysullivan@google.com> 2024-02-16 03:42:31 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-02-16 03:42:31 +0000
commit26c2e73f56f187d253931e3320b889fd653e9da2 (patch)
tree6e55d98acb7741149a7b93c57f852c7cc8cb2428
parent7a67242be7924cf6a038e10ae04e5e74594f76dd (diff)
parent43da1b89a3ce8a380309cfc6d2124563d05e1e92 (diff)
Merge "[ECM] Pass settingIdentifier to dialog" into main
-rw-r--r--framework-s/java/android/app/ecm/EnhancedConfirmationManager.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java b/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java
index e304fc21e..1b7398251 100644
--- a/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java
+++ b/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java
@@ -330,13 +330,15 @@ public final class EnhancedConfirmationManager {
}
/**
- * Gets an intent that will open the "Restricted setting" dialog for the specified app.
+ * Gets an intent that will open the "Restricted setting" dialog for the specified package
+ * and setting.
*
* <p>The "Restricted setting" dialog is a dialog that informs the user that the operation
* they've attempted to perform is restricted, and provides them with a link explaining how to
* proceed.
*
- * @param packageName package name of the application to open the dialog for
+ * @param packageName package name of the restricted application
+ * @param settingIdentifier identifier of the restricted setting
* @throws NameNotFoundException if the provided package was not found
*/
public @NonNull Intent createRestrictedSettingDialogIntent(@NonNull String packageName,
@@ -344,6 +346,7 @@ public final class EnhancedConfirmationManager {
Intent intent = new Intent(Settings.ACTION_SHOW_RESTRICTED_SETTING_DIALOG);
intent.putExtra(Intent.EXTRA_PACKAGE_NAME, packageName);
intent.putExtra(Intent.EXTRA_UID, getPackageUid(packageName));
+ intent.putExtra(Intent.EXTRA_SUBJECT, settingIdentifier);
return intent;
}