diff options
author | uabdullah <uabdullah@google.com> | 2017-06-20 17:16:05 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-06-21 13:49:13 -0700 |
commit | 22edf57d65dd1382128df841d7bfc4c74dc17814 (patch) | |
tree | 19408560ce83477c8693cb2ffc9104e094d497e5 /java/com/android/dialer | |
parent | 513e3a3dfa54ecaa2e12a049cd2b5e7dc7b8dc47 (diff) |
Select "Select all" if all the entries in the call log are selected.
TEST=N/A
Video: https://drive.google.com/a/google.com/file/d/0ByIs9UmqOFZFZjBsUS1HQVBxUUE/view?usp=sharing
PiperOrigin-RevId: 159637501
Change-Id: If1b088f7abff2ec52fd54fbbb36d6b7c6d54a926
Diffstat (limited to 'java/com/android/dialer')
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogAdapter.java | 11 | ||||
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogFragment.java | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java index b0afec1a7..4966d7fba 100644 --- a/java/com/android/dialer/app/calllog/CallLogAdapter.java +++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java @@ -317,6 +317,15 @@ public class CallLogAdapter extends GroupingListAdapter Logger.get(mActivity) .logImpression(DialerImpression.Type.MULTISELECT_SINGLE_PRESS_SELECT_ENTRY); checkMarkCallLogEntry(viewHolder); + // select all check box logic + if (getItemCount() == selectedItems.size()) { + LogUtil.i( + "mExpandCollapseListener.onClick", + "getitem count %d is equal to items select count %d, check select all box", + getItemCount(), + selectedItems.size()); + mMultiSelectRemoveView.tapSelectAll(); + } } return; } @@ -1394,5 +1403,7 @@ public class CallLogAdapter extends GroupingListAdapter void showMultiSelectRemoveView(boolean show); void setSelectAllModeToFalse(); + + void tapSelectAll(); } } diff --git a/java/com/android/dialer/app/calllog/CallLogFragment.java b/java/com/android/dialer/app/calllog/CallLogFragment.java index b03a4ad64..aa765d90e 100644 --- a/java/com/android/dialer/app/calllog/CallLogFragment.java +++ b/java/com/android/dialer/app/calllog/CallLogFragment.java @@ -664,6 +664,13 @@ public class CallLogFragment extends Fragment } @Override + public void tapSelectAll() { + LogUtil.i("CallLogFragment.tapSelectAll", "imitating select all"); + selectAllMode = true; + updateSelectAllIcon(); + } + + @Override public void onClick(View v) { selectAllMode = !selectAllMode; if (selectAllMode) { |