Merge "Handle interaction of Bundle.hasFileDescriptors() with removal" into nyc-dev
am: 1486557
* commit '1486557d10f9969ef31b65e4312bd00b1a6f02ae':
Handle interaction of Bundle.hasFileDescriptors() with removal
Change-Id: I3e1d35c5fbd6ad2356abe61309f8b6797f3fbbba
This commit is contained in:
@@ -207,6 +207,18 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
|
|||||||
mFlags = FLAG_HAS_FDS_KNOWN | FLAG_ALLOW_FDS;
|
mFlags = FLAG_HAS_FDS_KNOWN | FLAG_ALLOW_FDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
* Inserts all mappings from the given Bundle into this Bundle.
|
||||||
*
|
*
|
||||||
@@ -288,6 +300,8 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
|
|||||||
|
|
||||||
if (fdFound) {
|
if (fdFound) {
|
||||||
mFlags |= FLAG_HAS_FDS;
|
mFlags |= FLAG_HAS_FDS;
|
||||||
|
} else {
|
||||||
|
mFlags &= ~FLAG_HAS_FDS;
|
||||||
}
|
}
|
||||||
mFlags |= FLAG_HAS_FDS_KNOWN;
|
mFlags |= FLAG_HAS_FDS_KNOWN;
|
||||||
}
|
}
|
||||||
@@ -315,6 +329,8 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
|
|||||||
mMap.removeAt(i);
|
mMap.removeAt(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mFlags |= FLAG_HAS_FDS_KNOWN;
|
||||||
|
mFlags &= ~FLAG_HAS_FDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user