diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-02-26 23:32:10 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-02-26 23:32:10 +0000 |
commit | f068a1d55daa763325bd446892dd836557a4715e (patch) | |
tree | 1063c4399d6cecb8e0f6e2abc02422bf54ffa4d3 /java/com/android/dialer/main | |
parent | b2c8e1c635c5c1803ef712e29f46a0ebf172cf27 (diff) | |
parent | 2e2a171000ec3c468009c739e8cc540f021f4ad7 (diff) |
Merge changes I1c9fd942,Ib1b4baee
* changes:
Added Call History activity to MainMenu.
Updating PrimaryCallState value class to use AutoValue with builder pattern.
Diffstat (limited to 'java/com/android/dialer/main')
3 files changed, 17 insertions, 6 deletions
diff --git a/java/com/android/dialer/main/impl/MainSearchController.java b/java/com/android/dialer/main/impl/MainSearchController.java index 0c2374c96..33e0981dd 100644 --- a/java/com/android/dialer/main/impl/MainSearchController.java +++ b/java/com/android/dialer/main/impl/MainSearchController.java @@ -32,6 +32,7 @@ import android.view.animation.Animation; import android.view.animation.Animation.AnimationListener; import android.widget.Toast; import com.android.contacts.common.dialog.ClearFrequentsDialog; +import com.android.dialer.app.calllog.CallLogActivity; import com.android.dialer.app.settings.DialerSettingsActivity; import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.common.Assert; @@ -402,6 +403,9 @@ public class MainSearchController implements SearchBarListener { ClearFrequentsDialog.show(mainActivity.getFragmentManager()); Logger.get(mainActivity).logScreenView(ScreenEvent.Type.CLEAR_FREQUENTS, mainActivity); return true; + } else if (menuItem.getItemId() == R.id.menu_call_history) { + final Intent intent = new Intent(mainActivity, CallLogActivity.class); + mainActivity.startActivity(intent); } return false; } diff --git a/java/com/android/dialer/main/impl/toolbar/res/menu/main_menu.xml b/java/com/android/dialer/main/impl/toolbar/res/menu/main_menu.xml index e2ff57f28..ab25aa451 100644 --- a/java/com/android/dialer/main/impl/toolbar/res/menu/main_menu.xml +++ b/java/com/android/dialer/main/impl/toolbar/res/menu/main_menu.xml @@ -18,21 +18,24 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> <item + android:id="@+id/menu_call_history" + android:title="@string/main_menu_call_history" + app:showAsAction="collapseActionView"/> + + <item android:id="@+id/clear_frequents" android:title="@string/main_menu_clear_frequents" app:showAsAction="collapseActionView" android:visible="false"/> - <!-- TODO(calderwoodra): add clear call log --> - <item android:id="@+id/settings" android:title="@string/settings" app:showAsAction="collapseActionView"/> <item - android:id="@+id/menu_simulator_submenu" - android:title="@string/nui_simulator_submenu_label" - app:showAsAction="collapseActionView" - android:visible="false"/> + android:id="@+id/menu_simulator_submenu" + android:title="@string/nui_simulator_submenu_label" + app:showAsAction="collapseActionView" + android:visible="false"/> </menu>
\ No newline at end of file diff --git a/java/com/android/dialer/main/impl/toolbar/res/values/strings.xml b/java/com/android/dialer/main/impl/toolbar/res/values/strings.xml index 96f0cc0f9..00b175edf 100644 --- a/java/com/android/dialer/main/impl/toolbar/res/values/strings.xml +++ b/java/com/android/dialer/main/impl/toolbar/res/values/strings.xml @@ -38,6 +38,10 @@ <!-- Show users their settings [CHAR LIMIT=20] --> <string name="settings">Settings</string> + <!-- Content description for the fake action menu button that brings up the call history + activity [CHAR LIMIT=20] --> + <string name="main_menu_call_history">Call history</string> + <!-- The menu item to clear frequents [CHAR LIMIT=30] --> <string name="main_menu_clear_frequents">Clear frequents</string> |