Merge pull request #2572 from jotomo/insight-alert-intent-npe
InsightAlertservice: handle nullable intent.
This commit is contained in:
commit
6e9686ed89
1 changed files with 4 additions and 2 deletions
|
@ -104,8 +104,10 @@ public class InsightAlertService extends Service implements InsightConnectionSer
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(@Nullable Intent intent, int flags, int startId) {
|
||||||
if ("mute".equals(intent.getStringExtra("command"))) {
|
if (intent == null) {
|
||||||
|
// service is being restarted
|
||||||
|
} else if ("mute".equals(intent.getStringExtra("command"))) {
|
||||||
mute();
|
mute();
|
||||||
} else if ("confirm".equals(intent.getStringExtra("command"))) {
|
} else if ("confirm".equals(intent.getStringExtra("command"))) {
|
||||||
dismissNotification();
|
dismissNotification();
|
||||||
|
|
Loading…
Reference in a new issue