diff options
| author | 2021-03-23 20:35:10 +0000 | |
|---|---|---|
| committer | 2021-03-23 20:35:10 +0000 | |
| commit | 3a38f4572ee5e428e15d56bd8a5ee2741b92d67c (patch) | |
| tree | 58a3932d7ce7c6aaa19a89af06543cd6b5b89711 | |
| parent | 146ae7ffbb6fd137982fac46e641f746dd29b267 (diff) | |
| parent | 7ed71bc41819911fdf40f86119251a2cb5178f92 (diff) | |
Merge "Fix thread-shared field evades lock acquisition reported by Coverity" am: 66fc99d578 am: 7427d997f6 am: 7ed71bc418
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646974
Change-Id: Ifa2be5367a1afcb9803fe129951cf6c66ce30cc0
| -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 2a6bbf36ef76..cafda0966fc4 100644 --- a/graphics/java/android/graphics/Typeface.java +++ b/graphics/java/android/graphics/Typeface.java @@ -1441,13 +1441,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; } } } |