Remove expecting DOWN events in TAPL tests.
ACTION_UP is always preceded by ACTION_DOWN which means when launcher receives an UP events, down event is obviously sent. In b/325377690 , we started seeing only in P9 devices the DOWN events didn't reach TAPL. I added InputDispatcher logs which shows both DOWN and UP events are sent by system_server to NexusLauncher. However TAPL doesn't receive it. After spending lot of time debugging this, I think we are safe to remove DOWN event expectation in TAPL. Bug: 325377690 Test: Manual, TAPL presubmits Flag: NA Change-Id: I6d3587c488d45e3dc53d2c1c4f3b6b49285eae94
This commit is contained in:
@@ -62,7 +62,14 @@ public final class TestLogging {
|
||||
|
||||
public static void recordKeyEvent(String sequence, String message, KeyEvent event) {
|
||||
if (Utilities.isRunningInTestHarness()) {
|
||||
recordEventSlow(sequence, message + ": " + event, true);
|
||||
// This removes expecting ACTION_DOWN key event in the test. ACTION_UP is
|
||||
// always preceded by ACTION_DOWN.
|
||||
// Sometimes test doesn't receive ACTION_DOWN key event and we will assume that
|
||||
// Launcher relies only on ACTION_UP.
|
||||
// However in the test we will send both ACTION_DOWN and ACTION_UP key events.
|
||||
// But stop reporting to tapl if action is down.
|
||||
boolean reportToTapl = event.getAction() != KeyEvent.ACTION_DOWN;
|
||||
recordEventSlow(sequence, message + ": " + event, reportToTapl);
|
||||
registerEventNotFromTest(event);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user