summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard
diff options
context:
space:
mode:
authorXiyuan Xia <xiyuan@google.com>2015-05-29 19:19:27 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-05-29 19:19:27 +0000
commit223826b3cd1c7dc00706efc137b8a4dcaf7595fa (patch)
tree4f1a1bf21488a4082f4b2b1f925e84edcdcd5852 /packages/Keyguard
parent7ec9264f40087f48dcab821c65a93f8628dd0e93 (diff)
parente103029dbc457596661ae4066aabcb2a35f07dfd (diff)
downloadframeworks_base-223826b3cd1c7dc00706efc137b8a4dcaf7595fa.zip
frameworks_base-223826b3cd1c7dc00706efc137b8a4dcaf7595fa.tar.gz
frameworks_base-223826b3cd1c7dc00706efc137b8a4dcaf7595fa.tar.bz2
am e103029d: Merge "Avoid keyguard UI layout dimensions underflow" into mnc-dev
* commit 'e103029dbc457596661ae4066aabcb2a35f07dfd': Avoid keyguard UI layout dimensions underflow
Diffstat (limited to 'packages/Keyguard')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
index 1c4b963..54467f3 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
@@ -203,8 +203,8 @@ public class KeyguardSecurityViewFlipper extends ViewFlipper implements Keyguard
final int wPadding = getPaddingLeft() + getPaddingRight();
final int hPadding = getPaddingTop() + getPaddingBottom();
- maxWidth -= wPadding;
- maxHeight -= hPadding;
+ maxWidth = Math.max(0, maxWidth - wPadding);
+ maxHeight = Math.max(0, maxHeight - hPadding);
int width = widthMode == MeasureSpec.EXACTLY ? widthSize : 0;
int height = heightMode == MeasureSpec.EXACTLY ? heightSize : 0;