diff options
Diffstat (limited to 'java/com/android/dialer/app/calllog/CallLogAdapter.java')
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogAdapter.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java index d3fd36520..f5474eec6 100644 --- a/java/com/android/dialer/app/calllog/CallLogAdapter.java +++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java @@ -53,7 +53,6 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import com.android.contacts.common.ContactsUtils; -import com.android.contacts.common.preference.ContactsPreferences; import com.android.dialer.app.R; import com.android.dialer.app.calllog.CallLogFragment.CallLogFragmentListener; import com.android.dialer.app.calllog.CallLogGroupBuilder.GroupCreator; @@ -73,6 +72,7 @@ import com.android.dialer.common.concurrent.AsyncTaskExecutor; import com.android.dialer.common.concurrent.AsyncTaskExecutors; import com.android.dialer.compat.android.provider.VoicemailCompat; import com.android.dialer.configprovider.ConfigProviderComponent; +import com.android.dialer.contacts.ContactsComponent; import com.android.dialer.duo.Duo; import com.android.dialer.duo.DuoComponent; import com.android.dialer.duo.DuoListener; @@ -506,7 +506,6 @@ public class CallLogAdapter extends GroupingListAdapter private final Map<Long, Integer> dayGroups = new ArrayMap<>(); private boolean loading = true; - private ContactsPreferences contactsPreferences; private boolean isSpamEnabled; @@ -551,8 +550,6 @@ public class CallLogAdapter extends GroupingListAdapter callLogGroupBuilder = new CallLogGroupBuilder(activity.getApplicationContext(), this); this.filteredNumberAsyncQueryHandler = Assert.isNotNull(filteredNumberAsyncQueryHandler); - contactsPreferences = new ContactsPreferences(this.activity); - blockReportSpamListener = new BlockReportSpamListener( this.activity, @@ -674,7 +671,6 @@ public class CallLogAdapter extends GroupingListAdapter if (PermissionsUtil.hasPermission(activity, android.Manifest.permission.READ_CONTACTS)) { contactInfoCache.start(); } - contactsPreferences.refreshValue(ContactsPreferences.DISPLAY_ORDER_KEY); isSpamEnabled = SpamComponent.get(activity).spamSettings().isSpamEnabled(); getDuo().registerListener(this); notifyDataSetChanged(); @@ -1078,7 +1074,8 @@ public class CallLogAdapter extends GroupingListAdapter details.contactUri = info.lookupUri; details.namePrimary = info.name; details.nameAlternative = info.nameAlternative; - details.nameDisplayOrder = contactsPreferences.getDisplayOrder(); + details.nameDisplayOrder = + ContactsComponent.get(activity).contactDisplayPreferences().getDisplayOrder(); details.numberType = info.type; details.numberLabel = info.label; details.photoUri = info.photoUri; |