commit | f96f52ea51e93215f2fec7c7e44200884439c489 | [log] [tgz] |
---|---|---|
author | Svetoslav <svetoslavganov@google.com> | Thu Sep 04 18:39:01 2014 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Sep 04 18:39:02 2014 +0000 |
tree | 3d905c448014b2747688f320ddafe824892af036 | |
parent | 18aa9f65fd27aa3d5322dd669b52c8cc1c4d9b5a [diff] | |
parent | 298a6c6b29798647b3d8f12d0723b1e49fc8b8da [diff] |
Merge "Fix collection iteration index." into lmp-dev
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java index 7f7e5c3..2ef806f 100644 --- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -1863,7 +1863,7 @@ private void deleteProviderLocked(Provider provider) { int N = provider.widgets.size(); - for (int i = 0; i < N; i++) { + for (int i = N - 1; i >= 0; i--) { Widget widget = provider.widgets.remove(i); // Call back with empty RemoteViews updateAppWidgetInstanceLocked(widget, null, false);