From 43da1b89a3ce8a380309cfc6d2124563d05e1e92 Mon Sep 17 00:00:00 2001 From: Jay Thomas Sullivan Date: Thu, 15 Feb 2024 17:22:02 -0800 Subject: [ECM] Pass settingIdentifier to dialog In createRestrictedSettingDialogIntent, pass the provided settingIdentifier to the dialog intent. Fix: 323225971 Test: CtsPermissionUiTestCases:android.permissionui.cts.EnhancedConfirmationManagerTest Change-Id: I59efd6601f4254c0fe74b8430ac1f3b6c6d91b6e --- framework-s/java/android/app/ecm/EnhancedConfirmationManager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'framework-s') 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. * *

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; } -- cgit v1.2.3-59-g8ed1b