diff options
author | 2023-02-09 16:07:17 +0000 | |
---|---|---|
committer | 2023-02-09 16:07:17 +0000 | |
commit | 632846fd0f356e18f47327a29bea9e5e72b8208b (patch) | |
tree | c33dc82b21607a1eb9a034109d3e3768b9682bc3 | |
parent | 70b8b5519fc77c47f9b4a2839d4b17278a12ab84 (diff) | |
parent | 875cf6421adbe27b5bfaf687a2962f6d11873a93 (diff) |
Merge "Remove stale connections to DataLoaders."
-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 5e6200c7e975..81a547290d5e 100644 --- a/services/incremental/IncrementalService.cpp +++ b/services/incremental/IncrementalService.cpp @@ -2831,6 +2831,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"); } |