summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2014-11-06 18:15:16 +0100
committerAdrian Roos <roosa@google.com>2014-11-10 17:46:57 +0100
commit37d7a68de7e353c31a3a4736054cd86f0e002eaf (patch)
treec2dc2c064b1e57b29efdd0b233a4725f42857585 /policy/src
parent3e54ce273abafec3a0eca9e7064d5151ec096f0b (diff)
downloadframeworks_base-37d7a68de7e353c31a3a4736054cd86f0e002eaf.zip
frameworks_base-37d7a68de7e353c31a3a4736054cd86f0e002eaf.tar.gz
frameworks_base-37d7a68de7e353c31a3a4736054cd86f0e002eaf.tar.bz2
Fix inset hinting when adding window
Windows with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS were getting an incorrect content inset hint, because the hinting didn't see the adjusted systemUiVisibility. Also adds hinting for the stable insets. Bug: 17508238 Change-Id: If9647277feb6811b15665b801accd896c51dbd12
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 3c44e87..f29d5a6 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -3073,7 +3073,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
@Override
- public void getContentInsetHintLw(WindowManager.LayoutParams attrs, Rect contentInset) {
+ public void getInsetHintLw(WindowManager.LayoutParams attrs, Rect outContentInsets,
+ Rect outStableInsets) {
final int fl = PolicyControl.getWindowFlags(null, attrs);
final int sysuiVis = PolicyControl.getSystemUiVisibility(null, attrs);
final int systemUiVisibility = (sysuiVis | attrs.subtreeSystemUiVisibility);
@@ -3091,26 +3092,30 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
if ((systemUiVisibility & View.SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0) {
if ((fl & FLAG_FULLSCREEN) != 0) {
- contentInset.set(mStableFullscreenLeft, mStableFullscreenTop,
+ outContentInsets.set(mStableFullscreenLeft, mStableFullscreenTop,
availRight - mStableFullscreenRight,
availBottom - mStableFullscreenBottom);
} else {
- contentInset.set(mStableLeft, mStableTop,
+ outContentInsets.set(mStableLeft, mStableTop,
availRight - mStableRight, availBottom - mStableBottom);
}
} else if ((fl & FLAG_FULLSCREEN) != 0 || (fl & FLAG_LAYOUT_IN_OVERSCAN) != 0) {
- contentInset.setEmpty();
+ outContentInsets.setEmpty();
} else if ((systemUiVisibility & (View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)) == 0) {
- contentInset.set(mCurLeft, mCurTop,
+ outContentInsets.set(mCurLeft, mCurTop,
availRight - mCurRight, availBottom - mCurBottom);
} else {
- contentInset.set(mCurLeft, mCurTop,
+ outContentInsets.set(mCurLeft, mCurTop,
availRight - mCurRight, availBottom - mCurBottom);
}
+
+ outStableInsets.set(mStableLeft, mStableTop,
+ availRight - mStableRight, availBottom - mStableBottom);
return;
}
- contentInset.setEmpty();
+ outContentInsets.setEmpty();
+ outStableInsets.setEmpty();
}
/** {@inheritDoc} */