From d329d0562335b08e1da4da500770cbf226f2a950 Mon Sep 17 00:00:00 2001 From: Charlie Wang Date: Fri, 3 Feb 2023 16:48:12 -0800 Subject: [PATCH] Add WearableSensingService to isolated compute app. This enables WearableSensingService to get the right SeInfo so that it can get the isolated compute app domain. Bug: 266943251 Test: atest ActiveServicesTest && manual - sample app has correct seInfo Change-Id: I9893e4dd2580ba63910f3d02687215f6e2a7c746 --- .../core/java/com/android/server/am/ActiveServices.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 56d0b599c8084..24ce684e3d995 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -180,6 +180,7 @@ import android.os.UserManager; import android.provider.Settings; import android.service.voice.HotwordDetectionService; import android.service.voice.VisualQueryDetectionService; +import android.service.wearable.WearableSensingService; import android.stats.devicepolicy.DevicePolicyEnums; import android.text.TextUtils; import android.util.ArrayMap; @@ -3813,12 +3814,14 @@ public final class ActiveServices { inSharedIsolatedProcess); } - // TODO(b/265746493): Special case for HotwordDetectionService and - // VisualQueryDetectionService. Need a cleaner way to append this seInfo. + // TODO(b/265746493): Special case for HotwordDetectionService, + // VisualQueryDetectionService and WearableSensingService. + // Need a cleaner way to append this seInfo. private String generateAdditionalSeInfoFromService(Intent service) { if (service != null && service.getAction() != null && (service.getAction().equals(HotwordDetectionService.SERVICE_INTERFACE) - || service.getAction().equals(VisualQueryDetectionService.SERVICE_INTERFACE))) { + || service.getAction().equals(VisualQueryDetectionService.SERVICE_INTERFACE) + || service.getAction().equals(WearableSensingService.SERVICE_INTERFACE))) { return ":isolatedComputeApp"; } return "";