summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/profiles
diff options
context:
space:
mode:
authorlinus_lee <llee@cyngn.com>2015-01-21 12:39:24 -0800
committerAdnan Begovic <adnan@cyngn.com>2015-10-26 16:11:14 -0700
commitcbcf45885f3e6848acef2b76c395455775e6874c (patch)
treef38344a171558fe42f9b01c28528872d0ae4ea69 /src/com/android/settings/profiles
parenta7f6eb1a3752e472c115060cfe01812861d69501 (diff)
downloadpackages_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.java4
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);
}
});