summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/WidgetPreviewLoader.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-01-19 10:27:54 -0800
committerSunny Goyal <sunnygoyal@google.com>2017-01-19 13:54:31 -0800
commit782f0c9a896db58aeaa60d15f291831b8d7b4c93 (patch)
treeb8d8b2da1ae765811dedd9a9ec55d3c27898d727 /src/com/android/launcher3/WidgetPreviewLoader.java
parent278359539c02ca160caf1df54ce96053a2a2ef59 (diff)
downloadandroid_packages_apps_Trebuchet-782f0c9a896db58aeaa60d15f291831b8d7b4c93.tar.gz
android_packages_apps_Trebuchet-782f0c9a896db58aeaa60d15f291831b8d7b4c93.tar.bz2
android_packages_apps_Trebuchet-782f0c9a896db58aeaa60d15f291831b8d7b4c93.zip
Adding support for new APIs in O related to configurable shortcuts
> Config activities can now return PinItemRequest which can be used to pin deep shortcuts Bug: 33584624 Change-Id: Ic0df436bd79e069615b9d60d24eb7594b824b2da
Diffstat (limited to 'src/com/android/launcher3/WidgetPreviewLoader.java')
-rw-r--r--src/com/android/launcher3/WidgetPreviewLoader.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/WidgetPreviewLoader.java b/src/com/android/launcher3/WidgetPreviewLoader.java
index 83c978e95..33d63620f 100644
--- a/src/com/android/launcher3/WidgetPreviewLoader.java
+++ b/src/com/android/launcher3/WidgetPreviewLoader.java
@@ -3,7 +3,6 @@ package com.android.launcher3;
import android.content.ComponentName;
import android.content.ContentValues;
import android.content.Context;
-import android.content.pm.ActivityInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
@@ -30,6 +29,7 @@ import android.util.Log;
import android.util.LongSparseArray;
import com.android.launcher3.compat.AppWidgetManagerCompat;
+import com.android.launcher3.compat.ShortcutConfigActivityInfo;
import com.android.launcher3.compat.UserManagerCompat;
import com.android.launcher3.model.WidgetItem;
import com.android.launcher3.util.ComponentKey;
@@ -414,8 +414,8 @@ public class WidgetPreviewLoader {
return mWidgetManager.getBadgeBitmap(info, preview, imageWidth, imageHeight);
}
- private Bitmap generateShortcutPreview(
- BaseActivity launcher, ActivityInfo info, int maxWidth, int maxHeight, Bitmap preview) {
+ private Bitmap generateShortcutPreview(BaseActivity launcher, ShortcutConfigActivityInfo info,
+ int maxWidth, int maxHeight, Bitmap preview) {
final Canvas c = new Canvas();
if (preview == null) {
preview = Bitmap.createBitmap(maxWidth, maxHeight, Config.ARGB_8888);
@@ -428,7 +428,7 @@ public class WidgetPreviewLoader {
c.drawColor(0, PorterDuff.Mode.CLEAR);
}
- Drawable icon = mutateOnMainThread(mIconCache.getFullResIcon(info));
+ Drawable icon = mutateOnMainThread(info.getFullResIcon(mIconCache));
icon.setFilterBitmap(true);
// Draw a desaturated/scaled version of the icon in the background as a watermark