summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Felipe Leme <felipeal@google.com> 2017-07-14 11:18:08 -0700
committer Felipe Leme <felipeal@google.com> 2017-07-14 11:26:04 -0700
commit68d8041e4d8150f610cc03c10e70fade3c36ef65 (patch)
treea6927746986b2b677289ed514cd95260d9f6e4a6
parentd066fa9b96c8e481fc9ecc578c762b65f4bd4542 (diff)
Fix 'cmd notification' crashes when no command is set.
Test: adb shell cmd notification Fixes: 63705462 Change-Id: Icdeed5b67913c4bde525171b36f8d6103aa5dfbd
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 98a247975959..c0f9e0d90edb 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -5746,6 +5746,9 @@ public class NotificationManagerService extends SystemService {
@Override
public int onCommand(String cmd) {
+ if (cmd == null) {
+ return handleDefaultCommands(cmd);
+ }
final PrintWriter pw = getOutPrintWriter();
try {
switch (cmd) {