summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramStore.java
diff options
context:
space:
mode:
authorSeigo Nonaka <nona@google.com>2017-05-26 17:50:10 -0700
committerSeigo Nonaka <nona@google.com>2017-05-30 13:40:49 -0700
commitffae6c7f71e9da9f887002994d270b9dbf6d0673 (patch)
tree1704473cfd02eabd0cf21edc0eda7c49ed2f7b6a /rs/java/android/renderscript/ProgramStore.java
parentdc23c5e8098c5c22d7734f8430560600611eb30c (diff)
Fix NPE and wrong behavior of Typeface.isSupportedAxes
The Typeface kept by Paint object can be null if nobody calls setTypeface. The null typeface is equivalent to the Typeface.DEFAULT. To check whether the passed axis is usable for Typeface.DEFAULT, we need to pass Typeface.DEFAULT to isSupportedAxes if no typeface was set on the Paint. At the same time this CL fixes an issue in isSupportedAxes. If the requested axis is listed in the first element of axes list, isSupportedAxes returned false due to wrong handling of binarySearch result. Bug: 62146672 Bug: 62147012 Test: am instrument -w -e class android.graphics.cts.PaintTest android.graphics.cts/android.support.test.runner.AndroidJUnitRunner Change-Id: I7c154adfe8a19d6ed24ad645df7c10cee7880461
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions