diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-11-11 11:45:00 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-11-19 23:40:07 +0530 |
commit | 32f3dda80240e707ad4467b6b65fb589f539c58e (patch) | |
tree | 039a0b81d3aeddca2f8df76b83ed1f7d8040fccf /src/com/android/launcher3/AutoInstallsLayout.java | |
parent | 47a96054d97c042bd97b61795accbb9a59fd8ad0 (diff) | |
download | android_packages_apps_Trebuchet-32f3dda80240e707ad4467b6b65fb589f539c58e.tar.gz android_packages_apps_Trebuchet-32f3dda80240e707ad4467b6b65fb589f539c58e.tar.bz2 android_packages_apps_Trebuchet-32f3dda80240e707ad4467b6b65fb589f539c58e.zip |
Adding a utility class to enforce that icons are always flattened on
the background thread.
Bug: 21325319
Change-Id: I4d0f02557cdbf70cfa86750ac047faf2917e39bf
Diffstat (limited to 'src/com/android/launcher3/AutoInstallsLayout.java')
-rw-r--r-- | src/com/android/launcher3/AutoInstallsLayout.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/AutoInstallsLayout.java b/src/com/android/launcher3/AutoInstallsLayout.java index 8b5a8a863..2a4212a2d 100644 --- a/src/com/android/launcher3/AutoInstallsLayout.java +++ b/src/com/android/launcher3/AutoInstallsLayout.java @@ -17,7 +17,6 @@ package com.android.launcher3; import android.appwidget.AppWidgetHost; -import android.appwidget.AppWidgetManager; import android.content.ComponentName; import android.content.ContentValues; import android.content.Context; @@ -437,7 +436,8 @@ public class AutoInstallsLayout { return -1; } - ItemInfo.writeBitmap(mValues, LauncherIcons.createIconBitmap(icon, mContext)); + mValues.put(LauncherSettings.Favorites.ICON, + Utilities.flattenBitmap(LauncherIcons.createIconBitmap(icon, mContext))); mValues.put(Favorites.ICON_PACKAGE, mIconRes.getResourcePackageName(iconId)); mValues.put(Favorites.ICON_RESOURCE, mIconRes.getResourceName(iconId)); |