From 8db7caad865c38b629c1cb0f3383972cb86f2ed5 Mon Sep 17 00:00:00 2001 From: yueg Date: Fri, 22 Sep 2017 18:15:15 -0700 Subject: Don't show Lightbringer disclosure dialog after 1 day since viewed. We think it's viewed by user if it's showing and user scrolls on call log tab, since action in the same tab that moves the dialog is a strong proof. Test: GoogleCallLogAdapterTest PiperOrigin-RevId: 169763132 Change-Id: Ie520c65627b1e5d364860507321fb268c89e0cf7 --- java/com/android/dialer/app/calllog/CallLogAdapter.java | 5 +++++ java/com/android/dialer/app/calllog/CallLogFragment.java | 3 +++ 2 files changed, 8 insertions(+) (limited to 'java/com/android/dialer/app/calllog') diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java index 6540b6f95..e79c89c57 100644 --- a/java/com/android/dialer/app/calllog/CallLogAdapter.java +++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java @@ -407,6 +407,11 @@ public class CallLogAdapter extends GroupingListAdapter } }; + @Nullable + public RecyclerView.OnScrollListener getOnScrollListener() { + return null; + } + private void checkMarkCallLogEntry(CallLogListItemViewHolder viewHolder) { announceforAccessibility( mActivity.getCurrentFocus(), diff --git a/java/com/android/dialer/app/calllog/CallLogFragment.java b/java/com/android/dialer/app/calllog/CallLogFragment.java index 441cb4a5c..8ed924d76 100644 --- a/java/com/android/dialer/app/calllog/CallLogFragment.java +++ b/java/com/android/dialer/app/calllog/CallLogFragment.java @@ -352,6 +352,9 @@ public class CallLogFragment extends Fragment new FilteredNumberAsyncQueryHandler(getActivity()), activityType); mRecyclerView.setAdapter(mAdapter); + if (mAdapter.getOnScrollListener() != null) { + mRecyclerView.addOnScrollListener(mAdapter.getOnScrollListener()); + } fetchCalls(); } -- cgit v1.2.3