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

Commit 15cf976b 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

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

Change-Id: I9abdd46b7af650435bf07a0487d45468e0ded874
parents 29195855 6871807a
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);