Merge "Null check action of intents in StkCmdReceiver and BootCompletedReceiver"
diff --git a/src/com/android/stk/BootCompletedReceiver.java b/src/com/android/stk/BootCompletedReceiver.java
index 3f06f25..d162910 100644
--- a/src/com/android/stk/BootCompletedReceiver.java
+++ b/src/com/android/stk/BootCompletedReceiver.java
@@ -35,6 +35,9 @@
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
+ if (action == null) {
+ return;
+ }
// make sure the app icon is removed every time the device boots.
if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
diff --git a/src/com/android/stk/StkCmdReceiver.java b/src/com/android/stk/StkCmdReceiver.java
index 508e7f8..fd6f382 100644
--- a/src/com/android/stk/StkCmdReceiver.java
+++ b/src/com/android/stk/StkCmdReceiver.java
@@ -35,6 +35,9 @@
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
+ if (action == null) {
+ return;
+ }
if (action.equals(AppInterface.CAT_CMD_ACTION)) {
handleAction(context, intent, StkAppService.OP_CMD);