summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-11-11 18:23:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-11-11 18:23:19 +0000
commit2e054471b853b91fdd3d1a65c5ae4e18be1e9111 (patch)
treefa5aaac8ec0c6b99cc09cb6d4f3fc2a4f96c2ed7 /src
parent7a78b84e61bf13141ed7a9c379ee2b1e251d153b (diff)
parente9fc88c10940cae380d2dc6075685e60e08aa29a (diff)
Merge "Fix potential ANR in CallLogNotificationsService" into ub-contactsdialer-b-dev
Diffstat (limited to 'src')
-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);