diff options
author | Adam Powell <adamp@google.com> | 2012-11-07 14:07:23 -0800 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2012-11-07 14:07:46 -0800 |
commit | eeb6255056b5b0b45026db040edf1136662e847c (patch) | |
tree | a501231d275ddafd48e3707bf9928f3ffb28e7b9 /policy | |
parent | 0fc1b5ecba383f7d3a5e6154a9569ec7d35d64ce (diff) | |
download | frameworks_base-eeb6255056b5b0b45026db040edf1136662e847c.zip frameworks_base-eeb6255056b5b0b45026db040edf1136662e847c.tar.gz frameworks_base-eeb6255056b5b0b45026db040edf1136662e847c.tar.bz2 |
Fix keyguard measurement bugs
Bug 7493748
Bug 7493764
Change-Id: I2182ec4347eefc80198e675684bc5d195f947763
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityViewFlipper.java | 6 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/MultiPaneChallengeLayout.java | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityViewFlipper.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityViewFlipper.java index 072c688..e21e8fc 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityViewFlipper.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityViewFlipper.java @@ -219,10 +219,10 @@ public class KeyguardSecurityViewFlipper extends ViewFlipper implements Keyguard child.measure(childWidthSpec, childHeightSpec); - width = Math.max(width, Math.min(child.getMeasuredWidth(), widthSize)); - height = Math.max(height, Math.min(child.getMeasuredHeight(), heightSize)); + width = Math.max(width, Math.min(child.getMeasuredWidth(), widthSize - wPadding)); + height = Math.max(height, Math.min(child.getMeasuredHeight(), heightSize - hPadding)); } - setMeasuredDimension(width, height); + setMeasuredDimension(width + wPadding, height + hPadding); } private int makeChildMeasureSpec(int maxSize, int childDimen) { diff --git a/policy/src/com/android/internal/policy/impl/keyguard/MultiPaneChallengeLayout.java b/policy/src/com/android/internal/policy/impl/keyguard/MultiPaneChallengeLayout.java index 7b4bd6e..f4940a2 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/MultiPaneChallengeLayout.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/MultiPaneChallengeLayout.java @@ -363,7 +363,7 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo adjustedWidth = (int) (paddedWidth * lp.centerWithinArea + 0.5f); adjustedHeight = height; } else if (fixedLayoutVertical) { - final int paddedHeight = height - padding.top - padding.bottom; + final int paddedHeight = height - getPaddingTop() - getPaddingBottom(); adjustedWidth = width; adjustedHeight = (int) (paddedHeight * lp.centerWithinArea + 0.5f); } else { |