Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 7fc13838 authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-8.1.0_r80' into staging/lineage-15.1_merge-android-8.1.0_r80

Android 8.1.0 release 80

* tag 'android-8.1.0_r80':
  Prevent overlay drawing on top of Bluetooth discovery request dialog
  Prevent overlay drawing on top of Bluetooth pairing dialog

Change-Id: Ic1604eb1fa044875dd74b1ffe725735b5aa4359a
parents cdd85984 ee926b65
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -26,6 +26,8 @@ import android.content.IntentFilter;
import android.os.Bundle;
import android.os.Bundle;
import android.support.annotation.VisibleForTesting;
import android.support.annotation.VisibleForTesting;


import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;

/**
/**
 * BluetoothPairingDialog asks the user to enter a PIN / Passkey / simple confirmation
 * BluetoothPairingDialog asks the user to enter a PIN / Passkey / simple confirmation
 * for pairing with a remote Bluetooth device. It is an activity that appears as a dialog.
 * for pairing with a remote Bluetooth device. It is an activity that appears as a dialog.
@@ -63,6 +65,8 @@ public class BluetoothPairingDialog extends Activity {
    @Override
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.onCreate(savedInstanceState);

        getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
        Intent intent = getIntent();
        Intent intent = getIntent();
        mBluetoothPairingController = new BluetoothPairingController(intent, this);
        mBluetoothPairingController = new BluetoothPairingController(intent, this);
        // build the dialog fragment
        // build the dialog fragment
+4 −0
Original line number Original line Diff line number Diff line
@@ -37,6 +37,8 @@ import com.android.settingslib.bluetooth.BluetoothDiscoverableTimeoutReceiver;
import com.android.settingslib.bluetooth.LocalBluetoothAdapter;
import com.android.settingslib.bluetooth.LocalBluetoothAdapter;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
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
 * RequestPermissionActivity asks the user whether to enable discovery. This is
 * usually started by an application wanted to start bluetooth and or discovery
 * 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) {
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.onCreate(savedInstanceState);


        getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        setResult(Activity.RESULT_CANCELED);
        setResult(Activity.RESULT_CANCELED);


        // Note: initializes mLocalAdapter and returns true on error
        // Note: initializes mLocalAdapter and returns true on error