Merge changes Ia8ce6cfa,I1acdfb09 into sc-qpr1-dev

* changes:
  Remove some attributes to move the dialog window up
  Set the attribute of the dialog window for overlay QS internet panel
This commit is contained in:
Zoey Chen
2021-08-24 02:47:23 +00:00
committed by Android (Google) Code Review

View File

@@ -21,6 +21,8 @@ import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
@@ -108,6 +110,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 +130,13 @@ 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);
window.setAttributes(lp);
}
@Override
protected void onStart() {
final ImageButton ssidScannerButton = findViewById(R.id.ssid_scanner_button);