From 76b96fbb156111d9ece28436606c1e0290578dcf Mon Sep 17 00:00:00 2001 From: Azhara Assanova Date: Wed, 19 Mar 2025 07:18:08 -0700 Subject: [PATCH] Fix default window type for Advanced Protection dialog The previous window type FIRST_APPLICATION_WINDOW was incorrect and could have caused the dialog to be dimmed and TalkBack to not be focused. The current window type TYPE_APPLICATION fixes these issues by correctly placing the dialog in the window hierarchy. Bug: 404595933 Bug: 404439964 Bug: 353531691 Test: visual Test: checked with TalkBack Flag: EXEMPT bug fix Change-Id: I520220c1527868b6fc928eaa35184ba9b0159e06 --- .../security/ActionDisabledByAdvancedProtectionDialog.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/security/ActionDisabledByAdvancedProtectionDialog.kt b/src/com/android/settings/security/ActionDisabledByAdvancedProtectionDialog.kt index cf29c3d707e..0c96473b6d4 100644 --- a/src/com/android/settings/security/ActionDisabledByAdvancedProtectionDialog.kt +++ b/src/com/android/settings/security/ActionDisabledByAdvancedProtectionDialog.kt @@ -118,7 +118,7 @@ class ActionDisabledByAdvancedProtectionDialog : SpaDialogWindowTypeActivity() { } override fun getDialogWindowType(): Int? = if (intent.hasExtra(DIALOG_WINDOW_TYPE)) { - intent.getIntExtra(DIALOG_WINDOW_TYPE, WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW) + intent.getIntExtra(DIALOG_WINDOW_TYPE, WindowManager.LayoutParams.TYPE_APPLICATION) } else null private fun getIntentFeatureId(): Int {