From e53bc444fd1ef726fc45ef1577691591e554b630 Mon Sep 17 00:00:00 2001 From: Hani Kazmi Date: Fri, 21 Mar 2025 09:41:03 -0700 Subject: [AAPM] Fix AAPM QS behavior. The bugs are caused by the interaction of three windows: 1. The notification shade 2. The WIfi QuickSetting Dialog 3. The AAPM Action Blocked dialog. Dismissing (1) and (2) resolves the listed bugs. The current `startActivity` method causes janky animation - explicitly dismissing the dialog first smoothes this out. Bug: 404595536, 404595701, 398892533 Test: Manually tested on device Flag: EXEMPT_BUGFIX Change-Id: I99533e54d65bb75f546c519d13f1107f1ede149e --- packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/SettingsLib') diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt index cca43b92ef19..84d61fc86073 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt @@ -501,6 +501,7 @@ open class WifiUtils { dialogWindowType: Int, onStartActivity: (intent: Intent) -> Unit, onAllowed: () -> Unit, + onStartAapmActivity: (intent: Intent) -> Unit = onStartActivity, ): Job = coroutineScope.launch { val wifiManager = context.getSystemService(WifiManager::class.java) ?: return@launch @@ -510,7 +511,7 @@ open class WifiUtils { AdvancedProtectionManager.FEATURE_ID_DISALLOW_WEP, AdvancedProtectionManager.SUPPORT_DIALOG_TYPE_BLOCKED_INTERACTION) intent.putExtra(DIALOG_WINDOW_TYPE, dialogWindowType) - withContext(Dispatchers.Main) { onStartActivity(intent) } + withContext(Dispatchers.Main) { onStartAapmActivity(intent) } } else if (wifiManager.isWepSupported == true && wifiManager.queryWepAllowed()) { withContext(Dispatchers.Main) { onAllowed() } } else { -- cgit v1.2.3-59-g8ed1b