mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Fix the fallback logic for shortcut icons when icons are missing
The icons of shortcuts in general are not persisted in backup payload and thus are not available on the new device, apps are reposponsible for republishing those shortcuts on the new device, with the only exception being pinned shortcuts, whose icons are stored in launcher.db as a fallback when icons are not avaialble in the shortcut themselves. A previous CL unexpected excluded deep shortcuts from loading their fallback icons in launcher.db, causes pinned shortcut to fallback further to default droid icons, this CL restores the original behavior. Bug: 202346722 Test: manual Change-Id: Ie09becd3a0dc1ca1e7c2573fe1b68b61a58c2091
This commit is contained in:
@@ -190,6 +190,7 @@ public class LoaderCursor extends CursorWrapper {
|
||||
String resourceName = itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT
|
||||
? getString(iconResourceIndex) : null;
|
||||
byte[] iconBlob = itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT
|
||||
|| itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT
|
||||
|| restoreFlag != 0
|
||||
? getBlob(iconIndex) : null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user