summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-12-12 14:07:46 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-12-12 14:07:46 +0000
commit1cddcb6f4df1ad1e6375914713212e060504e413 (patch)
treec8d0acba87d62cc5c5f17586f63f741a60ea5483
parente1c5b52a88c99facd1794e0b4e044298370babbe (diff)
parent19d8bc264efc765e155ea7c17e751177d094970e (diff)
Merge "Skip onActivityEvent when remote ContentCaptureService is dead or unbound." into main
-rw-r--r--services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java b/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java
index 34787a390d48..145303df7b0b 100644
--- a/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java
+++ b/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java
@@ -554,6 +554,10 @@ final class ContentCapturePerUserService
if (mMaster.debug) Slog.d(mTag, "onActivityEvent(): no remote service");
return;
}
+ if (mRemoteService.getServiceInterface() == null) {
+ if (mMaster.debug) Slog.d(mTag, "onActivityEvent(): remote service is dead or unbound");
+ return;
+ }
final ActivityEvent event = new ActivityEvent(activityId, componentName, type);
if (mMaster.verbose) Slog.v(mTag, "onActivityEvent(): " + event);