summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/dragndrop/PinShortcutRequestActivityInfo.java
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2017-09-18 16:53:16 -0400
committerJon Miranda <jonmiranda@google.com>2017-09-18 16:53:16 -0400
commit7f55620089eb54a73a41fe0ba18d4f4ec720ebb7 (patch)
tree459afef125a9b5473eaa869534f45b3229aadcf0 /src/com/android/launcher3/dragndrop/PinShortcutRequestActivityInfo.java
parentdff92fe1aa90dfad1cce228ee140a70ab7a365b2 (diff)
parentd926a9316f61a7540b00ecd42acba8013e715f92 (diff)
downloadandroid_packages_apps_Trebuchet-7f55620089eb54a73a41fe0ba18d4f4ec720ebb7.tar.gz
android_packages_apps_Trebuchet-7f55620089eb54a73a41fe0ba18d4f4ec720ebb7.tar.bz2
android_packages_apps_Trebuchet-7f55620089eb54a73a41fe0ba18d4f4ec720ebb7.zip
Merge branch 'ub-launcher3-dorval-polish2'
Bug: 64937210 Test: flashed img Change-Id: Id6a05e7be885bf5c53a41eab2573c6ae3a44dc55
Diffstat (limited to 'src/com/android/launcher3/dragndrop/PinShortcutRequestActivityInfo.java')
-rw-r--r--src/com/android/launcher3/dragndrop/PinShortcutRequestActivityInfo.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/launcher3/dragndrop/PinShortcutRequestActivityInfo.java b/src/com/android/launcher3/dragndrop/PinShortcutRequestActivityInfo.java
index 52abbc766..a70a9bb1f 100644
--- a/src/com/android/launcher3/dragndrop/PinShortcutRequestActivityInfo.java
+++ b/src/com/android/launcher3/dragndrop/PinShortcutRequestActivityInfo.java
@@ -25,7 +25,9 @@ import android.content.pm.LauncherApps.PinItemRequest;
import android.content.pm.ShortcutInfo;
import android.graphics.drawable.Drawable;
import android.os.Build;
+import android.os.Process;
+import com.android.launcher3.FastBitmapDrawable;
import com.android.launcher3.IconCache;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
@@ -69,8 +71,12 @@ class PinShortcutRequestActivityInfo extends ShortcutConfigActivityInfo {
@Override
public Drawable getFullResIcon(IconCache cache) {
- return mContext.getSystemService(LauncherApps.class)
+ Drawable d = mContext.getSystemService(LauncherApps.class)
.getShortcutIconDrawable(mInfo, LauncherAppState.getIDP(mContext).fillResIconDpi);
+ if (d == null) {
+ d = new FastBitmapDrawable(cache.getDefaultIcon(Process.myUserHandle()));
+ }
+ return d;
}
@Override