Adding some logging to track test failure in post submit

Test: not needed

Bug: 295069071

Change-Id: I3394267dbbd808544e2759737c7d139c5ba4121f
This commit is contained in:
randypfohl
2023-08-21 14:41:52 -07:00
parent 7900abdab7
commit ecffb20ba8
5 changed files with 11 additions and 2 deletions

View File

@@ -37,6 +37,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Trace;
import android.util.Log;
import android.view.Display;
import android.view.RemoteAnimationAdapter;
import android.view.RemoteAnimationTarget;
@@ -59,7 +60,6 @@ import com.android.launcher3.R;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.compat.AccessibilityManagerCompat;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.statemanager.StateManager;
import com.android.launcher3.statemanager.StateManager.AtomicAnimationFactory;
@@ -67,6 +67,7 @@ import com.android.launcher3.statemanager.StateManager.StateHandler;
import com.android.launcher3.statemanager.StatefulActivity;
import com.android.launcher3.taskbar.FallbackTaskbarUIController;
import com.android.launcher3.taskbar.TaskbarManager;
import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.ActivityOptionsWrapper;
import com.android.launcher3.util.ActivityTracker;
import com.android.launcher3.util.RunnableList;
@@ -404,6 +405,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
}
public void startHome() {
Log.d(TestProtocol.INCORRECT_HOME_STATE, "start home from recents activity");
RecentsView recentsView = getOverviewPanel();
recentsView.switchToScreenshot(() -> recentsView.finishRecentsAnimation(true,
this::startHomeInternal));

View File

@@ -38,6 +38,7 @@ import androidx.annotation.UiThread;
import com.android.launcher3.Utilities;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.DisplayController;
import com.android.quickstep.TopTaskTracker.CachedTaskInfo;
import com.android.quickstep.util.ActiveGestureLog;
@@ -179,6 +180,9 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn
RecentsView recentsView =
activityInterface.getCreatedActivity().getOverviewPanel();
if (recentsView != null) {
Log.d(TestProtocol.INCORRECT_HOME_STATE,
"finish recents animation on "
+ compat.taskInfo.description);
recentsView.finishRecentsAnimation(true, null);
}
return;

View File

@@ -5296,6 +5296,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
cleanupRemoteTargets();
if (mRecentsAnimationController == null) {
Log.d(TestProtocol.INCORRECT_HOME_STATE, "finish recents animation but recents "
+ "animation controller was null. returning.");
if (onFinishComplete != null) {
onFinishComplete.run();
}

View File

@@ -161,7 +161,7 @@ public final class TestProtocol {
public static final String LAUNCH_SPLIT_PAIR = "b/288939273";
public static final String OVERVIEW_OVER_HOME = "b/279059025";
public static final String INCORRECT_HOME_STATE = "b/293191790";
public static final String REQUEST_EMULATE_DISPLAY = "emulate-display";
public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display";
public static final String REQUEST_IS_EMULATE_DISPLAY_RUNNING = "is-emulate-display-running";

View File

@@ -333,6 +333,7 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
@Test
@Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) // b/293191790
@ScreenRecord
@PortraitLandscape
public void testWidgets() throws Exception {
// Test opening widgets.