diff options
author | Andrew Lee <anwlee@google.com> | 2015-08-14 21:27:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-14 21:27:04 +0000 |
commit | 903ebbdd718d1ea6ee10c3ffa68c2ba8c45624eb (patch) | |
tree | 4bd7160729d3f118842203b1c7a90abb4e752ee7 /src/com/android | |
parent | eac047fee7695a19b23c725caf02619a066ad224 (diff) | |
parent | 4de59fb9ceac10ed429cd8416251329aa03ad266 (diff) |
Merge "Rename "Recents" to "Call History"."
Diffstat (limited to 'src/com/android')
5 files changed, 24 insertions, 25 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index ddb09272d..8fa56f02f 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -189,7 +189,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O }; /** - * Fragment containing the speed dial list, recents list, and all contacts list. + * Fragment containing the speed dial list, call history list, and all contacts list. */ private ListsFragment mListsFragment; @@ -543,7 +543,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mListsFragment.showTab(index); } } else if (Calls.CONTENT_TYPE.equals(getIntent().getType())) { - mListsFragment.showTab(ListsFragment.TAB_INDEX_RECENTS); + mListsFragment.showTab(ListsFragment.TAB_INDEX_HISTORY); } setSearchBoxHint(); @@ -1282,13 +1282,13 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { int tabIndex = mListsFragment.getCurrentTabIndex(); - // Scroll the button from center to end when moving from the Speed Dial to Recents tab. - // In RTL, scroll when the current tab is Recents instead of Speed Dial, because the order - // of the tabs is reversed and the ViewPager returns the left tab position during scroll. + // Scroll the button from center to end when moving from the Speed Dial to Call History tab. + // In RTL, scroll when the current tab is Call History instead, since the order of the tabs + // is reversed and the ViewPager returns the left tab position during scroll. boolean isRtl = DialerUtils.isRtl(); if (!isRtl && tabIndex == ListsFragment.TAB_INDEX_SPEED_DIAL && !mIsLandscape) { mFloatingActionButtonController.onPageScrolled(positionOffset); - } else if (isRtl && tabIndex == ListsFragment.TAB_INDEX_RECENTS && !mIsLandscape) { + } else if (isRtl && tabIndex == ListsFragment.TAB_INDEX_HISTORY && !mIsLandscape) { mFloatingActionButtonController.onPageScrolled(1 - positionOffset); } else if (tabIndex != ListsFragment.TAB_INDEX_SPEED_DIAL) { mFloatingActionButtonController.onPageScrolled(1); diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 0d6fcac88..a0ce85bd9 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -240,7 +240,7 @@ public class CallLogAdapter extends GroupingListAdapter ContextMenu.NONE, R.id.context_menu_edit_before_call, ContextMenu.NONE, - R.string.recentCalls_editNumberBeforeCall); + R.string.call_log_edit_number_before_call); editItem.setOnMenuItemClickListener(new OnMenuItemClickListener() { @Override diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java index cf354e596..c63b212d1 100644 --- a/src/com/android/dialer/calllog/CallLogFragment.java +++ b/src/com/android/dialer/calllog/CallLogFragment.java @@ -407,13 +407,13 @@ public class CallLogFragment extends Fragment implements CallLogQueryHandler.Lis final int messageId; switch (filterType) { case Calls.MISSED_TYPE: - messageId = R.string.recentMissed_empty; + messageId = R.string.call_log_missed_empty; break; case Calls.VOICEMAIL_TYPE: - messageId = R.string.recentVoicemails_empty; + messageId = R.string.call_log_voicemail_empty; break; case CallLogQueryHandler.CALL_TYPE_ALL: - messageId = R.string.recentCalls_empty; + messageId = R.string.call_log_all_empty; break; default: throw new IllegalArgumentException("Unexpected filter type in CallLogFragment: " @@ -422,8 +422,8 @@ public class CallLogFragment extends Fragment implements CallLogQueryHandler.Lis mEmptyListView.setDescription(messageId); if (mIsCallLogActivity) { mEmptyListView.setActionLabel(EmptyContentView.NO_LABEL); - } else { - mEmptyListView.setActionLabel(R.string.recentCalls_empty_action); + } else if (filterType == CallLogQueryHandler.CALL_TYPE_ALL) { + mEmptyListView.setActionLabel(R.string.call_log_all_empty_action); } } @@ -497,7 +497,7 @@ public class CallLogFragment extends Fragment implements CallLogQueryHandler.Lis if (!PermissionsUtil.hasPermission(activity, READ_CALL_LOG)) { requestPermissions(new String[] {READ_CALL_LOG}, READ_CALL_LOG_PERMISSION_REQUEST_CODE); } else if (!mIsCallLogActivity) { - // Show dialpad if we are the recents fragment. + // Show dialpad if we are not in the call log activity. ((HostInterface) activity).showDialpad(); } } diff --git a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java index a6d165e3a..4eb74bd29 100644 --- a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java +++ b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java @@ -184,7 +184,6 @@ public class DefaultVoicemailNotifier { // Determine the intent to fire when the notification is clicked on. final Intent contentIntent; // Open the call log. - // TODO: Send to recents tab in Dialer instead. contentIntent = new Intent(mContext, DialtactsActivity.class); contentIntent.putExtra(DialtactsActivity.EXTRA_SHOW_TAB, ListsFragment.TAB_INDEX_VOICEMAIL); notificationBuilder.setContentIntent(PendingIntent.getActivity( diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index 1eeba58f7..931b9bd04 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -52,7 +52,7 @@ public class ListsFragment extends Fragment private static final String TAG = "ListsFragment"; public static final int TAB_INDEX_SPEED_DIAL = 0; - public static final int TAB_INDEX_RECENTS = 1; + public static final int TAB_INDEX_HISTORY = 1; public static final int TAB_INDEX_ALL_CONTACTS = 2; public static final int TAB_INDEX_VOICEMAIL = 3; @@ -74,7 +74,7 @@ public class ListsFragment extends Fragment private View mRemoveViewContent; private SpeedDialFragment mSpeedDialFragment; - private CallLogFragment mRecentsFragment; + private CallLogFragment mHistoryFragment; private AllContactsFragment mAllContactsFragment; private CallLogFragment mVoicemailFragment; @@ -111,9 +111,9 @@ public class ListsFragment extends Fragment case TAB_INDEX_SPEED_DIAL: mSpeedDialFragment = new SpeedDialFragment(); return mSpeedDialFragment; - case TAB_INDEX_RECENTS: - mRecentsFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL); - return mRecentsFragment; + case TAB_INDEX_HISTORY: + mHistoryFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL); + return mHistoryFragment; case TAB_INDEX_ALL_CONTACTS: mAllContactsFragment = new AllContactsFragment(); return mAllContactsFragment; @@ -133,8 +133,8 @@ public class ListsFragment extends Fragment (Fragment) super.instantiateItem(container, position); if (fragment instanceof SpeedDialFragment) { mSpeedDialFragment = (SpeedDialFragment) fragment; - } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_RECENTS) { - mRecentsFragment = (CallLogFragment) fragment; + } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_HISTORY) { + mHistoryFragment = (CallLogFragment) fragment; } else if (fragment instanceof AllContactsFragment) { mAllContactsFragment = (AllContactsFragment) fragment; } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_VOICEMAIL) { @@ -206,13 +206,13 @@ public class ListsFragment extends Fragment mTabTitles = new String[TAB_COUNT_WITH_VOICEMAIL]; mTabTitles[TAB_INDEX_SPEED_DIAL] = getResources().getString(R.string.tab_speed_dial); - mTabTitles[TAB_INDEX_RECENTS] = getResources().getString(R.string.tab_recents); + mTabTitles[TAB_INDEX_HISTORY] = getResources().getString(R.string.tab_history); mTabTitles[TAB_INDEX_ALL_CONTACTS] = getResources().getString(R.string.tab_all_contacts); mTabTitles[TAB_INDEX_VOICEMAIL] = getResources().getString(R.string.tab_voicemail); mTabIcons = new int[TAB_COUNT_WITH_VOICEMAIL]; mTabIcons[TAB_INDEX_SPEED_DIAL] = R.drawable.tab_speed_dial; - mTabIcons[TAB_INDEX_RECENTS] = R.drawable.tab_recents; + mTabIcons[TAB_INDEX_HISTORY] = R.drawable.tab_history; mTabIcons[TAB_INDEX_ALL_CONTACTS] = R.drawable.tab_contacts; mTabIcons[TAB_INDEX_VOICEMAIL] = R.drawable.tab_voicemail; @@ -363,8 +363,8 @@ public class ListsFragment extends Fragment case TAB_INDEX_SPEED_DIAL: fragmentName = SpeedDialFragment.class.getSimpleName(); break; - case TAB_INDEX_RECENTS: - fragmentName = CallLogFragment.class.getSimpleName() + "#Recents"; + case TAB_INDEX_HISTORY: + fragmentName = CallLogFragment.class.getSimpleName() + "#History"; break; case TAB_INDEX_ALL_CONTACTS: fragmentName = AllContactsFragment.class.getSimpleName(); |