Merge "Hide nav handle/background when taskbar is showing" into sc-dev am: d12feb574c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13880565 Change-Id: I529be14c2b7d7fb3a00a8a894dae0d19ae93ec55
This commit is contained in:
commit
379f5418f9
2 files changed
+14
-2
No files matched your search
@@ -65,6 +65,7 @@ public class TaskbarVisibilityController {
|
||||
}
|
||||
|
||||
protected void cleanup() {
|
||||
setNavBarButtonAlpha(1f);
|
||||
}
|
||||
|
||||
protected AnimatedFloat getTaskbarVisibilityForLauncherState() {
|
||||
@@ -93,6 +94,14 @@ public class TaskbarVisibilityController {
|
||||
float alphaDueToLauncher = Math.max(mTaskbarBackgroundAlpha.value,
|
||||
mTaskbarVisibilityAlphaForLauncherState.value);
|
||||
float alphaDueToOther = mTaskbarVisibilityAlphaForIme.value;
|
||||
mTaskbarCallbacks.updateTaskbarVisibilityAlpha(alphaDueToLauncher * alphaDueToOther);
|
||||
float taskbarAlpha = alphaDueToLauncher * alphaDueToOther;
|
||||
mTaskbarCallbacks.updateTaskbarVisibilityAlpha(taskbarAlpha);
|
||||
|
||||
// Make the nav bar invisible if taskbar is visible.
|
||||
setNavBarButtonAlpha(1f - taskbarAlpha);
|
||||
}
|
||||
|
||||
private void setNavBarButtonAlpha(float navBarAlpha) {
|
||||
SystemUiProxy.INSTANCE.get(mLauncher).setNavBarButtonAlpha(navBarAlpha, false);
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,7 @@ public class SystemUiProxy implements ISystemUiProxy,
|
||||
private boolean mLastShelfVisible;
|
||||
private float mLastNavButtonAlpha;
|
||||
private boolean mLastNavButtonAnimate;
|
||||
private boolean mHasNavButtonAlphaBeenSet = false;
|
||||
|
||||
// TODO(141886704): Find a way to remove this
|
||||
private int mLastSystemUiStateFlags;
|
||||
@@ -163,10 +164,12 @@ public class SystemUiProxy implements ISystemUiProxy,
|
||||
@Override
|
||||
public void setNavBarButtonAlpha(float alpha, boolean animate) {
|
||||
boolean changed = Float.compare(alpha, mLastNavButtonAlpha) != 0
|
||||
|| animate != mLastNavButtonAnimate;
|
||||
|| animate != mLastNavButtonAnimate
|
||||
|| !mHasNavButtonAlphaBeenSet;
|
||||
if (mSystemUiProxy != null && changed) {
|
||||
mLastNavButtonAlpha = alpha;
|
||||
mLastNavButtonAnimate = animate;
|
||||
mHasNavButtonAlphaBeenSet = true;
|
||||
try {
|
||||
mSystemUiProxy.setNavBarButtonAlpha(alpha, animate);
|
||||
} catch (RemoteException e) {
|
||||
|
||||
Reference in new issue
Block a user