Handle null intent in StkAppService.
Bug 2151421. The onStart() may be passed a null intent if a service is restarted and it need handle the null intent for now.
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index d13be1d..7831503 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -161,7 +161,14 @@
public void onStart(Intent intent, int startId) {
waitForLooper();
+ // onStart() method can be passed a null intent
+ // TODO: replace onStart() with onStartCommand()
+ if (intent == null) {
+ return;
+ }
+
Bundle args = intent.getExtras();
+
if (args == null) {
return;
}