summaryrefslogtreecommitdiff
path: root/cmds/incidentd/src/IncidentService.cpp
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2019-11-25 11:03:38 +0900
committerJiyong Park <jiyong@google.com>2019-12-18 05:32:25 +0000
commit573fd3dfe09252eda18c63f177823df481100d81 (patch)
tree18b3841828bcfef9834eda1f36beeb73d6ac56b9 /cmds/incidentd/src/IncidentService.cpp
parent36af0dc32e8d6d66eae27f74a9a127e97c18ae86 (diff)
unique_fd is passed by value in AIDL interfaces
FileDescriptor type in AIDL was translated into const unique_fd& in C++. Now, it is unique_fd, i.e. passed by value, to make it easier to keep it beyond the scope of the call. Bug: 144943748 Test: m Exempt-From-Owner-Approval: cherry-pick from internal Merged-In: I2b87761401361f9cf96cdda070f26e70a5c6c935 (cherry picked from commit b8ba23418aa6868ec14e82c29311021e382a19bc) Change-Id: I2b87761401361f9cf96cdda070f26e70a5c6c935
Diffstat (limited to 'cmds/incidentd/src/IncidentService.cpp')
-rw-r--r--cmds/incidentd/src/IncidentService.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/incidentd/src/IncidentService.cpp b/cmds/incidentd/src/IncidentService.cpp
index 999936bda1d3..cfd77c2357cd 100644
--- a/cmds/incidentd/src/IncidentService.cpp
+++ b/cmds/incidentd/src/IncidentService.cpp
@@ -279,7 +279,7 @@ Status IncidentService::reportIncident(const IncidentReportArgs& args) {
Status IncidentService::reportIncidentToStream(const IncidentReportArgs& args,
const sp<IIncidentReportStatusListener>& listener,
- const unique_fd& stream) {
+ unique_fd stream) {
IncidentReportArgs argsCopy(args);
// Streaming reports can not also be broadcast.
@@ -306,7 +306,7 @@ Status IncidentService::reportIncidentToStream(const IncidentReportArgs& args,
return Status::ok();
}
-Status IncidentService::reportIncidentToDumpstate(const unique_fd& stream,
+Status IncidentService::reportIncidentToDumpstate(unique_fd stream,
const sp<IIncidentReportStatusListener>& listener) {
uid_t caller = IPCThreadState::self()->getCallingUid();
if (caller != AID_ROOT && caller != AID_SHELL) {