diff options
author | 2023-02-08 21:24:01 -0800 | |
---|---|---|
committer | 2023-02-09 05:30:17 +0000 | |
commit | 875cf6421adbe27b5bfaf687a2962f6d11873a93 (patch) | |
tree | 98155a2db9c1f2d039718c86ccc253f38d580f23 /services/incremental/IncrementalService.cpp | |
parent | 63c5a5aca1be92bc8347f86ad07038babf84b12f (diff) |
Remove stale connections to DataLoaders.
Bug: 263449831
Fixes: 263449831
Test: atest service.incremental_test
Change-Id: Ia3da6ca047c46807cbd72ef797bb4b300c38efb3
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
-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 9c9b363b948e..7ed95991642f 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"); } |