From cded4dd923ffaf0be870ed07227e9ceffaf93126 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 30 Jul 2020 12:25:58 -0700 Subject: [PATCH] Create a copy of the original list instead of a new view unmodifiableList is backed up by the original list and is not suitable to passing to different thead. Bug: 162518472 Change-Id: I71774ced89d64acc7176269e107cfcf47627f7c4 --- src/com/android/launcher3/model/BgDataModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/model/BgDataModel.java b/src/com/android/launcher3/model/BgDataModel.java index 6158a9c6b4..fd8520dcdf 100644 --- a/src/com/android/launcher3/model/BgDataModel.java +++ b/src/com/android/launcher3/model/BgDataModel.java @@ -422,7 +422,7 @@ public class BgDataModel { @Override public FixedContainerItems clone() { - return new FixedContainerItems(containerId, Collections.unmodifiableList(items)); + return new FixedContainerItems(containerId, new ArrayList<>(items)); } }