diff options
-rw-r--r-- | AndroidManifest.xml | 2 | ||||
-rw-r--r-- | res/drawable/tab_history.xml (renamed from res/drawable/tab_recents.xml) | 0 | ||||
-rw-r--r-- | res/layout/voicemail_playback_layout.xml | 2 | ||||
-rw-r--r-- | res/menu/call_details_options.xml | 6 | ||||
-rw-r--r-- | res/menu/call_log_options.xml | 2 | ||||
-rw-r--r-- | res/values/strings.xml | 43 | ||||
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 12 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 2 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogFragment.java | 12 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/DefaultVoicemailNotifier.java | 1 | ||||
-rw-r--r-- | src/com/android/dialer/list/ListsFragment.java | 22 |
11 files changed, 46 insertions, 58 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4055b4441..2098b17da 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 index b1a531840..b1a531840 100644 --- a/res/drawable/tab_recents.xml +++ b/res/drawable/tab_history.xml diff --git a/res/layout/voicemail_playback_layout.xml b/res/layout/voicemail_playback_layout.xml index 56865fcd6..555d20142 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 f08b4facd..84cc2c9eb 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 50b1cad5b..da38d864d 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 8eeb03c4a..a80153c29 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 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(); |