Fix KI in test and re-enable for postsubmit.

- The taskbar stashing logic with hardware keyboards was different
  between tests and user experience; aligned the test to be the
  same.
- There is still a previous test failure that only occurred in
  post submit, so also add ScreenRecord to diagnose it
- Once that is resolved, can promote the test to PRESUBMIT.

Test: testQuickSwitchToPreviousAppForTablet
Flag: NA
Fixes: 318544733
Bug: 314873201
Change-Id: Ia813eb0294d759c40d90cec7a8e9a7e0aea2d917
This commit is contained in:
Tony Wickham
2023-12-06 20:49:48 +00:00
parent afbf61a150
commit c5d4e4dcf5
3 changed files with 17 additions and 6 deletions

View File

@@ -175,6 +175,13 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
sTransientTaskbarStatusForTests = enable;
}
/**
* Returns whether the taskbar is pinned in gesture navigation mode.
*/
public static boolean isPinnedTaskbar(Context context) {
return INSTANCE.get(context).getInfo().isPinnedTaskbar();
}
@Override
public void close() {
mDestroyed = true;
@@ -423,6 +430,12 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
}
return true;
}
/**
* Returns whether the taskbar is pinned in gesture navigation mode.
*/
public boolean isPinnedTaskbar() {
return navigationMode == NavigationMode.NO_BUTTON && !isTransientTaskbar();
}
/**
* Returns {@code true} if the bounds represent a tablet.