From d5f7ed278261652d7999ee788faae331cccb6fb8 Mon Sep 17 00:00:00 2001 From: Heemin Seog Date: Wed, 23 Sep 2020 10:20:18 -0700 Subject: [PATCH] DO NOT MERGE Only check internal inset types if they exist Bug: 169205727 Test: atest WindowInsetsControllerTests (sdk_gphone_x86 && gcar_emu_x86) Change-Id: I4d4a21ac3fc1b17d848c33917efae1f80571a37a --- .../core/java/com/android/server/wm/DisplayPolicy.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index 4a40fc6e572c8..c691a0e220ed7 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -3400,9 +3400,12 @@ public class DisplayPolicy { ? Type.navigationBars() : 0) | (requestedState.getSourceOrDefaultVisibility(ITYPE_STATUS_BAR) ? Type.statusBars() : 0) - | (requestedState.getSourceOrDefaultVisibility(ITYPE_EXTRA_NAVIGATION_BAR) + | (mExtraNavBarAlt != null + && requestedState.getSourceOrDefaultVisibility( + ITYPE_EXTRA_NAVIGATION_BAR) ? Type.navigationBars() : 0) - | (requestedState.getSourceOrDefaultVisibility(ITYPE_CLIMATE_BAR) + | (mClimateBarAlt != null + && requestedState.getSourceOrDefaultVisibility(ITYPE_CLIMATE_BAR) ? Type.statusBars() : 0); if (swipeTarget == mNavigationBar