summaryrefslogtreecommitdiffstats
path: root/policy/src/com/android
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2014-04-01 20:46:38 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-01 20:46:38 +0000
commit2c73e08d36985fbe5aa8b845730eeec8fe4379b1 (patch)
treecfc1229debcdd5af0b1a840995b1a2061adf1131 /policy/src/com/android
parent913c903612b63e97b340f84dc742875672923f84 (diff)
parent17bbd976c0971f25447b2ce66117f08029dc2fa9 (diff)
downloadframeworks_base-2c73e08d36985fbe5aa8b845730eeec8fe4379b1.zip
frameworks_base-2c73e08d36985fbe5aa8b845730eeec8fe4379b1.tar.gz
frameworks_base-2c73e08d36985fbe5aa8b845730eeec8fe4379b1.tar.bz2
am 17bbd976: Merge "Add outset to decor view measuring" into klp-modular-dev
* commit '17bbd976c0971f25447b2ce66117f08029dc2fa9': Add outset to decor view measuring
Diffstat (limited to 'policy/src/com/android')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 7c047c3..bed3462 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -125,6 +125,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
TypedValue mFixedWidthMinor;
TypedValue mFixedHeightMajor;
TypedValue mFixedHeightMinor;
+ TypedValue mOutsetBottom;
// This is the top-level view of the window, containing the window decor.
private DecorView mDecor;
@@ -2289,7 +2290,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
} else {
h = 0;
}
-
if (h > 0) {
final int heightSize = MeasureSpec.getSize(heightMeasureSpec);
heightMeasureSpec = MeasureSpec.makeMeasureSpec(
@@ -2298,6 +2298,15 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
}
}
+ if (mOutsetBottom != null) {
+ int mode = MeasureSpec.getMode(heightMeasureSpec);
+ if (mode != MeasureSpec.UNSPECIFIED) {
+ int outset = (int) mOutsetBottom.getDimension(metrics);
+ int height = MeasureSpec.getSize(heightMeasureSpec);
+ heightMeasureSpec = MeasureSpec.makeMeasureSpec(height + outset, mode);
+ }
+ }
+
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int width = getMeasuredWidth();
@@ -2904,6 +2913,10 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
a.getValue(com.android.internal.R.styleable.Window_windowFixedHeightMinor,
mFixedHeightMinor);
}
+ if (a.hasValue(com.android.internal.R.styleable.Window_windowOutsetBottom)) {
+ if (mOutsetBottom == null) mOutsetBottom = new TypedValue();
+ a.getValue(com.android.internal.R.styleable.Window_windowOutsetBottom, mOutsetBottom);
+ }
final Context context = getContext();
final int targetSdk = context.getApplicationInfo().targetSdkVersion;