mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Merge "Debugging Logs for TaplTestsTransientTaskbar#testSwipeToStashAndUnstash" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
90182bffc1
@@ -174,6 +174,7 @@ public final class TestProtocol {
|
||||
public static final String UIOBJECT_STALE_ELEMENT = "b/319501259";
|
||||
public static final String ACTIVITY_NOT_RESUMED_AFTER_BACK = "b/322823209";
|
||||
public static final String GET_FROM_RECENTS_FAILURE = "b/321775748";
|
||||
public static final String SUCCESSFUL_GESTURE_MISMATCH_EVENTS = "b/324940434";
|
||||
|
||||
public static final String REQUEST_EMULATE_DISPLAY = "emulate-display";
|
||||
public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display";
|
||||
|
||||
@@ -24,7 +24,9 @@ import static com.android.launcher3.testing.shared.TestProtocol.REQUEST_ENABLE_B
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.REQUEST_SHELL_DRAG_READY;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.REQUEST_STASHED_TASKBAR_SCALE;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.REQUEST_TASKBAR_FROM_NAV_THRESHOLD;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.SUCCESSFUL_GESTURE_MISMATCH_EVENTS;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.TEST_INFO_RESPONSE_FIELD;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.testLogD;
|
||||
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
@@ -139,6 +141,8 @@ public final class LaunchedAppState extends Background {
|
||||
|
||||
return new Taskbar(mLauncher);
|
||||
} finally {
|
||||
testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS,
|
||||
"swipeUpToUnstashTaskbar: completed gesture");
|
||||
mLauncher.getTestInfo(REQUEST_DISABLE_BLOCK_TIMEOUT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,9 @@ import static com.android.launcher3.tapl.TestHelpers.getOverviewPackageName;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.NORMAL_STATE_ORDINAL;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.REQUEST_GET_SPLIT_SELECTION_ACTIVE;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.REQUEST_NUM_ALL_APPS_COLUMNS;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.SUCCESSFUL_GESTURE_MISMATCH_EVENTS;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.TEST_INFO_RESPONSE_FIELD;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.testLogD;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.Instrumentation;
|
||||
@@ -2309,9 +2311,13 @@ public final class LauncherInstrumentation {
|
||||
}
|
||||
|
||||
if (mEventChecker != null) {
|
||||
testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "eventsCheck: mEventChecker exists");
|
||||
mEventChecker = null;
|
||||
if (mCheckEventsForSuccessfulGestures) {
|
||||
final String message = eventChecker.verify(WAIT_TIME_MS, true);
|
||||
testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS,
|
||||
"mCheckEventsForSuccessfulGestures = true | eventsCheck: message="
|
||||
+ message);
|
||||
if (message != null) {
|
||||
dumpDiagnostics(message);
|
||||
checkForAnomaly();
|
||||
|
||||
@@ -18,6 +18,8 @@ package com.android.launcher3.tapl;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.SEQUENCE_MAIN;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.SEQUENCE_PILFER;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.SEQUENCE_TIS;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.SUCCESSFUL_GESTURE_MISMATCH_EVENTS;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.testLogD;
|
||||
|
||||
import android.os.SystemClock;
|
||||
|
||||
@@ -88,6 +90,7 @@ public class LogEventChecker {
|
||||
}
|
||||
|
||||
String verify(long waitForExpectedCountMs, boolean successfulGesture) {
|
||||
testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "LogEventChecker.java - verify");
|
||||
final ListMap<String> actualEvents = finishSync(waitForExpectedCountMs);
|
||||
if (actualEvents == null) return "null event sequences because launcher likely died";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user