Merge "Fix BEHAVIOR_SHOW_BARS_BY_TOUCH" into rvc-qpr-dev

This commit is contained in:
Tiger Huang
2020-09-03 07:11:33 +00:00
committed by Android (Google) Code Review

View File

@@ -1540,7 +1540,7 @@ public class DisplayPolicy {
if (mInputConsumer == null) { if (mInputConsumer == null) {
return; return;
} }
showNavigationBar(); showSystemBars();
// Any user activity always causes us to show the // Any user activity always causes us to show the
// navigation controls, if they had been hidden. // navigation controls, if they had been hidden.
// We also clear the low profile and only content // We also clear the low profile and only content
@@ -1575,13 +1575,13 @@ public class DisplayPolicy {
} }
} }
private void showNavigationBar() { private void showSystemBars() {
final InsetsSourceProvider provider = mDisplayContent.getInsetsStateController() final InsetsSourceProvider provider = mDisplayContent.getInsetsStateController()
.peekSourceProvider(ITYPE_NAVIGATION_BAR); .peekSourceProvider(ITYPE_NAVIGATION_BAR);
final InsetsControlTarget target = final InsetsControlTarget target =
provider != null ? provider.getControlTarget() : null; provider != null ? provider.getControlTarget() : null;
if (target != null) { if (target != null) {
target.showInsets(Type.navigationBars(), false /* fromIme */); target.showInsets(Type.systemBars(), false /* fromIme */);
} }
} }
} }