Merge "Ignoring invalid deep shortcuts during load" into sc-dev
This commit is contained in:
@@ -52,6 +52,7 @@ import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.model.data.AppInfo;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
import com.android.launcher3.shortcuts.ShortcutKey;
|
||||
import com.android.launcher3.util.ContentWriter;
|
||||
import com.android.launcher3.util.GridOccupancy;
|
||||
import com.android.launcher3.util.IntArray;
|
||||
@@ -394,6 +395,11 @@ public class LoaderCursor extends CursorWrapper {
|
||||
* otherwise marks it for deletion.
|
||||
*/
|
||||
public void checkAndAddItem(ItemInfo info, BgDataModel dataModel) {
|
||||
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);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user