diff options
| author | Shawn Lin <shawnlin@google.com> | 2020-03-10 06:35:51 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-03-10 06:35:51 +0000 |
| commit | 74c6a9785a105303401c1403e4d268ddcc8ba4cf (patch) | |
| tree | 860808d9d30d5a8f84b8f89136d305a1a9df3c69 /core/java | |
| parent | af3061e58e0409c6d1c57d648922c1041bddc2b9 (diff) | |
| parent | a62e449f6b9f83a086ba3413403292f52ffc8524 (diff) | |
Merge "Fixed DisplayCutout flaky test"
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/DisplayCutout.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/view/DisplayCutout.java b/core/java/android/view/DisplayCutout.java index e77d7191d5b8..598c1dc2c39f 100644 --- a/core/java/android/view/DisplayCutout.java +++ b/core/java/android/view/DisplayCutout.java @@ -638,7 +638,8 @@ public final class DisplayCutout { return sCachedCutout; } } - spec = spec.trim(); + final String specToCache = spec.trim(); + spec = specToCache; final float offsetX; if (spec.endsWith(RIGHT_MARKER)) { offsetX = displayWidth; @@ -709,7 +710,7 @@ public final class DisplayCutout { final Pair<Path, DisplayCutout> result = new Pair<>(p, cutout); synchronized (CACHE_LOCK) { - sCachedSpec = spec; + sCachedSpec = specToCache; sCachedDisplayWidth = displayWidth; sCachedDisplayHeight = displayHeight; sCachedDensity = density; |
