Fix build breakage.

pull/1/head
Matthew Chen 7 years ago
parent 5c63f7f254
commit 4b6239f491

@ -253,7 +253,7 @@ NSString *const kKeychainKey_LastRegisteredPhoneNumber = @"kKeychainKey_LastRegi
self.phoneNumberTextField.text = [self lastRegisteredPhoneNumber];
#endif
NSNumber *callingCode = [[PhoneNumberUtil sharedUtil].nbPhoneNumberUtil getCountryCodeForRegion:countryCode];
NSNumber *callingCode = [[PhoneNumberUtil sharedThreadLocal].nbPhoneNumberUtil getCountryCodeForRegion:countryCode];
NSString *countryName = [PhoneNumberUtil countryNameFromCountryCode:countryCode];
[self updateCountryWithName:countryName
callingCode:[NSString stringWithFormat:@"%@%@", COUNTRY_CODE_PREFIX, callingCode]

@ -218,13 +218,13 @@ NSString *const kSelectRecipientViewControllerCellIdentifier = @"kSelectRecipien
OWSAssert(callingCode);
if (callingCode) {
NSString *prefix = [NSString stringWithFormat:@"+%d", callingCode.intValue];
countryCode = [[PhoneNumberUtil sharedUtil] probableCountryCodeForCallingCode:prefix];
countryCode = [[PhoneNumberUtil sharedThreadLocal] probableCountryCodeForCallingCode:prefix];
}
}
if (!countryCode || !callingCode) {
countryCode = [PhoneNumber defaultCountryCode];
callingCode = [[PhoneNumberUtil sharedUtil].nbPhoneNumberUtil getCountryCodeForRegion:countryCode];
callingCode = [[PhoneNumberUtil sharedThreadLocal].nbPhoneNumberUtil getCountryCodeForRegion:countryCode];
}
NSString *countryName = [PhoneNumberUtil countryNameFromCountryCode:countryCode];

@ -217,7 +217,7 @@ static NSString *const RPDefaultsKeyPhoneNumberCanonical = @"RPDefaultsKeyPhoneN
if (localCallingCode != nil) {
NSString *localCallingCodePrefix = [NSString stringWithFormat:@"+%@", localCallingCode];
NSString *localCountryCode =
[PhoneNumberUtil.sharedUtil probableCountryCodeForCallingCode:localCallingCodePrefix];
[PhoneNumberUtil.sharedThreadLocal probableCountryCodeForCallingCode:localCallingCodePrefix];
if (localCountryCode && ![localCountryCode isEqualToString:[self defaultCountryCode]]) {
NBMetadataHelper *helper = [[NBMetadataHelper alloc] init];
NBPhoneMetaData *localNumberRegionMetadata = [helper getMetadataForRegion:localCountryCode];
@ -332,7 +332,7 @@ static NSString *const RPDefaultsKeyPhoneNumberCanonical = @"RPDefaultsKeyPhoneN
// Italian phone number but use French region/language for their
// phone. They're likely to have both Italian and French contacts.
NSString *localCountryCode =
[PhoneNumberUtil.sharedUtil probableCountryCodeForCallingCode:callingCodePrefix];
[PhoneNumberUtil.sharedThreadLocal probableCountryCodeForCallingCode:callingCodePrefix];
if (localCountryCode && ![localCountryCode isEqualToString:[self defaultCountryCode]]) {
tryParsingWithCountryCode(
[callingCodePrefix stringByAppendingString:sanitizedString], localCountryCode);

Loading…
Cancel
Save