summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-10-01 13:02:52 -0700
committerAmith Yamasani <yamasani@google.com>2013-10-01 13:45:58 -0700
commit540b659304079bead967aa2524abe59920dd260b (patch)
treeb417c25750a690b86a0c28f6c313ecf74670e31e
parent0e772b226801ca03292abad04677b1f7f29fade4 (diff)
downloadframeworks_base-540b659304079bead967aa2524abe59920dd260b.zip
frameworks_base-540b659304079bead967aa2524abe59920dd260b.tar.gz
frameworks_base-540b659304079bead967aa2524abe59920dd260b.tar.bz2
Use correct method for sparsearray lookup
Should fix the array index out of bounds. valueAt() is when we have the index, not the key. Bug: 11014210 Change-Id: Icb53fe763782befbd5de1b3df6630b87cda72e84
-rw-r--r--services/java/com/android/server/am/ActiveServices.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/am/ActiveServices.java b/services/java/com/android/server/am/ActiveServices.java
index fa1769f..8f4bf21 100644
--- a/services/java/com/android/server/am/ActiveServices.java
+++ b/services/java/com/android/server/am/ActiveServices.java
@@ -1839,7 +1839,7 @@ public final class ActiveServices {
}
}
} else {
- ServiceMap smap = mServiceMap.valueAt(userId);
+ ServiceMap smap = mServiceMap.get(userId);
if (smap != null) {
ArrayMap<ComponentName, ServiceRecord> items = smap.mServicesByName;
didSomething = collectForceStopServicesLocked(name, userId, evenPersistent,