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

Commit 95f566be authored by changbetty's avatar changbetty Committed by Automerger Merge Worker
Browse files

Set the attribute of the dialog window for overlay QS internet panel am: 6871807a am: 17f06cc0

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

Change-Id: I622330aa4b5448d6f3165a388ca6a7cee1c2ca1b
parents 4af312f3 17f06cc0
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -21,6 +21,9 @@ import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
@@ -108,6 +111,8 @@ public class WifiDialog2 extends AlertDialog implements WifiConfigUiBase2,

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setWindowsOverlay();

        mView = getLayoutInflater().inflate(R.layout.wifi_dialog, /* root */ null);
        setView(mView);
        mController = new WifiConfigController2(this, mView, mWifiEntry, mMode);
@@ -126,6 +131,16 @@ public class WifiDialog2 extends AlertDialog implements WifiConfigUiBase2,
        }
    }

    private void setWindowsOverlay() {
        final Window window = getWindow();
        final WindowManager.LayoutParams lp = window.getAttributes();
        window.setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
        lp.setFitInsetsTypes(WindowInsets.Type.statusBars() | WindowInsets.Type.navigationBars());
        lp.setFitInsetsSides(WindowInsets.Side.all());
        lp.setFitInsetsIgnoringVisibility(true);
        window.setAttributes(lp);
    }

    @Override
    protected void onStart() {
        final ImageButton ssidScannerButton = findViewById(R.id.ssid_scanner_button);