summaryrefslogtreecommitdiff
path: root/core/java/android/os/Bundle.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2016-03-31 22:31:59 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-03-31 22:31:59 +0000
commit8f1ebb5de3159a807fbeaa766a06fac2f33a8f18 (patch)
treedb699ee7ff12667ca72afdd2d7c202d0ec28a2e2 /core/java/android/os/Bundle.java
parent13f295ed1f36d90921d6eea8eda799f25890157e (diff)
parentd4306fd59029a650c741bcb9a305e83e09f2a8e4 (diff)
Merge "Handle interaction of Bundle.hasFileDescriptors() with removal" into nyc-dev am: 1486557
am: d4306fd * commit 'd4306fd59029a650c741bcb9a305e83e09f2a8e4': Handle interaction of Bundle.hasFileDescriptors() with removal Change-Id: I6a0431d4231c3aad55161fa46ccb3fb420dff3ae
Diffstat (limited to 'core/java/android/os/Bundle.java')
-rw-r--r--core/java/android/os/Bundle.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/os/Bundle.java b/core/java/android/os/Bundle.java
index fdb864cb87cd..7688ff75b842 100644
--- a/core/java/android/os/Bundle.java
+++ b/core/java/android/os/Bundle.java
@@ -228,6 +228,18 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
}
/**
+ * Removes any entry with the given key from the mapping of this Bundle.
+ *
+ * @param key a String key
+ */
+ public void remove(String key) {
+ super.remove(key);
+ if ((mFlags & FLAG_HAS_FDS) != 0) {
+ mFlags &= ~FLAG_HAS_FDS_KNOWN;
+ }
+ }
+
+ /**
* Inserts all mappings from the given Bundle into this Bundle.
*
* @param bundle a Bundle
@@ -308,6 +320,8 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
if (fdFound) {
mFlags |= FLAG_HAS_FDS;
+ } else {
+ mFlags &= ~FLAG_HAS_FDS;
}
mFlags |= FLAG_HAS_FDS_KNOWN;
}
@@ -335,6 +349,8 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
mMap.removeAt(i);
}
}
+ mFlags |= FLAG_HAS_FDS_KNOWN;
+ mFlags &= ~FLAG_HAS_FDS;
}
/**