Implement swipe up and quick scrub onboarding (Pt. Launcher)
SysUI change: ag/3914771 Bug: 70180942 Test: manual test Change-Id: I42ade28ebad6dcbbcee6dfb80791f22f36e78290
This commit is contained in:
parent
955a018df7
commit
5c74f7bb59
Binary file not shown.
|
@ -12,6 +12,7 @@ import com.android.launcher3.LauncherState;
|
|||
import com.android.launcher3.touch.AbstractStateChangeTouchController;
|
||||
import com.android.launcher3.touch.SwipeDetector;
|
||||
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
|
||||
import com.android.quickstep.RecentsModel;
|
||||
import com.android.quickstep.util.SysuiEventLogger;
|
||||
|
||||
/**
|
||||
|
@ -19,6 +20,8 @@ import com.android.quickstep.util.SysuiEventLogger;
|
|||
*/
|
||||
public class LandscapeEdgeSwipeController extends AbstractStateChangeTouchController {
|
||||
|
||||
private static final String TAG = "LandscapeEdgeSwipeCtrl";
|
||||
|
||||
public LandscapeEdgeSwipeController(Launcher l) {
|
||||
super(l, SwipeDetector.HORIZONTAL);
|
||||
}
|
||||
|
@ -69,6 +72,7 @@ public class LandscapeEdgeSwipeController extends AbstractStateChangeTouchContro
|
|||
protected void onSwipeInteractionCompleted(LauncherState targetState, int logAction) {
|
||||
super.onSwipeInteractionCompleted(targetState, logAction);
|
||||
if (mFromState == NORMAL && targetState == OVERVIEW) {
|
||||
RecentsModel.getInstance(mLauncher).onOverviewShown(true, TAG);
|
||||
SysuiEventLogger.writeDummyRecentsTransition(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.android.launcher3.touch.AbstractStateChangeTouchController;
|
|||
import com.android.launcher3.touch.SwipeDetector;
|
||||
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
|
||||
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
|
||||
import com.android.quickstep.RecentsModel;
|
||||
import com.android.quickstep.TouchInteractionService;
|
||||
import com.android.quickstep.util.SysuiEventLogger;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
|
@ -49,6 +50,8 @@ import com.android.quickstep.views.TaskView;
|
|||
*/
|
||||
public class PortraitStatesTouchController extends AbstractStateChangeTouchController {
|
||||
|
||||
private static final String TAG = "PortraitStatesTouchCtrl";
|
||||
|
||||
private static final float TOTAL_DISTANCE_MULTIPLIER = 3f;
|
||||
private static final float LINEAR_SCALE_LIMIT = 1 / TOTAL_DISTANCE_MULTIPLIER;
|
||||
|
||||
|
@ -284,6 +287,7 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr
|
|||
protected void onSwipeInteractionCompleted(LauncherState targetState, int logAction) {
|
||||
super.onSwipeInteractionCompleted(targetState, logAction);
|
||||
if (mFromState == NORMAL && targetState == OVERVIEW) {
|
||||
RecentsModel.getInstance(mLauncher).onOverviewShown(true, TAG);
|
||||
SysuiEventLogger.writeDummyRecentsTransition(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,8 +26,10 @@ import android.graphics.drawable.Drawable;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.os.RemoteException;
|
||||
import android.os.UserHandle;
|
||||
import android.support.annotation.WorkerThread;
|
||||
import android.util.Log;
|
||||
import android.util.LruCache;
|
||||
import android.util.SparseArray;
|
||||
import android.view.accessibility.AccessibilityManager;
|
||||
|
@ -234,6 +236,19 @@ public class RecentsModel extends TaskStackChangeListener {
|
|||
mRecentsTaskLoader.onTrimMemory(level);
|
||||
}
|
||||
|
||||
public void onOverviewShown(boolean fromHome, String tag) {
|
||||
if (mSystemUiProxy == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
mSystemUiProxy.onOverviewShown(fromHome);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(tag,
|
||||
"Failed to notify SysUI of overview shown from " + (fromHome ? "home" : "app")
|
||||
+ ": ", e);
|
||||
}
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
public void preloadAssistData(int taskId, Bundle data) {
|
||||
mMainThreadExecutor.execute(() -> {
|
||||
|
|
|
@ -698,6 +698,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
|
|||
// If we haven't posted the transition end runnable, run it now
|
||||
finishTransitionRunnable.run();
|
||||
}
|
||||
RecentsModel.getInstance(mContext).onOverviewShown(false, TAG);
|
||||
doLogGesture(true /* toLauncher */);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue