diff options
| author | 2021-03-23 20:28:06 +0000 | |
|---|---|---|
| committer | 2021-03-23 20:28:06 +0000 | |
| commit | 7ed71bc41819911fdf40f86119251a2cb5178f92 (patch) | |
| tree | 583fb35404840ca0270e42f3e7b03c87ca1d842a /graphics/java/android | |
| parent | a32dc0fbe21b20b9333a591e1378087567236428 (diff) | |
| parent | 7427d997f6ad3ae439cea26066cd402793c48575 (diff) | |
Merge "Fix thread-shared field evades lock acquisition reported by Coverity" am: 66fc99d578 am: 7427d997f6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646974
Change-Id: I6b290dc2cbb93837e74ea5040b359e72d22beab0
Diffstat (limited to 'graphics/java/android')
| -rw-r--r-- | graphics/java/android/graphics/Typeface.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java index fe5c1be05927..d048efcfd12c 100644 --- a/graphics/java/android/graphics/Typeface.java +++ b/graphics/java/android/graphics/Typeface.java @@ -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; } } } |