diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index ddb0927..8fa56f0 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -189,7 +189,7 @@
     };
 
     /**
-     * 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 @@
                 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 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 0d6fcac..a0ce85b 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -240,7 +240,7 @@
                                 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 cf354e5..c63b212 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -407,13 +407,13 @@
         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 @@
         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 @@
         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 a6d165e..4eb74bd 100644
--- a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
+++ b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
@@ -184,7 +184,6 @@
         // 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 1eeba58..931b9bd 100644
--- a/src/com/android/dialer/list/ListsFragment.java
+++ b/src/com/android/dialer/list/ListsFragment.java
@@ -52,7 +52,7 @@
     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 @@
     private View mRemoveViewContent;
 
     private SpeedDialFragment mSpeedDialFragment;
-    private CallLogFragment mRecentsFragment;
+    private CallLogFragment mHistoryFragment;
     private AllContactsFragment mAllContactsFragment;
     private CallLogFragment mVoicemailFragment;
 
@@ -111,9 +111,9 @@
                 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 @@
                     (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 @@
 
         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 @@
             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();
