Loading quickstep/libs/sysui_shared.jar +238 B (129 KiB) File changed.No diff preview for this file type. View original file View changed file quickstep/src/com/android/quickstep/OverviewCommandHelper.java +5 −1 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.LatencyTrackerCompat; import com.android.systemui.shared.system.PackageManagerWrapper; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplier; import com.android.systemui.shared.system.TransactionCompat; import java.util.ArrayList; Loading Loading @@ -350,11 +351,14 @@ public class OverviewCommandHelper { clipHelper.updateTargetRect(targetRect); clipHelper.prepareAnimation(false /* isOpening */); SyncRtSurfaceTransactionApplier syncTransactionApplier = new SyncRtSurfaceTransactionApplier(rootView); ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, 1); valueAnimator.setDuration(RECENTS_LAUNCH_DURATION); valueAnimator.setInterpolator(TOUCH_RESPONSE_INTERPOLATOR); valueAnimator.addUpdateListener((v) -> clipHelper.applyTransform(targetSet, (float) v.getAnimatedValue())); clipHelper.applyTransform(targetSet, (float) v.getAnimatedValue(), syncTransactionApplier)); if (targetSet.isAnimatingHome()) { // If we are animating home, fade in the opening targets Loading quickstep/src/com/android/quickstep/TaskUtils.java +6 −18 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplier; import java.util.List; Loading Loading @@ -144,6 +145,8 @@ public class TaskUtils { */ public static ValueAnimator getRecentsWindowAnimator(TaskView v, boolean skipViewChanges, RemoteAnimationTargetCompat[] targets, final ClipAnimationHelper inOutHelper) { SyncRtSurfaceTransactionApplier syncTransactionApplier = new SyncRtSurfaceTransactionApplier(v); final ValueAnimator appAnimator = ValueAnimator.ofFloat(0, 1); appAnimator.setInterpolator(TOUCH_RESPONSE_INTERPOLATOR); appAnimator.addUpdateListener(new MultiValueUpdateListener() { Loading @@ -155,18 +158,10 @@ public class TaskUtils { final RemoteAnimationTargetSet mTargetSet; final RectF mThumbnailRect; private Surface mSurface; private long mFrameNumber; { mTargetSet = new RemoteAnimationTargetSet(targets, MODE_OPENING); inOutHelper.setTaskTransformCallback((t, app) -> { t.setAlpha(app.leash, mTaskAlpha.value); if (!skipViewChanges) { t.deferTransactionUntil(app.leash, mSurface, mFrameNumber); } }); inOutHelper.setTaskAlphaCallback((t, alpha) -> mTaskAlpha.value); inOutHelper.prepareAnimation(true /* isOpening */); inOutHelper.fromTaskThumbnailView(v.getThumbnail(), (RecentsView) v.getParent(), Loading @@ -179,15 +174,8 @@ public class TaskUtils { @Override public void onUpdate(float percent) { mSurface = getSurface(v); mFrameNumber = mSurface != null ? getNextFrameNumber(mSurface) : -1; if (mFrameNumber == -1) { // Booo, not cool! Our surface got destroyed, so no reason to animate anything. Log.w(TAG, "Failed to animate, surface got destroyed."); return; } RectF taskBounds = inOutHelper.applyTransform(mTargetSet, 1 - percent); RectF taskBounds = inOutHelper.applyTransform(mTargetSet, 1 - percent, syncTransactionApplier); if (!skipViewChanges) { float scale = taskBounds.width() / mThumbnailRect.width(); v.setScaleX(scale); Loading quickstep/src/com/android/quickstep/TouchInteractionService.java +2 −1 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import com.android.quickstep.views.RecentsView; import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.ChoreographerCompat; import com.android.systemui.shared.system.NavigationBarCompat.HitTarget; /** Loading Loading @@ -406,6 +407,6 @@ public class TouchInteractionService extends Service { sRemoteUiThread.start(); } new Handler(sRemoteUiThread.getLooper()).post(() -> mBackgroundThreadChoreographer = Choreographer.getInstance()); mBackgroundThreadChoreographer = ChoreographerCompat.getSfInstance()); } } quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +8 −1 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ import com.android.systemui.shared.system.InputConsumerController; import com.android.systemui.shared.system.LatencyTrackerCompat; import com.android.systemui.shared.system.RecentsAnimationControllerCompat; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplier; import com.android.systemui.shared.system.WindowCallbacksCompat; import com.android.systemui.shared.system.WindowManagerWrapper; Loading Loading @@ -181,6 +182,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { private T mActivity; private LayoutListener mLayoutListener; private RecentsView mRecentsView; private SyncRtSurfaceTransactionApplier mSyncTransactionApplier; private QuickScrubController mQuickScrubController; private AnimationFactory mAnimationFactory = (t, i) -> { }; Loading Loading @@ -347,6 +349,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { } mRecentsView = activity.getOverviewPanel(); mSyncTransactionApplier = new SyncRtSurfaceTransactionApplier(mRecentsView); mQuickScrubController = mRecentsView.getQuickScrubController(); mLayoutListener = mActivityControlHelper.createLayoutListener(mActivity); Loading Loading @@ -504,7 +507,11 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { RecentsAnimationControllerCompat controller = mRecentsAnimationWrapper.getController(); if (controller != null) { mClipAnimationHelper.applyTransform(mRecentsAnimationWrapper.targetSet, shift); mClipAnimationHelper.applyTransform(mRecentsAnimationWrapper.targetSet, shift, Looper.myLooper() == mMainThreadHandler.getLooper() ? mSyncTransactionApplier : null); // TODO: This logic is spartanic! boolean passedThreshold = shift > 0.12f; Loading Loading
quickstep/libs/sysui_shared.jar +238 B (129 KiB) File changed.No diff preview for this file type. View original file View changed file
quickstep/src/com/android/quickstep/OverviewCommandHelper.java +5 −1 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.LatencyTrackerCompat; import com.android.systemui.shared.system.PackageManagerWrapper; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplier; import com.android.systemui.shared.system.TransactionCompat; import java.util.ArrayList; Loading Loading @@ -350,11 +351,14 @@ public class OverviewCommandHelper { clipHelper.updateTargetRect(targetRect); clipHelper.prepareAnimation(false /* isOpening */); SyncRtSurfaceTransactionApplier syncTransactionApplier = new SyncRtSurfaceTransactionApplier(rootView); ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, 1); valueAnimator.setDuration(RECENTS_LAUNCH_DURATION); valueAnimator.setInterpolator(TOUCH_RESPONSE_INTERPOLATOR); valueAnimator.addUpdateListener((v) -> clipHelper.applyTransform(targetSet, (float) v.getAnimatedValue())); clipHelper.applyTransform(targetSet, (float) v.getAnimatedValue(), syncTransactionApplier)); if (targetSet.isAnimatingHome()) { // If we are animating home, fade in the opening targets Loading
quickstep/src/com/android/quickstep/TaskUtils.java +6 −18 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplier; import java.util.List; Loading Loading @@ -144,6 +145,8 @@ public class TaskUtils { */ public static ValueAnimator getRecentsWindowAnimator(TaskView v, boolean skipViewChanges, RemoteAnimationTargetCompat[] targets, final ClipAnimationHelper inOutHelper) { SyncRtSurfaceTransactionApplier syncTransactionApplier = new SyncRtSurfaceTransactionApplier(v); final ValueAnimator appAnimator = ValueAnimator.ofFloat(0, 1); appAnimator.setInterpolator(TOUCH_RESPONSE_INTERPOLATOR); appAnimator.addUpdateListener(new MultiValueUpdateListener() { Loading @@ -155,18 +158,10 @@ public class TaskUtils { final RemoteAnimationTargetSet mTargetSet; final RectF mThumbnailRect; private Surface mSurface; private long mFrameNumber; { mTargetSet = new RemoteAnimationTargetSet(targets, MODE_OPENING); inOutHelper.setTaskTransformCallback((t, app) -> { t.setAlpha(app.leash, mTaskAlpha.value); if (!skipViewChanges) { t.deferTransactionUntil(app.leash, mSurface, mFrameNumber); } }); inOutHelper.setTaskAlphaCallback((t, alpha) -> mTaskAlpha.value); inOutHelper.prepareAnimation(true /* isOpening */); inOutHelper.fromTaskThumbnailView(v.getThumbnail(), (RecentsView) v.getParent(), Loading @@ -179,15 +174,8 @@ public class TaskUtils { @Override public void onUpdate(float percent) { mSurface = getSurface(v); mFrameNumber = mSurface != null ? getNextFrameNumber(mSurface) : -1; if (mFrameNumber == -1) { // Booo, not cool! Our surface got destroyed, so no reason to animate anything. Log.w(TAG, "Failed to animate, surface got destroyed."); return; } RectF taskBounds = inOutHelper.applyTransform(mTargetSet, 1 - percent); RectF taskBounds = inOutHelper.applyTransform(mTargetSet, 1 - percent, syncTransactionApplier); if (!skipViewChanges) { float scale = taskBounds.width() / mThumbnailRect.width(); v.setScaleX(scale); Loading
quickstep/src/com/android/quickstep/TouchInteractionService.java +2 −1 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import com.android.quickstep.views.RecentsView; import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.ChoreographerCompat; import com.android.systemui.shared.system.NavigationBarCompat.HitTarget; /** Loading Loading @@ -406,6 +407,6 @@ public class TouchInteractionService extends Service { sRemoteUiThread.start(); } new Handler(sRemoteUiThread.getLooper()).post(() -> mBackgroundThreadChoreographer = Choreographer.getInstance()); mBackgroundThreadChoreographer = ChoreographerCompat.getSfInstance()); } }
quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +8 −1 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ import com.android.systemui.shared.system.InputConsumerController; import com.android.systemui.shared.system.LatencyTrackerCompat; import com.android.systemui.shared.system.RecentsAnimationControllerCompat; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplier; import com.android.systemui.shared.system.WindowCallbacksCompat; import com.android.systemui.shared.system.WindowManagerWrapper; Loading Loading @@ -181,6 +182,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { private T mActivity; private LayoutListener mLayoutListener; private RecentsView mRecentsView; private SyncRtSurfaceTransactionApplier mSyncTransactionApplier; private QuickScrubController mQuickScrubController; private AnimationFactory mAnimationFactory = (t, i) -> { }; Loading Loading @@ -347,6 +349,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { } mRecentsView = activity.getOverviewPanel(); mSyncTransactionApplier = new SyncRtSurfaceTransactionApplier(mRecentsView); mQuickScrubController = mRecentsView.getQuickScrubController(); mLayoutListener = mActivityControlHelper.createLayoutListener(mActivity); Loading Loading @@ -504,7 +507,11 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { RecentsAnimationControllerCompat controller = mRecentsAnimationWrapper.getController(); if (controller != null) { mClipAnimationHelper.applyTransform(mRecentsAnimationWrapper.targetSet, shift); mClipAnimationHelper.applyTransform(mRecentsAnimationWrapper.targetSet, shift, Looper.myLooper() == mMainThreadHandler.getLooper() ? mSyncTransactionApplier : null); // TODO: This logic is spartanic! boolean passedThreshold = shift > 0.12f; Loading