From 63f5f3a40ff8e660172b1955bf028acd898bf199 Mon Sep 17 00:00:00 2001 From: Sergey Volnov Date: Thu, 13 Feb 2020 17:56:45 +0000 Subject: [PATCH] After data was successfully copied - mark package as able to receive new sharing requrests. Bug: 145205247 Test: this was actually surfaced during CTS tests implementation, when subsequent test executions failed because of needing a timeout. Change-Id: I529216d0e9139f165f90bdaab80850c4c047f836 --- .../server/contentcapture/ContentCaptureManagerService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java b/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java index 31ea5faa05f18..9a33fc9548a00 100644 --- a/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java +++ b/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java @@ -998,6 +998,11 @@ public final class ContentCaptureManagerService extends sendErrorSignal(mClientAdapterReference, serviceAdapterReference, ContentCaptureManager.DATA_SHARE_ERROR_UNKNOWN); + } finally { + synchronized (parentService.mLock) { + parentService.mPackagesWithShareRequests + .remove(mDataShareRequest.getPackageName()); + } } });