summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java8
-rw-r--r--src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java3
-rw-r--r--src/com/android/dialer/calllog/CallLogFragment.java10
3 files changed, 11 insertions, 10 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index dfb5190e1..64df877f8 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/CallLogAsyncTaskUtil.java b/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
index aa19d25fe..7cb35f514 100644
--- a/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
+++ b/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
@@ -353,8 +353,6 @@ public class CallLogAsyncTaskUtil {
Intent intent = new Intent(context, CallLogNotificationsService.class);
intent.setAction(CallLogNotificationsService.ACTION_MARK_NEW_VOICEMAILS_AS_OLD);
context.startService(intent);
-
- ((DialtactsActivity) context).updateTabUnreadCounts();
return null;
}
});
@@ -416,7 +414,6 @@ public class CallLogAsyncTaskUtil {
});
}
-
/**
* Updates the duration of a voicemail call log entry if the duration given is greater than 0,
* and if if the duration currently in the database is less than or equal to 0 (non-existent).
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 07299a2fb..d258a8c46 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -473,9 +473,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());
+ }
}
}