Merge "Fix NPE in onStartCommand"

This commit is contained in:
Marc Blank 2011-07-18 10:18:11 -07:00 committed by Android (Google) Code Review
commit ecf8672df2

View File

@ -909,7 +909,7 @@ public class AttachmentDownloadService extends Service implements Runnable {
if (sRunningService == null) { if (sRunningService == null) {
sRunningService = this; sRunningService = this;
} }
if (intent.hasExtra(EXTRA_ATTACHMENT)) { if (intent != null && intent.hasExtra(EXTRA_ATTACHMENT)) {
Attachment att = (Attachment)intent.getParcelableExtra(EXTRA_ATTACHMENT); Attachment att = (Attachment)intent.getParcelableExtra(EXTRA_ATTACHMENT);
Log.d(TAG, "*** ONSTARTCOMMAND, changed: " + att.mId); Log.d(TAG, "*** ONSTARTCOMMAND, changed: " + att.mId);
onChange(att); onChange(att);