Removing some Launcher3 dependencies from BaseIconCache

Change-Id: Ic80ed4a5cd2fc414cd6c27096d798e7f0b8efc72
This commit is contained in:
Sunny Goyal
2018-11-06 10:28:37 -08:00
parent 066ace1b88
commit e62d2bb165
9 changed files with 86 additions and 55 deletions

View File

@@ -41,6 +41,7 @@ import android.util.Pair;
import com.android.launcher3.compat.LauncherAppsCompat;
import com.android.launcher3.compat.UserManagerCompat;
import com.android.launcher3.icons.BitmapInfo;
import com.android.launcher3.icons.GraphicsUtils;
import com.android.launcher3.icons.LauncherIcons;
import com.android.launcher3.shortcuts.DeepShortcutManager;
import com.android.launcher3.shortcuts.ShortcutInfoCompat;
@@ -457,7 +458,7 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
.key(LAUNCH_INTENT_KEY).value(launchIntent.toUri(0))
.key(NAME_KEY).value(name);
if (icon != null) {
byte[] iconByteArray = Utilities.flattenBitmap(icon);
byte[] iconByteArray = GraphicsUtils.flattenBitmap(icon);
json = json.key(ICON_KEY).value(
Base64.encodeToString(
iconByteArray, 0, iconByteArray.length, Base64.DEFAULT));