summaryrefslogtreecommitdiffstats
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-06-21 15:32:56 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-06-21 15:32:56 -0700
commitefcf68aa1fd7fcfd52cf3d2837ed8db8e797194b (patch)
tree2534ec6eb14f23541fc9fa4f8c86441e562697cb /libs/binder/Parcel.cpp
parentb9fd188a0b1cd71e38c03a7bb4a4688eedf83667 (diff)
parentef8f96a717554a85aa63a60f8c61be2afbd12a5c (diff)
downloadframeworks_base-efcf68aa1fd7fcfd52cf3d2837ed8db8e797194b.zip
frameworks_base-efcf68aa1fd7fcfd52cf3d2837ed8db8e797194b.tar.gz
frameworks_base-efcf68aa1fd7fcfd52cf3d2837ed8db8e797194b.tar.bz2
am ef8f96a7: Merge "Start of work on passing around StrictMode policy over Binder calls." into gingerbread
Merge commit 'ef8f96a717554a85aa63a60f8c61be2afbd12a5c' into gingerbread-plus-aosp * commit 'ef8f96a717554a85aa63a60f8c61be2afbd12a5c': Start of work on passing around StrictMode policy over Binder calls.
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 00d2210..c2574bd 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -19,6 +19,7 @@
#include <binder/Parcel.h>
+#include <binder/IPCThreadState.h>
#include <binder/Binder.h>
#include <binder/BpBinder.h>
#include <utils/Debug.h>
@@ -436,19 +437,22 @@ bool Parcel::hasFileDescriptors() const
return mHasFds;
}
+// Write RPC headers. (previously just the interface token)
status_t Parcel::writeInterfaceToken(const String16& interface)
{
+ writeInt32(IPCThreadState::self()->getStrictModePolicy());
// currently the interface identification token is just its name as a string
return writeString16(interface);
}
bool Parcel::checkInterface(IBinder* binder) const
{
- return enforceInterface(binder->getInterfaceDescriptor());
+ return enforceInterface(binder->getInterfaceDescriptor());
}
bool Parcel::enforceInterface(const String16& interface) const
{
+ int32_t strict_policy = readInt32();
const String16 str(readString16());
if (str == interface) {
return true;
@@ -457,7 +461,7 @@ bool Parcel::enforceInterface(const String16& interface) const
String8(interface).string(), String8(str).string());
return false;
}
-}
+}
const size_t* Parcel::objects() const
{