diff options
author | 2023-12-27 02:43:14 +0000 | |
---|---|---|
committer | 2023-12-27 04:16:01 +0000 | |
commit | 5791cd4bd9dd7f72e60c51072e67f1b0f7e9ced1 (patch) | |
tree | 8a92230429094a400afbaf0503e5bf171094a45c | |
parent | 89d2237e24cc7e458063c1d813affbf4e59a70f3 (diff) |
Prevent windows overlay on VPN dialog
This change addresses the issue of some applications using tapjack
attacks to trick users into disconnecting the VPN connection.
Bug: 182806691
Test: manually check that the VPN dialog is not being overlaid by
windows from the PoC application.
Change-Id: I03e600dec306af8b7d4c7ec024a5903f4591d9b4
-rw-r--r-- | packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java b/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java index 1fc74f704f62..67a7d121ea17 100644 --- a/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java +++ b/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java @@ -16,6 +16,8 @@ package com.android.vpndialogs; +import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; + import android.content.DialogInterface; import android.net.VpnManager; import android.os.Bundle; @@ -87,6 +89,7 @@ public class ManageDialog extends AlertActivity implements mAlertParams.mNegativeButtonListener = this; mAlertParams.mView = view; setupAlert(); + getWindow().addPrivateFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); if (mHandler == null) { mHandler = new Handler(this); |