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:
Schneider Victor-tulias
2021-11-29 12:23:40 -08:00
parent 2fd047f193
commit c817dac4cd
5 changed files with 152 additions and 13 deletions

View File

@@ -383,18 +383,23 @@ public class LoaderCursor extends CursorWrapper {
info.cellY = getInt(cellYIndex);
}
public void checkAndAddItem(ItemInfo info, BgDataModel dataModel) {
checkAndAddItem(info, dataModel, null);
}
/**
* Adds the {@param info} to {@param dataModel} if it does not overlap with any other item,
* otherwise marks it for deletion.
*/
public void checkAndAddItem(ItemInfo info, BgDataModel dataModel) {
public void checkAndAddItem(
ItemInfo info, BgDataModel dataModel, LoaderMemoryLogger logger) {
if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) {
// Ensure that it is a valid intent. An exception here will
// cause the item loading to get skipped
ShortcutKey.fromItemInfo(info);
}
if (checkItemPlacement(info)) {
dataModel.addItem(mContext, info, false);
dataModel.addItem(mContext, info, false, logger);
} else {
markDeleted("Item position overlap");
}