Delay computing of PhoneNumber as much as possible.
Computing PhoneNumber is an expensive operation. We want to make that
asynchronous and it is currently only used together with the offline
geocoder, which also needs to be asynchronous.
Therefore, delay the call to generate a PhoneNumer until it is actually
needed, i.e., at the same time as computing the geocode. This means we
only need to make one call asynchronous instead of many.
Change-Id: Iebebf098be713281b2976c72506e480466fb65d4
diff --git a/src/com/android/contacts/CallDetailActivity.java b/src/com/android/contacts/CallDetailActivity.java
index d2c193e..3189b2d 100644
--- a/src/com/android/contacts/CallDetailActivity.java
+++ b/src/com/android/contacts/CallDetailActivity.java
@@ -419,8 +419,7 @@
numberText = candidateNumberText;
}
}
- return new PhoneCallDetails(number, numberText,
- mPhoneNumberHelper.parsePhoneNumber(number, countryIso),
+ return new PhoneCallDetails(number, numberText, countryIso,
new int[]{ callType }, date, duration,
nameText, numberType, numberLabel, personId, photoUri);
} finally {