Move flags to desktopmodeflag

Flag: com.android.launcher3.enable_fallback_overview_in_window
Flag: com.android.launcher3.enable_launcher_overview_in_window
Flag: com.android.launcher3.enable_state_manager_proto_log
Flag: com.android.launcher3.enable_recents_window_proto_log

Test: built and ran locally with flags on and off

Bug: b/401073215
Bug: b/401073401
Bug: b/401075030
Bug: b/401076625

Change-Id: I1bd2822d20f677445610b912dd82ff160bff4143
This commit is contained in:
Randy Pfohl
2025-03-07 18:22:59 +00:00
parent 2642bfb210
commit d94ca57547
15 changed files with 91 additions and 59 deletions
@@ -16,14 +16,16 @@
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 android.window.DesktopModeFlags;
import androidx.annotation.NonNull;
import com.android.internal.protolog.ProtoLog;
import com.android.internal.protolog.common.IProtoLogGroup;
import com.android.launcher3.Flags;
/**
* Proxy class used for Recents Window ProtoLog support.
@@ -35,19 +37,20 @@ import com.android.internal.protolog.common.IProtoLogGroup;
* method. Or, if an existing entry needs to be modified, simply update it here.
*/
public class RecentsWindowProtoLogProxy {
private static final DesktopModeFlags.DesktopModeFlag ENABLE_RECENTS_WINDOW_PROTO_LOG =
new DesktopModeFlags.DesktopModeFlag(Flags::enableRecentsWindowProtoLog, true);
public static void logOnStateSetStart(@NonNull String stateName) {
if (!enableRecentsWindowProtoLog() || !isProtoLogInitialized()) return;
if (!ENABLE_RECENTS_WINDOW_PROTO_LOG.isTrue() || !isProtoLogInitialized()) return;
ProtoLog.d(RECENTS_WINDOW, "onStateSetStart: %s", stateName);
}
public static void logOnStateSetEnd(@NonNull String stateName) {
if (!enableRecentsWindowProtoLog() || !isProtoLogInitialized()) return;
if (!ENABLE_RECENTS_WINDOW_PROTO_LOG.isTrue() || !isProtoLogInitialized()) return;
ProtoLog.d(RECENTS_WINDOW, "onStateSetEnd: %s", stateName);
}
public static void logStartRecentsWindow(boolean isShown, boolean windowViewIsNull) {
if (!enableRecentsWindowProtoLog() || !isProtoLogInitialized()) return;
if (!ENABLE_RECENTS_WINDOW_PROTO_LOG.isTrue() || !isProtoLogInitialized()) return;
ProtoLog.d(RECENTS_WINDOW,
"Starting recents window: isShow= %b, windowViewIsNull=%b",
isShown,
@@ -55,7 +58,7 @@ public class RecentsWindowProtoLogProxy {
}
public static void logCleanup(boolean isShown) {
if (!enableRecentsWindowProtoLog() || !isProtoLogInitialized()) return;
if (!ENABLE_RECENTS_WINDOW_PROTO_LOG.isTrue() || !isProtoLogInitialized()) return;
ProtoLog.d(RECENTS_WINDOW, "Cleaning up recents window: isShow= %b", isShown);
}
}