Fix for #1855127. When Home cannot decode an icon, it should not interrupt the loading of the workspace, but fallback to the default package icon.
This commit is contained in:
@@ -1169,9 +1169,14 @@ public class LauncherModel {
|
|||||||
break;
|
break;
|
||||||
case LauncherSettings.Favorites.ICON_TYPE_BITMAP:
|
case LauncherSettings.Favorites.ICON_TYPE_BITMAP:
|
||||||
byte[] data = c.getBlob(iconIndex);
|
byte[] data = c.getBlob(iconIndex);
|
||||||
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
|
try {
|
||||||
info.icon = new FastBitmapDrawable(
|
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
|
||||||
Utilities.createBitmapThumbnail(bitmap, launcher));
|
info.icon = new FastBitmapDrawable(
|
||||||
|
Utilities.createBitmapThumbnail(bitmap, launcher));
|
||||||
|
} catch (Exception e) {
|
||||||
|
packageManager = launcher.getPackageManager();
|
||||||
|
info.icon = packageManager.getDefaultActivityIcon();
|
||||||
|
}
|
||||||
info.filtered = true;
|
info.filtered = true;
|
||||||
info.customIcon = true;
|
info.customIcon = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user