From 7900abdab7cf3751679d1b46c5d96f0eeae36b5c Mon Sep 17 00:00:00 2001 From: randypfohl Date: Thu, 17 Aug 2023 11:35:41 -0700 Subject: [PATCH 1/2] enable testWidgets for postsubmit for long term debugging Test: no need here. Bug: 295069071 Change-Id: Idf9ef20e15518802dbe89b49489149fe76d31b03 --- tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java index 1ade1b0c55..8e9cb7d7c9 100644 --- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java +++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java @@ -19,6 +19,8 @@ package com.android.launcher3.ui; import static androidx.test.InstrumentationRegistry.getInstrumentation; import static com.android.launcher3.testing.shared.TestProtocol.ICON_MISSING; +import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL; +import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT; import static com.google.common.truth.Truth.assertThat; @@ -61,6 +63,7 @@ import com.android.launcher3.util.TestUtil; import com.android.launcher3.util.Wait; import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord; import com.android.launcher3.util.rule.TISBindRule; +import com.android.launcher3.util.rule.TestStabilityRule.Stability; import com.android.launcher3.widget.picker.WidgetsFullSheet; import com.android.launcher3.widget.picker.WidgetsRecyclerView; @@ -329,7 +332,7 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest { } @Test - @Ignore // b/293191790 + @Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) // b/293191790 @PortraitLandscape public void testWidgets() throws Exception { // Test opening widgets. From ecffb20ba8269ca0a2dbfa8159b0d724e9ce0935 Mon Sep 17 00:00:00 2001 From: randypfohl Date: Mon, 21 Aug 2023 14:41:52 -0700 Subject: [PATCH 2/2] Adding some logging to track test failure in post submit Test: not needed Bug: 295069071 Change-Id: I3394267dbbd808544e2759737c7d139c5ba4121f --- quickstep/src/com/android/quickstep/RecentsActivity.java | 4 +++- quickstep/src/com/android/quickstep/TaskAnimationManager.java | 4 ++++ quickstep/src/com/android/quickstep/views/RecentsView.java | 2 ++ .../com/android/launcher3/testing/shared/TestProtocol.java | 2 +- tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java index 2e1a62c372..ae5d1e35d5 100644 --- a/quickstep/src/com/android/quickstep/RecentsActivity.java +++ b/quickstep/src/com/android/quickstep/RecentsActivity.java @@ -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 { } public void startHome() { + Log.d(TestProtocol.INCORRECT_HOME_STATE, "start home from recents activity"); RecentsView recentsView = getOverviewPanel(); recentsView.switchToScreenshot(() -> recentsView.finishRecentsAnimation(true, this::startHomeInternal)); diff --git a/quickstep/src/com/android/quickstep/TaskAnimationManager.java b/quickstep/src/com/android/quickstep/TaskAnimationManager.java index 6dbb5bfb3c..0b5a0708b7 100644 --- a/quickstep/src/com/android/quickstep/TaskAnimationManager.java +++ b/quickstep/src/com/android/quickstep/TaskAnimationManager.java @@ -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; diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 4b8741d60c..cb5b457efa 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -5296,6 +5296,8 @@ public abstract class RecentsView