summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/list/ListsFragment.java
diff options
context:
space:
mode:
authorSarmad Hashmi <mhashmi@google.com>2016-02-10 18:39:59 -0800
committerSarmad Hashmi <mhashmi@google.com>2016-02-24 20:04:24 -0800
commitcb55981252b49e476e1adf9f2d5ec19a658d2aa4 (patch)
treea68f5af6ed2f11462f3ec31a2462598d89ce975e /src/com/android/dialer/list/ListsFragment.java
parentcdc14da9275c67d123b55e668f48f73c4b58d948 (diff)
Mark missed calls as read on swipe.
When swiping to a new tab, if the previous tab that the user was in was the call history tab, all missed calls are marked as read and the tab count is updated. Also fixes b/27153608 and clearing of missed calls on orientation change. BUG=27136093 BUG=27153608 BUG=27154514 Change-Id: I5be31b1a3978784b941fb8e1af22f93fb6ca944a
Diffstat (limited to 'src/com/android/dialer/list/ListsFragment.java')
-rw-r--r--src/com/android/dialer/list/ListsFragment.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java
index 9f761486d..5b7c950bf 100644
--- a/src/com/android/dialer/list/ListsFragment.java
+++ b/src/com/android/dialer/list/ListsFragment.java
@@ -36,6 +36,7 @@ import com.android.contacts.common.list.ViewPagerTabs;
import com.android.dialer.DialtactsActivity;
import com.android.dialer.R;
import com.android.dialer.calllog.CallLogFragment;
+import com.android.dialer.calllog.CallLogNotificationsHelper;
import com.android.dialer.calllog.CallLogQueryHandler;
import com.android.dialer.calllog.VisualVoicemailCallLogFragment;
import com.android.dialer.logging.Logger;
@@ -376,7 +377,8 @@ public class ListsFragment extends Fragment
/**
* External method to update unread count because the unread count changes when the user
- * expands a voicemail in the call log.
+ * expands a voicemail in the call log or when the user expands an unread call in the call
+ * history tab.
*/
public void updateTabUnreadCounts() {
if (mCallLogQueryHandler != null) {
@@ -387,6 +389,17 @@ public class ListsFragment extends Fragment
}
}
+ /**
+ * External method to mark all missed calls as read.
+ */
+ public void markMissedCallsAsReadAndRemoveNotifications() {
+ if (mCallLogQueryHandler != null) {
+ mCallLogQueryHandler.markMissedCallsAsRead();
+ CallLogNotificationsHelper.removeMissedCallNotifications(getActivity());
+ }
+ }
+
+
public void showRemoveView(boolean show) {
mRemoveViewContent.setVisibility(show ? View.VISIBLE : View.GONE);
mRemoveView.setAlpha(show ? 0 : 1);