diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-09-19 23:25:35 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-09-19 23:25:35 +0000 |
commit | fb46415e803a7f20a7d48bf42106f3f40cd769dd (patch) | |
tree | b755c5b64eb096681181d4ddb36c313988309141 /src/com/android/launcher3/dragndrop | |
parent | fe8a39d8b0750a332787abbe1a210fb55e444223 (diff) | |
parent | 7f55620089eb54a73a41fe0ba18d4f4ec720ebb7 (diff) | |
download | android_packages_apps_Trebuchet-fb46415e803a7f20a7d48bf42106f3f40cd769dd.tar.gz android_packages_apps_Trebuchet-fb46415e803a7f20a7d48bf42106f3f40cd769dd.tar.bz2 android_packages_apps_Trebuchet-fb46415e803a7f20a7d48bf42106f3f40cd769dd.zip |
Merge "Merge branch 'ub-launcher3-dorval-polish2'" into oc-mr1-dev
Diffstat (limited to 'src/com/android/launcher3/dragndrop')
4 files changed, 9 insertions, 4 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java index ee6a0e0b8..fde7995ce 100644 --- a/src/com/android/launcher3/dragndrop/DragLayer.java +++ b/src/com/android/launcher3/dragndrop/DragLayer.java @@ -544,7 +544,6 @@ public class DragLayer extends InsettableFrameLayout { public void clearResizeFrame() { if (mCurrentResizeFrame != null) { - mCurrentResizeFrame.commitResize(); removeView(mCurrentResizeFrame); mCurrentResizeFrame = null; } diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java index e81e2a386..33d4fa628 100644 --- a/src/com/android/launcher3/dragndrop/DragView.java +++ b/src/com/android/launcher3/dragndrop/DragView.java @@ -193,7 +193,7 @@ public class DragView extends View { */ @TargetApi(Build.VERSION_CODES.O) public void setItemInfo(final ItemInfo info) { - if (!(FeatureFlags.LAUNCHER3_SPRING_ICONS && Utilities.isAtLeastO())) { + if (!(FeatureFlags.LAUNCHER3_SPRING_ICONS && Utilities.ATLEAST_OREO)) { return; } if (info.itemType != LauncherSettings.Favorites.ITEM_TYPE_APPLICATION && diff --git a/src/com/android/launcher3/dragndrop/PinItemDragListener.java b/src/com/android/launcher3/dragndrop/PinItemDragListener.java index c8d3890ba..b9d97ac5a 100644 --- a/src/com/android/launcher3/dragndrop/PinItemDragListener.java +++ b/src/com/android/launcher3/dragndrop/PinItemDragListener.java @@ -128,7 +128,7 @@ public class PinItemDragListener extends BaseItemDragListener implements Parcela } public static boolean handleDragRequest(Launcher launcher, Intent intent) { - if (!Utilities.isAtLeastO()) { + if (!Utilities.ATLEAST_OREO) { return false; } if (intent == null || !Intent.ACTION_MAIN.equals(intent.getAction())) { 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 |