Update ProtoLogProxy classes to only log to protolog when protolog has been initialized
Flag: com.android.launcher3.enable_active_gesture_proto_log Flag: com.android.launcher3.enable_recents_window_proto_log Flag: com.android.launcher3.enable_state_manager_proto_log Fixes: 381846204 Test: ran launcher and checked logs Change-Id: I807326bd6c65b8e51f5302ba58eed841c23216f6
This commit is contained in:
1 parent
74ff7af5e2
commit
7fb1d6d53b
4 files changed
+93
-64
No files matched your search
@@ -37,6 +37,7 @@ import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent
|
||||
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.SET_END_TARGET;
|
||||
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.START_RECENTS_ANIMATION;
|
||||
import static com.android.quickstep.util.QuickstepProtoLogGroup.ACTIVE_GESTURE_LOG;
|
||||
import static com.android.quickstep.util.QuickstepProtoLogGroup.isProtoLogInitialized;
|
||||
|
||||
import android.graphics.Point;
|
||||
import android.graphics.RectF;
|
||||
@@ -62,7 +63,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
|
||||
public static void logLauncherDestroyed() {
|
||||
ActiveGestureLog.INSTANCE.addLog("Launcher destroyed", LAUNCHER_DESTROYED);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "Launcher destroyed");
|
||||
}
|
||||
|
||||
@@ -70,7 +71,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
ActiveGestureLog.INSTANCE.addLog(
|
||||
/* event= */ "AbsSwipeUpHandler.onRecentsAnimationCanceled",
|
||||
/* gestureEvent= */ CANCEL_RECENTS_ANIMATION);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "AbsSwipeUpHandler.onRecentsAnimationCanceled");
|
||||
}
|
||||
|
||||
@@ -78,7 +79,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
ActiveGestureLog.INSTANCE.addLog(
|
||||
/* event= */ "RecentsAnimationCallbacks.onAnimationFinished",
|
||||
ON_FINISH_RECENTS_ANIMATION);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "AbsSwipeUpHandler.onAnimationFinished");
|
||||
}
|
||||
|
||||
@@ -86,27 +87,27 @@ public class ActiveGestureProtoLogProxy {
|
||||
ActiveGestureLog.INSTANCE.addLog(
|
||||
"AbsSwipeUpHandler.cancelCurrentAnimation",
|
||||
ActiveGestureErrorDetector.GestureEvent.CANCEL_CURRENT_ANIMATION);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "AbsSwipeUpHandler.cancelCurrentAnimation");
|
||||
}
|
||||
|
||||
public static void logAbsSwipeUpHandlerOnTasksAppeared() {
|
||||
ActiveGestureLog.INSTANCE.addLog("AbsSwipeUpHandler.onTasksAppeared: "
|
||||
+ "force finish recents animation complete; clearing state callback.");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "AbsSwipeUpHandler.onTasksAppeared: "
|
||||
+ "force finish recents animation complete; clearing state callback.");
|
||||
}
|
||||
|
||||
public static void logHandOffAnimation() {
|
||||
ActiveGestureLog.INSTANCE.addLog("AbsSwipeUpHandler.handOffAnimation");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "AbsSwipeUpHandler.handOffAnimation");
|
||||
}
|
||||
|
||||
public static void logFinishRecentsAnimationOnTasksAppeared() {
|
||||
ActiveGestureLog.INSTANCE.addLog("finishRecentsAnimationOnTasksAppeared");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "finishRecentsAnimationOnTasksAppeared");
|
||||
}
|
||||
|
||||
@@ -114,14 +115,14 @@ public class ActiveGestureProtoLogProxy {
|
||||
ActiveGestureLog.INSTANCE.addLog(
|
||||
/* event= */ "RecentsAnimationCallbacks.onAnimationCanceled",
|
||||
/* gestureEvent= */ ON_CANCEL_RECENTS_ANIMATION);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "RecentsAnimationCallbacks.onAnimationCanceled");
|
||||
}
|
||||
|
||||
public static void logRecentsAnimationCallbacksOnTasksAppeared() {
|
||||
ActiveGestureLog.INSTANCE.addLog("RecentsAnimationCallbacks.onTasksAppeared",
|
||||
ActiveGestureErrorDetector.GestureEvent.TASK_APPEARED);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "RecentsAnimationCallbacks.onTasksAppeared");
|
||||
}
|
||||
|
||||
@@ -129,39 +130,39 @@ public class ActiveGestureProtoLogProxy {
|
||||
ActiveGestureLog.INSTANCE.addLog(
|
||||
/* event= */ "TaskAnimationManager.startRecentsAnimation",
|
||||
/* gestureEvent= */ START_RECENTS_ANIMATION);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "TaskAnimationManager.startRecentsAnimation");
|
||||
}
|
||||
|
||||
public static void logLaunchingSideTaskFailed() {
|
||||
ActiveGestureLog.INSTANCE.addLog("Unable to launch side task (no recents)");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "Unable to launch side task (no recents)");
|
||||
}
|
||||
|
||||
public static void logContinueRecentsAnimation() {
|
||||
ActiveGestureLog.INSTANCE.addLog(/* event= */ "continueRecentsAnimation");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "continueRecentsAnimation");
|
||||
}
|
||||
|
||||
public static void logCleanUpRecentsAnimationSkipped() {
|
||||
ActiveGestureLog.INSTANCE.addLog(
|
||||
/* event= */ "cleanUpRecentsAnimation skipped due to wrong callbacks");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "cleanUpRecentsAnimation skipped due to wrong callbacks");
|
||||
}
|
||||
|
||||
public static void logCleanUpRecentsAnimation() {
|
||||
ActiveGestureLog.INSTANCE.addLog(/* event= */ "cleanUpRecentsAnimation");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "cleanUpRecentsAnimation");
|
||||
}
|
||||
|
||||
public static void logOnInputEventUserLocked() {
|
||||
ActiveGestureLog.INSTANCE.addLog(
|
||||
"TIS.onInputEvent: Cannot process input event: user is locked");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"TIS.onInputEvent: Cannot process input event: user is locked");
|
||||
}
|
||||
@@ -171,7 +172,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
+ "but a previously-requested recents animation hasn't started. "
|
||||
+ "Ignoring all following motion events.",
|
||||
RECENTS_ANIMATION_START_PENDING);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "TIS.onMotionEvent: A new gesture has been started, "
|
||||
+ "but a previously-requested recents animation hasn't started. "
|
||||
+ "Ignoring all following motion events.");
|
||||
@@ -180,53 +181,53 @@ public class ActiveGestureProtoLogProxy {
|
||||
public static void logOnInputEventThreeButtonNav() {
|
||||
ActiveGestureLog.INSTANCE.addLog("TIS.onInputEvent: Cannot process input event: "
|
||||
+ "using 3-button nav and event is not a trackpad event");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "TIS.onInputEvent: Cannot process input event: "
|
||||
+ "using 3-button nav and event is not a trackpad event");
|
||||
}
|
||||
|
||||
public static void logPreloadRecentsAnimation() {
|
||||
ActiveGestureLog.INSTANCE.addLog("preloadRecentsAnimation");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "preloadRecentsAnimation");
|
||||
}
|
||||
|
||||
public static void logRecentTasksMissing() {
|
||||
ActiveGestureLog.INSTANCE.addLog("Null mRecentTasks", RECENT_TASKS_MISSING);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "Null mRecentTasks");
|
||||
}
|
||||
|
||||
public static void logExecuteHomeCommand() {
|
||||
ActiveGestureLog.INSTANCE.addLog("OverviewCommandHelper.executeCommand(HOME)");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "OverviewCommandHelper.executeCommand(HOME)");
|
||||
}
|
||||
|
||||
public static void logFinishRecentsAnimationCallback() {
|
||||
ActiveGestureLog.INSTANCE.addLog("finishRecentsAnimation-callback");
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "finishRecentsAnimation-callback");
|
||||
}
|
||||
|
||||
public static void logOnScrollerAnimationAborted() {
|
||||
ActiveGestureLog.INSTANCE.addLog("scroller animation aborted",
|
||||
ActiveGestureErrorDetector.GestureEvent.SCROLLER_ANIMATION_ABORTED);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "scroller animation aborted");
|
||||
}
|
||||
|
||||
public static void logInputConsumerBecameActive(@NonNull String consumerName) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"%s became active", consumerName));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "%s became active", consumerName);
|
||||
}
|
||||
|
||||
public static void logTaskLaunchFailed(int launchedTaskId) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"Launch failed, task (id=%d) finished mid transition", launchedTaskId));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"Launch failed, task (id=%d) finished mid transition", launchedTaskId);
|
||||
}
|
||||
@@ -234,7 +235,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
public static void logOnPageEndTransition(int nextPageIndex) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"onPageEndTransition: current page index updated: %d", nextPageIndex));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"onPageEndTransition: current page index updated: %d", nextPageIndex);
|
||||
}
|
||||
@@ -244,7 +245,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
"Quick switch from home fallback case: The TaskView at index %d is missing.",
|
||||
taskIndex),
|
||||
QUICK_SWITCH_FROM_HOME_FALLBACK);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"Quick switch from home fallback case: The TaskView at index %d is missing.",
|
||||
taskIndex);
|
||||
@@ -255,7 +256,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
"Quick switch from home failed: TaskViews at indices %d and 0 are missing.",
|
||||
taskIndex),
|
||||
QUICK_SWITCH_FROM_HOME_FAILED);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"Quick switch from home failed: TaskViews at indices %d and 0 are missing.",
|
||||
taskIndex);
|
||||
@@ -265,42 +266,42 @@ public class ActiveGestureProtoLogProxy {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"finishRecentsAnimation: %b", toRecents),
|
||||
/* gestureEvent= */ FINISH_RECENTS_ANIMATION);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "finishRecentsAnimation: %b", toRecents);
|
||||
}
|
||||
|
||||
public static void logSetEndTarget(@NonNull String target) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"setEndTarget %s", target), /* gestureEvent= */ SET_END_TARGET);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "setEndTarget %s", target);
|
||||
}
|
||||
|
||||
public static void logStartHomeIntent(@NonNull String reason) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"OverviewComponentObserver.startHomeIntent: %s", reason));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "OverviewComponentObserver.startHomeIntent: %s", reason);
|
||||
}
|
||||
|
||||
public static void logRunningTaskPackage(@NonNull String packageName) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"Current running task package name=%s", packageName));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "Current running task package name=%s", packageName);
|
||||
}
|
||||
|
||||
public static void logSysuiStateFlags(@NonNull String stateFlags) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"Current SystemUi state flags=%s", stateFlags));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "Current SystemUi state flags=%s", stateFlags);
|
||||
}
|
||||
|
||||
public static void logSetInputConsumer(@NonNull String consumerName, @NonNull String reason) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"setInputConsumer: %s. reason(s):%s", consumerName, reason));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"setInputConsumer: %s. reason(s):%s", consumerName, reason);
|
||||
}
|
||||
@@ -312,7 +313,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
+ "one (%s) was excluded from recents",
|
||||
otherTaskPackage,
|
||||
runningTaskPackage));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"Changing active task to %s because the previous task running on top of this "
|
||||
+ "one (%s) was excluded from recents",
|
||||
@@ -328,7 +329,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
/* gestureEvent= */ action == ACTION_DOWN
|
||||
? MOTION_DOWN
|
||||
: MOTION_UP);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"onMotionEvent(%d, %d): %s, %s", x, y, actionString, classification);
|
||||
}
|
||||
@@ -341,7 +342,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
classification,
|
||||
pointerCount),
|
||||
MOTION_MOVE);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"onMotionEvent: %s, %s, pointerCount: %d", action, classification, pointerCount);
|
||||
}
|
||||
@@ -350,7 +351,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
@NonNull String action, @NonNull String classification) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"onMotionEvent: %s, %s", action, classification));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "onMotionEvent: %s, %s", action, classification);
|
||||
}
|
||||
|
||||
@@ -362,7 +363,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
startNavMode,
|
||||
currentNavMode),
|
||||
NAVIGATION_MODE_SWITCHED);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"TIS.onInputEvent: Navigation mode switched mid-gesture (%s -> %s); "
|
||||
+ "cancelling gesture.",
|
||||
@@ -373,7 +374,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
public static void logUnknownInputEvent(@NonNull String event) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"TIS.onInputEvent: Cannot process input event: received unknown event %s", event));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"TIS.onInputEvent: Cannot process input event: received unknown event %s", event);
|
||||
}
|
||||
@@ -381,14 +382,14 @@ public class ActiveGestureProtoLogProxy {
|
||||
public static void logFinishRunningRecentsAnimation(boolean toHome) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"finishRunningRecentsAnimation: %b", toHome));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "finishRunningRecentsAnimation: %b", toHome);
|
||||
}
|
||||
|
||||
public static void logOnRecentsAnimationStartCancelled() {
|
||||
ActiveGestureLog.INSTANCE.addLog("RecentsAnimationCallbacks.onAnimationStart (canceled): 0",
|
||||
/* gestureEvent= */ ON_START_RECENTS_ANIMATION);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "RecentsAnimationCallbacks.onAnimationStart (canceled): 0");
|
||||
}
|
||||
|
||||
@@ -396,7 +397,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"RecentsAnimationCallbacks.onAnimationStart (canceled): %d", appCount),
|
||||
/* gestureEvent= */ ON_START_RECENTS_ANIMATION);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"RecentsAnimationCallbacks.onAnimationStart (canceled): %d", appCount);
|
||||
}
|
||||
@@ -406,7 +407,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
"TaskAnimationManager.startRecentsAnimation(%s): "
|
||||
+ "Setting mRecentsAnimationStartPending = false",
|
||||
callback));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"TaskAnimationManager.startRecentsAnimation(%s): "
|
||||
+ "Setting mRecentsAnimationStartPending = false",
|
||||
@@ -418,7 +419,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
"TaskAnimationManager.startRecentsAnimation: "
|
||||
+ "Setting mRecentsAnimationStartPending = %b",
|
||||
value));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"TaskAnimationManager.startRecentsAnimation: "
|
||||
+ "Setting mRecentsAnimationStartPending = %b",
|
||||
@@ -428,28 +429,28 @@ public class ActiveGestureProtoLogProxy {
|
||||
public static void logLaunchingSideTask(int taskId) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"Launching side task id=%d", taskId));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "Launching side task id=%d", taskId);
|
||||
}
|
||||
|
||||
public static void logOnInputEventActionDown(@NonNull ActiveGestureLog.CompoundString reason) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"TIS.onMotionEvent: ").append(reason));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "TIS.onMotionEvent: %s", reason.toString());
|
||||
}
|
||||
|
||||
public static void logStartNewTask(@NonNull ActiveGestureLog.CompoundString tasks) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"Launching task: ").append(tasks));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "TIS.onMotionEvent: %s", tasks.toString());
|
||||
}
|
||||
|
||||
public static void logMotionPauseDetectorEvent(@NonNull ActiveGestureLog.CompoundString event) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"MotionPauseDetector: ").append(event));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "MotionPauseDetector: %s", event.toString());
|
||||
}
|
||||
|
||||
@@ -457,7 +458,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
@NonNull ActiveGestureLog.CompoundString reason) {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"handleTaskAppeared check failed: ").append(reason));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "handleTaskAppeared check failed: %s", reason.toString());
|
||||
}
|
||||
|
||||
@@ -469,7 +470,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
@NonNull String string,
|
||||
@Nullable ActiveGestureErrorDetector.GestureEvent gestureEvent) {
|
||||
ActiveGestureLog.INSTANCE.addLog(string, gestureEvent);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "%s", string);
|
||||
}
|
||||
|
||||
@@ -477,7 +478,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(
|
||||
"onSettledOnEndTarget %s", endTarget),
|
||||
/* gestureEvent= */ ON_SETTLED_ON_END_TARGET);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG, "onSettledOnEndTarget %s", endTarget);
|
||||
}
|
||||
|
||||
@@ -488,7 +489,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
velocityY,
|
||||
angle),
|
||||
velocityX == 0 && velocityY == 0 ? INVALID_VELOCITY_ON_SWIPE_UP : null);
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"calculateEndTarget: velocities=(x=%fdp/ms, y=%fdp/ms), angle=%f",
|
||||
velocityX,
|
||||
@@ -501,7 +502,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
"Forcefully finishing recents animation: Unexpected task appeared id=%d, pkg=%s",
|
||||
taskId,
|
||||
packageName));
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"Forcefully finishing recents animation: Unexpected task appeared id=%d, pkg=%s",
|
||||
taskId,
|
||||
@@ -511,7 +512,7 @@ public class ActiveGestureProtoLogProxy {
|
||||
public static void logCreateTouchRegionForDisplay(int displayRotation,
|
||||
@NonNull Point displaySize, @NonNull RectF swipeRegion, @NonNull RectF ohmRegion,
|
||||
int gesturalHeight, int largerGesturalHeight, @NonNull String reason) {
|
||||
if (!enableActiveGestureProtoLog()) return;
|
||||
if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(ACTIVE_GESTURE_LOG,
|
||||
"OrientationTouchTransformer.createRegionForDisplay: "
|
||||
+ "dispRot=%d, dispSize=%s, swipeRegion=%s, ohmRegion=%s, "
|
||||
|
||||
Reference in new issue
Block a user