fix array index out of bounds

we can't be removing items from the list while we're iterating
through them!

Test: Manual
Change-Id: I18c70aced01269e196adbf4aa538c42345d74a95
This commit is contained in:
Todd Kennedy
2017-01-31 12:49:28 -08:00
parent e73724c4f9
commit 7a12f9fa20

View File

@@ -469,7 +469,7 @@ class InstantAppRegistry {
return;
}
final int appCount = uninstalledAppStates.size();
for (int i = 0; i < appCount; i++) {
for (int i = appCount - 1; i >= 0; --i) {
UninstalledInstantAppState uninstalledAppState = uninstalledAppStates.get(i);
if (!criteria.test(uninstalledAppState)) {
continue;