diff options
author | Raph Levien <raph@google.com> | 2014-08-13 15:26:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-13 01:30:28 +0000 |
commit | e07465fafd66a6e882890febcd688e04e6cf2c61 (patch) | |
tree | 992b676421dcbdd09ae2edccb3f7e5db40af80be /graphics | |
parent | 55b0abd75c4fe61d293846f55c3d9fe834a4d15a (diff) | |
parent | ff86bcd08827d1050a8cfd99b521c21848b3f364 (diff) | |
download | frameworks_base-e07465fafd66a6e882890febcd688e04e6cf2c61.zip frameworks_base-e07465fafd66a6e882890febcd688e04e6cf2c61.tar.gz frameworks_base-e07465fafd66a6e882890febcd688e04e6cf2c61.tar.bz2 |
Merge "Resolve invalid Typeface style to default" into lmp-dev
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/Typeface.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java index 0dc903a..06586ca 100644 --- a/graphics/java/android/graphics/Typeface.java +++ b/graphics/java/android/graphics/Typeface.java @@ -132,6 +132,9 @@ public class Typeface { * @return The best matching typeface. */ public static Typeface create(Typeface family, int style) { + if (style < 0 || style > 3) { + style = 0; + } long ni = 0; if (family != null) { // Return early if we're asked for the same face/style |