diff options
author | Filip Gruszczynski <gruszczy@google.com> | 2014-07-17 13:37:25 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-07-17 13:37:25 +0000 |
commit | 31a37dc0a1ad977157d0a0c79fb4c82e6bdd72ce (patch) | |
tree | a599b421029bd3919bfbc5329248d0838fcefe0b /policy | |
parent | 9d32507a8608f82d430fcaf1de0eb81de93dcdea (diff) | |
parent | 95198b91665bb93473ea1ec68c69bdbfd0002d49 (diff) | |
download | frameworks_base-31a37dc0a1ad977157d0a0c79fb4c82e6bdd72ce.zip frameworks_base-31a37dc0a1ad977157d0a0c79fb4c82e6bdd72ce.tar.gz frameworks_base-31a37dc0a1ad977157d0a0c79fb4c82e6bdd72ce.tar.bz2 |
am 95198b91: am 39f0e7da: Merge "Using outset bottom from theme as bottom inset on circular screens." into klp-modular-dev
* commit '95198b91665bb93473ea1ec68c69bdbfd0002d49':
Using outset bottom from theme as bottom inset on circular screens.
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index edeb5b4..abbaacc 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -2271,6 +2271,22 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } @Override + public WindowInsets dispatchApplyWindowInsets(WindowInsets insets) { + if (mOutsetBottom != null) { + final DisplayMetrics metrics = getContext().getResources().getDisplayMetrics(); + int bottom = (int) mOutsetBottom.getDimension(metrics); + WindowInsets newInsets = insets.replaceSystemWindowInsets( + insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), + insets.getSystemWindowInsetRight(), + insets.getSystemWindowInsetBottom() + bottom); + return super.dispatchApplyWindowInsets(newInsets); + } else { + return super.dispatchApplyWindowInsets(insets); + } + } + + + @Override public boolean onTouchEvent(MotionEvent event) { return onInterceptTouchEvent(event); } |