Merge "Fix thread-shared field evades lock acquisition reported by Coverity"

This commit is contained in:
John Reck
2021-03-23 19:55:30 +00:00
committed by Gerrit Code Review

View File

@@ -1196,13 +1196,11 @@ public class Typeface {
/** @hide */
public boolean isSupportedAxes(int axis) {
if (mSupportedAxes == null) {
synchronized (this) {
synchronized (this) {
if (mSupportedAxes == null) {
mSupportedAxes = nativeGetSupportedAxes(native_instance);
if (mSupportedAxes == null) {
mSupportedAxes = nativeGetSupportedAxes(native_instance);
if (mSupportedAxes == null) {
mSupportedAxes = EMPTY_AXES;
}
mSupportedAxes = EMPTY_AXES;
}
}
}