diff options
author | Alex Buynytskyy <alexbuy@google.com> | 2020-04-07 14:26:55 -0700 |
---|---|---|
committer | Alex Buynytskyy <alexbuy@google.com> | 2020-04-07 14:42:50 -0700 |
commit | f41567922839d9e84fad0333788301b6c2b330de (patch) | |
tree | 404766a196d175d15820c1528eeacc44501c42a5 /services/incremental/IncrementalService.cpp | |
parent | 21f4dd5c7cd6daa4dd005832024c746a9f551d04 (diff) |
Change the way how we call setStorageParams.
Now it's unified with callback FS connector - we are passing the
callback pointer directly to dataloader. This restricts access only
to methods we want and only by someone we want.
Bug: b/153468113
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: Ib557ebbe7c6c5ce92140eb20534a3626b3ac96d3
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
-rw-r--r-- | services/incremental/IncrementalService.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp index d36eae89c1ff..d6ce529fb56f 100644 --- a/services/incremental/IncrementalService.cpp +++ b/services/incremental/IncrementalService.cpp @@ -1143,6 +1143,7 @@ bool IncrementalService::prepareDataLoader(IncrementalService::IncFsMount& ifs, fsControlParcel.incremental->pendingReads.reset( base::unique_fd(::dup(ifs.control.pendingReads()))); fsControlParcel.incremental->log.reset(base::unique_fd(::dup(ifs.control.logs()))); + fsControlParcel.service = new IncrementalServiceConnector(*this, ifs.mountId); sp<IncrementalDataLoaderListener> listener = new IncrementalDataLoaderListener(*this, externalListener ? *externalListener @@ -1394,4 +1395,10 @@ void IncrementalService::AppOpsListener::opChanged(int32_t, const String16&) { incrementalService.onAppOpChanged(packageName); } +binder::Status IncrementalService::IncrementalServiceConnector::setStorageParams( + bool enableReadLogs, int32_t* _aidl_return) { + *_aidl_return = incrementalService.setStorageParams(storage, enableReadLogs); + return binder::Status::ok(); +} + } // namespace android::incremental |