[WifiSettings] Submit Wi-Fi dialog with enter key

Add a OnKeyListener for hardware keyboards and an
OnEditorActionListener for on-screen IMEs to submit the Wi-Fi dialog
with the currently entered information.

Before committing the action, check for whether the dialog is
submittable -- that is checking whether all necessary information has
been entered. If not the enter key behaves the same as it is before
the change.

Bug: 22211604
Change-Id: Idede4233a7385d3bcd8fd6614948270280536bf1
This commit is contained in:
Maurice Lam
2015-08-27 16:06:55 -07:00
parent e3be8eb3e5
commit 2662df8433
5 changed files with 95 additions and 40 deletions

View File

@@ -29,6 +29,8 @@ public interface WifiConfigUiBase {
public LayoutInflater getLayoutInflater();
public boolean isEdit();
public void dispatchSubmit();
public void setTitle(int id);
public void setTitle(CharSequence title);