Do not modify the children order while iterating the viewgroup
Bug: 69799241 Change-Id: I06a0a88aadc41cd93081a7de90e641283e79ec70
This commit is contained in:
1 parent
4018f3df14
commit
c7d808a424
1 file changed
+9
-9
@@ -3519,17 +3519,17 @@ public class Workspace extends PagedView
|
||||
|
||||
mRefreshPending = false;
|
||||
|
||||
mapOverItems(MAP_NO_RECURSE, new ItemOperator() {
|
||||
@Override
|
||||
public boolean evaluate(ItemInfo info, View view) {
|
||||
if (view instanceof PendingAppWidgetHostView && mInfos.contains(info)) {
|
||||
mLauncher.removeItem(view, info, false /* deleteFromDb */);
|
||||
mLauncher.bindAppWidget((LauncherAppWidgetInfo) info);
|
||||
}
|
||||
// process all the shortcuts
|
||||
return false;
|
||||
ArrayList<PendingAppWidgetHostView> views = new ArrayList<>(mInfos.size());
|
||||
mapOverItems(MAP_NO_RECURSE, (info, view) -> {
|
||||
if (view instanceof PendingAppWidgetHostView && mInfos.contains(info)) {
|
||||
views.add((PendingAppWidgetHostView) view);
|
||||
}
|
||||
// process all children
|
||||
return false;
|
||||
});
|
||||
for (PendingAppWidgetHostView view : views) {
|
||||
view.reinflate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user