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:
1 parent
9099dfcfb7
commit
a579ddc9c8
18 files changed
+241
-197
No files matched your search
@@ -37,6 +37,7 @@ import com.android.launcher3.util.InstantAppResolver;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Helper methods for logging.
|
||||
@@ -255,4 +256,13 @@ public class LoggerUtils {
|
||||
event.action = action;
|
||||
return event;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates LauncherEvent using Action and ArrayList of Targets
|
||||
*/
|
||||
public static LauncherEvent newLauncherEvent(Action action, ArrayList<Target> targets) {
|
||||
Target[] targetsArray = new Target[targets.size()];
|
||||
targets.toArray(targetsArray);
|
||||
return newLauncherEvent(action, targetsArray);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user