Merge "Remove ConcurrentModificationException for snapshot logging Bug: 159282737" into ub-launcher3-rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ac3f71269e
@@ -47,6 +47,7 @@ import com.android.launcher3.model.data.FolderInfo;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
import com.android.launcher3.util.Executors;
|
||||
import com.android.launcher3.util.IntSparseArrayMap;
|
||||
import com.android.launcher3.util.LogConfig;
|
||||
import com.android.systemui.shared.system.SysUiStatsLog;
|
||||
@@ -124,11 +125,14 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
writeSnapshot(atomInfo, mInstanceId);
|
||||
}
|
||||
for (FolderInfo fInfo : folders) {
|
||||
ArrayList<WorkspaceItemInfo> folderContents = (ArrayList) fInfo.contents.clone();
|
||||
for (ItemInfo info : folderContents) {
|
||||
LauncherAtom.ItemInfo atomInfo = info.buildProto(fInfo);
|
||||
writeSnapshot(atomInfo, mInstanceId);
|
||||
}
|
||||
try {
|
||||
ArrayList<WorkspaceItemInfo> folderContents =
|
||||
(ArrayList) Executors.MAIN_EXECUTOR.submit(fInfo.contents::clone).get();
|
||||
for (ItemInfo info : folderContents) {
|
||||
LauncherAtom.ItemInfo atomInfo = info.buildProto(fInfo);
|
||||
writeSnapshot(atomInfo, mInstanceId);
|
||||
}
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
for (ItemInfo info : appWidgets) {
|
||||
LauncherAtom.ItemInfo atomInfo = info.buildProto(null);
|
||||
|
||||
Reference in New Issue
Block a user