From 8b92fe336be8d7d06925b50f63fe15538d2fe1db Mon Sep 17 00:00:00 2001 From: Matthew Ng Date: Wed, 9 May 2018 11:40:44 -0700 Subject: [PATCH] Fade back button in and out tied with the overview/shelf (2/3) Back button changes opacity when moving the shelf during swipe up between home screen and overview. The alpha changes depending on the progress of the swipe up animation. When going from app to home and vice versa, the fade animation does not tie with the swipe up progress. The fade animation also masks the back button drawable when ime visibility changes. Change-Id: I51e42930640ba711e81880b385bb722d7ee8ad33 Fixes: 74581837 Fixes: 76900236 Test: swipe up from home screen to overview --- quickstep/libs/sysui_shared.jar | Bin 128738 -> 129096 bytes .../launcher3/uioverrides/UiFactory.java | 6 ++- .../quickstep/OverviewInteractionState.java | 41 +++++++++++------- .../allapps/AllAppsTransitionController.java | 9 ++++ .../AbstractStateChangeTouchController.java | 12 +++++ .../launcher3/uioverrides/UiFactory.java | 2 + 6 files changed, 54 insertions(+), 16 deletions(-) diff --git a/quickstep/libs/sysui_shared.jar b/quickstep/libs/sysui_shared.jar index 5e25fd8bf280b0370133ecfd6ebddf87cfa395c5..53a6ceb4d06e87b31c69070e18eb74622257cc26 100644 GIT binary patch delta 11381 zcmZu%2RxPG_rI@*?7g!0-a8pZR#viCQduD+3f&MPBVD}6%t(cBWzT&htFyIp@7iEE0cMA*L`fI6_E|AR!?^+>b6xq)<76 z`_K=;eUyLV1#q9}6`+C`_W+5sZeCprqGmHkyVONQS|OT{h$^;MIv`HsKO=hyqO@1N0A`L*QqLd(an z$tG*T(3kw|%khhPH(XK%%Gtr}u%;ul=Nx|_%r&_JNko|W3k)BHkv#rF%tx($j?7ql zS65s$6!El~KX`K~u>QB3wpnpzP)EJrQqAm6d(CY8E_%Oi>onrt3R0Q<$z#`dmk8sO z*w3iMXrBEz6MMD&jA?>j@0O67z`fbas}~3>1B+OxCMQ)SKBVdJ^xV?D$4%U=BBN5F zauzs=9BezmQBdg9*#0U$*-)uj%e|=rU3h}e#6SD8?MT_1_^J~6!46W_JfoDO-&@3o zGEzH?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@rltLk07Q2Soi68-Sm8d5)+6EHe#NdP=C(>3e6nnOl<~&ln8!9e6W2uon;tkgy=WK z0g}ufYjMs(&@a;85IYFHFdzVtv&RYlvkQ?u;o4s`7$siJ8wE~yZZtCz=$)XpNX-i}RRozjxi_oyv3#f% zV+KptkNK^6+u>Xgmjs$Zl|KeXAQBC+d`zzf4le`P)^B|o8k*JkH^d81?9)o;H9Tly z#i7pi!U-$)E?}up*Tw|ennV9OJ|9Oh`WZ4sY54~(wF2~Ds1r*=O(s9iZ%ZGYK?11H8paCyCW2I2n z$Ow|G9=plB3PFFlU?Hf3#75j>y*dIwwi}?olgEWAS1c9NRDw`bNeM1Prr-eP3J9t2 zAcYR-@8s#>g4=H;!T+hse;%<<&S|gvZ#B3xC4koyoWk)n$ZZu*EdJLzzz=(XCa$v^ zfhyi9s6OhRNFl#3hRP52_yIid@_?;0tV31;0)ImkAk|lZ1%B3veubcxAPl4dCVU0x z;1c+Y*~DxR%C|4(DRN?f!B7m<9M)ytfOI*K7=b!iuzpk7YeVFnaU6SVF% zPO#L{F)StUR|Y`*Kg%XD)=KUjeGih}di`5U4??{YcCWxojK{b%7 diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java index 3e80d2cb67..b371677f39 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java @@ -93,7 +93,11 @@ public class UiFactory { TYPE_ALL & ~TYPE_HIDE_BACK_BUTTON) == null; } OverviewInteractionState.getInstance(launcher) - .setBackButtonVisible(!shouldBackButtonBeHidden); + .setBackButtonAlpha(shouldBackButtonBeHidden ? 0 : 1, true /* animate */); + } + + public static void setBackButtonAlpha(Launcher launcher, float alpha, boolean animate) { + OverviewInteractionState.getInstance(launcher).setBackButtonAlpha(alpha,animate); } public static void resetOverview(Launcher launcher) { diff --git a/quickstep/src/com/android/quickstep/OverviewInteractionState.java b/quickstep/src/com/android/quickstep/OverviewInteractionState.java index 420406ca52..d60574676e 100644 --- a/quickstep/src/com/android/quickstep/OverviewInteractionState.java +++ b/quickstep/src/com/android/quickstep/OverviewInteractionState.java @@ -17,7 +17,6 @@ package com.android.quickstep; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_DISABLE_QUICK_SCRUB; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_DISABLE_SWIPE_UP; -import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_HIDE_BACK_BUTTON; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_SHOW_OVERVIEW_BUTTON; import static com.android.systemui.shared.system.SettingsCompat.SWIPE_UP_SETTING_NAME; @@ -46,7 +45,6 @@ import java.util.concurrent.ExecutionException; * * - FLAG_DISABLE_QUICK_SCRUB * - FLAG_DISABLE_SWIPE_UP - * - FLAG_HIDE_BACK_BUTTON * - FLAG_SHOW_OVERVIEW_BUTTON * * @see com.android.systemui.shared.system.NavigationBarCompat.InteractionType and associated flags. @@ -81,7 +79,7 @@ public class OverviewInteractionState { } private static final int MSG_SET_PROXY = 200; - private static final int MSG_SET_BACK_BUTTON_VISIBLE = 201; + private static final int MSG_SET_BACK_BUTTON_ALPHA = 201; private static final int MSG_SET_SWIPE_UP_ENABLED = 202; private final SwipeUpGestureEnabledSettingObserver mSwipeUpSettingObserver; @@ -92,13 +90,16 @@ public class OverviewInteractionState { // These are updated on the background thread private ISystemUiProxy mISystemUiProxy; - private boolean mBackButtonVisible = true; private boolean mSwipeUpEnabled = true; private Runnable mOnSwipeUpSettingChangedListener; private OverviewInteractionState(Context context) { mContext = context; + + // Data posted to the uihandler will be sent to the bghandler. Data is sent to uihandler + // because of its high send frequency and data may be very different than the previous value + // For example, send back alpha on uihandler to avoid flickering when setting its visibility mUiHandler = new Handler(this::handleUiMessage); mBgHandler = new Handler(UiThreadHelper.getBackgroundLooper(), this::handleBgMessage); @@ -116,9 +117,9 @@ public class OverviewInteractionState { return mSwipeUpEnabled; } - public void setBackButtonVisible(boolean visible) { - mUiHandler.removeMessages(MSG_SET_BACK_BUTTON_VISIBLE); - mUiHandler.obtainMessage(MSG_SET_BACK_BUTTON_VISIBLE, visible ? 1 : 0, 0) + public void setBackButtonAlpha(float alpha, boolean animate) { + mUiHandler.removeMessages(MSG_SET_BACK_BUTTON_ALPHA); + mUiHandler.obtainMessage(MSG_SET_BACK_BUTTON_ALPHA, animate ? 1 : 0, 0, alpha) .sendToTarget(); } @@ -127,7 +128,7 @@ public class OverviewInteractionState { } private boolean handleUiMessage(Message msg) { - mBgHandler.obtainMessage(msg.what, msg.arg1, msg.arg2).sendToTarget(); + mBgHandler.obtainMessage(msg.what, msg.arg1, msg.arg2, msg.obj).sendToTarget(); return true; } @@ -136,9 +137,9 @@ public class OverviewInteractionState { case MSG_SET_PROXY: mISystemUiProxy = (ISystemUiProxy) msg.obj; break; - case MSG_SET_BACK_BUTTON_VISIBLE: - mBackButtonVisible = msg.arg1 != 0; - break; + case MSG_SET_BACK_BUTTON_ALPHA: + applyBackButtonAlpha((float) msg.obj, msg.arg1 == 1); + return true; case MSG_SET_SWIPE_UP_ENABLED: mSwipeUpEnabled = msg.arg1 != 0; resetHomeBounceSeenOnQuickstepEnabledFirstTime(); @@ -162,10 +163,8 @@ public class OverviewInteractionState { return; } - int flags; - if (mSwipeUpEnabled) { - flags = mBackButtonVisible ? 0 : FLAG_HIDE_BACK_BUTTON; - } else { + int flags = 0; + if (!mSwipeUpEnabled) { flags = FLAG_DISABLE_SWIPE_UP | FLAG_DISABLE_QUICK_SCRUB | FLAG_SHOW_OVERVIEW_BUTTON; } try { @@ -175,6 +174,18 @@ public class OverviewInteractionState { } } + @WorkerThread + private void applyBackButtonAlpha(float alpha, boolean animate) { + if (mISystemUiProxy == null) { + return; + } + try { + mISystemUiProxy.setBackButtonAlpha(alpha, animate); + } catch (RemoteException e) { + Log.w(TAG, "Unable to update overview back button alpha", e); + } + } + private class SwipeUpGestureEnabledSettingObserver extends ContentObserver { private Handler mHandler; private ContentResolver mResolver; diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index 2c3e3ee7b2..b5c821ac25 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -25,9 +25,11 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherStateManager.AnimationConfig; import com.android.launcher3.LauncherStateManager.StateHandler; import com.android.launcher3.R; +import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorSetBuilder; import com.android.launcher3.anim.PropertySetter; +import com.android.launcher3.uioverrides.UiFactory; import com.android.launcher3.util.Themes; import com.android.launcher3.views.ScrimView; @@ -182,6 +184,13 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil anim.setDuration(config.duration); anim.setInterpolator(builder.getInterpolator(ANIM_VERTICAL_PROGRESS, interpolator)); anim.addListener(getProgressAnimatorListener()); + if (toState.hideBackButton) { + anim.addUpdateListener(animation -> { + final float alpha = (float) animation.getAnimatedValue(); + UiFactory.setBackButtonAlpha(mLauncher, 1 - Utilities.boundToRange(alpha, 0, 1), + false /* animate */); + }); + } builder.play(anim); diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java index e29250a5e4..8ffa628135 100644 --- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java @@ -42,6 +42,7 @@ import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.AnimatorSetBuilder; +import com.android.launcher3.uioverrides.UiFactory; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; @@ -221,6 +222,8 @@ public abstract class AbstractStateChangeTouchController cancelAtomicComponentsController(); } mProgressMultiplier = initCurrentAnimation(animComponents); + mCurrentAnimation.getAnimationPlayer().addUpdateListener(animation -> + setBackButtonAlphaWithProgress((float) animation.getAnimatedValue())); mCurrentAnimation.dispatchOnStart(); return true; } @@ -279,6 +282,7 @@ public abstract class AbstractStateChangeTouchController mAtomicComponentsController.setPlayFraction(fraction - mAtomicComponentsStartProgress); } maybeUpdateAtomicAnim(mFromState, mToState, fraction); + setBackButtonAlphaWithProgress(fraction); } /** @@ -471,6 +475,14 @@ public abstract class AbstractStateChangeTouchController } } + private void setBackButtonAlphaWithProgress(float progress) { + if (mFromState.hideBackButton ^ mToState.hideBackButton) { + progress = Utilities.boundToRange(progress, 0, 1); + final float alpha = mToState.hideBackButton ? 1 - progress : progress; + UiFactory.setBackButtonAlpha(mLauncher, alpha, false /* animate */); + } + } + private void logReachedState(int logAction) { // Transition complete. log the action mLauncher.getUserEventDispatcher().logStateChangeAction(logAction, diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java b/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java index e93dd5a034..db98f9a80b 100644 --- a/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java +++ b/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java @@ -56,4 +56,6 @@ public class UiFactory { } public static void prepareToShowOverview(Launcher launcher) { } + + public static void setBackButtonAlpha(Launcher launcher, float alpha, boolean animate) { } }