summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/calllog/CallLogNotificationsService.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/com/android/dialer/calllog/CallLogNotificationsService.java b/src/com/android/dialer/calllog/CallLogNotificationsService.java
index 9a67b61b6..d2a494d9a 100644
--- a/src/com/android/dialer/calllog/CallLogNotificationsService.java
+++ b/src/com/android/dialer/calllog/CallLogNotificationsService.java
@@ -67,12 +67,6 @@ public class CallLogNotificationsService extends IntentService {
}
@Override
- public void onCreate() {
- super.onCreate();
- mVoicemailQueryHandler = new VoicemailQueryHandler(this, getContentResolver());
- }
-
- @Override
protected void onHandleIntent(Intent intent) {
if (intent == null) {
Log.d(TAG, "onHandleIntent: could not handle null intent");
@@ -84,6 +78,9 @@ public class CallLogNotificationsService extends IntentService {
}
if (ACTION_MARK_NEW_VOICEMAILS_AS_OLD.equals(intent.getAction())) {
+ if (mVoicemailQueryHandler == null) {
+ mVoicemailQueryHandler = new VoicemailQueryHandler(this, getContentResolver());
+ }
mVoicemailQueryHandler.markNewVoicemailsAsOld();
} else if (ACTION_UPDATE_NOTIFICATIONS.equals(intent.getAction())) {
Uri voicemailUri = (Uri) intent.getParcelableExtra(EXTRA_NEW_VOICEMAIL_URI);