diff options
| author | 2023-12-08 15:02:19 +0800 | |
|---|---|---|
| committer | 2023-12-08 07:07:42 +0000 | |
| commit | 19d8bc264efc765e155ea7c17e751177d094970e (patch) | |
| tree | ea837d13bf76bce5537bfb267fab58f1b6989e3f | |
| parent | 52553becb6fe08627cb3410b0b37ac2fa0d461ac (diff) | |
Skip onActivityEvent when remote ContentCaptureService is dead or unbound.
test: monkey
Change-Id: Ifa02ef7d5315e819862059d2ef910c0e1a123278
| -rw-r--r-- | services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java | 4 |
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); |