summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Michael Kolb <kolby@google.com> 2014-04-18 00:44:35 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2014-04-18 00:44:35 +0000
commit4abbd0a685cb418eb3cfc1f030d3091ef394a7e3 (patch)
tree1b49d32b8099c9bbccfc90f58d31642b6a8afdd1
parentcb54f978b565459210e80054e95becd1f8cae173 (diff)
parent6642e51ac5d0351f02fc929817603d7371e08e10 (diff)
Merge "Populate isRound from config.xml to WindowInsets" into klp-modular-dev
-rw-r--r--core/java/android/view/ViewRootImpl.java10
-rw-r--r--core/java/android/view/WindowInsets.java5
-rw-r--r--core/res/res/values/config.xml3
-rw-r--r--core/res/res/values/symbols.xml1
4 files changed, 18 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index db80aed0281c..bac7fac71f46 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -1153,7 +1153,15 @@ public final class ViewRootImpl implements ViewParent,
void dispatchApplyInsets(View host) {
mFitSystemWindowsInsets.set(mAttachInfo.mContentInsets);
- host.dispatchApplyWindowInsets(new WindowInsets(mFitSystemWindowsInsets));
+ boolean isRound = false;
+ if ((mWindowAttributes.flags & WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN) != 0
+ && mDisplay.getDisplayId() == 0) {
+ // we're fullscreen and not hosted in an ActivityView
+ isRound = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_windowIsRound);
+ }
+ host.dispatchApplyWindowInsets(new WindowInsets(
+ mFitSystemWindowsInsets, isRound));
}
private void performTraversals() {
diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java
index f8cc793f477b..2160efeadc0e 100644
--- a/core/java/android/view/WindowInsets.java
+++ b/core/java/android/view/WindowInsets.java
@@ -51,6 +51,11 @@ public class WindowInsets {
}
/** @hide */
+ public WindowInsets(Rect systemWindowInsets, boolean isRound) {
+ this(systemWindowInsets, EMPTY_RECT, isRound);
+ }
+
+ /** @hide */
public WindowInsets(Rect systemWindowInsets, Rect windowDecorInsets, boolean isRound) {
mSystemWindowInsets = systemWindowInsets;
mWindowDecorInsets = windowDecorInsets;
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index d6395d649229..bc6060804785 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1417,4 +1417,7 @@
2 - The device DOES NOT have a permanent menu key; ignore autodetection. -->
<integer name="config_overrideHasPermanentMenuKey">0</integer>
+ <!-- default window inset isRound property -->
+ <bool name="config_windowIsRound">false</bool>
+
</resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index e7dfec457195..aa8db0134759 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -288,6 +288,7 @@
<java-symbol type="bool" name="config_useFixedVolume" />
<java-symbol type="bool" name="config_forceDefaultOrientation" />
<java-symbol type="bool" name="config_wifi_batched_scan_supported" />
+ <java-symbol type="bool" name="config_windowIsRound" />
<java-symbol type="integer" name="config_cursorWindowSize" />
<java-symbol type="integer" name="config_extraFreeKbytesAdjust" />