diff options
-rw-r--r-- | java/com/android/dialer/databasepopulator/VoicemailPopulator.java | 7 | ||||
-rw-r--r-- | java/com/android/dialer/phonelookup/cp2/Cp2LocalPhoneLookup.java | 16 |
2 files changed, 12 insertions, 11 deletions
diff --git a/java/com/android/dialer/databasepopulator/VoicemailPopulator.java b/java/com/android/dialer/databasepopulator/VoicemailPopulator.java index 97f6b0a32..2300150f4 100644 --- a/java/com/android/dialer/databasepopulator/VoicemailPopulator.java +++ b/java/com/android/dialer/databasepopulator/VoicemailPopulator.java @@ -72,13 +72,6 @@ public final class VoicemailPopulator { .setDurationSeconds(0) .setPhoneAccountComponentName(componentName) .setIsRead(true), - // Short number. - Voicemail.builder() - .setPhoneNumber("711") - .setTranscription("This is a short voicemail.") - .setDurationSeconds(12) - .setPhoneAccountComponentName(componentName) - .setIsRead(true), }; @WorkerThread diff --git a/java/com/android/dialer/phonelookup/cp2/Cp2LocalPhoneLookup.java b/java/com/android/dialer/phonelookup/cp2/Cp2LocalPhoneLookup.java index 95b14a41d..e051f473c 100644 --- a/java/com/android/dialer/phonelookup/cp2/Cp2LocalPhoneLookup.java +++ b/java/com/android/dialer/phonelookup/cp2/Cp2LocalPhoneLookup.java @@ -495,10 +495,18 @@ public final class Cp2LocalPhoneLookup implements PhoneLookup<Cp2Info> { } else if (deletedPhoneNumbers.contains(dialerPhoneNumber)) { infoBuilder.clear(); } else if (unprocessableNumbers.contains(dialerPhoneNumber)) { - // Don't clear the existing info when the number is unprocessable. It's - // likely that the existing info is up-to-date so keep it in place so that - // the UI doesn't pop when the query is completed at display time. - infoBuilder.setIsIncomplete(true); + // Don't ever set the "incomplete" bit for numbers which are empty; this + // causes unnecessary render time work because there will never be contact + // information for an empty number. It is also required to pass the + // assertion check in the new voicemail fragment, which verifies that no + // voicemails rows are considered "incomplete" (the voicemail fragment + // does not have the ability to fetch information at render time). + if (!dialerPhoneNumber.getNormalizedNumber().isEmpty()) { + // Don't clear the existing info when the number is unprocessable. It's + // likely that the existing info is up-to-date so keep it in place so + // that the UI doesn't pop when the query is completed at display time. + infoBuilder.setIsIncomplete(true); + } } // If the DialerPhoneNumber didn't change, add the unchanged existing info. |