summaryrefslogtreecommitdiff
path: root/libs/binder/IShellCallback.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2018-06-08 15:11:57 -0700
committer Xin Li <delphij@google.com> 2018-06-08 15:11:57 -0700
commitf11e2bd016d886a333345dea853ebda23a408d5c (patch)
tree905bd4d25d6ab2b046620ff459777d8dcfa5d7de /libs/binder/IShellCallback.cpp
parentaabd6b7fa343654cd85b3b2da392e424d037d15a (diff)
parent5c947cdf72270fd1f766b2248d526ebc8c7227f6 (diff)
Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master
Bug: 79597307 Change-Id: I6d6bee71b9424eb478780bbfc06b830eb8ded342
Diffstat (limited to 'libs/binder/IShellCallback.cpp')
-rw-r--r--libs/binder/IShellCallback.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/binder/IShellCallback.cpp b/libs/binder/IShellCallback.cpp
index 4568a426cd..dd4a65ee84 100644
--- a/libs/binder/IShellCallback.cpp
+++ b/libs/binder/IShellCallback.cpp
@@ -39,11 +39,13 @@ public:
{
}
- virtual int openOutputFile(const String16& path, const String16& seLinuxContext) {
+ virtual int openFile(const String16& path, const String16& seLinuxContext,
+ const String16& mode) {
Parcel data, reply;
data.writeInterfaceToken(IShellCallback::getInterfaceDescriptor());
data.writeString16(path);
data.writeString16(seLinuxContext);
+ data.writeString16(mode);
remote()->transact(OP_OPEN_OUTPUT_FILE, data, &reply, 0);
reply.readExceptionCode();
int fd = reply.readParcelFileDescriptor();
@@ -64,7 +66,8 @@ status_t BnShellCallback::onTransact(
CHECK_INTERFACE(IShellCallback, data, reply);
String16 path(data.readString16());
String16 seLinuxContext(data.readString16());
- int fd = openOutputFile(path, seLinuxContext);
+ String16 mode(data.readString16());
+ int fd = openFile(path, seLinuxContext, mode);
if (reply != nullptr) {
reply->writeNoException();
if (fd >= 0) {