am 4bc4fed4: Use new service command processing to avoid leaving the service running.

Merge commit '4bc4fed47bec36b48203ae7dd6cd7e4727cfea70'

* commit '4bc4fed47bec36b48203ae7dd6cd7e4727cfea70':
  Use new service command processing to avoid leaving the service running.
This commit is contained in:
Dianne Hackborn 2009-08-24 17:06:01 -07:00 committed by Android Git Automerger
commit 47ac444ff6

View File

@ -141,8 +141,8 @@ public class MailService extends Service {
}
@Override
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
public int onStartCommand(Intent intent, int flags, int startId) {
super.onStartCommand(intent, flags, startId);
// TODO this needs to be passed through the controller and back to us
this.mStartId = startId;
@ -212,6 +212,11 @@ public class MailService extends Service {
}
stopSelf(startId);
}
// If we get killed will syncing, have the intent sent to us again.
// Evetually we should change to schedule the next alarm in this
// function, and return START_NOT_STICK from here.
return START_REDELIVER_INTENT;
}
@Override