summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-11-11 18:29:54 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-11-11 18:29:54 +0000
commit95860e6a97fc99f74d22c7c9317c2f1e1dc69b91 (patch)
treefa5aaac8ec0c6b99cc09cb6d4f3fc2a4f96c2ed7
parentdb07abada10e311e29615d24c26e8ee76588e096 (diff)
parent2e054471b853b91fdd3d1a65c5ae4e18be1e9111 (diff)
Merge "Fix potential ANR in CallLogNotificationsService" into ub-contactsdialer-b-dev
am: 2e054471b8 * commit '2e054471b853b91fdd3d1a65c5ae4e18be1e9111': Fix potential ANR in CallLogNotificationsService
-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);