diff options
author | linus_lee <llee@cyngn.com> | 2015-01-21 12:39:24 -0800 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-26 16:11:14 -0700 |
commit | cbcf45885f3e6848acef2b76c395455775e6874c (patch) | |
tree | f38344a171558fe42f9b01c28528872d0ae4ea69 /src/com/android/settings/profiles | |
parent | a7f6eb1a3752e472c115060cfe01812861d69501 (diff) | |
download | packages_apps_Settings-cbcf45885f3e6848acef2b76c395455775e6874c.zip packages_apps_Settings-cbcf45885f3e6848acef2b76c395455775e6874c.tar.gz packages_apps_Settings-cbcf45885f3e6848acef2b76c395455775e6874c.tar.bz2 |
Settings: Also disallow profile names with spaces
Change-Id: Ie7d79518b0a0e28a929b7bdad3e41319e485af33
Diffstat (limited to 'src/com/android/settings/profiles')
-rw-r--r-- | src/com/android/settings/profiles/SetupActionsFragment.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/settings/profiles/SetupActionsFragment.java b/src/com/android/settings/profiles/SetupActionsFragment.java index 7203b48..28ca71f 100644 --- a/src/com/android/settings/profiles/SetupActionsFragment.java +++ b/src/com/android/settings/profiles/SetupActionsFragment.java @@ -734,7 +734,9 @@ public class SetupActionsFragment extends SettingsPreferenceFragment @Override public void afterTextChanged(Editable s) { - final boolean empty = TextUtils.isEmpty(s.toString()); + final String str = s.toString(); + final boolean empty = TextUtils.isEmpty(str) + || TextUtils.getTrimmedLength(str) == 0; alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(!empty); } }); |