From fc0eb8ccebcc7846db5e8b5c5430070055679bfa Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Thu, 31 Aug 2017 06:57:16 -0700 Subject: Update Dialer source to latest internal Google revision. Previously, Android's Dialer app was developed in an internal Google source control system and only exported to public during AOSP drops. The Dialer team is now switching to a public development model similar to the telephony team. This CL represents all internal Google changes that were committed to Dialer between the public O release and today's tip of tree on internal master. This CL squashes those changes into a single commit. In subsequent changes, changes will be exported on a per-commit basis. (cherry picked from commit 2ca4318cc1ee57dda907ba2069bd61d162b1baef and amended to match paths of dependencies under prebuilts/maven_repo/bumptech/com/github/bumptech/glide/.) This CL was generated using these commands from a repository at stage-stage-master at revision ea7b4dc89590ffa3332766a531e0eab6ffb9aebd ("Merge "Update Dialer source to latest internal Google revision." am: c39ea3c55f -s ours"): git diff --binary 2ca4318cc1ee57dda907ba2069bd61d162b1baef | git apply -R --index git commit -c 2ca4318cc1ee57dda907ba2069bd61d162b1baef Test: make, flash install, run Change-Id: I529aaeb88535b9533c0ae4ef4e6c1222d4e0f1c8 PiperOrigin-RevId: 167068436 --- .../dialer/app/list/DialtactsPagerAdapter.java | 27 ++++++---------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'java/com/android/dialer/app/list/DialtactsPagerAdapter.java') diff --git a/java/com/android/dialer/app/list/DialtactsPagerAdapter.java b/java/com/android/dialer/app/list/DialtactsPagerAdapter.java index 822aa789f..1fbf0f01a 100644 --- a/java/com/android/dialer/app/list/DialtactsPagerAdapter.java +++ b/java/com/android/dialer/app/list/DialtactsPagerAdapter.java @@ -24,13 +24,12 @@ import android.support.v13.app.FragmentPagerAdapter; import android.view.ViewGroup; import com.android.dialer.app.calllog.CallLogFragment; import com.android.dialer.app.calllog.VisualVoicemailCallLogFragment; -import com.android.dialer.calllog.CallLogComponent; -import com.android.dialer.calllog.CallLogFramework; -import com.android.dialer.calllog.ui.NewCallLogFragment; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.configprovider.ConfigProviderBindings; import com.android.dialer.contactsfragment.ContactsFragment; +import com.android.dialer.contactsfragment.ContactsFragment.ClickAction; +import com.android.dialer.contactsfragment.ContactsFragment.Header; import com.android.dialer.database.CallLogQueryHandler; import com.android.dialer.speeddial.SpeedDialFragment; import com.android.dialer.util.ViewUtil; @@ -58,12 +57,10 @@ public class DialtactsPagerAdapter extends FragmentPagerAdapter { private final List fragments = new ArrayList<>(); private final String[] tabTitles; private final boolean useNewSpeedDialTab; - private final boolean useNewCallLogTab; private final boolean useNewContactsTab; private OldSpeedDialFragment oldSpeedDialFragment; private SpeedDialFragment speedDialFragment; private CallLogFragment callLogFragment; - private NewCallLogFragment newCallLogFragment; private AllContactsFragment oldContactsFragment; private ContactsFragment contactsFragment; private CallLogFragment voicemailFragment; @@ -75,8 +72,6 @@ public class DialtactsPagerAdapter extends FragmentPagerAdapter { super(fm); useNewSpeedDialTab = ConfigProviderBindings.get(context).getBoolean("enable_new_favorites_tab", false); - CallLogFramework callLogFramework = CallLogComponent.get(context).callLogFramework(); - useNewCallLogTab = callLogFramework.isNewCallLogEnabled(context); useNewContactsTab = ConfigProviderBindings.get(context).getBoolean("enable_new_contacts_tab", true); this.tabTitles = tabTitles; @@ -106,21 +101,15 @@ public class DialtactsPagerAdapter extends FragmentPagerAdapter { return oldSpeedDialFragment; } case TAB_INDEX_HISTORY: - if (useNewCallLogTab) { - if (newCallLogFragment == null) { - newCallLogFragment = new NewCallLogFragment(); - } - return newCallLogFragment; - } else { - if (callLogFragment == null) { - callLogFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL); - } - return callLogFragment; + if (callLogFragment == null) { + callLogFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL); } + return callLogFragment; case TAB_INDEX_ALL_CONTACTS: if (useNewContactsTab) { if (contactsFragment == null) { - contactsFragment = new ContactsFragment(); + contactsFragment = + ContactsFragment.newInstance(Header.ADD_CONTACT, ClickAction.OPEN_CONTACT_CARD); } return contactsFragment; } else { @@ -156,8 +145,6 @@ public class DialtactsPagerAdapter extends FragmentPagerAdapter { speedDialFragment = (SpeedDialFragment) fragment; } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_HISTORY) { callLogFragment = (CallLogFragment) fragment; - } else if (fragment instanceof NewCallLogFragment) { - newCallLogFragment = (NewCallLogFragment) fragment; } else if (fragment instanceof ContactsFragment) { contactsFragment = (ContactsFragment) fragment; } else if (fragment instanceof AllContactsFragment) { -- cgit v1.2.3