Loading quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +3 −2 Original line number Diff line number Diff line Loading @@ -640,7 +640,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener (mLauncher.getTaskbarUIController() == null || !isTransientTaskbar(mLauncher)) ? null : mLauncher.getTaskbarUIController().findMatchingView(v), !appTargetsAreTranslucent, launcherIconBounds, true /* isOpening */); null /* fadeOutView */, !appTargetsAreTranslucent, launcherIconBounds, true /* isOpening */); Rect crop = new Rect(); Matrix matrix = new Matrix(); Loading Loading @@ -1355,7 +1356,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener mDeviceProfile.isMultiWindowMode ? 0 : getWindowCornerRadius(mLauncher), isTransluscent, fallbackBackgroundColor); } else if (launcherView != null) { floatingIconView = getFloatingIconView(mLauncher, launcherView, floatingIconView = getFloatingIconView(mLauncher, launcherView, null, mLauncher.getTaskbarUIController() == null ? null : mLauncher.getTaskbarUIController().findMatchingView(launcherView), Loading quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java +1 −1 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ public class LauncherSwipeHandlerV2 extends private HomeAnimationFactory createIconHomeAnimationFactory(View workspaceView) { RectF iconLocation = new RectF(); FloatingIconView floatingIconView = getFloatingIconView(mActivity, workspaceView, FloatingIconView floatingIconView = getFloatingIconView(mActivity, workspaceView, null, mActivity.getTaskbarUIController() == null ? null : mActivity.getTaskbarUIController().findMatchingView(workspaceView), Loading src/com/android/launcher3/views/FloatingIconView.java +22 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ import static android.view.Gravity.LEFT; import static com.android.launcher3.Utilities.getBadge; import static com.android.launcher3.Utilities.getFullDrawable; import static com.android.launcher3.Utilities.mapToRange; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.util.Executors.MODEL_EXECUTOR; import static com.android.launcher3.views.IconLabelDotView.setIconAndDotVisible; Loading Loading @@ -98,6 +100,9 @@ public class FloatingIconView extends FrameLayout implements // A view whose visibility should update in sync with mOriginalIcon. private @Nullable View mMatchVisibilityView; // A view that will fade out as the animation progresses. private @Nullable View mFadeOutView; private View mOriginalIcon; private RectF mPositionOut; private Runnable mOnTargetChangeRunnable; Loading Loading @@ -156,6 +161,11 @@ public class FloatingIconView extends FrameLayout implements setAlpha(alpha); mClipIconView.update(rect, progress, shapeProgressStart, cornerRadius, isOpening, this, mLauncher.getDeviceProfile()); if (mFadeOutView != null) { // The alpha goes from 1 to 0 when progress is 0 and 0.33 respectively. mFadeOutView.setAlpha(1 - Math.min(1f, mapToRange(progress, 0, 0.33f, 0, 1, LINEAR))); } } @Override Loading Loading @@ -564,14 +574,16 @@ public class FloatingIconView extends FrameLayout implements /** * Creates a floating icon view for {@param originalView}. * @param originalView The view to copy * @param secondView A view whose visibility should update in sync with originalView. * @param visibilitySyncView A view whose visibility should update in sync with originalView. * @param fadeOutView A view that will fade out as the animation progresses. * @param hideOriginal If true, it will hide {@param originalView} while this view is visible. * Else, we will not draw anything in this view. * @param positionOut Rect that will hold the size and position of v. * @param isOpening True if this view replaces the icon for app open animation. */ public static FloatingIconView getFloatingIconView(Launcher launcher, View originalView, @Nullable View secondView, boolean hideOriginal, RectF positionOut, boolean isOpening) { @Nullable View visibilitySyncView, @Nullable View fadeOutView, boolean hideOriginal, RectF positionOut, boolean isOpening) { final DragLayer dragLayer = launcher.getDragLayer(); ViewGroup parent = (ViewGroup) dragLayer.getParent(); FloatingIconView view = launcher.getViewCache().getView(R.layout.floating_icon_view, Loading @@ -581,7 +593,8 @@ public class FloatingIconView extends FrameLayout implements // Init properties before getting the drawable. view.mIsOpening = isOpening; view.mOriginalIcon = originalView; view.mMatchVisibilityView = secondView; view.mMatchVisibilityView = visibilitySyncView; view.mFadeOutView = fadeOutView; view.mPositionOut = positionOut; // Get the drawable on the background thread Loading Loading @@ -610,6 +623,10 @@ public class FloatingIconView extends FrameLayout implements view.mEndRunnable = () -> { view.mEndRunnable = null; if (view.mFadeOutView != null) { view.mFadeOutView.setAlpha(1f); } if (hideOriginal) { view.updateViewsVisibility(true /* isVisible */); view.finish(dragLayer); Loading Loading @@ -669,6 +686,8 @@ public class FloatingIconView extends FrameLayout implements mBtvDrawable.setBackground(null); mFastFinishRunnable = null; mIconOffsetY = 0; mMatchVisibilityView = null; mFadeOutView = null; } private static class IconLoadResult { Loading Loading
quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +3 −2 Original line number Diff line number Diff line Loading @@ -640,7 +640,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener (mLauncher.getTaskbarUIController() == null || !isTransientTaskbar(mLauncher)) ? null : mLauncher.getTaskbarUIController().findMatchingView(v), !appTargetsAreTranslucent, launcherIconBounds, true /* isOpening */); null /* fadeOutView */, !appTargetsAreTranslucent, launcherIconBounds, true /* isOpening */); Rect crop = new Rect(); Matrix matrix = new Matrix(); Loading Loading @@ -1355,7 +1356,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener mDeviceProfile.isMultiWindowMode ? 0 : getWindowCornerRadius(mLauncher), isTransluscent, fallbackBackgroundColor); } else if (launcherView != null) { floatingIconView = getFloatingIconView(mLauncher, launcherView, floatingIconView = getFloatingIconView(mLauncher, launcherView, null, mLauncher.getTaskbarUIController() == null ? null : mLauncher.getTaskbarUIController().findMatchingView(launcherView), Loading
quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java +1 −1 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ public class LauncherSwipeHandlerV2 extends private HomeAnimationFactory createIconHomeAnimationFactory(View workspaceView) { RectF iconLocation = new RectF(); FloatingIconView floatingIconView = getFloatingIconView(mActivity, workspaceView, FloatingIconView floatingIconView = getFloatingIconView(mActivity, workspaceView, null, mActivity.getTaskbarUIController() == null ? null : mActivity.getTaskbarUIController().findMatchingView(workspaceView), Loading
src/com/android/launcher3/views/FloatingIconView.java +22 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ import static android.view.Gravity.LEFT; import static com.android.launcher3.Utilities.getBadge; import static com.android.launcher3.Utilities.getFullDrawable; import static com.android.launcher3.Utilities.mapToRange; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.util.Executors.MODEL_EXECUTOR; import static com.android.launcher3.views.IconLabelDotView.setIconAndDotVisible; Loading Loading @@ -98,6 +100,9 @@ public class FloatingIconView extends FrameLayout implements // A view whose visibility should update in sync with mOriginalIcon. private @Nullable View mMatchVisibilityView; // A view that will fade out as the animation progresses. private @Nullable View mFadeOutView; private View mOriginalIcon; private RectF mPositionOut; private Runnable mOnTargetChangeRunnable; Loading Loading @@ -156,6 +161,11 @@ public class FloatingIconView extends FrameLayout implements setAlpha(alpha); mClipIconView.update(rect, progress, shapeProgressStart, cornerRadius, isOpening, this, mLauncher.getDeviceProfile()); if (mFadeOutView != null) { // The alpha goes from 1 to 0 when progress is 0 and 0.33 respectively. mFadeOutView.setAlpha(1 - Math.min(1f, mapToRange(progress, 0, 0.33f, 0, 1, LINEAR))); } } @Override Loading Loading @@ -564,14 +574,16 @@ public class FloatingIconView extends FrameLayout implements /** * Creates a floating icon view for {@param originalView}. * @param originalView The view to copy * @param secondView A view whose visibility should update in sync with originalView. * @param visibilitySyncView A view whose visibility should update in sync with originalView. * @param fadeOutView A view that will fade out as the animation progresses. * @param hideOriginal If true, it will hide {@param originalView} while this view is visible. * Else, we will not draw anything in this view. * @param positionOut Rect that will hold the size and position of v. * @param isOpening True if this view replaces the icon for app open animation. */ public static FloatingIconView getFloatingIconView(Launcher launcher, View originalView, @Nullable View secondView, boolean hideOriginal, RectF positionOut, boolean isOpening) { @Nullable View visibilitySyncView, @Nullable View fadeOutView, boolean hideOriginal, RectF positionOut, boolean isOpening) { final DragLayer dragLayer = launcher.getDragLayer(); ViewGroup parent = (ViewGroup) dragLayer.getParent(); FloatingIconView view = launcher.getViewCache().getView(R.layout.floating_icon_view, Loading @@ -581,7 +593,8 @@ public class FloatingIconView extends FrameLayout implements // Init properties before getting the drawable. view.mIsOpening = isOpening; view.mOriginalIcon = originalView; view.mMatchVisibilityView = secondView; view.mMatchVisibilityView = visibilitySyncView; view.mFadeOutView = fadeOutView; view.mPositionOut = positionOut; // Get the drawable on the background thread Loading Loading @@ -610,6 +623,10 @@ public class FloatingIconView extends FrameLayout implements view.mEndRunnable = () -> { view.mEndRunnable = null; if (view.mFadeOutView != null) { view.mFadeOutView.setAlpha(1f); } if (hideOriginal) { view.updateViewsVisibility(true /* isVisible */); view.finish(dragLayer); Loading Loading @@ -669,6 +686,8 @@ public class FloatingIconView extends FrameLayout implements mBtvDrawable.setBackground(null); mFastFinishRunnable = null; mIconOffsetY = 0; mMatchVisibilityView = null; mFadeOutView = null; } private static class IconLoadResult { Loading