From 0ae50bdaaa095aa18eeb897f96778de64f3e6cd3 Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Fri, 11 May 2018 21:31:16 -0700 Subject: Exit multiselect mode when opening the dialpad. Bug: 79183384 Test: manual PiperOrigin-RevId: 196344851 Change-Id: I9f5c0e52cb4efe9e63e2c19a4f62ee0b9a23412f --- java/com/android/dialer/app/DialtactsActivity.java | 3 ++- java/com/android/dialer/app/calllog/CallLogAdapter.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'java/com/android/dialer/app') diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java index c819fecba..06f094d5e 100644 --- a/java/com/android/dialer/app/DialtactsActivity.java +++ b/java/com/android/dialer/app/DialtactsActivity.java @@ -46,6 +46,7 @@ import android.telecom.PhoneAccount; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; +import android.view.ActionMode; import android.view.DragEvent; import android.view.Gravity; import android.view.Menu; @@ -1532,7 +1533,7 @@ public class DialtactsActivity extends TransactionSafeActivity } @Override - public void onActionModeStateChanged(boolean isEnabled) { + public void onActionModeStateChanged(ActionMode mode, boolean isEnabled) { isMultiSelectModeEnabled = isEnabled; } diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java index c2c753e43..450e5eaa7 100644 --- a/java/com/android/dialer/app/calllog/CallLogAdapter.java +++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java @@ -178,7 +178,7 @@ public class CallLogAdapter extends GroupingListAdapter MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.actionbar_delete, menu); multiSelectRemoveView.showMultiSelectRemoveView(true); - actionModeStateChangedListener.onActionModeStateChanged(true); + actionModeStateChangedListener.onActionModeStateChanged(mode, true); return true; } @@ -216,7 +216,7 @@ public class CallLogAdapter extends GroupingListAdapter selectAllMode = false; deselectAllMode = false; multiSelectRemoveView.showMultiSelectRemoveView(false); - actionModeStateChangedListener.onActionModeStateChanged(false); + actionModeStateChangedListener.onActionModeStateChanged(null, false); notifyDataSetChanged(); } }; @@ -1511,7 +1511,7 @@ public class CallLogAdapter extends GroupingListAdapter /** Interface used to allow single tap multi select for contact photos. */ public interface OnActionModeStateChangedListener { - void onActionModeStateChanged(boolean isEnabled); + void onActionModeStateChanged(ActionMode mode, boolean isEnabled); boolean isActionModeStateEnabled(); } -- cgit v1.2.3