commit | c49fcef9075aaa37542facda196768331f659895 | [log] [tgz] |
---|---|---|
author | Jakub Pawlowski <jpawlowski@google.com> | Fri Jun 26 20:06:25 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Jun 26 20:06:25 2020 +0000 |
tree | 2a2624592f9d80729e5e4dd024f4fd43382a6520 | |
parent | 138dbb86cc2fceb7d2ec0c53f71d4ce39daa7b3f [diff] | |
parent | ba7f6d7d45776254791dea3b1f5d2acc0dc9b2dd [diff] |
Prevent overlay drawing on top of Bluetooth discovery request dialog am: ba7f6d7d45 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11986974 Change-Id: Ice5a98b7d2c10e9ee62ed20da7aa9213d18a4d8b
diff --git a/src/com/android/settings/bluetooth/RequestPermissionActivity.java b/src/com/android/settings/bluetooth/RequestPermissionActivity.java index d2e2060..7bc5c07 100644 --- a/src/com/android/settings/bluetooth/RequestPermissionActivity.java +++ b/src/com/android/settings/bluetooth/RequestPermissionActivity.java
@@ -37,6 +37,8 @@ import com.android.settingslib.bluetooth.LocalBluetoothAdapter; import com.android.settingslib.bluetooth.LocalBluetoothManager; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; + /** * RequestPermissionActivity asks the user whether to enable discovery. This is * usually started by an application wanted to start bluetooth and or discovery @@ -72,6 +74,8 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); + setResult(Activity.RESULT_CANCELED); // Note: initializes mLocalAdapter and returns true on error