summaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorSarmad Hashmi <mhashmi@google.com>2016-01-25 17:35:36 -0800
committerBrandon Maxwell <maxwelb@google.com>2016-03-15 12:31:12 -0700
commitba0d51222597bc5e5ef8b9074097cf12950aad64 (patch)
treed47e8e5f0d72beb8cc9ac3072a3d7b1544eb5673 /src/com
parent82f68703ec819b2d9b24766e1abd019784032824 (diff)
Fixing build
+ A merge was performed improperly which caused an import to be removed, but the code using the imported object wasn't. This resulted in build failures since the necessary class wasn't imported. + This change properly performs the merge of cdc14da9275c67d123b55e668f48f73c4b58d948. Change-Id: Ifb78cc75aff18a9c632c7c5e1a3121858383296a
Diffstat (limited to 'src/com')
-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());
+ }
}
}