Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f693253 authored by Samuel Fufa's avatar Samuel Fufa Committed by Android (Google) Code Review
Browse files

Merge "[AllApps] Fix ConcurrentModificationException in AppPredictionRow" into sc-v2-dev

parents 091d91a8 a46da739
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import com.android.launcher3.touch.ItemLongClickListener;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

@TargetApi(Build.VERSION_CODES.P)
public class PredictionRowView extends LinearLayout implements
@@ -170,10 +171,9 @@ public class PredictionRowView extends LinearLayout implements
    private void applyPredictedApps(List<ItemInfo> items) {
        mPendingPredictedItems = null;
        mPredictedApps.clear();
        items.stream()
        mPredictedApps.addAll(items.stream()
                .filter(itemInfo -> itemInfo instanceof WorkspaceItemInfo)
                .map(itemInfo -> (WorkspaceItemInfo) itemInfo)
                .forEach(mPredictedApps::add);
                .map(itemInfo -> (WorkspaceItemInfo) itemInfo).collect(Collectors.toList()));
        applyPredictionApps();
    }