diff options
Diffstat (limited to 'src/com/android/dialer')
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 8 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogFragment.java | 10 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 165594efa..3f41b1c1f 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -178,9 +178,6 @@ public class CallLogAdapter extends GroupingListAdapter } else { if (viewHolder.callType == CallLog.Calls.MISSED_TYPE) { CallLogAsyncTaskUtil.markCallAsRead(mContext, viewHolder.callIds); - if (mActivityType == ACTIVITY_TYPE_DIALTACTS) { - ((DialtactsActivity) v.getContext()).updateTabUnreadCounts(); - } } expandViewHolderActions(viewHolder); } @@ -525,7 +522,10 @@ public class CallLogAdapter extends GroupingListAdapter details.features = getCallFeatures(c, count); details.geocode = c.getString(CallLogQuery.GEOCODED_LOCATION); details.transcription = c.getString(CallLogQuery.TRANSCRIPTION); - details.callTypes = getCallTypes(c, count); + if (details.callTypes[0] == CallLog.Calls.VOICEMAIL_TYPE || + details.callTypes[0] == CallLog.Calls.MISSED_TYPE) { + details.isRead = c.getInt(CallLogQuery.IS_READ) == 1; + } if (!c.isNull(CallLogQuery.DATA_USAGE)) { details.dataUsage = c.getLong(CallLogQuery.DATA_USAGE); diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java index 67b72a5a3..d01537dea 100644 --- a/src/com/android/dialer/calllog/CallLogFragment.java +++ b/src/com/android/dialer/calllog/CallLogFragment.java @@ -474,9 +474,13 @@ public class CallLogFragment extends Fragment implements CallLogQueryHandler.Lis // We don't want to update any call data when keyguard is on because the user has likely not // seen the new calls yet. // This might be called before onCreate() and thus we need to check null explicitly. - if (mKeyguardManager != null && !mKeyguardManager.inKeyguardRestrictedInputMode() - && mCallTypeFilter == Calls.VOICEMAIL_TYPE) { - CallLogNotificationsHelper.updateVoicemailNotifications(getActivity()); + if (mKeyguardManager != null && !mKeyguardManager.inKeyguardRestrictedInputMode()) { + // On either of the transitions we update the missed call and voicemail notifications. + // While exiting we additionally consume all missed calls (by marking them as read). + mCallLogQueryHandler.markNewCallsAsOld(); + if (mCallTypeFilter == Calls.VOICEMAIL_TYPE) { + CallLogNotificationsHelper.updateVoicemailNotifications(getActivity()); + } } } |