summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-12-12 15:09:32 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-12-12 15:09:32 +0000
commitd1dd1d77bf0ae8e92b2e27d3bfd2252c5a3af9d4 (patch)
tree72100ed38f35ed9599981acd870b4d9e655bd6c4
parentddc1c4958530a0723bc2a6db7c0925888ef76d83 (diff)
parente41d20ad91e6ef97a6885bb50e8bebcd2cbb7d4a (diff)
Merge "Skip onActivityEvent when remote ContentCaptureService is dead or unbound." into main am: 1cddcb6f4d am: e41d20ad91
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2864429 Change-Id: I9d1a8b7a6a817d14e35d8e1f7c50fca874f899c1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-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);