summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-07-20 15:14:41 -0400
committerJason Monk <jmonk@google.com>2015-07-20 15:14:41 -0400
commitdf01cfe5c469be42a5122df134da0d1105611de3 (patch)
treefb661a7742a6be88bc89908e200a27444a48d340 /src
parent4bb2c78d281ea555e328b4f556572a35a9156540 (diff)
downloadandroid_packages_apps_PackageInstaller-df01cfe5c469be42a5122df134da0d1105611de3.tar.gz
android_packages_apps_PackageInstaller-df01cfe5c469be42a5122df134da0d1105611de3.tar.bz2
android_packages_apps_PackageInstaller-df01cfe5c469be42a5122df134da0d1105611de3.zip
Keep the permissions dialog width consistent
Bug: 22532807 Change-Id: Ie89b4287094bc6525463c6238b53d8ee68395e38
Diffstat (limited to 'src')
-rw-r--r--src/com/android/packageinstaller/permission/ui/ManualLayoutFrame.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/packageinstaller/permission/ui/ManualLayoutFrame.java b/src/com/android/packageinstaller/permission/ui/ManualLayoutFrame.java
index 99a74e75..c9ccf9c1 100644
--- a/src/com/android/packageinstaller/permission/ui/ManualLayoutFrame.java
+++ b/src/com/android/packageinstaller/permission/ui/ManualLayoutFrame.java
@@ -30,6 +30,7 @@ public class ManualLayoutFrame extends FrameLayout {
private int mDesiredHeight;
private int mHeight;
+ private int mWidth;
private View mOffsetView;
@@ -45,11 +46,16 @@ public class ManualLayoutFrame extends FrameLayout {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ if (mWidth != 0) {
+ // Keep the width constant to avoid weirdness.
+ widthMeasureSpec = MeasureSpec.makeMeasureSpec(mWidth, MeasureSpec.EXACTLY);
+ }
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
mDesiredHeight = getMeasuredHeight();
if (mHeight == 0 && mDesiredHeight != 0) {
- // Record the first non-zero height, this will be the height henceforth.
+ // Record the first non-zero width and height, this will be the height henceforth.
mHeight = mDesiredHeight;
+ mWidth = getMeasuredWidth();
}
if (mHeight != 0) {
// Always report the same height