diff --git a/tests/multivalentTests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/multivalentTests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 389b57fa22..1dc4f9696c 100644 --- a/tests/multivalentTests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/multivalentTests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -1207,7 +1207,8 @@ public final class LauncherInstrumentation { waitForNavigationUiObject("back").click(); } if (launcherVisible) { - if (getContext().getApplicationInfo().isOnBackInvokedCallbackEnabled()) { + if (InstrumentationRegistry.getTargetContext().getApplicationInfo() + .isOnBackInvokedCallbackEnabled()) { expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_ON_BACK_INVOKED); } else { expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_KEY_BACK_DOWN);