summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Azhara Assanova <azharaa@google.com> 2025-02-26 21:27:22 +0000
committer Azhara Assanova <azharaa@google.com> 2025-03-04 11:48:21 +0000
commit3795e1e38caa94e0efd1dd80ebcc4b7596b55a00 (patch)
tree54f18e815228501c9bd2c944f80355c8a43dcf2f
parent1c72035d02f77e57043dd8585d4bc2c3bebd298e (diff)
Fix displaying advanced protection dialog on top of the Wi-Fi quick tile
Fixes an issue where the advanced protection dialog was missing when connecting to a WEP network via the Wi-Fi quick tile with advanced protection enabled. The fix involves making the advanced protection Intent explicit to the Settings package, and adjusting the window type of the dialog to show on top of the WEP quick tile, similar to the WEP dialog. Bug: 389081238 Test: Visual test Flag: EXEMPT bug fix Change-Id: Ie6f60c88d65e08e4a0b51bfa04a179fa965b27b1
-rw-r--r--core/java/android/security/advancedprotection/AdvancedProtectionManager.java2
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt1
2 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/security/advancedprotection/AdvancedProtectionManager.java b/core/java/android/security/advancedprotection/AdvancedProtectionManager.java
index 770e234381c4..0b2239aa42b2 100644
--- a/core/java/android/security/advancedprotection/AdvancedProtectionManager.java
+++ b/core/java/android/security/advancedprotection/AdvancedProtectionManager.java
@@ -57,6 +57,7 @@ import java.util.concurrent.Executor;
@SystemService(Context.ADVANCED_PROTECTION_SERVICE)
public final class AdvancedProtectionManager {
private static final String TAG = "AdvancedProtectionMgr";
+ private static final String PKG_SETTINGS = "com.android.settings";
//TODO(b/378931989): Switch to android.app.admin.DevicePolicyIdentifiers.MEMORY_TAGGING_POLICY
//when the appropriate flag is launched.
@@ -343,6 +344,7 @@ public final class AdvancedProtectionManager {
}
Intent intent = new Intent(ACTION_SHOW_ADVANCED_PROTECTION_SUPPORT_DIALOG);
+ intent.setPackage(PKG_SETTINGS);
intent.setFlags(FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(EXTRA_SUPPORT_DIALOG_FEATURE, featureId);
intent.putExtra(EXTRA_SUPPORT_DIALOG_TYPE, type);
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt
index 88bccc9f6ebd..2ed437c94439 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt
@@ -509,6 +509,7 @@ open class WifiUtils {
val intent = AdvancedProtectionManager.createSupportIntent(
AdvancedProtectionManager.FEATURE_ID_DISALLOW_WEP,
AdvancedProtectionManager.SUPPORT_DIALOG_TYPE_BLOCKED_INTERACTION)
+ intent.putExtra(DIALOG_WINDOW_TYPE, dialogWindowType)
onStartActivity(intent)
} else if (wifiManager.isWepSupported == true && wifiManager.queryWepAllowed()) {
onAllowed()