diff options
author | Googler <noreply@google.com> | 2023-01-19 11:41:01 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-01-19 11:41:40 -0800 |
commit | 9e8162c02fa4ecec5d8bf3cdc58de2e41e0d22fb (patch) | |
tree | 21f3b317fc9decfe19ffc8a1e5c8d88f25891aec /nativeruntime | |
parent | 219a887e97cb3d75764e9f84c87e6f23196ea2eb (diff) | |
download | robolectric-9e8162c02fa4ecec5d8bf3cdc58de2e41e0d22fb.tar.gz |
Add "/" at the end of fontsPath for RNG initialization
PiperOrigin-RevId: 503223428
Diffstat (limited to 'nativeruntime')
-rw-r--r-- | nativeruntime/src/main/java/org/robolectric/nativeruntime/DefaultNativeRuntimeLoader.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nativeruntime/src/main/java/org/robolectric/nativeruntime/DefaultNativeRuntimeLoader.java b/nativeruntime/src/main/java/org/robolectric/nativeruntime/DefaultNativeRuntimeLoader.java index 5221a4b8a..3892453dd 100644 --- a/nativeruntime/src/main/java/org/robolectric/nativeruntime/DefaultNativeRuntimeLoader.java +++ b/nativeruntime/src/main/java/org/robolectric/nativeruntime/DefaultNativeRuntimeLoader.java @@ -11,6 +11,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; import com.google.common.io.Files; import com.google.common.io.Resources; +import java.io.File; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; @@ -137,7 +138,9 @@ public class DefaultNativeRuntimeLoader implements NativeRuntimeLoader { } } System.setProperty( - "robolectric.nativeruntime.fontdir", fontsOutputPath.toAbsolutePath().toString()); + "robolectric.nativeruntime.fontdir", + // Android's FontListParser expects a trailing slash for the base font directory. + fontsOutputPath.toAbsolutePath() + File.separator); if (zipfs != null) { zipfs.close(); } |