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:
@@ -18,6 +18,7 @@ package com.android.quickstep.util;
|
||||
|
||||
import static com.android.launcher3.Flags.enableRecentsWindowProtoLog;
|
||||
import static com.android.quickstep.util.QuickstepProtoLogGroup.RECENTS_WINDOW;
|
||||
import static com.android.quickstep.util.QuickstepProtoLogGroup.isProtoLogInitialized;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
@@ -36,17 +37,17 @@ import com.android.internal.protolog.common.IProtoLogGroup;
|
||||
public class RecentsWindowProtoLogProxy {
|
||||
|
||||
public static void logOnStateSetStart(@NonNull String stateName) {
|
||||
if (!enableRecentsWindowProtoLog()) return;
|
||||
if (!enableRecentsWindowProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(RECENTS_WINDOW, "onStateSetStart: %s", stateName);
|
||||
}
|
||||
|
||||
public static void logOnStateSetEnd(@NonNull String stateName) {
|
||||
if (!enableRecentsWindowProtoLog()) return;
|
||||
if (!enableRecentsWindowProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(RECENTS_WINDOW, "onStateSetEnd: %s", stateName);
|
||||
}
|
||||
|
||||
public static void logStartRecentsWindow(boolean isShown, boolean windowViewIsNull) {
|
||||
if (!enableRecentsWindowProtoLog()) return;
|
||||
if (!enableRecentsWindowProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(RECENTS_WINDOW,
|
||||
"Starting recents window: isShow= %b, windowViewIsNull=%b",
|
||||
isShown,
|
||||
@@ -54,7 +55,7 @@ public class RecentsWindowProtoLogProxy {
|
||||
}
|
||||
|
||||
public static void logCleanup(boolean isShown) {
|
||||
if (!enableRecentsWindowProtoLog()) return;
|
||||
if (!enableRecentsWindowProtoLog() || !isProtoLogInitialized()) return;
|
||||
ProtoLog.d(RECENTS_WINDOW, "Cleaning up recents window: isShow= %b", isShown);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user