diff options
author | Brett Chabot <brettchabot@google.com> | 2017-11-09 11:17:19 -0800 |
---|---|---|
committer | Brett Chabot <brettchabot@google.com> | 2017-11-09 11:17:19 -0800 |
commit | 90374ee14e84d347431d2c0b20cddb8a2dcdc67f (patch) | |
tree | 1d69dc8e46840eb0058e598adbfbe3dd43ebcb7d /resources/src/main/java/org | |
parent | fde0c7e49e6e6c3010f30c5bd013bc6c606f0296 (diff) | |
download | robolectric-shadows-90374ee14e84d347431d2c0b20cddb8a2dcdc67f.tar.gz |
Fix for locale variants
Diffstat (limited to 'resources/src/main/java/org')
-rw-r--r-- | resources/src/main/java/org/robolectric/res/android/ConfigDescription.java | 2 | ||||
-rw-r--r-- | resources/src/main/java/org/robolectric/res/android/ResTable_config.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/resources/src/main/java/org/robolectric/res/android/ConfigDescription.java b/resources/src/main/java/org/robolectric/res/android/ConfigDescription.java index 77d9a6ccb..18d30f9cc 100644 --- a/resources/src/main/java/org/robolectric/res/android/ConfigDescription.java +++ b/resources/src/main/java/org/robolectric/res/android/ConfigDescription.java @@ -185,7 +185,7 @@ public class ConfigDescription { System.arraycopy(scriptBytes, 0, out.localeScript, 0, scriptBytes.length); Arrays.fill(out.localeVariant, (byte) 0); - byte[] variantBytes = variant == null ? new byte[2] : variant.getBytes(); + byte[] variantBytes = variant == null ? new byte[8] : variant.getBytes(); System.arraycopy(variantBytes, 0, out.localeVariant, 0, variantBytes.length); } } diff --git a/resources/src/main/java/org/robolectric/res/android/ResTable_config.java b/resources/src/main/java/org/robolectric/res/android/ResTable_config.java index f5cbbe9ce..556483954 100644 --- a/resources/src/main/java/org/robolectric/res/android/ResTable_config.java +++ b/resources/src/main/java/org/robolectric/res/android/ResTable_config.java @@ -507,7 +507,7 @@ public class ResTable_config { this.language = new byte[2]; this.country = new byte[2]; this.localeScript = new byte[LocaleData.SCRIPT_LENGTH]; - this.localeVariant = new byte[2]; + this.localeVariant = new byte[8]; } public int minorVersion; |