Merge "Resolve invalid Typeface style to default" into lmp-dev
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 @@
      * @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