优化服务的返回值

main
Matthew 5 days ago
parent a7c4356d93
commit a9ac0743f7

@ -893,7 +893,7 @@ public class MpMasterService extends Service {
if (intent == null) { if (intent == null) {
stopForeground(true); stopForeground(true);
stopSelf(); stopSelf(startId);
return START_NOT_STICKY; return START_NOT_STICKY;
} }
@ -931,14 +931,14 @@ public class MpMasterService extends Service {
break; break;
case ACTION_STOP: case ACTION_STOP:
stopForeground(true); stopForeground(true);
stopSelf(); stopSelf(startId);
break; break;
default: default:
stopForeground(true); stopForeground(true);
stopSelf(); stopSelf();
} }
return START_NOT_STICKY; return START_REDELIVER_INTENT;
} }
private void connect() { private void connect() {

Loading…
Cancel
Save