Merge "Not caching TaskView during quickswitch" into ub-launcher3-rvc-dev
This commit is contained in:
+10
-11
@@ -35,8 +35,6 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_O
|
|||||||
|
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
import com.android.launcher3.Launcher;
|
import com.android.launcher3.Launcher;
|
||||||
import com.android.launcher3.LauncherState;
|
import com.android.launcher3.LauncherState;
|
||||||
import com.android.launcher3.Utilities;
|
import com.android.launcher3.Utilities;
|
||||||
@@ -57,7 +55,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper;
|
|||||||
*/
|
*/
|
||||||
public class QuickSwitchTouchController extends AbstractStateChangeTouchController {
|
public class QuickSwitchTouchController extends AbstractStateChangeTouchController {
|
||||||
|
|
||||||
private @Nullable TaskView mTaskToLaunch;
|
protected final RecentsView mOverviewPanel;
|
||||||
|
|
||||||
public QuickSwitchTouchController(Launcher launcher) {
|
public QuickSwitchTouchController(Launcher launcher) {
|
||||||
this(launcher, SingleAxisSwipeDetector.HORIZONTAL);
|
this(launcher, SingleAxisSwipeDetector.HORIZONTAL);
|
||||||
@@ -65,6 +63,7 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll
|
|||||||
|
|
||||||
protected QuickSwitchTouchController(Launcher l, SingleAxisSwipeDetector.Direction dir) {
|
protected QuickSwitchTouchController(Launcher l, SingleAxisSwipeDetector.Direction dir) {
|
||||||
super(l, dir);
|
super(l, dir);
|
||||||
|
mOverviewPanel = l.getOverviewPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -94,7 +93,6 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll
|
|||||||
public void onDragStart(boolean start, float startDisplacement) {
|
public void onDragStart(boolean start, float startDisplacement) {
|
||||||
super.onDragStart(start, startDisplacement);
|
super.onDragStart(start, startDisplacement);
|
||||||
mStartContainerType = LauncherLogProto.ContainerType.NAVBAR;
|
mStartContainerType = LauncherLogProto.ContainerType.NAVBAR;
|
||||||
mTaskToLaunch = mLauncher.<RecentsView>getOverviewPanel().getTaskViewAt(0);
|
|
||||||
ActivityManagerWrapper.getInstance()
|
ActivityManagerWrapper.getInstance()
|
||||||
.closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
|
.closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
|
||||||
}
|
}
|
||||||
@@ -102,7 +100,6 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll
|
|||||||
@Override
|
@Override
|
||||||
protected void onSwipeInteractionCompleted(LauncherState targetState, int logAction) {
|
protected void onSwipeInteractionCompleted(LauncherState targetState, int logAction) {
|
||||||
super.onSwipeInteractionCompleted(targetState, logAction);
|
super.onSwipeInteractionCompleted(targetState, logAction);
|
||||||
mTaskToLaunch = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -141,13 +138,15 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateFullscreenProgress(float progress) {
|
private void updateFullscreenProgress(float progress) {
|
||||||
if (mTaskToLaunch != null) {
|
mOverviewPanel.setFullscreenProgress(progress);
|
||||||
mTaskToLaunch.setFullscreenProgress(progress);
|
int sysuiFlags = 0;
|
||||||
int sysuiFlags = progress > UPDATE_SYSUI_FLAGS_THRESHOLD
|
if (progress > UPDATE_SYSUI_FLAGS_THRESHOLD) {
|
||||||
? mTaskToLaunch.getThumbnail().getSysUiStatusNavFlags()
|
TaskView tv = mOverviewPanel.getTaskViewAt(0);
|
||||||
: 0;
|
if (tv != null) {
|
||||||
mLauncher.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, sysuiFlags);
|
sysuiFlags = tv.getThumbnail().getSysUiStatusNavFlags();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
mLauncher.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, sysuiFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user