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 /carrier | |
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 'carrier')
-rw-r--r-- | carrier/src/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.java | 4 | ||||
-rw-r--r-- | carrier/test/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapperTest.java | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/carrier/src/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.java b/carrier/src/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.java index 201062d9..4d328b95 100644 --- a/carrier/src/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.java +++ b/carrier/src/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.java @@ -30,8 +30,10 @@ import java.util.Locale; */ public class PhoneNumberToCarrierMapper { private static PhoneNumberToCarrierMapper 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/carrier/data/"; + "/com/gaggle/i18n/phonenumbers/carrier/data/".replace("gaggle", "google"); private PrefixFileReader prefixFileReader = null; private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); diff --git a/carrier/test/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapperTest.java b/carrier/test/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapperTest.java index 8ca0e2d6..37c81582 100644 --- a/carrier/test/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapperTest.java +++ b/carrier/test/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapperTest.java @@ -28,8 +28,10 @@ import java.util.Locale; public class PhoneNumberToCarrierMapperTest extends TestCase { private final PhoneNumberToCarrierMapper carrierMapper = new PhoneNumberToCarrierMapper(TEST_MAPPING_DATA_DIRECTORY); + // TODO: Revert this hideous hack once the build system has been changed + // to let resource files be jar-jared. private static final String TEST_MAPPING_DATA_DIRECTORY = - "/com/google/i18n/phonenumbers/carrier/testing_data/"; + "/com/gaggle/i18n/phonenumbers/carrier/testing_data/".replace("gaggle", "google"); // Set up some test numbers to re-use. private static final PhoneNumber AO_MOBILE1 = |