Fix NPE in AttachmentDownloadService

Initialize mConnectivityManager before starting the thread.

Bug 3389701

Change-Id: If616721ad3b3bec81c5d6920f4a5d91b06f937fb
This commit is contained in:
Makoto Onuki 2011-01-25 15:22:32 -08:00
parent 61e63111ba
commit 2d0e44f201

View File

@ -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) {