[Wi-Fi] Add a new fragment for configuring a new AccessPoint network.
When configuring a new access point in Wi-Fi settings page, it's hard to figure out there are some other option items after you tapping the "Advanced options" button. To improve it, use full screen fragment to present the configuration items, so user can see as many items as possible. Bug: 31052996 Test: Mock this fragment and check each button status run as expected. Change-Id: I1c8e552fcabb1414bb500d918ed61287bf4aece2
This commit is contained in:
@@ -173,6 +173,7 @@ public class WifiConfigController 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;
|
||||
@@ -187,11 +188,17 @@ public class WifiConfigController implements TextWatcher,
|
||||
|
||||
public WifiConfigController(WifiConfigUiBase parent, View view, AccessPoint accessPoint,
|
||||
int mode) {
|
||||
this (parent, view, accessPoint, mode, true /* requestFocus */);
|
||||
}
|
||||
|
||||
public WifiConfigController(WifiConfigUiBase parent, View view, AccessPoint accessPoint,
|
||||
int mode, boolean requestFocus) {
|
||||
mConfigUi = parent;
|
||||
|
||||
mView = view;
|
||||
mAccessPoint = accessPoint;
|
||||
mContext = mConfigUi.getContext();
|
||||
mRequestFocus = requestFocus;
|
||||
|
||||
// Init Wi-Fi manager
|
||||
mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
|
||||
@@ -420,8 +427,10 @@ public class WifiConfigController implements TextWatcher,
|
||||
enableSubmitIfAppropriate();
|
||||
}
|
||||
|
||||
// After done view show and hide, request focus from parent view
|
||||
mView.findViewById(R.id.l_wifidialog).requestFocus();
|
||||
// After done view show and hide, request focus from parameter.
|
||||
if (mRequestFocus) {
|
||||
mView.findViewById(R.id.l_wifidialog).requestFocus();
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
Reference in New Issue
Block a user