summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/Settings.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-02-15 10:17:17 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-02-15 10:17:17 -0800
commit07d195ed2829317d0335049b0d9a84a3660877f9 (patch)
treebdec0a991e6a80674cf7f16f205916fbd27a0c65 /src/com/android/settings/Settings.java
parent595a8919228d51cdde11319b25d4c268638426eb (diff)
parent1ef6a106d50f6fce2e2a810075a55bb264fa5c23 (diff)
downloadpackages_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.java4
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) {