summaryrefslogtreecommitdiff
path: root/core/java/android/view/WindowManagerGlobal.java
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2016-02-12 15:04:21 -0800
committerJorim Jaggi <jjaggi@google.com>2016-02-24 18:15:17 +0000
commit0ffd49cbe0ab4c13fd5528abacade898a8cff481 (patch)
tree41ef19d1f5952c54896711ae8b082d1ab445ed00 /core/java/android/view/WindowManagerGlobal.java
parent155a280e18200aeaa0e7d5e31d6b8b0115c58e42 (diff)
Always consume bottom insets when navigation bar is force shown
When an app requests SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION but we force show the navigation bar, we need to treat for the app like there is no virtual navigation bar on the device. Because if you combine it with FLAG_HIDE_NAVIGATION, you'd expect the navigation bar gets hidden but it doesn't, so there could be content that overlaps with the navigation bar. Bug: 27157904 Change-Id: I088e02eae2e723c35e9cb4873de6b1325458533b
Diffstat (limited to 'core/java/android/view/WindowManagerGlobal.java')
-rw-r--r--core/java/android/view/WindowManagerGlobal.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java
index 1530b474c534..a1cbc1d07575 100644
--- a/core/java/android/view/WindowManagerGlobal.java
+++ b/core/java/android/view/WindowManagerGlobal.java
@@ -90,6 +90,13 @@ public final class WindowManagerGlobal {
public static final int RELAYOUT_RES_SURFACE_RESIZED = 0x20;
/**
+ * In multi-window we force show the navigation bar. Because we don't want that the surface size
+ * changes in this mode, we instead have a flag whether the navigation bar size should always be
+ * consumed, so the app is treated like there is no virtual navigation bar at all.
+ */
+ public static final int RELAYOUT_RES_CONSUME_ALWAYS_NAV_BAR = 0x40;
+
+ /**
* Flag for relayout: the client will be later giving
* internal insets; as a result, the window will not impact other window
* layouts until the insets are given.
@@ -107,6 +114,11 @@ public final class WindowManagerGlobal {
public static final int ADD_FLAG_APP_VISIBLE = 0x2;
public static final int ADD_FLAG_IN_TOUCH_MODE = RELAYOUT_RES_IN_TOUCH_MODE;
+ /**
+ * Like {@link #RELAYOUT_RES_CONSUME_ALWAYS_NAV_BAR}, but as a "hint" when adding the window.
+ */
+ public static final int ADD_FLAG_ALWAYS_CONSUME_NAV_BAR = 0x4;
+
public static final int ADD_OKAY = 0;
public static final int ADD_BAD_APP_TOKEN = -1;
public static final int ADD_BAD_SUBWINDOW_TOKEN = -2;