Good riddance UserEventDispatcher
Bug: 165675920 Bug: 161381246 TL;DR;; - nano -> lite proto - add all the missing logs to WW - pin item related logging fix - Removed logging for assistant sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g' Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
This commit is contained in:
1 parent
380d603f83
commit
95786e077d
66 files changed
+232
-1566
No files matched your search
@@ -1,49 +0,0 @@
|
||||
package com.android.launcher3.logging;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewParent;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class StatsLogUtils {
|
||||
private final static int MAXIMUM_VIEW_HIERARCHY_LEVEL = 5;
|
||||
|
||||
/**
|
||||
* Implemented by containers to provide a container source for a given child.
|
||||
*/
|
||||
public interface LogContainerProvider {
|
||||
|
||||
/**
|
||||
* Populates parent container targets for an item
|
||||
*/
|
||||
void fillInLogContainerData(ItemInfo childInfo, Target child, ArrayList<Target> parents);
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively finds the parent of the given child which implements IconLogInfoProvider
|
||||
*/
|
||||
public static LogContainerProvider getLaunchProviderRecursive(@Nullable View v) {
|
||||
ViewParent parent;
|
||||
if (v != null) {
|
||||
parent = v.getParent();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Optimization to only check up to 5 parents.
|
||||
int count = MAXIMUM_VIEW_HIERARCHY_LEVEL;
|
||||
while (parent != null && count-- > 0) {
|
||||
if (parent instanceof LogContainerProvider) {
|
||||
return (LogContainerProvider) parent;
|
||||
} else {
|
||||
parent = parent.getParent();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user