packages/apps/Settings
Revisión | c21e5d604db3554c206a56325d2836a103dd87aa (tree) |
---|---|
Tiempo | 2020-07-01 08:11:07 |
Autor | Jakub Pawlowski <jpawlowski@goog...> |
Commiter | Anis Assi |
Prevent overlay drawing on top of Bluetooth discovery request dialog
Bug: 155650356
Change-Id: I9cee6e5bb8cef77aa385d664fe0738db1496ef20
Merged-In: I9cee6e5bb8cef77aa385d664fe0738db1496ef20
(cherry picked from commit ac671004231fb2ceb85f3101995e22dcc52c8088)
(cherry picked from commit ba7f6d7d45776254791dea3b1f5d2acc0dc9b2dd)
@@ -37,6 +37,8 @@ import com.android.settingslib.bluetooth.BluetoothDiscoverableTimeoutReceiver; | ||
37 | 37 | import com.android.settingslib.bluetooth.LocalBluetoothAdapter; |
38 | 38 | import com.android.settingslib.bluetooth.LocalBluetoothManager; |
39 | 39 | |
40 | +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; | |
41 | + | |
40 | 42 | /** |
41 | 43 | * RequestPermissionActivity asks the user whether to enable discovery. This is |
42 | 44 | * usually started by an application wanted to start bluetooth and or discovery |
@@ -72,6 +74,8 @@ public class RequestPermissionActivity extends Activity implements | ||
72 | 74 | protected void onCreate(Bundle savedInstanceState) { |
73 | 75 | super.onCreate(savedInstanceState); |
74 | 76 | |
77 | + getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); | |
78 | + | |
75 | 79 | setResult(Activity.RESULT_CANCELED); |
76 | 80 | |
77 | 81 | // Note: initializes mLocalAdapter and returns true on error |