summaryrefslogtreecommitdiff
path: root/core/java/android/app/ActivityThread.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-09-28 23:19:47 -0400
committerDianne Hackborn <hackbod@google.com>2011-10-03 16:58:41 -0700
commit9ecebbfbf768fd63e9a6c9a09c86d81c7737ee2d (patch)
tree08d24c5413fa49ac6386f8b396f29e297e728fbd /core/java/android/app/ActivityThread.java
parent8ebf1efd66516340bedbf0d0a19d5e96cc28fa20 (diff)
Add mechanism for Parcel to not allow FDs to be written to it.
This is to help implement issue #5224703. Change-Id: I026a5890495537d15b57fe61227a640aac806d46
Diffstat (limited to 'core/java/android/app/ActivityThread.java')
-rw-r--r--core/java/android/app/ActivityThread.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 0776e1015c3c..99aae37ff73d 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -2674,6 +2674,7 @@ public final class ActivityThread {
// Next have the activity save its current state and managed dialogs...
if (!r.activity.mFinished && saveState) {
state = new Bundle();
+ state.setAllowFds(false);
mInstrumentation.callActivityOnSaveInstanceState(r.activity, state);
r.state = state;
}
@@ -2775,6 +2776,7 @@ public final class ActivityThread {
if (!r.activity.mFinished && saveState) {
if (r.state == null) {
state = new Bundle();
+ state.setAllowFds(false);
mInstrumentation.callActivityOnSaveInstanceState(r.activity, state);
r.state = state;
} else {
@@ -3306,6 +3308,7 @@ public final class ActivityThread {
}
if (r.state == null && !r.stopped && !r.isPreHoneycomb()) {
r.state = new Bundle();
+ r.state.setAllowFds(false);
mInstrumentation.callActivityOnSaveInstanceState(r.activity, r.state);
}