Prevent overlay drawing on top of Bluetooth discovery request dialog am: ac67100423

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11484057

Change-Id: I473a3833214ce9dcee8679abbddd513145e2b26c
This commit is contained in:
Jakub Pawlowski
2020-08-04 08:20:38 +00:00
committed by Automerger Merge Worker

View File

@@ -37,6 +37,8 @@ import com.android.settingslib.bluetooth.BluetoothDiscoverableTimeoutReceiver;
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 @@ public class RequestPermissionActivity extends Activity implements
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