summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorFilip Gruszczynski <gruszczy@google.com>2014-07-17 10:55:43 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-17 10:55:43 +0000
commit95198b91665bb93473ea1ec68c69bdbfd0002d49 (patch)
tree17cf878d397295fc756b52e76b87ec8d5c9d340c /policy
parent1f4e56869c47a8ef68ef83b7693a0f93ad21c984 (diff)
parent39f0e7da00eae4e5a331a9413a396f3dddbeb625 (diff)
downloadframeworks_base-95198b91665bb93473ea1ec68c69bdbfd0002d49.zip
frameworks_base-95198b91665bb93473ea1ec68c69bdbfd0002d49.tar.gz
frameworks_base-95198b91665bb93473ea1ec68c69bdbfd0002d49.tar.bz2
am 39f0e7da: Merge "Using outset bottom from theme as bottom inset on circular screens." into klp-modular-dev
* commit '39f0e7da00eae4e5a331a9413a396f3dddbeb625': 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.java17
1 files changed, 17 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 610f6cf..b5f88f0 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -88,6 +88,7 @@ import android.view.ViewParent;
import android.view.ViewRootImpl;
import android.view.ViewStub;
import android.view.Window;
+import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
@@ -2094,6 +2095,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);
}