diff options
author | Vinit Nayak <peanutbutter@google.com> | 2021-09-23 15:32:38 -0700 |
---|---|---|
committer | Vinit Nayak <peanutbutter@google.com> | 2021-09-23 15:55:22 -0700 |
commit | ea7e9a48fd745caef09a3bcba59b093c2f36fd6c (patch) | |
tree | e140bc718174a61d67abaff12870c4d149c4aca4 /quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java | |
parent | e37b51b30f07ad997dd49a5548475e4e4d96a7af (diff) |
Don't show taskbar when keyguard occluded
* Show only back button in taskbar for 3
button nav.
Fixes: 199406716
Test: From lock screen view home controls
or double-tap camera, no taskbar shown.
Change-Id: Ia603c7dbe584e3fab62365de4fc5a790c48d1340
Diffstat (limited to 'quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java')
-rw-r--r-- | quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java index 79bea036a0..3f621fdb34 100644 --- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java @@ -75,9 +75,10 @@ public class NavbarButtonsViewController { private static final int FLAG_A11Y_VISIBLE = 1 << 3; private static final int FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE = 1 << 4; private static final int FLAG_KEYGUARD_VISIBLE = 1 << 5; - private static final int FLAG_DISABLE_HOME = 1 << 6; - private static final int FLAG_DISABLE_RECENTS = 1 << 7; - private static final int FLAG_DISABLE_BACK = 1 << 8; + private static final int FLAG_KEYGUARD_OCCLUDED = 1 << 6; + private static final int FLAG_DISABLE_HOME = 1 << 7; + private static final int FLAG_DISABLE_RECENTS = 1 << 8; + private static final int FLAG_DISABLE_BACK = 1 << 9; private static final int MASK_IME_SWITCHER_VISIBLE = FLAG_SWITCHER_SUPPORTED | FLAG_IME_VISIBLE; @@ -188,10 +189,11 @@ public class NavbarButtonsViewController { mPropertyHolders.add(new StatePropertyHolder( mBackButton, flags -> (flags & FLAG_IME_VISIBLE) != 0, View.ROTATION, isRtl ? 90 : -90, 0)); - // Hide when keyguard is showing, show when bouncer is showing + // Hide when keyguard is showing, show when bouncer or lock screen app is showing mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 || - (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0)); + (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 || + (flags & FLAG_KEYGUARD_OCCLUDED) != 0)); // home and recents buttons View homeButton = addButton(R.drawable.ic_sysbar_home, BUTTON_HOME, navContainer, @@ -256,10 +258,12 @@ public class NavbarButtonsViewController { } /** - * Slightly misnamed, but should be called when keyguard OR AOD is showing + * Slightly misnamed, but should be called when keyguard OR AOD is showing. + * We consider keyguardVisible when it's showing bouncer OR is occlucded by another app */ - public void setKeyguardVisible(boolean isKeyguardVisible) { - updateStateForFlag(FLAG_KEYGUARD_VISIBLE, isKeyguardVisible); + public void setKeyguardVisible(boolean isKeyguardVisible, boolean isKeyguardOccluded) { + updateStateForFlag(FLAG_KEYGUARD_VISIBLE, isKeyguardVisible || isKeyguardOccluded); + updateStateForFlag(FLAG_KEYGUARD_OCCLUDED, isKeyguardOccluded); applyState(); } |