Merge "Rename "Recents" to "Call History"."
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4055b44..2098b17 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -132,7 +132,7 @@
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.TAB" />
             </intent-filter>
-            <intent-filter android:label="@string/recentCallsIconLabel">
+            <intent-filter android:label="@string/callHistoryIconLabel">
                 <action android:name="com.android.phone.action.RECENT_CALLS" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.TAB" />
diff --git a/res/drawable/tab_recents.xml b/res/drawable/tab_history.xml
similarity index 100%
rename from res/drawable/tab_recents.xml
rename to res/drawable/tab_history.xml
diff --git a/res/layout/voicemail_playback_layout.xml b/res/layout/voicemail_playback_layout.xml
index 56865fc..555d201 100644
--- a/res/layout/voicemail_playback_layout.xml
+++ b/res/layout/voicemail_playback_layout.xml
@@ -94,7 +94,7 @@
                     style="@style/VoicemailPlaybackLayoutButtonStyle"
                     android:src="@drawable/ic_delete_24dp"
                     android:tint="@color/voicemail_icon_tint"
-                    android:contentDescription="@string/recentCalls_trashVoicemail" />
+                    android:contentDescription="@string/call_log_trash_voicemail" />
 
             </LinearLayout>
 
diff --git a/res/menu/call_details_options.xml b/res/menu/call_details_options.xml
index f08b4fa..84cc2c9 100644
--- a/res/menu/call_details_options.xml
+++ b/res/menu/call_details_options.xml
@@ -18,15 +18,15 @@
     <item android:id="@+id/menu_trash"
         android:icon="@drawable/ic_delete_24dp"
         android:showAsAction="ifRoom"
-        android:title="@string/recentCalls_trashVoicemail" />
+        android:title="@string/call_log_trash_voicemail" />
 
     <item android:id="@+id/menu_remove_from_call_log"
         android:icon="@drawable/ic_delete_24dp"
         android:showAsAction="ifRoom"
-        android:title="@string/recentCalls_removeFromRecentList" />
+        android:title="@string/call_log_remove_from_call_log" />
 
     <item android:id="@+id/menu_edit_number_before_call"
-        android:title="@string/recentCalls_editNumberBeforeCall" />
+        android:title="@string/call_log_edit_number_before_call" />
 
     <item android:id="@+id/menu_report"
         android:title="@string/call_detail_menu_report" />
diff --git a/res/menu/call_log_options.xml b/res/menu/call_log_options.xml
index 50b1cad..da38d86 100644
--- a/res/menu/call_log_options.xml
+++ b/res/menu/call_log_options.xml
@@ -16,7 +16,7 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
     <item
         android:id="@+id/delete_all"
-        android:title="@string/recentCalls_deleteAll"
+        android:title="@string/call_log_delete_all"
         android:showAsAction="never"
         android:orderInCategory="1"/>
 </menu>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8eeb03c..a80153c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -40,12 +40,7 @@
     This is especially valuable for views without textual representation like ImageView.
 
     [CHAR LIMIT=NONE] -->
-    <string name="recentCallsIconLabel">Call history</string>
-
-    <!-- Menu item used to call a contact from the call log -->
-    <string name="recentCalls_callNumber">Call
-        <xliff:g id="name">%s</xliff:g>
-    </string>
+    <string name="callHistoryIconLabel">Call history</string>
 
     <!-- Text for a menu item to report a call as having been incorrectly identified.
          [CHAR LIMIT=30] -->
@@ -58,28 +53,16 @@
     <string name="copy_transcript_text">Copy transcription to clipboard</string>
 
     <!-- Menu item used to copy a number from the call log to the dialer so it can be edited before calling it -->
-    <string name="recentCalls_editNumberBeforeCall">Edit number before call</string>
-
-    <!-- Menu item used to add a number from the call log to contacts -->
-    <string name="recentCalls_addToContact">Add to a contact</string>
+    <string name="call_log_edit_number_before_call">Edit number before call</string>
 
     <!-- Menu item used to remove a single call from the call log -->
-    <string name="recentCalls_removeFromRecentList">Delete from call history</string>
+    <string name="call_log_remove_from_call_log">Delete from call history</string>
 
     <!-- Menu item used to remove all calls from the call log -->
-    <string name="recentCalls_deleteAll">Clear call history</string>
+    <string name="call_log_delete_all">Clear call history</string>
 
     <!-- Menu item used to delete a voicemail. [CHAR LIMIT=30] -->
-    <string name="recentCalls_trashVoicemail">Delete voicemail</string>
-
-    <!-- Menu item used to share a voicemail. [CHAR LIMIT=30] -->
-    <string name="recentCalls_shareVoicemail">Share voicemail</string>
-
-    <!-- Text displayed when the call log is empty. -->
-    <string name="recentCalls_empty">Your call log is empty</string>
-
-    <!-- Label of the button displayed when the call log is empty. Allows the user to make a call. -->
-    <string name="recentCalls_empty_action">Make a call</string>
+    <string name="call_log_trash_voicemail">Delete voicemail</string>
 
     <!-- Title of the confirmation dialog for clearing the call log. [CHAR LIMIT=37]  -->
     <string name="clearCallLogConfirmation_title">Clear call history?</string>
@@ -474,17 +457,23 @@
          Do not translate. -->
     <string name="view_full_call_history_font_family">sans-serif</string>
 
+    <!-- Text displayed when the call log is empty. -->
+    <string name="call_log_all_empty">Your call history is empty</string>
+
+    <!-- Label of the button displayed when the call history is empty. Allows the user to make a call. -->
+    <string name="call_log_all_empty_action">Make a call</string>
+
     <!-- Text displayed when the list of missed calls is empty -->
-    <string name="recentMissed_empty">You have no missed calls.</string>
+    <string name="call_log_missed_empty">You have no missed calls.</string>
 
     <!-- Text displayed when the list of voicemails is empty -->
-    <string name="recentVoicemails_empty">Your voicemail inbox is empty.</string>
+    <string name="call_log_voicemail_empty">Your voicemail inbox is empty.</string>
 
     <!--  Menu option to show favorite contacts only -->
     <string name="show_favorites_only">Show favorites only</string>
 
     <!--  Title of activity that displays a list of all calls -->
-    <string name="call_log_activity_title">History</string>
+    <string name="call_log_activity_title">Call History</string>
 
     <!-- Title for the call log tab containing the list of all voicemails and calls
          [CHAR LIMIT=30] -->
@@ -502,8 +491,8 @@
          [CHAR LIMIT=40] -->
     <string name="tab_speed_dial">Speed dial</string>
 
-    <!-- Accessibility text for the tab showing the call log of recent calls. [CHAR LIMIT=40] -->
-    <string name="tab_recents">Recents</string>
+    <!-- Accessibility text for the tab showing the call history. [CHAR LIMIT=40] -->
+    <string name="tab_history">Call History</string>
 
     <!-- Accessibility text for the tab showing the user's contacts. [CHAR LIMIT=40] -->
     <string name="tab_all_contacts">Contacts</string>
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();