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

Commit 19478096 authored by Goven Liu's avatar Goven Liu Committed by Automerger Merge Worker
Browse files

Merge "[Wi-Fi] Request focus on input field when config a WiFi network" into rvc-dev am: 75d8ada0

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

Change-Id: If45a7ff167a2df5c9b490cced15dce18d8a737b5
parents 4af89f86 75d8ada0
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -113,8 +113,7 @@ public class ConfigureWifiEntryFragment extends InstrumentedFragment implements
        mSubmitBtn.setOnClickListener(view -> handleSubmitAction());
        mCancelBtn.setOnClickListener(view -> handleCancelAction());

        mUiController = new WifiConfigController2(this, rootView, mWifiEntry,
                getMode(), false /* requestFocus */);
        mUiController = new WifiConfigController2(this, rootView, mWifiEntry, getMode());

        /**
         * For this add WifiEntry UI, need to remove the Home button, so set related feature as
+2 −12
Original line number Diff line number Diff line
@@ -193,7 +193,6 @@ public class WifiConfigController2 implements TextWatcher,
    private ProxySettings mProxySettings = ProxySettings.UNASSIGNED;
    private ProxyInfo mHttpProxy = null;
    private StaticIpConfiguration mStaticIpConfiguration = null;
    private boolean mRequestFocus = true;

    private String[] mLevels;
    private int mMode;
@@ -208,17 +207,10 @@ public class WifiConfigController2 implements TextWatcher,

    public WifiConfigController2(WifiConfigUiBase2 parent, View view, WifiEntry wifiEntry,
            int mode) {
        this (parent, view, wifiEntry, mode, true /* requestFocus */);
    }

    public WifiConfigController2(WifiConfigUiBase2 parent, View view, WifiEntry wifiEntry,
            int mode, boolean requestFocus) {
        mConfigUi = parent;

        mView = view;
        mWifiEntry = wifiEntry;
        mContext = mConfigUi.getContext();
        mRequestFocus = requestFocus;

        // Init Wi-Fi manager
        mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
@@ -443,11 +435,9 @@ public class WifiConfigController2 implements TextWatcher,
            enableSubmitIfAppropriate();
        }

        // After done view show and hide, request focus from parameter.
        if (mRequestFocus) {
        // After done view show and hide, request focus
        mView.findViewById(R.id.l_wifidialog).requestFocus();
    }
    }

    @VisibleForTesting
    boolean isSplitSystemUser() {