summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Joe Onorato <joeo@android.com> 2010-09-23 16:49:20 -0700
committer Joe Onorato <joeo@android.com> 2010-09-23 16:49:20 -0700
commiteaa0718780a29df8fbe42c59beecee5557fdf785 (patch)
treeb4caca99201bbcff4799c0f1a542ab926de5fc11
parentf9ec03c0f5fc2c6eba5bbead24c4eb314c0205be (diff)
Crash apps when they provide bad notifications instead of crashing the system process.
Bug: 2958415 Change-Id: I9cbef340fb20a64eca8493950b814399c26ce197
-rw-r--r--services/java/com/android/server/am/ServiceRecord.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/java/com/android/server/am/ServiceRecord.java b/services/java/com/android/server/am/ServiceRecord.java
index f35a68e734d4..e5aceb45c4d9 100644
--- a/services/java/com/android/server/am/ServiceRecord.java
+++ b/services/java/com/android/server/am/ServiceRecord.java
@@ -347,7 +347,9 @@ class ServiceRecord extends Binder {
// If it gave us a garbage notification, it doesn't
// get to be foreground.
ams.setServiceForeground(name, ServiceRecord.this,
- localForegroundId, null, true);
+ 0, null, true);
+ ams.crashApplication(appUid, appPid, localPackageName,
+ "Bad notification for startForeground: " + e);
}
}
});