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 /geocoder/src/com/google/i18n/phonenumbers | |
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 'geocoder/src/com/google/i18n/phonenumbers')
-rw-r--r-- | geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java | 4 | ||||
-rw-r--r-- | geocoder/src/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java b/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java index afbc0b2d..71e3a1ba 100644 --- a/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java +++ b/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java @@ -34,8 +34,10 @@ import java.util.logging.Logger; */ public class PhoneNumberToTimeZonesMapper { private static PhoneNumberToTimeZonesMapper instance = null; + // TODO: Revert this hideous hack once the build system has been changed + // to let resource files be jar-jared. private static final String MAPPING_DATA_DIRECTORY = - "/com/google/i18n/phonenumbers/timezones/data/"; + "/com/gaggle/i18n/phonenumbers/timezones/data/".replace("gaggle", "google"); private static final String MAPPING_DATA_FILE_NAME = "map_data"; // This is defined by ICU as the unknown time zone. private static final String UNKNOWN_TIMEZONE = "Etc/Unknown"; diff --git a/geocoder/src/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java b/geocoder/src/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java index 5642a11d..46c6d0fd 100644 --- a/geocoder/src/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java +++ b/geocoder/src/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java @@ -32,8 +32,10 @@ import java.util.Locale; */ public class PhoneNumberOfflineGeocoder { private static PhoneNumberOfflineGeocoder instance = null; + // TODO: Revert this hideous hack once the build system has been changed + // to let resource files be jar-jared. private static final String MAPPING_DATA_DIRECTORY = - "/com/google/i18n/phonenumbers/geocoding/data/"; + "/com/gaggle/i18n/phonenumbers/geocoding/data/".replace("gaggle", "google"); private PrefixFileReader prefixFileReader = null; private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); |