OSDN Git Service

am 670889f7: Merge change 27326 into eclair
authorKen Shirriff <kens@google.com>
Sun, 27 Sep 2009 23:54:25 +0000 (16:54 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Sun, 27 Sep 2009 23:54:25 +0000 (16:54 -0700)
Merge commit '670889f7e328330909c99f36b35e7a84e2927511' into eclair-plus-aosp

* commit '670889f7e328330909c99f36b35e7a84e2927511':
  Use onStartCommand() in AlertService.

src/com/android/calendar/AlertService.java

index 558a8f6..6550694 100644 (file)
@@ -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