Revive the old behavior of unsupported filed in public APIs
The behavior of the Typeface creating function when unsuppoted font files are passed has changed unexpectedly. This CL revives the old behaviors. Here is the list of public APIs and expected behaviors. Resources#getFont for unsupported font Exception: Resources#NotFoundException Resources#getFont for unsupported font in XML Exception: Resources#NotFoundException Resources#getFont for unsupported font from provider No Exception: Typeface.DEFAULT is returned Typeface#Builder for unsupported font No Exception: null is returned Typeface#Builder for unavailable font No Exception: null is returned Typeface#createFromAsset for unsupported font Not Exception: Typeface.DEFAULT is returned Typeface#createFromAsset for unavailable font Exception: RuntimeExcetpion FontsContract#buildTypeface for unspported font No Exception: null is returned FontsContract#buildTypeface for unspported font in XML No Exception: null is returned FontsContract#buildTypeface for unspported font from provider No Exception: null is returned TextView inflation for unsupported font No Exception: Typeface.DEFAULT is set TextView inflation for unsupported font in XML No Exception: Typeface.DEFAULT is set TextView inflation for unsupported font from provider No Exception: Typeface.DEFAULT is set Bug: 127714175 Test: Manually done Change-Id: Iaab037f4168546409ead67ed8eee7340418418ed
Loading
Please register or sign in to comment