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
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 4a40fc6..c691a0e 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 @@
                             ? 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