summaryrefslogtreecommitdiff
path: root/core/java/android/app/ApplicationThreadNative.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-06-24 15:57:42 -0700
committerDianne Hackborn <hackbod@google.com>2010-06-24 17:27:28 -0700
commit9d39d0cb361c5d3bba04a6bacf299be2162a6e92 (patch)
tree3e08cfc2e7b5e1fabc21d2c0c9184531da78d41a /core/java/android/app/ApplicationThreadNative.java
parent01e4cfc47d0a2c7e7ab383d2fb23224ec52c0301 (diff)
Make bad notifications crash their application.
Implement notification manager handling of bad notifications, to call a new activity manager to have the owner's process crashed (if there is one). Change-Id: Ib15e8d0c598756f3b39c99cc2045c18e054daf6b
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
-rw-r--r--core/java/android/app/ApplicationThreadNative.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index da26a78f8198..360959d65517 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -402,6 +402,14 @@ public abstract class ApplicationThreadNative extends Binder
dispatchPackageBroadcast(cmd, packages);
return true;
}
+
+ case SCHEDULE_CRASH_TRANSACTION:
+ {
+ data.enforceInterface(IApplicationThread.descriptor);
+ String msg = data.readString();
+ scheduleCrash(msg);
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
@@ -826,5 +834,15 @@ class ApplicationThreadProxy implements IApplicationThread {
data.recycle();
}
+
+ public void scheduleCrash(String msg) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ data.writeInterfaceToken(IApplicationThread.descriptor);
+ data.writeString(msg);
+ mRemote.transact(SCHEDULE_CRASH_TRANSACTION, data, null,
+ IBinder.FLAG_ONEWAY);
+ data.recycle();
+
+ }
}