summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/folder
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2016-04-12 18:32:04 -0700
committerHyunyoung Song <hyunyoungs@google.com>2016-04-13 10:58:33 -0700
commitddec1c739ef37c3a042982b8943fe42e04b65f4c (patch)
tree565933d46552049c8af29e8615964e47919fd81c /src/com/android/launcher3/folder
parent30a716157b748258e5461fe783298ba7c740835f (diff)
downloadandroid_packages_apps_Trebuchet-ddec1c739ef37c3a042982b8943fe42e04b65f4c.tar.gz
android_packages_apps_Trebuchet-ddec1c739ef37c3a042982b8943fe42e04b65f4c.tar.bz2
android_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/folder')
-rw-r--r--src/com/android/launcher3/folder/Folder.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index 2b34a79e8..b6be8e04c 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -29,7 +29,6 @@ import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.Rect;
import android.os.Build;
-import android.os.Bundle;
import android.text.InputType;
import android.text.Selection;
import android.text.Spannable;
@@ -70,7 +69,6 @@ import com.android.launcher3.LogDecelerateInterpolator;
import com.android.launcher3.OnAlarmListener;
import com.android.launcher3.R;
import com.android.launcher3.ShortcutInfo;
-import com.android.launcher3.Stats;
import com.android.launcher3.UninstallDropTarget.DropTargetSource;
import com.android.launcher3.Utilities;
import com.android.launcher3.Workspace.ItemOperator;
@@ -79,6 +77,9 @@ import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.dragndrop.DragController;
import com.android.launcher3.dragndrop.DragController.DragListener;
import com.android.launcher3.dragndrop.DragLayer;
+import com.android.launcher3.logging.UserEventLogger.LaunchSourceProvider;
+import com.android.launcher3.userevent.nano.LauncherLogProto;
+import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.Thunk;
import com.android.launcher3.util.UiThreadCircularReveal;
@@ -92,7 +93,7 @@ import java.util.Comparator;
public class Folder extends LinearLayout implements DragSource, View.OnClickListener,
View.OnLongClickListener, DropTarget, FolderListener, TextView.OnEditorActionListener,
View.OnFocusChangeListener, DragListener, DropTargetSource, AccessibilityDragSource,
- Stats.LaunchSourceProvider {
+ LaunchSourceProvider {
private static final String TAG = "Launcher.Folder";
/**
@@ -1416,11 +1417,12 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
}
@Override
- public void fillInLaunchSourceData(View v, Bundle sourceData) {
- // Fill in from the folder icon's launch source provider first
- Stats.LaunchSourceUtils.populateSourceDataFromAncestorProvider(mFolderIcon, sourceData);
- sourceData.putString(Stats.SOURCE_EXTRA_SUB_CONTAINER, Stats.SUB_CONTAINER_FOLDER);
- sourceData.putInt(Stats.SOURCE_EXTRA_SUB_CONTAINER_PAGE, mContent.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 = mContent.getCurrentPage();
+ targetParent.containerType = LauncherLogProto.FOLDER;
}
private class OnScrollHintListener implements OnAlarmListener {