Loading quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -121,12 +121,16 @@ public final class LauncherAppTransitionManagerImpl extends QuickstepAppTransiti alpha.setDuration(CONTENT_ALPHA_DURATION); alpha.setInterpolator(LINEAR); anim.play(alpha); overview.setFreezeViewVisibility(true); ObjectAnimator transY = ObjectAnimator.ofFloat(overview, View.TRANSLATION_Y, trans); transY.setInterpolator(AGGRESSIVE_EASE); transY.setDuration(CONTENT_TRANSLATION_DURATION); anim.play(transY); return mLauncher.getStateManager()::reapplyState; return () -> { overview.setFreezeViewVisibility(false); mLauncher.getStateManager().reapplyState(); }; } } quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java +2 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,7 @@ public class LauncherRecentsView extends RecentsView<Launcher> implements StateL @Override public void onStateTransitionStart(LauncherState toState) { setOverviewStateEnabled(toState.overviewUi); setFreezeViewVisibility(true); } @Override Loading @@ -236,6 +237,7 @@ public class LauncherRecentsView extends RecentsView<Launcher> implements StateL reset(); } setOverlayEnabled(finalState == OVERVIEW); setFreezeViewVisibility(false); } @Override Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +20 −1 Original line number Diff line number Diff line Loading @@ -188,6 +188,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl private boolean mDwbToastShown; private boolean mDisallowScrollToClearAll; private boolean mOverlayEnabled; private boolean mFreezeViewVisibility; /** * TODO: Call reloadIdNeeded in onTaskStackChanged. Loading Loading @@ -1302,7 +1303,25 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl mEmptyMessagePaint.setAlpha(alphaInt); mEmptyIcon.setAlpha(alphaInt); setVisibility(alpha > 0 ? VISIBLE : GONE); if (alpha > 0) { setVisibility(VISIBLE); } else if (!mFreezeViewVisibility) { setVisibility(GONE); } } /** * Freezes the view visibility change. When frozen, the view will not change its visibility * to gone due to alpha changes. */ public void setFreezeViewVisibility(boolean freezeViewVisibility) { if (mFreezeViewVisibility != freezeViewVisibility) { mFreezeViewVisibility = freezeViewVisibility; if (!mFreezeViewVisibility) { setVisibility(mContentAlpha > 0 ? VISIBLE : GONE); } } } @Override Loading src/com/android/launcher3/views/FloatingIconView.java +7 −3 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ public class FloatingIconView extends View implements private boolean mIsVerticalBarLayout = false; private boolean mIsAdaptiveIcon = false; private boolean mIsOpening; private @Nullable Drawable mBadge; private @Nullable Drawable mForeground; Loading Loading @@ -178,9 +179,11 @@ public class FloatingIconView extends View implements @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); if (!mIsOpening) { getViewTreeObserver().addOnGlobalLayoutListener(this); mLauncher.getRotationHelper().setCurrentTransitionRequest(REQUEST_LOCK); } } @Override protected void onDetachedFromWindow() { Loading Loading @@ -326,7 +329,7 @@ public class FloatingIconView extends View implements * - For BubbleTextView, we return the icon bounds. */ private float getLocationBoundsForView(View v, RectF outRect) { boolean ignoreTransform = true; boolean ignoreTransform = !mIsOpening; if (v instanceof DeepShortcutView) { v = ((DeepShortcutView) v).getBubbleText(); ignoreTransform = false; Loading Loading @@ -627,6 +630,7 @@ public class FloatingIconView extends View implements view.recycle(); view.mIsVerticalBarLayout = launcher.getDeviceProfile().isVerticalBarLayout(); view.mIsOpening = isOpening; view.mOriginalIcon = originalView; view.mPositionOut = positionOut; Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -121,12 +121,16 @@ public final class LauncherAppTransitionManagerImpl extends QuickstepAppTransiti alpha.setDuration(CONTENT_ALPHA_DURATION); alpha.setInterpolator(LINEAR); anim.play(alpha); overview.setFreezeViewVisibility(true); ObjectAnimator transY = ObjectAnimator.ofFloat(overview, View.TRANSLATION_Y, trans); transY.setInterpolator(AGGRESSIVE_EASE); transY.setDuration(CONTENT_TRANSLATION_DURATION); anim.play(transY); return mLauncher.getStateManager()::reapplyState; return () -> { overview.setFreezeViewVisibility(false); mLauncher.getStateManager().reapplyState(); }; } }
quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java +2 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,7 @@ public class LauncherRecentsView extends RecentsView<Launcher> implements StateL @Override public void onStateTransitionStart(LauncherState toState) { setOverviewStateEnabled(toState.overviewUi); setFreezeViewVisibility(true); } @Override Loading @@ -236,6 +237,7 @@ public class LauncherRecentsView extends RecentsView<Launcher> implements StateL reset(); } setOverlayEnabled(finalState == OVERVIEW); setFreezeViewVisibility(false); } @Override Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +20 −1 Original line number Diff line number Diff line Loading @@ -188,6 +188,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl private boolean mDwbToastShown; private boolean mDisallowScrollToClearAll; private boolean mOverlayEnabled; private boolean mFreezeViewVisibility; /** * TODO: Call reloadIdNeeded in onTaskStackChanged. Loading Loading @@ -1302,7 +1303,25 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl mEmptyMessagePaint.setAlpha(alphaInt); mEmptyIcon.setAlpha(alphaInt); setVisibility(alpha > 0 ? VISIBLE : GONE); if (alpha > 0) { setVisibility(VISIBLE); } else if (!mFreezeViewVisibility) { setVisibility(GONE); } } /** * Freezes the view visibility change. When frozen, the view will not change its visibility * to gone due to alpha changes. */ public void setFreezeViewVisibility(boolean freezeViewVisibility) { if (mFreezeViewVisibility != freezeViewVisibility) { mFreezeViewVisibility = freezeViewVisibility; if (!mFreezeViewVisibility) { setVisibility(mContentAlpha > 0 ? VISIBLE : GONE); } } } @Override Loading
src/com/android/launcher3/views/FloatingIconView.java +7 −3 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ public class FloatingIconView extends View implements private boolean mIsVerticalBarLayout = false; private boolean mIsAdaptiveIcon = false; private boolean mIsOpening; private @Nullable Drawable mBadge; private @Nullable Drawable mForeground; Loading Loading @@ -178,9 +179,11 @@ public class FloatingIconView extends View implements @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); if (!mIsOpening) { getViewTreeObserver().addOnGlobalLayoutListener(this); mLauncher.getRotationHelper().setCurrentTransitionRequest(REQUEST_LOCK); } } @Override protected void onDetachedFromWindow() { Loading Loading @@ -326,7 +329,7 @@ public class FloatingIconView extends View implements * - For BubbleTextView, we return the icon bounds. */ private float getLocationBoundsForView(View v, RectF outRect) { boolean ignoreTransform = true; boolean ignoreTransform = !mIsOpening; if (v instanceof DeepShortcutView) { v = ((DeepShortcutView) v).getBubbleText(); ignoreTransform = false; Loading Loading @@ -627,6 +630,7 @@ public class FloatingIconView extends View implements view.recycle(); view.mIsVerticalBarLayout = launcher.getDeviceProfile().isVerticalBarLayout(); view.mIsOpening = isOpening; view.mOriginalIcon = originalView; view.mPositionOut = positionOut; Loading