Merge "Skip setShelfHeight if Launcher is not started" into sc-dev

This commit is contained in:
Hongwei Wang 2021-05-12 23:42:35 +00:00 committed by Android (Google) Code Review
commit da21eb9159
1 changed files with 12 additions and 8 deletions

View File

@ -200,14 +200,18 @@ public class QuickstepLauncher extends BaseQuickstepLauncher {
*/ */
private void onStateOrResumeChanging(boolean inTransition) { private void onStateOrResumeChanging(boolean inTransition) {
LauncherState state = getStateManager().getState(); LauncherState state = getStateManager().getState();
DeviceProfile profile = getDeviceProfile(); boolean started = ((getActivityFlags() & ACTIVITY_STATE_STARTED)) != 0;
boolean willUserBeActive = (getActivityFlags() & ACTIVITY_STATE_USER_WILL_BE_ACTIVE) != 0; if (started) {
boolean visible = (state == NORMAL || state == OVERVIEW) DeviceProfile profile = getDeviceProfile();
&& (willUserBeActive || isUserActive()) boolean willUserBeActive =
&& !profile.isVerticalBarLayout() (getActivityFlags() & ACTIVITY_STATE_USER_WILL_BE_ACTIVE) != 0;
&& profile.isPhone && !profile.isLandscape; boolean visible = (state == NORMAL || state == OVERVIEW)
UiThreadHelper.runAsyncCommand(this, SET_SHELF_HEIGHT, visible ? 1 : 0, && (willUserBeActive || isUserActive())
profile.hotseatBarSizePx); && !profile.isVerticalBarLayout()
&& profile.isPhone && !profile.isLandscape;
UiThreadHelper.runAsyncCommand(this, SET_SHELF_HEIGHT, visible ? 1 : 0,
profile.hotseatBarSizePx);
}
if (state == NORMAL && !inTransition) { if (state == NORMAL && !inTransition) {
((RecentsView) getOverviewPanel()).setSwipeDownShouldLaunchApp(false); ((RecentsView) getOverviewPanel()).setSwipeDownShouldLaunchApp(false);
} }