Limit existing usages of nav bar button alpha to two button mode
Bug: 181206743 Test: Manual Change-Id: Id63131e9aae36bb143d6a4807ef37f96dfa05be9
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.launcher3.statehandlers;
|
||||
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.quickstep.AnimatedFloat.VALUE;
|
||||
import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS;
|
||||
|
||||
import com.android.launcher3.BaseQuickstepLauncher;
|
||||
import com.android.launcher3.LauncherState;
|
||||
@@ -30,7 +31,7 @@ import com.android.quickstep.SysUINavigationMode;
|
||||
import com.android.quickstep.SystemUiProxy;
|
||||
|
||||
/**
|
||||
* State handler for animating back button alpha
|
||||
* State handler for animating back button alpha in two-button nav mode.
|
||||
*/
|
||||
public class BackButtonAlphaHandler implements StateHandler<LauncherState> {
|
||||
|
||||
@@ -51,14 +52,11 @@ public class BackButtonAlphaHandler implements StateHandler<LauncherState> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SysUINavigationMode.getMode(mLauncher).hasGestures) {
|
||||
// If the nav mode is not gestural, then force back button alpha to be 1
|
||||
UiThreadHelper.setBackButtonAlphaAsync(mLauncher,
|
||||
BaseQuickstepLauncher.SET_BACK_BUTTON_ALPHA, 1f, true /* animate */);
|
||||
if (SysUINavigationMode.getMode(mLauncher) != TWO_BUTTONS) {
|
||||
return;
|
||||
}
|
||||
|
||||
mBackAlpha.value = SystemUiProxy.INSTANCE.get(mLauncher).getLastBackButtonAlpha();
|
||||
mBackAlpha.value = SystemUiProxy.INSTANCE.get(mLauncher).getLastNavButtonAlpha();
|
||||
animation.setFloat(mBackAlpha, VALUE,
|
||||
mLauncher.shouldBackButtonBeHidden(toState) ? 0 : 1, LINEAR);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user