summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/shortcuts
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2019-03-27 16:03:06 -0700
committerSunny Goyal <sunnygoyal@google.com>2019-04-16 00:08:24 -0700
commit9589916418d8892fcd99b3abb9770ae83ebec7d8 (patch)
treead71a549bf1538ed9980912f6912f93808a61218 /src/com/android/launcher3/shortcuts
parent1f457ae87f05f76ead7f064e93e4473abe840828 (diff)
downloadandroid_packages_apps_Trebuchet-9589916418d8892fcd99b3abb9770ae83ebec7d8.tar.gz
android_packages_apps_Trebuchet-9589916418d8892fcd99b3abb9770ae83ebec7d8.tar.bz2
android_packages_apps_Trebuchet-9589916418d8892fcd99b3abb9770ae83ebec7d8.zip
ShortcutInfo renamed to WorkspaceItemInfo
Will get rid of ShortcutInfoCompat in a follow up cl Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
Diffstat (limited to 'src/com/android/launcher3/shortcuts')
-rw-r--r--src/com/android/launcher3/shortcuts/DeepShortcutView.java16
-rw-r--r--src/com/android/launcher3/shortcuts/ShortcutInfoCompat.java3
2 files changed, 9 insertions, 10 deletions
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutView.java b/src/com/android/launcher3/shortcuts/DeepShortcutView.java
index 7b93ba253..199d9c808 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutView.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutView.java
@@ -18,7 +18,6 @@ package com.android.launcher3.shortcuts;
import android.content.Context;
import android.graphics.Point;
-import android.graphics.Rect;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
@@ -27,10 +26,9 @@ import android.widget.FrameLayout;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
-import com.android.launcher3.ShortcutInfo;
+import com.android.launcher3.WorkspaceItemInfo;
import com.android.launcher3.Utilities;
import com.android.launcher3.popup.PopupContainerWithArrow;
-import com.android.launcher3.touch.ItemClickHandler;
/**
* A {@link android.widget.FrameLayout} that contains a {@link DeepShortcutView}.
@@ -44,7 +42,7 @@ public class DeepShortcutView extends FrameLayout {
private View mIconView;
private View mDivider;
- private ShortcutInfo mInfo;
+ private WorkspaceItemInfo mInfo;
private ShortcutInfoCompat mDetail;
public DeepShortcutView(Context context) {
@@ -95,11 +93,11 @@ public class DeepShortcutView extends FrameLayout {
}
/** package private **/
- public void applyShortcutInfo(ShortcutInfo info, ShortcutInfoCompat detail,
+ public void applyShortcutInfo(WorkspaceItemInfo info, ShortcutInfoCompat detail,
PopupContainerWithArrow container) {
mInfo = info;
mDetail = detail;
- mBubbleText.applyFromShortcutInfo(info);
+ mBubbleText.applyFromWorkspaceItem(info);
mIconView.setBackground(mBubbleText.getIcon());
// Use the long label as long as it exists and fits.
@@ -119,12 +117,12 @@ public class DeepShortcutView extends FrameLayout {
/**
* Returns the shortcut info that is suitable to be added on the homescreen
*/
- public ShortcutInfo getFinalInfo() {
- final ShortcutInfo badged = new ShortcutInfo(mInfo);
+ public WorkspaceItemInfo getFinalInfo() {
+ final WorkspaceItemInfo badged = new WorkspaceItemInfo(mInfo);
// Queue an update task on the worker thread. This ensures that the badged
// shortcut eventually gets its icon updated.
Launcher.getLauncher(getContext()).getModel()
- .updateAndBindShortcutInfo(badged, mDetail);
+ .updateAndBindWorkspaceItem(badged, mDetail);
return badged;
}
diff --git a/src/com/android/launcher3/shortcuts/ShortcutInfoCompat.java b/src/com/android/launcher3/shortcuts/ShortcutInfoCompat.java
index e5bd00265..5ec199714 100644
--- a/src/com/android/launcher3/shortcuts/ShortcutInfoCompat.java
+++ b/src/com/android/launcher3/shortcuts/ShortcutInfoCompat.java
@@ -23,11 +23,12 @@ import android.content.pm.ShortcutInfo;
import android.os.UserHandle;
import com.android.launcher3.R;
+import com.android.launcher3.WorkspaceItemInfo;
/**
* Wrapper class for {@link android.content.pm.ShortcutInfo}, representing deep shortcuts into apps.
*
- * Not to be confused with {@link com.android.launcher3.ShortcutInfo}.
+ * Not to be confused with {@link WorkspaceItemInfo}.
*/
public class ShortcutInfoCompat {
private static final String INTENT_CATEGORY = "com.android.launcher3.DEEP_SHORTCUT";