diff options
| author | 2016-04-07 23:12:05 +0000 | |
|---|---|---|
| committer | 2016-04-07 23:12:06 +0000 | |
| commit | f89c01254fbf1b3b874072ca5bcc5548e858853d (patch) | |
| tree | e3d4820feeaafda7227acd0d604990c50d20b555 | |
| parent | 4a62effbfe8ad9a0eb7049c2f52a57d39bb64e29 (diff) | |
| parent | 22d1201c39d734273ed4a356de0df0c082623479 (diff) | |
Merge "Fixed PIN entry detecting gravity improperly" into nyc-dev
| -rw-r--r-- | packages/Keyguard/src/com/android/keyguard/PasswordTextView.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java b/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java index 6eea81bf4014..7dba5455e642 100644 --- a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java +++ b/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java @@ -148,8 +148,9 @@ public class PasswordTextView extends View { protected void onDraw(Canvas canvas) { float totalDrawingWidth = getDrawingWidth(); float currentDrawPosition; - if ((mGravity & Gravity.START) != 0) { - if (getLayoutDirection() == LAYOUT_DIRECTION_RTL) { + if ((mGravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.LEFT) { + if ((mGravity & Gravity.RELATIVE_LAYOUT_DIRECTION) != 0 + && getLayoutDirection() == LAYOUT_DIRECTION_RTL) { currentDrawPosition = getWidth() - getPaddingRight() - totalDrawingWidth; } else { currentDrawPosition = getPaddingLeft(); @@ -163,7 +164,7 @@ public class PasswordTextView extends View { float yPosition = (getHeight() - getPaddingBottom() - getPaddingTop()) / 2 + getPaddingTop(); canvas.clipRect(getPaddingLeft(), getPaddingTop(), - getWidth()-getPaddingRight(), getHeight()-getPaddingBottom()); + getWidth() - getPaddingRight(), getHeight() - getPaddingBottom()); float charLength = bounds.right - bounds.left; for (int i = 0; i < length; i++) { CharState charState = mTextChars.get(i); |