diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-10-03 21:09:35 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-10-03 21:09:35 -0700 |
commit | c04db7e06737c5b9bae276ac462858d44002672e (patch) | |
tree | bc987fad458ca9609339478f4aac28971646d760 /libs | |
parent | 2588a07730ff511329c87b5f61b20419b2443d48 (diff) | |
download | frameworks_base-c04db7e06737c5b9bae276ac462858d44002672e.zip frameworks_base-c04db7e06737c5b9bae276ac462858d44002672e.tar.gz frameworks_base-c04db7e06737c5b9bae276ac462858d44002672e.tar.bz2 |
Fix handling of "allow fds" state.
Didn't take into account nesting of bundles. Boo.
Change-Id: Ic8cf21ad8d6f4938a3e105128624c9d162310d01
Diffstat (limited to 'libs')
-rw-r--r-- | libs/binder/Parcel.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 9552c1c..608877e 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -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) { |