diff options
author | Irfan Sheriff <isheriff@google.com> | 2012-06-04 10:21:11 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2012-06-04 10:22:43 -0700 |
commit | 15a279231fa938ae3f93fc932b8341aa80df70e0 (patch) | |
tree | 69cbc66828e6a75dc6972211c4c27d5f804666a8 /src | |
parent | 96e2a62a464c1c1d9866c6ab515ed2f78ab11a62 (diff) | |
download | packages_apps_settings-15a279231fa938ae3f93fc932b8341aa80df70e0.zip packages_apps_settings-15a279231fa938ae3f93fc932b8341aa80df70e0.tar.gz packages_apps_settings-15a279231fa938ae3f93fc932b8341aa80df70e0.tar.bz2 |
Fix crash when accessibility is on
Bug: 6600699
Change-Id: I9eb8b9871d1368bd7508873951d5719e1f2ba826
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/wifi/WifiConfigController.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java index 6bf4259..2598a0e 100644 --- a/src/com/android/settings/wifi/WifiConfigController.java +++ b/src/com/android/settings/wifi/WifiConfigController.java @@ -743,7 +743,9 @@ public class WifiConfigController implements TextWatcher, InputType.TYPE_CLASS_TEXT | (((CheckBox) view).isChecked() ? InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD : InputType.TYPE_TEXT_VARIATION_PASSWORD)); - ((EditText)mPasswordView).setSelection(pos); + if (pos >= 0) { + ((EditText)mPasswordView).setSelection(pos); + } } else if (view.getId() == R.id.wifi_advanced_togglebox) { if (((CheckBox) view).isChecked()) { mView.findViewById(R.id.wifi_advanced_fields).setVisibility(View.VISIBLE); |