Loading telephony/java/com/android/internal/telephony/CallerInfo.java +12 −0 Original line number Diff line number Diff line Loading @@ -526,8 +526,20 @@ public class CallerInfo { + countryIso); } // Temp workaround: The current libphonenumber library requires // the countryIso to be uppercase (e.g. "US") but the // detector.detectCountry().getCountryIso() call currently returns // "us". Passing "us" to util.parse() will just result in a // NumberParseException. // So force the countryIso to uppercase for now. // TODO: remove this once getCountryIso() is fixed to always // return uppercase. countryIso = countryIso.toUpperCase(); PhoneNumber pn = null; try { if (VDBG) Log.v(TAG, "parsing '" + number + "' for countryIso '" + countryIso + "'..."); pn = util.parse(number, countryIso); if (VDBG) Log.v(TAG, "- parsed number: " + pn); } catch (NumberParseException e) { Loading telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ public class CallerInfoAsyncQuery { // PhoneNumberOfflineGeocoder to look up a "geo description"? // (TODO: This could become a flag in config.xml if it ever needs to be // configured on a per-product basis.) private static final boolean ENABLE_UNKNOWN_NUMBER_GEO_DESCRIPTION = false; private static final boolean ENABLE_UNKNOWN_NUMBER_GEO_DESCRIPTION = true; /** * Interface for a CallerInfoAsyncQueryHandler result return. Loading Loading
telephony/java/com/android/internal/telephony/CallerInfo.java +12 −0 Original line number Diff line number Diff line Loading @@ -526,8 +526,20 @@ public class CallerInfo { + countryIso); } // Temp workaround: The current libphonenumber library requires // the countryIso to be uppercase (e.g. "US") but the // detector.detectCountry().getCountryIso() call currently returns // "us". Passing "us" to util.parse() will just result in a // NumberParseException. // So force the countryIso to uppercase for now. // TODO: remove this once getCountryIso() is fixed to always // return uppercase. countryIso = countryIso.toUpperCase(); PhoneNumber pn = null; try { if (VDBG) Log.v(TAG, "parsing '" + number + "' for countryIso '" + countryIso + "'..."); pn = util.parse(number, countryIso); if (VDBG) Log.v(TAG, "- parsed number: " + pn); } catch (NumberParseException e) { Loading
telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ public class CallerInfoAsyncQuery { // PhoneNumberOfflineGeocoder to look up a "geo description"? // (TODO: This could become a flag in config.xml if it ever needs to be // configured on a per-product basis.) private static final boolean ENABLE_UNKNOWN_NUMBER_GEO_DESCRIPTION = false; private static final boolean ENABLE_UNKNOWN_NUMBER_GEO_DESCRIPTION = true; /** * Interface for a CallerInfoAsyncQueryHandler result return. Loading