mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Merge "Add a method to go Home from immersive fullscreen app" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
9cf11627de
@@ -994,6 +994,25 @@ public final class LauncherInstrumentation {
|
||||
return goHome();
|
||||
}
|
||||
|
||||
/**
|
||||
* Goes to home from immersive fullscreen app by first swiping up to bring navbar, and then
|
||||
* performing {@code goHome()} action.
|
||||
* Currently only supports gesture navigation mode.
|
||||
*
|
||||
* @return the Workspace object.
|
||||
*/
|
||||
public Workspace goHomeFromImmersiveFullscreenApp() {
|
||||
assertTrue("expected gesture navigation mode",
|
||||
getNavigationModel() == NavigationModel.ZERO_BUTTON);
|
||||
final Point displaySize = getRealDisplaySize();
|
||||
linearGesture(
|
||||
displaySize.x / 2, displaySize.y - 1,
|
||||
displaySize.x / 2, 0,
|
||||
ZERO_BUTTON_STEPS_FROM_BACKGROUND_TO_HOME,
|
||||
false, GestureScope.EXPECT_PILFER);
|
||||
return goHome();
|
||||
}
|
||||
|
||||
/**
|
||||
* Goes to home by swiping up in zero-button mode or pressing Home button.
|
||||
* Calling it after another TAPL call is safe because all TAPL methods wait for the animations
|
||||
|
||||
Reference in New Issue
Block a user