Files
Flexera-Launcher/quickstep/src_protolog/com/android/quickstep/util/RecentsWindowProtoLogProxy.java
T
Schneider Victor-Tulias 6d532fe59d Fix broken state when tapping nav handle from running app.
When tapping the nav handle from running app, OtherActivityInputConsumer will start the recents window through TaskAnimationManager. The recents window would then typically be closed through the StateManager, however since the state isn't changing, then RecentsWindowManger never actually gets any signal to close the recents window. Added a new callback to fix this flow.

Flag: com.android.launcher3.enable_launcher_overview_in_window
Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 377678992
Test: pre/post submit tests. tapped nev handle from a runnign app
Change-Id: If1fe7de195a9a8a98c72629c7904d469a5768d7f
2025-05-21 10:35:11 -07:00

75 lines
3.1 KiB
Java

/*
* Copyright (C) 2024 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.quickstep.util;
import static com.android.quickstep.util.QuickstepProtoLogGroup.RECENTS_WINDOW;
import static com.android.quickstep.util.QuickstepProtoLogGroup.isProtoLogInitialized;
import android.window.DesktopExperienceFlags;
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.
* <p>
* This file will have all of its static strings in the
* {@link ProtoLog#d(IProtoLogGroup, String, Object...)} calls replaced by dynamic code/strings.
* <p>
* When a new Recents Window log needs to be added to the codebase, add it here under a new unique
* method. Or, if an existing entry needs to be modified, simply update it here.
*/
public class RecentsWindowProtoLogProxy {
private static final DesktopExperienceFlags.DesktopExperienceFlag
ENABLE_RECENTS_WINDOW_PROTO_LOG =
new DesktopExperienceFlags.DesktopExperienceFlag(
Flags::enableRecentsWindowProtoLog,
false,
Flags.FLAG_ENABLE_RECENTS_WINDOW_PROTO_LOG);
public static void logOnStateSetStart(@NonNull String stateName) {
if (!ENABLE_RECENTS_WINDOW_PROTO_LOG.isTrue() || !isProtoLogInitialized()) return;
ProtoLog.d(RECENTS_WINDOW, "onStateSetStart: %s", stateName);
}
public static void logOnStateSetEnd(@NonNull String stateName) {
if (!ENABLE_RECENTS_WINDOW_PROTO_LOG.isTrue() || !isProtoLogInitialized()) return;
ProtoLog.d(RECENTS_WINDOW, "onStateSetEnd: %s", stateName);
}
public static void logOnRepeatStateSetAborted(@NonNull String stateName) {
if (!ENABLE_RECENTS_WINDOW_PROTO_LOG.isTrue() || !isProtoLogInitialized()) return;
ProtoLog.d(RECENTS_WINDOW, "onRepeatStateSetAborted: %s", stateName);
}
public static void logStartRecentsWindow(boolean isShown, boolean windowViewIsNull) {
if (!ENABLE_RECENTS_WINDOW_PROTO_LOG.isTrue() || !isProtoLogInitialized()) return;
ProtoLog.d(RECENTS_WINDOW,
"Starting recents window: isShow= %b, windowViewIsNull=%b",
isShown,
windowViewIsNull);
}
public static void logCleanup(boolean isShown) {
if (!ENABLE_RECENTS_WINDOW_PROTO_LOG.isTrue() || !isProtoLogInitialized()) return;
ProtoLog.d(RECENTS_WINDOW, "Cleaning up recents window: isShow= %b", isShown);
}
}