Merge "Account for Recents Scale when computing dismiss length to take task off screen." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
dd7d89d7e1
+9
-4
@@ -37,6 +37,7 @@ import com.android.quickstep.views.RecentsViewContainer
|
||||
import com.android.quickstep.views.TaskView
|
||||
import com.google.android.msdl.data.model.MSDLToken
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.ceil
|
||||
|
||||
/** Touch controller for handling task view card dismiss swipes */
|
||||
class TaskViewDismissTouchController<CONTAINER>(
|
||||
@@ -135,12 +136,16 @@ CONTAINER : RecentsViewContainer {
|
||||
container.dragLayer
|
||||
)
|
||||
// Dismiss length as bottom of task so it is fully off screen when dismissed.
|
||||
// Take into account the recents scale when fully zoomed out on dismiss.
|
||||
it.getThumbnailBounds(tempTaskThumbnailBounds, relativeToDragLayer = true)
|
||||
dismissLength =
|
||||
recentsView.pagedOrientationHandler.getTaskDismissLength(
|
||||
secondaryLayerDimension,
|
||||
tempTaskThumbnailBounds,
|
||||
)
|
||||
ceil(
|
||||
recentsView.pagedOrientationHandler.getTaskDismissLength(
|
||||
secondaryLayerDimension,
|
||||
tempTaskThumbnailBounds,
|
||||
) / RECENTS_SCALE_ON_DISMISS_SUCCESS
|
||||
)
|
||||
.toInt()
|
||||
verticalFactor =
|
||||
recentsView.pagedOrientationHandler.getTaskDismissVerticalDirection()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user