Snap for 5803748 from 38a28d5f0a to rvc-release
Change-Id: Id52240188c982c74a95e2b1371fb8f91e68e2c9a
This commit is contained in:
+4
@@ -95,6 +95,10 @@ public class PredictionAppTracker extends AppLaunchTracker {
|
||||
private AppPredictor createPredictor(Client client, int count) {
|
||||
AppPredictionManager apm = mContext.getSystemService(AppPredictionManager.class);
|
||||
|
||||
if (apm == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AppPredictor predictor = apm.createAppPredictionSession(
|
||||
new AppPredictionContext.Builder(mContext)
|
||||
.setUiSurface(client.id)
|
||||
|
||||
+12
-11
@@ -736,18 +736,19 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
|
||||
: LAST_TASK;
|
||||
}
|
||||
} else {
|
||||
if (mMode == Mode.NO_BUTTON && endVelocity < 0 && !mIsShelfPeeking) {
|
||||
// If swiping at a diagonal, base end target on the faster velocity.
|
||||
boolean isSwipeUp = endVelocity < 0;
|
||||
boolean willGoToNewTaskOnSwipeUp =
|
||||
goingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity);
|
||||
|
||||
if (mMode == Mode.NO_BUTTON && isSwipeUp && !willGoToNewTaskOnSwipeUp) {
|
||||
endTarget = HOME;
|
||||
} else if (mMode == Mode.NO_BUTTON && isSwipeUp && !mIsShelfPeeking) {
|
||||
// If swiping at a diagonal, base end target on the faster velocity.
|
||||
endTarget = goingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity)
|
||||
? NEW_TASK : HOME;
|
||||
} else if (endVelocity < 0) {
|
||||
if (reachedOverviewThreshold) {
|
||||
endTarget = RECENTS;
|
||||
} else {
|
||||
// If swiping at a diagonal, base end target on the faster velocity.
|
||||
endTarget = goingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity)
|
||||
? NEW_TASK : RECENTS;
|
||||
}
|
||||
endTarget = NEW_TASK;
|
||||
} else if (isSwipeUp) {
|
||||
endTarget = !reachedOverviewThreshold && willGoToNewTaskOnSwipeUp
|
||||
? NEW_TASK : RECENTS;
|
||||
} else {
|
||||
endTarget = goingToNewTask ? NEW_TASK : LAST_TASK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user