diff options
author | Amith Yamasani <yamasani@google.com> | 2013-02-15 10:17:17 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-02-15 10:17:17 -0800 |
commit | 07d195ed2829317d0335049b0d9a84a3660877f9 (patch) | |
tree | bdec0a991e6a80674cf7f16f205916fbd27a0c65 /src/com/android/settings/Settings.java | |
parent | 595a8919228d51cdde11319b25d4c268638426eb (diff) | |
parent | 1ef6a106d50f6fce2e2a810075a55bb264fa5c23 (diff) | |
download | packages_apps_Settings-07d195ed2829317d0335049b0d9a84a3660877f9.zip packages_apps_Settings-07d195ed2829317d0335049b0d9a84a3660877f9.tar.gz packages_apps_Settings-07d195ed2829317d0335049b0d9a84a3660877f9.tar.bz2 |
am 1ef6a106: Merge "Fix Settings app crash after enabled multi-user"
* commit '1ef6a106d50f6fce2e2a810075a55bb264fa5c23':
Fix Settings app crash after enabled multi-user
Diffstat (limited to 'src/com/android/settings/Settings.java')
-rw-r--r-- | src/com/android/settings/Settings.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java index f3cceb8..24a7d59 100644 --- a/src/com/android/settings/Settings.java +++ b/src/com/android/settings/Settings.java @@ -450,14 +450,14 @@ public class Settings extends PreferenceActivity } } - if (target.get(i) == header + if (i < target.size() && target.get(i) == header && UserHandle.MU_ENABLED && UserHandle.myUserId() != 0 && !ArrayUtils.contains(SETTINGS_FOR_RESTRICTED, id)) { target.remove(i); } // Increment if the current one wasn't removed by the Utils code. - if (target.get(i) == header) { + if (i < target.size() && target.get(i) == header) { // Hold on to the first header, when we need to reset to the top-level if (mFirstHeader == null && HeaderAdapter.getHeaderType(header) != HeaderAdapter.HEADER_TYPE_CATEGORY) { |