Merge "Prevent system crash when OOM in Binder thread."
This commit is contained in:
@@ -292,6 +292,10 @@ public class Binder implements IBinder {
|
|||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
reply.writeException(e);
|
reply.writeException(e);
|
||||||
res = true;
|
res = true;
|
||||||
|
} catch (OutOfMemoryError e) {
|
||||||
|
RuntimeException re = new RuntimeException("Out of memory", e);
|
||||||
|
reply.writeException(re);
|
||||||
|
res = true;
|
||||||
}
|
}
|
||||||
reply.recycle();
|
reply.recycle();
|
||||||
data.recycle();
|
data.recycle();
|
||||||
|
|||||||
Reference in New Issue
Block a user