mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Refactor logging to capture Target hierarchy
Instead of creating a fixed number of targets, we now pass an ArrayList of targets to. Any class implementing LogContainerProviders#fillInLogContainerData can setup it's own target and add it to the ArrayList, It can also pass the ArrayList to other LogContainerProvider to capture full Target hierarchy. Bug: 147305863 Change-Id: I0063c692120fb9e1cff2d8902c5da972d0623418
This commit is contained in:
@@ -18,6 +18,8 @@ package com.android.launcher3.allapps;
|
||||
import static android.view.View.MeasureSpec.EXACTLY;
|
||||
import static android.view.View.MeasureSpec.makeMeasureSpec;
|
||||
|
||||
import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
@@ -65,6 +67,8 @@ import com.android.launcher3.views.RecyclerViewFastScroller;
|
||||
import com.android.launcher3.views.SpringRelativeLayout;
|
||||
import com.android.launcher3.views.WorkFooterContainer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* The all apps view container.
|
||||
*/
|
||||
@@ -327,12 +331,10 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {
|
||||
if (getApps().hasFilter()) {
|
||||
targetParent.containerType = ContainerType.SEARCHRESULT;
|
||||
} else {
|
||||
targetParent.containerType = ContainerType.ALLAPPS;
|
||||
}
|
||||
public void fillInLogContainerData(ItemInfo childInfo, Target child,
|
||||
ArrayList<Target> parents) {
|
||||
parents.add(newContainerTarget(
|
||||
getApps().hasFilter() ? ContainerType.SEARCHRESULT : ContainerType.ALLAPPS));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user