summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author JianYang Liu <jianyliu@google.com> 2020-05-14 17:07:38 -0700
committer Jian-Yang Liu <jianyliu@google.com> 2020-05-15 20:00:59 +0000
commitb99019ed5bf08c86a1409f0270daaf454e487f36 (patch)
tree50c8b4d29cdaed4911662433b6a44d35601eafc8
parent877b5b2196a8aa108246d3f3e93d9fde2de10eb0 (diff)
Set status bar to provide top gesture insets and navigation bar to
provide bottom gesture insets. Bug: 155688058 Test: atest WindowInsetsPolicyTest Change-Id: If4d700ac1fda38da04c6ec7287aa5131cdeaebcc
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java
index 8e114142972c..5c6472ecb4ef 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java
@@ -16,8 +16,10 @@
package com.android.systemui.car.navigationbar;
+import static android.view.InsetsState.ITYPE_BOTTOM_GESTURES;
import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
import static android.view.InsetsState.ITYPE_STATUS_BAR;
+import static android.view.InsetsState.ITYPE_TOP_GESTURES;
import static android.view.InsetsState.containsType;
import static android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS;
@@ -377,7 +379,7 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
PixelFormat.TRANSLUCENT);
lp.setTitle("TopCarNavigationBar");
- lp.providesInsetsTypes = new int[]{ITYPE_STATUS_BAR};
+ lp.providesInsetsTypes = new int[]{ITYPE_STATUS_BAR, ITYPE_TOP_GESTURES};
lp.setFitInsetsTypes(0);
lp.windowAnimations = 0;
lp.gravity = Gravity.TOP;
@@ -399,7 +401,7 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
PixelFormat.TRANSLUCENT);
lp.setTitle("BottomCarNavigationBar");
- lp.providesInsetsTypes = new int[]{ITYPE_NAVIGATION_BAR};
+ lp.providesInsetsTypes = new int[]{ITYPE_NAVIGATION_BAR, ITYPE_BOTTOM_GESTURES};
lp.windowAnimations = 0;
lp.gravity = Gravity.BOTTOM;
mWindowManager.addView(mBottomNavigationBarWindow, lp);