[WifiSettings] Add Wi-Fi dialog activity

Add a Wi-Fi dialog activity that can be started by setup wizard to
connect to a Wi-Fi access point.

Also refactored mEdit and mModify in WifiConfigController into an
int-enum mMode, with modes view, connect and modify. This is how the
new modes maps to the old flags:

MODE_VIEW     --  mEdit = false, mModify = *
MODE_CONNECT  --  mEdit = true, mModify = false
MODE_MODIFY   --  mEdit = true, mModify = true

Bug: 23426311
Change-Id: I8e2221fd3c42577068e07686dab245dd5888e0ae
This commit is contained in:
Maurice Lam
2015-09-08 10:36:43 -07:00
parent 2662df8433
commit 771fac591f
8 changed files with 187 additions and 53 deletions

View File

@@ -24,10 +24,26 @@ import android.widget.Button;
* Foundation interface glues between Activities and UIs like {@link WifiDialog}.
*/
public interface WifiConfigUiBase {
/**
* Viewing mode for a Wi-Fi access point. Data is displayed in non-editable mode.
*/
int MODE_VIEW = 0;
/**
* Connect mode. Data is displayed in editable mode, and a connect button will be shown.
*/
int MODE_CONNECT = 1;
/**
* Modify mode. All data is displayed in editable fields, and a "save" button is shown instead
* of "connect". Clients are expected to only save but not connect to the access point in this
* mode.
*/
int MODE_MODIFY = 2;
public Context getContext();
public WifiConfigController getController();
public LayoutInflater getLayoutInflater();
public boolean isEdit();
public int getMode();
public void dispatchSubmit();