mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 02:08:20 +00:00
Merge ag/16307859 into master without bug fix.
- Copied ag/16307859, with a modification to QuickstepModelDelegate#getContainer. This allows the crash from b/173838775 to continue occuring with additional debuging logs. Bug: 173838775 Test: manual Change-Id: Ic96a25665457c80f5c9ab45a896fada34a3a68ff
This commit is contained in:
@@ -161,8 +161,7 @@ public class QuickstepModelDelegate extends ModelDelegate {
|
||||
}
|
||||
InstanceId instanceId = new InstanceIdSequence().newInstanceId();
|
||||
for (ItemInfo info : itemsIdMap) {
|
||||
FolderInfo parent = info.container > 0
|
||||
? (FolderInfo) itemsIdMap.get(info.container) : null;
|
||||
FolderInfo parent = getContainer(info, itemsIdMap);
|
||||
StatsLogCompatManager.writeSnapshot(info.buildProto(parent), instanceId);
|
||||
}
|
||||
additionalSnapshotEvents(instanceId);
|
||||
@@ -199,8 +198,7 @@ public class QuickstepModelDelegate extends ModelDelegate {
|
||||
}
|
||||
|
||||
for (ItemInfo info : itemsIdMap) {
|
||||
FolderInfo parent = info.container > 0
|
||||
? (FolderInfo) itemsIdMap.get(info.container) : null;
|
||||
FolderInfo parent = getContainer(info, itemsIdMap);
|
||||
LauncherAtom.ItemInfo itemInfo = info.buildProto(parent);
|
||||
Log.d(TAG, itemInfo.toString());
|
||||
StatsEvent statsEvent = StatsLogCompatManager.buildStatsEvent(itemInfo,
|
||||
@@ -222,6 +220,22 @@ public class QuickstepModelDelegate extends ModelDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
private static FolderInfo getContainer(ItemInfo info, IntSparseArrayMap<ItemInfo> itemsIdMap) {
|
||||
if (info.container > 0) {
|
||||
ItemInfo containerInfo = itemsIdMap.get(info.container);
|
||||
|
||||
if (!(containerInfo instanceof FolderInfo)) {
|
||||
Log.e(TAG, String.format(
|
||||
"Item info: %s found with invalid container: %s",
|
||||
info,
|
||||
containerInfo));
|
||||
}
|
||||
// Allow crash to help debug b/173838775
|
||||
return (FolderInfo) containerInfo;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateData() {
|
||||
super.validateData();
|
||||
|
||||
Reference in New Issue
Block a user