Set the attribute of the dialog window for overlay QS internet panel
Bug: 190460969 Test: Manual test Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialog2Test Change-Id: I1acdfb09393163bb94824fe2b3bad0391ba4fb53
This commit is contained in:
@@ -21,6 +21,9 @@ import android.content.Context;
|
|||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowInsets;
|
||||||
|
import android.view.WindowManager;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -108,6 +111,8 @@ public class WifiDialog2 extends AlertDialog implements WifiConfigUiBase2,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
setWindowsOverlay();
|
||||||
|
|
||||||
mView = getLayoutInflater().inflate(R.layout.wifi_dialog, /* root */ null);
|
mView = getLayoutInflater().inflate(R.layout.wifi_dialog, /* root */ null);
|
||||||
setView(mView);
|
setView(mView);
|
||||||
mController = new WifiConfigController2(this, mView, mWifiEntry, mMode);
|
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
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
final ImageButton ssidScannerButton = findViewById(R.id.ssid_scanner_button);
|
final ImageButton ssidScannerButton = findViewById(R.id.ssid_scanner_button);
|
||||||
|
Reference in New Issue
Block a user