diff options
author | twyen <twyen@google.com> | 2018-06-27 14:48:00 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-27 15:41:55 -0700 |
commit | d83c23c9fe6cc4eb2923d8b8b258c5f577b7eef3 (patch) | |
tree | 859e255dc285185cd6846e8d170e01d81456717e /java/com/android/dialer/contacts/ContactsComponent.java | |
parent | 3d17fe77a1d9e523cf15838330aee9bacb81ad58 (diff) |
Request high resolution photo to be downloaded by the sync adapter when a contact is added to the favorites.
To conserve resources synced contacts only have the low-res icon by default, and the hi-res photo is only synced when the contact is viewed.
When a contact is "viewed" in dialer, dialer should send a ACTION_VIEW with the contact URI to the sync adapter service.
TEST=TAP
Test: TAP
PiperOrigin-RevId: 202373390
Change-Id: Ie3a173b7c3f442dc806a719910aea9b3a6c5cf4f
Diffstat (limited to 'java/com/android/dialer/contacts/ContactsComponent.java')
-rw-r--r-- | java/com/android/dialer/contacts/ContactsComponent.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/com/android/dialer/contacts/ContactsComponent.java b/java/com/android/dialer/contacts/ContactsComponent.java index 5c4097ace..9c6773716 100644 --- a/java/com/android/dialer/contacts/ContactsComponent.java +++ b/java/com/android/dialer/contacts/ContactsComponent.java @@ -18,7 +18,9 @@ package com.android.dialer.contacts; import android.content.Context; import com.android.dialer.contacts.displaypreference.ContactDisplayPreferences; +import com.android.dialer.contacts.hiresphoto.HighResolutionPhotoRequester; import com.android.dialer.inject.HasRootComponent; +import com.android.dialer.inject.IncludeInDialerRoot; import dagger.Subcomponent; /** Component for contacts related utilities */ @@ -27,12 +29,15 @@ public abstract class ContactsComponent { public abstract ContactDisplayPreferences contactDisplayPreferences(); + public abstract HighResolutionPhotoRequester highResolutionPhotoLoader(); + public static ContactsComponent get(Context context) { return ((HasComponent) ((HasRootComponent) context.getApplicationContext()).component()) .contactsComponent(); } /** Used to refer to the root application component. */ + @IncludeInDialerRoot public interface HasComponent { ContactsComponent contactsComponent(); } |