diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2019-04-17 18:38:52 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2019-04-22 15:39:40 -0700 |
commit | 6bbf6004f8c746cc50c622ec1759f77ea76af9ef (patch) | |
tree | 0740c52b700f0f8bd96505db8b5c10acb434d81e /src/com/android/launcher3/dragndrop | |
parent | 8b0cb4113fc34ced9a9de71e40f448615ec8210d (diff) | |
download | android_packages_apps_Trebuchet-6bbf6004f8c746cc50c622ec1759f77ea76af9ef.tar.gz android_packages_apps_Trebuchet-6bbf6004f8c746cc50c622ec1759f77ea76af9ef.tar.bz2 android_packages_apps_Trebuchet-6bbf6004f8c746cc50c622ec1759f77ea76af9ef.zip |
Removing ShortcutInfoCompat and directly using ShortcutInfo
Change-Id: I2842689e192a206c0d31558c8126eae1c7904598
Diffstat (limited to 'src/com/android/launcher3/dragndrop')
-rw-r--r-- | src/com/android/launcher3/dragndrop/AddItemActivity.java | 4 | ||||
-rw-r--r-- | src/com/android/launcher3/dragndrop/DragView.java | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/com/android/launcher3/dragndrop/AddItemActivity.java b/src/com/android/launcher3/dragndrop/AddItemActivity.java index 5ac986787..a72089d7c 100644 --- a/src/com/android/launcher3/dragndrop/AddItemActivity.java +++ b/src/com/android/launcher3/dragndrop/AddItemActivity.java @@ -52,7 +52,6 @@ import com.android.launcher3.R; import com.android.launcher3.compat.AppWidgetManagerCompat; import com.android.launcher3.compat.LauncherAppsCompatVO; import com.android.launcher3.model.WidgetItem; -import com.android.launcher3.shortcuts.ShortcutInfoCompat; import com.android.launcher3.userevent.nano.LauncherLogProto.Action; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; import com.android.launcher3.util.InstantAppResolver; @@ -250,8 +249,7 @@ public class AddItemActivity extends BaseActivity implements OnLongClickListener */ public void onPlaceAutomaticallyClick(View v) { if (mRequest.getRequestType() == PinItemRequest.REQUEST_TYPE_SHORTCUT) { - InstallShortcutReceiver.queueShortcut( - new ShortcutInfoCompat(mRequest.getShortcutInfo()), this); + InstallShortcutReceiver.queueShortcut(mRequest.getShortcutInfo(), this); logCommand(Action.Command.CONFIRM); mRequest.accept(); finish(); diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java index bdbea2992..3ab97b0d9 100644 --- a/src/com/android/launcher3/dragndrop/DragView.java +++ b/src/com/android/launcher3/dragndrop/DragView.java @@ -24,6 +24,7 @@ import android.animation.FloatArrayEvaluator; import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.annotation.TargetApi; +import android.content.pm.ShortcutInfo; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; @@ -54,7 +55,6 @@ import com.android.launcher3.Utilities; import com.android.launcher3.FirstFrameAnimatorHelper; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.icons.LauncherIcons; -import com.android.launcher3.shortcuts.ShortcutInfoCompat; import com.android.launcher3.util.Themes; import com.android.launcher3.util.Thunk; @@ -321,11 +321,11 @@ public class DragView extends View { boolean iconBadged = (info instanceof ItemInfoWithIcon) && (((ItemInfoWithIcon) info).runtimeStatusFlags & FLAG_ICON_BADGED) > 0; if ((info.id == ItemInfo.NO_ID && !iconBadged) - || !(obj instanceof ShortcutInfoCompat)) { + || !(obj instanceof ShortcutInfo)) { // The item is not yet added on home screen. return new FixedSizeEmptyDrawable(iconSize); } - ShortcutInfoCompat si = (ShortcutInfoCompat) obj; + ShortcutInfo si = (ShortcutInfo) obj; LauncherIcons li = LauncherIcons.obtain(appState.getContext()); Bitmap badge = li.getShortcutInfoBadge(si, appState.getIconCache()).iconBitmap; li.recycle(); |