diff options
author | Qin Chao <chaox.qin@intel.com> | 2014-12-30 14:28:49 +0800 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2015-01-13 10:47:24 +0000 |
commit | d627ef9abbc8f6e641c92c2fd1c7a502a6485b87 (patch) | |
tree | 3da0c6f57e98b9dedcc5d58a1c76753b6be38874 /libphonenumber/src/com/google/i18n/phonenumbers/MetadataManager.java | |
parent | c30a96daaeb212ddd57838a34d29119246def058 (diff) | |
download | libphonenumber-d627ef9abbc8f6e641c92c2fd1c7a502a6485b87.tar.gz |
Temporary workaround build system issues.
The tool jarjar will replace the string "com.google" with "com.android"
according to the "jarjar-rules.txt". So all the hardcoded strings which
started with "/com/google" will modified into "/com/android/*" in the
final jar packages. This will cause all configuration files like
"/com/google/i18n/phonenumbers/ShortNumberMetadaProto_*" and
"/com/google/i18n/phonenumbers/PhoneNumberAlternateFormatsProto_*" not found.
This is because the build system packages resources after applying
jarjar rules.
This fixes a crash while making phone calls.
Signed-off-by: Qin Chao <chaox.qin@intel.com>
Change-Id: I7b1649dd97368ae7d524f4f6e51bff2864f9905f
Diffstat (limited to 'libphonenumber/src/com/google/i18n/phonenumbers/MetadataManager.java')
-rw-r--r-- | libphonenumber/src/com/google/i18n/phonenumbers/MetadataManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/MetadataManager.java b/libphonenumber/src/com/google/i18n/phonenumbers/MetadataManager.java index e6f44dee..5e36dcb3 100644 --- a/libphonenumber/src/com/google/i18n/phonenumbers/MetadataManager.java +++ b/libphonenumber/src/com/google/i18n/phonenumbers/MetadataManager.java @@ -37,10 +37,12 @@ import java.util.logging.Logger; * would handle the main metadata file (PhoneNumberMetadata.xml) as well. */ class MetadataManager { + // TODO: Revert this hideous hack once the build system has been changed + // to let resource files be jar-jared. private static final String ALTERNATE_FORMATS_FILE_PREFIX = - "/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto"; + "/com/gaggle/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto".replace("gaggle", "google"); private static final String SHORT_NUMBER_METADATA_FILE_PREFIX = - "/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto"; + "/com/gaggle/i18n/phonenumbers/data/ShortNumberMetadataProto".replace("gaggle", "google"); private static final Logger LOGGER = Logger.getLogger(MetadataManager.class.getName()); |