From 2d0e44f201f4f50e3e3416285805c8f28d1d6ed8 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Tue, 25 Jan 2011 15:22:32 -0800 Subject: [PATCH] Fix NPE in AttachmentDownloadService Initialize mConnectivityManager before starting the thread. Bug 3389701 Change-Id: If616721ad3b3bec81c5d6920f4a5d91b06f937fb --- src/com/android/email/service/AttachmentDownloadService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/email/service/AttachmentDownloadService.java b/src/com/android/email/service/AttachmentDownloadService.java index ab318159e..dc17b20e4 100644 --- a/src/com/android/email/service/AttachmentDownloadService.java +++ b/src/com/android/email/service/AttachmentDownloadService.java @@ -885,9 +885,9 @@ public class AttachmentDownloadService extends Service implements Runnable { */ @Override public void onCreate() { + mConnectivityManager = new EmailConnectivityManager(this, TAG); // Start up our service thread new Thread(this, "AttachmentDownloadService").start(); - mConnectivityManager = new EmailConnectivityManager(this, TAG); } @Override public IBinder onBind(Intent intent) {