diff options
| author | Hyunyoung Song <hyunyoungs@google.com> | 2016-04-12 18:32:04 -0700 |
|---|---|---|
| committer | Hyunyoung Song <hyunyoungs@google.com> | 2016-04-13 10:58:33 -0700 |
| commit | ddec1c739ef37c3a042982b8943fe42e04b65f4c (patch) | |
| tree | 565933d46552049c8af29e8615964e47919fd81c /src/com/android/launcher3/Workspace.java | |
| parent | 30a716157b748258e5461fe783298ba7c740835f (diff) | |
| download | packages_apps_Trebuchet-ddec1c739ef37c3a042982b8943fe42e04b65f4c.tar.gz packages_apps_Trebuchet-ddec1c739ef37c3a042982b8943fe42e04b65f4c.tar.bz2 packages_apps_Trebuchet-ddec1c739ef37c3a042982b8943fe42e04b65f4c.zip | |
Refactor UserEventLogging, Add predictedRank, replace Bundle with Proto
b/26494415
- Removed bundle object that became redundant now that we have LauncherEvent proto
- Combined Stats and UserEventLogger as they are effectively doing same thing
- Removed parent field inside Target
- added predictedRank target inside Target
b/27967359
- make com.android.launcher3.action.LAUNCH broadcast explicit
Later CL: finish packageName/intent/componentHash/predictedRank fields
Change-Id: I441fb46c834f73e58a4d2324e8da7971e8713ec8
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
| -rw-r--r-- | src/com/android/launcher3/Workspace.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 4aea85e6d..6b38f648c 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -39,7 +39,6 @@ import android.graphics.Rect; import android.graphics.Region.Op; import android.graphics.drawable.Drawable; import android.os.Build; -import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Parcelable; @@ -73,6 +72,9 @@ import com.android.launcher3.dragndrop.DragView; import com.android.launcher3.dragndrop.SpringLoadedDragController; import com.android.launcher3.folder.Folder; import com.android.launcher3.folder.FolderIcon; +import com.android.launcher3.logging.UserEventLogger; +import com.android.launcher3.userevent.nano.LauncherLogProto; +import com.android.launcher3.userevent.nano.LauncherLogProto.Target; import com.android.launcher3.util.LongArrayMap; import com.android.launcher3.util.Thunk; import com.android.launcher3.util.WallpaperOffsetInterpolator; @@ -92,7 +94,7 @@ import java.util.concurrent.atomic.AtomicInteger; public class Workspace extends PagedView implements DropTarget, DragSource, DragScroller, View.OnTouchListener, DragController.DragListener, LauncherTransitionable, ViewGroup.OnHierarchyChangeListener, - Insettable, DropTargetSource, AccessibilityDragSource, Stats.LaunchSourceProvider { + Insettable, DropTargetSource, AccessibilityDragSource, UserEventLogger.LaunchSourceProvider { private static final String TAG = "Launcher.Workspace"; private static boolean ENFORCE_DRAG_EVENT_ORDER = false; @@ -4264,9 +4266,12 @@ public class Workspace extends PagedView } @Override - public void fillInLaunchSourceData(View v, Bundle sourceData) { - sourceData.putString(Stats.SOURCE_EXTRA_CONTAINER, Stats.CONTAINER_HOMESCREEN); - sourceData.putInt(Stats.SOURCE_EXTRA_CONTAINER_PAGE, getCurrentPage()); + public void fillInLaunchSourceData(View v, ItemInfo info, Target target, Target targetParent) { + target.itemType = LauncherLogProto.APP_ICON; + target.gridX = info.cellX; + target.gridY = info.cellY; + target.pageIndex = getCurrentPage(); + targetParent.containerType = LauncherLogProto.WORKSPACE; } /** |
