From bf9dfb6623185f924df7348103471084923a02ed Mon Sep 17 00:00:00 2001 From: Tony Mak Date: Mon, 4 May 2020 16:10:47 +0100 Subject: [PATCH] TCMS should bind the TCS when onSelectionEvent/onTextClassifierEvent ... is called If the system TC (e.g. AiAi) only depends on the default system TC (i.e. ExtService) for logging purposes (i.e. onSelectionEvent() and onTextClassifierEvent()), the TCS in ExtServices will never be bound and the log events will never be delivered to the system default TC. BUG: 155636992 Test: Enable verbose logging and check the logcat Change-Id: I5b77761b8fb0d12906e205200c11e26833b81c1c --- .../textclassifier/TextClassificationManagerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/textclassifier/TextClassificationManagerService.java b/services/core/java/com/android/server/textclassifier/TextClassificationManagerService.java index 5657c74ce3ad1..e675f4e8a46cf 100644 --- a/services/core/java/com/android/server/textclassifier/TextClassificationManagerService.java +++ b/services/core/java/com/android/server/textclassifier/TextClassificationManagerService.java @@ -241,7 +241,7 @@ public final class TextClassificationManagerService extends ITextClassifierServi handleRequest( event.getSystemTextClassifierMetadata(), /* verifyCallingPackage= */ true, - /* attemptToBind= */ false, + /* attemptToBind= */ true, service -> service.onSelectionEvent(sessionId, event), "onSelectionEvent", NO_OP_CALLBACK); @@ -260,7 +260,7 @@ public final class TextClassificationManagerService extends ITextClassifierServi handleRequest( systemTcMetadata, /* verifyCallingPackage= */ true, - /* attemptToBind= */ false, + /* attemptToBind= */ true, service -> service.onTextClassifierEvent(sessionId, event), "onTextClassifierEvent", NO_OP_CALLBACK);