summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sunny Goyal <sunnygoyal@google.com> 2019-08-08 16:36:14 -0700
committer Sunny Goyal <sunnygoyal@google.com> 2019-08-08 16:47:24 -0700
commitbe4e054cd35adefd99830a828f3b67e8fe8606ed (patch)
treee85652dabb7235d1df30351ca9e1da04d1642ca4
parent386126a45026663b42cce351f0b32a26c89f7b39 (diff)
Hide the home handle in lock task home when home and overview are disabled
Bug: 137626984 Test: Verified the home handle is hidden with CtsVerifier app Change-Id: I0c21ae5b6f0d094e84b2ba4200a93fd9c4295a55
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 6bfa048eb63d..f689a3eadf58 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -619,6 +619,10 @@ public class NavigationBarView extends FrameLayout implements
// Always disable recents when alternate car mode UI is active and for secondary displays.
boolean disableRecent = isRecentsButtonDisabled();
+ // Disable the home handle if both hone and recents are disabled
+ boolean disableHomeHandle = disableRecent
+ && ((mDisabledFlags & View.STATUS_BAR_DISABLE_HOME) != 0);
+
boolean disableBack = !useAltBack && (isGesturalMode(mNavBarMode)
|| ((mDisabledFlags & View.STATUS_BAR_DISABLE_BACK) != 0));
@@ -649,6 +653,7 @@ public class NavigationBarView extends FrameLayout implements
getBackButton().setVisibility(disableBack ? View.INVISIBLE : View.VISIBLE);
getHomeButton().setVisibility(disableHome ? View.INVISIBLE : View.VISIBLE);
getRecentsButton().setVisibility(disableRecent ? View.INVISIBLE : View.VISIBLE);
+ getHomeHandle().setVisibility(disableHomeHandle ? View.INVISIBLE : View.VISIBLE);
}
@VisibleForTesting