diff options
| author | 2023-02-09 15:30:28 +0000 | |
|---|---|---|
| committer | 2023-02-09 15:30:28 +0000 | |
| commit | da38e58db2f55fd24eaa6e9f383422b573efe2a4 (patch) | |
| tree | 8aab41415f3af1ead02d2743cb605fed39faad54 | |
| parent | b3ec2ce0ef4606c8b62dc79bfbc2142c54bc1644 (diff) | |
| parent | 96cac56f51fdac09d7e542d4dfa852b91b53e99b (diff) | |
Merge "Remove stale connections to DataLoaders." into tm-qpr-dev
| -rw-r--r-- | services/incremental/IncrementalService.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp index a49577b21957..1aeb0ca6f8ae 100644 --- a/services/incremental/IncrementalService.cpp +++ b/services/incremental/IncrementalService.cpp @@ -2816,6 +2816,12 @@ bool IncrementalService::DataLoaderStub::fsmStep() { binder::Status IncrementalService::DataLoaderStub::onStatusChanged(MountId mountId, int newStatus) { if (!isValid()) { + if (newStatus == IDataLoaderStatusListener::DATA_LOADER_BOUND) { + // Async "bound" came to already destroyed stub. + // Unbind immediately to avoid invalid stub sitting around in DataLoaderManagerService. + mService.mDataLoaderManager->unbindFromDataLoader(mountId); + return binder::Status::ok(); + } return binder::Status:: fromServiceSpecificError(-EINVAL, "onStatusChange came to invalid DataLoaderStub"); } |