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
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
if ("mute".equals(intent.getStringExtra("command"))) {
|
||||
public int onStartCommand(@Nullable Intent intent, int flags, int startId) {
|
||||
if (intent == null) {
|
||||
// service is being restarted
|
||||
} else if ("mute".equals(intent.getStringExtra("command"))) {
|
||||
mute();
|
||||
} else if ("confirm".equals(intent.getStringExtra("command"))) {
|
||||
dismissNotification();
|
||||
|
|
Loading…
Reference in a new issue