Fix handling of "allow fds" state.
Didn't take into account nesting of bundles. Boo. Change-Id: Ic8cf21ad8d6f4938a3e105128624c9d162310d01
This commit is contained in:
parent
a0ac77133d
commit
7746cc3188
|
@ -59,7 +59,8 @@ public:
|
|||
status_t appendFrom(const Parcel *parcel,
|
||||
size_t start, size_t len);
|
||||
|
||||
bool setAllowFds(bool allowFds);
|
||||
bool pushAllowFds(bool allowFds);
|
||||
void restoreAllowFds(bool lastValue);
|
||||
|
||||
bool hasFileDescriptors() const;
|
||||
|
||||
|
|
|
@ -447,13 +447,20 @@ status_t Parcel::appendFrom(const Parcel *parcel, size_t offset, size_t len)
|
|||
return err;
|
||||
}
|
||||
|
||||
bool Parcel::setAllowFds(bool allowFds)
|
||||
bool Parcel::pushAllowFds(bool allowFds)
|
||||
{
|
||||
const bool origValue = mAllowFds;
|
||||
mAllowFds = allowFds;
|
||||
if (!allowFds) {
|
||||
mAllowFds = false;
|
||||
}
|
||||
return origValue;
|
||||
}
|
||||
|
||||
void Parcel::restoreAllowFds(bool lastValue)
|
||||
{
|
||||
mAllowFds = lastValue;
|
||||
}
|
||||
|
||||
bool Parcel::hasFileDescriptors() const
|
||||
{
|
||||
if (!mFdsKnown) {
|
||||
|
|
Loading…
Reference in New Issue