Merge "Check NPE and log error condition for enableBlockingTimeout in test harness." into tm-qpr-dev am: 1eb1e03651

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20501925

Change-Id: I71768063eba0eebd6b98c504e9dce9bdfdb12d03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-11-17 19:20:00 +00:00
committed by Automerger Merge Worker

View File

@@ -179,9 +179,15 @@ public class QuickstepTestInformationHandler extends TestInformationHandler {
private void enableBlockingTimeout(
TouchInteractionService.TISBinder tisBinder, boolean enable) {
// Allow null-pointer to catch illegal states.
tisBinder.getTaskbarManager().getCurrentActivityContext().enableBlockingTimeoutDuringTests(
enable);
TaskbarActivityContext context = tisBinder.getTaskbarManager().getCurrentActivityContext();
if (context == null) {
if (TestProtocol.sDebugTracing) {
Log.d(NPE_TRANSIENT_TASKBAR, "enableBlockingTimeout: enable=" + enable,
new Exception());
}
} else {
context.enableBlockingTimeoutDuringTests(enable);
}
}
private void enableTransientTaskbar(