summaryrefslogtreecommitdiff
path: root/src/com/android/dialer
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-08-13 15:20:08 -0700
committerAndrew Lee <anwlee@google.com>2015-08-14 12:47:15 -0700
commit4de59fb9ceac10ed429cd8416251329aa03ad266 (patch)
treeaeadff2f9d88b2d6bfb14e1a9b2c3487c4704312 /src/com/android/dialer
parentc4079241a7ea29773cfec497281a114b7cbbbddd (diff)
Rename "Recents" to "Call History".
+ All user-facing indications should now say "Call History". + I renamed many references in code to "Call Log", which is how we internally refer to many of the components related to call history. It seemed excessive to rename the fragment, list items, adapters, and other references to that throughout our codebase. Bug: 23017190 Change-Id: I99719122ce592962ff99705dcf4b16e17eee3ab7
Diffstat (limited to 'src/com/android/dialer')
-rw-r--r--src/com/android/dialer/DialtactsActivity.java12
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java2
-rw-r--r--src/com/android/dialer/calllog/CallLogFragment.java12
-rw-r--r--src/com/android/dialer/calllog/DefaultVoicemailNotifier.java1
-rw-r--r--src/com/android/dialer/list/ListsFragment.java22
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();