mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
plugin for user event logging
Bug: 140243695 Change-Id: If9c620aa10334b26ad9b489d6544201d38439fea
This commit is contained in:
@@ -427,10 +427,16 @@ public class UserEventDispatcher implements ResourceBasedOverride {
|
||||
mAppOrTaskLaunch = false;
|
||||
ev.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
|
||||
ev.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
|
||||
|
||||
if (!IS_VERBOSE) {
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, generateLog(ev));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a human-readable log for given user event.
|
||||
*/
|
||||
public static String generateLog(LauncherEvent ev) {
|
||||
String log = "\n-----------------------------------------------------"
|
||||
+ "\naction:" + LoggerUtils.getActionStr(ev.action);
|
||||
if (ev.srcTarget != null && ev.srcTarget.length > 0) {
|
||||
@@ -445,8 +451,7 @@ public class UserEventDispatcher implements ResourceBasedOverride {
|
||||
ev.elapsedSessionMillis,
|
||||
ev.actionDurationMillis);
|
||||
log += "\n\n";
|
||||
Log.d(TAG, log);
|
||||
return;
|
||||
return log;
|
||||
}
|
||||
|
||||
private static String getTargetsStr(Target[] targets) {
|
||||
|
||||
Reference in New Issue
Block a user