mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Show overview as grid in fallback recents
- Replace mShowAsGrid with state specific mOverviewGridEnabled and mCurrentGestureEndTarget - Avoid showing invisible home task in grid - Fix quick switch out of orientation in fallback recents - Add a HOME state to switch to when starting home, to avoid showing grid overview briefly in quick switch - Separate clear all button and overview actions handling - Always maintain first task's fullscreen translation at 0 to avoid jumping when mOverviewFullscreenEnabled changes - Moved fullscreenTranslation calculation to RecentsView - Added GestureEndTarget -> BaseState translation to allow querying displayOverviewAsGrid for a displayOverviewTasksAsGrid Bug: 174464863 Test: Launch overveiw from home, launch overveiw from app, launch into app, test for both small and large screens Change-Id: Iee06d94d3067ea45cadd2051717223ddc0e6e70c
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.quickstep;
|
||||
import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON;
|
||||
import static com.android.quickstep.fallback.RecentsState.BACKGROUND_APP;
|
||||
import static com.android.quickstep.fallback.RecentsState.DEFAULT;
|
||||
import static com.android.quickstep.fallback.RecentsState.HOME;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
@@ -81,6 +82,7 @@ public final class FallbackActivityInterface extends
|
||||
@Override
|
||||
public AnimationFactory prepareRecentsUI(RecentsAnimationDeviceState deviceState,
|
||||
boolean activityVisible, Consumer<AnimatorControllerWithResistance> callback) {
|
||||
notifyRecentsOfOrientation(deviceState.getRotationTouchHelper());
|
||||
DefaultAnimationFactory factory = new DefaultAnimationFactory(callback);
|
||||
factory.initUI();
|
||||
return factory;
|
||||
@@ -154,4 +156,25 @@ public final class FallbackActivityInterface extends
|
||||
}
|
||||
activity.<RecentsView>getOverviewPanel().startHome();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecentsState stateFromGestureEndTarget(GestureState.GestureEndTarget endTarget) {
|
||||
switch (endTarget) {
|
||||
case RECENTS:
|
||||
return DEFAULT;
|
||||
case NEW_TASK:
|
||||
case LAST_TASK:
|
||||
return BACKGROUND_APP;
|
||||
case HOME:
|
||||
default:
|
||||
return HOME;
|
||||
}
|
||||
}
|
||||
|
||||
private void notifyRecentsOfOrientation(RotationTouchHelper rotationTouchHelper) {
|
||||
// reset layout on swipe to home
|
||||
RecentsView recentsView = getCreatedActivity().getOverviewPanel();
|
||||
recentsView.setLayoutRotation(rotationTouchHelper.getCurrentActiveRotation(),
|
||||
rotationTouchHelper.getDisplayRotation());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user