Tapjacking vulnerability when pairing Bluetooth devices with NFC
Bug: 180422108
Test: build ok
Change-Id: I169a83ff860b4f2062606f4dd15659f3b5813983
(cherry picked from commit 8afc24e296743c5c294444a14da20bc4c44dec6a)
diff --git a/src/com/android/nfc/handover/ConfirmConnectActivity.java b/src/com/android/nfc/handover/ConfirmConnectActivity.java
index c4ac8ab..5574469 100644
--- a/src/com/android/nfc/handover/ConfirmConnectActivity.java
+++ b/src/com/android/nfc/handover/ConfirmConnectActivity.java
@@ -16,6 +16,8 @@
package com.android.nfc.handover;
+import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+
import android.app.Activity;
import android.app.AlertDialog;
import android.bluetooth.BluetoothDevice;
@@ -35,6 +37,7 @@
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
AlertDialog.Builder builder = new AlertDialog.Builder(this,
R.style.DialogAlertDayNight);
Intent launchIntent = getIntent();