summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-09 05:57:20 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-09 05:57:20 +0000
commit7ef86819fc085dce28962c9a5008b7c86406f70a (patch)
tree14720a91cf1add28099424e43078daa08f650736
parent26da25fe898e911c335be59f5033ce4dc6c32a84 (diff)
parenta12b93996e9a3f39434fd3351a7dd9d11ade75f9 (diff)
downloadbase-7ef86819fc085dce28962c9a5008b7c86406f70a.tar.gz
Merge cherrypicks of ['googleplex-android-review.googlesource.com/21342999'] into sparse-9565633-L11900000958535598.
SPARSE_CHANGE: Ia3da6ca047c46807cbd72ef797bb4b300c38efb3 Change-Id: I2cf299f2aead4d5e524fd0367376df708902e8b3
-rw-r--r--services/incremental/IncrementalService.cpp6
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");
}