From c1dc950c9b5756937a1df44463cc09fdf0649420 Mon Sep 17 00:00:00 2001 From: Ken Shirriff Date: Sun, 27 Sep 2009 15:21:09 -0700 Subject: [PATCH] Use onStartCommand() in AlertService. This service is supposed to handle an intent, so it uses START_REDELIVER_INTENT to make sure the intent is handled. --- src/com/android/calendar/AlertService.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/com/android/calendar/AlertService.java b/src/com/android/calendar/AlertService.java index 558a8f6..6550694 100644 --- a/src/com/android/calendar/AlertService.java +++ b/src/com/android/calendar/AlertService.java @@ -427,11 +427,14 @@ public class AlertService extends Service { } @Override - public void onStart(Intent intent, int startId) { - Message msg = mServiceHandler.obtainMessage(); - msg.arg1 = startId; - msg.obj = intent.getExtras(); - mServiceHandler.sendMessage(msg); + public int onStartCommand(Intent intent, int flags, int startId) { + if (intent != null) { + Message msg = mServiceHandler.obtainMessage(); + msg.arg1 = startId; + msg.obj = intent.getExtras(); + mServiceHandler.sendMessage(msg); + } + return START_REDELIVER_INTENT; } @Override -- 2.11.0