From 88c92c70fee29654cb3603115cf1add892cf4382 Mon Sep 17 00:00:00 2001 From: Tiger Huang Date: Thu, 27 Aug 2020 15:53:56 +0800 Subject: Fix BEHAVIOR_SHOW_BARS_BY_TOUCH If navigation is hidden while the behavior is SHOW_BARS_BY_TOUCH, both system bars should be shown by touch, not just navigation bar. Fix: 160587946 Test: atest DisplayPolicyTests Change-Id: I3f2e80a24b3184707a9fa0d65a4f44fc308c30ca --- services/core/java/com/android/server/wm/DisplayPolicy.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index 5c5ec358d004..4eb14baaff90 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -1538,7 +1538,7 @@ public class DisplayPolicy { if (mInputConsumer == null) { return; } - showNavigationBar(); + showSystemBars(); // Any user activity always causes us to show the // navigation controls, if they had been hidden. // We also clear the low profile and only content @@ -1573,13 +1573,13 @@ public class DisplayPolicy { } } - private void showNavigationBar() { + private void showSystemBars() { final InsetsSourceProvider provider = mDisplayContent.getInsetsStateController() .peekSourceProvider(ITYPE_NAVIGATION_BAR); final InsetsControlTarget target = provider != null ? provider.getControlTarget() : null; if (target != null) { - target.showInsets(Type.navigationBars(), false /* fromIme */); + target.showInsets(Type.systemBars(), false /* fromIme */); } } } -- cgit v1.2.3-59-g8ed1b