summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2010-02-18 11:02:48 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-02-18 11:02:48 -0800
commit6a6588b4acada94fd36908c6bf16bc32c7c0a252 (patch)
tree15b8f7f8c800a7d76652d5d1883aecf2995f8413 /services
parentf59a3c14c1d2ad701a842c1b66fa14e2d022c313 (diff)
parent6371a2d31f30b473e91be9cced64a2527c086af1 (diff)
downloadframeworks_base-6a6588b4acada94fd36908c6bf16bc32c7c0a252.zip
frameworks_base-6a6588b4acada94fd36908c6bf16bc32c7c0a252.tar.gz
frameworks_base-6a6588b4acada94fd36908c6bf16bc32c7c0a252.tar.bz2
am 6371a2d3: am ee3bbefd: Merge "Don\'t crash the system process when apps give us a bad foreground service notification." into eclair
Merge commit '6371a2d31f30b473e91be9cced64a2527c086af1' * commit '6371a2d31f30b473e91be9cced64a2527c086af1': Don't crash the system process when apps give us a bad foreground service notification.
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/am/ServiceRecord.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/java/com/android/server/am/ServiceRecord.java b/services/java/com/android/server/am/ServiceRecord.java
index 89761a8..2f2cc32 100644
--- a/services/java/com/android/server/am/ServiceRecord.java
+++ b/services/java/com/android/server/am/ServiceRecord.java
@@ -29,6 +29,7 @@ import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemClock;
+import android.util.Log;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -267,6 +268,9 @@ class ServiceRecord extends Binder {
int[] outId = new int[1];
inm.enqueueNotification(localPackageName, localForegroundId,
localForegroundNoti, outId);
+ } catch (RuntimeException e) {
+ Log.w(ActivityManagerService.TAG, "Error showing notification for service",
+ e);
} catch (RemoteException e) {
}
}
@@ -288,6 +292,9 @@ class ServiceRecord extends Binder {
}
try {
inm.cancelNotification(localPackageName, localForegroundId);
+ } catch (RuntimeException e) {
+ Log.w(ActivityManagerService.TAG, "Error canceling notification for"
+ + " service", e);
} catch (RemoteException e) {
}
}