summaryrefslogtreecommitdiff
path: root/services/java
diff options
context:
space:
mode:
author Kathy Chen <kxchen@google.com> 2022-01-23 01:54:29 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-01-23 01:54:29 +0000
commit50460ddd32138bbbd70b33ca47e51009ba1587f8 (patch)
tree1e8888741946f4044ce2661a31ed82ddf969465d /services/java
parent2d7db6fca80b6b8ee856a6c0435a79d43d912438 (diff)
parent5d568eda6211220ddecd1e9bbcf476bfad2ec9e9 (diff)
Merge "AmbientContext (aka Ambient PCC) Framework API, with a client API for apps to subscribe for AmbientContextEvents, and a provider API for AiAi to implement and provide the detected events."
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/SystemServer.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 0424da58184f..ad8753d4c136 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -104,6 +104,7 @@ import com.android.internal.util.EmergencyAffordanceManager;
import com.android.internal.util.FrameworkStatsLog;
import com.android.internal.widget.ILockSettings;
import com.android.server.am.ActivityManagerService;
+import com.android.server.ambientcontext.AmbientContextManagerService;
import com.android.server.appbinding.AppBindingService;
import com.android.server.art.ArtManagerLocal;
import com.android.server.attention.AttentionManagerService;
@@ -1810,6 +1811,7 @@ public final class SystemServer implements Dumpable {
startRotationResolverService(context, t);
startSystemCaptionsManagerService(context, t);
startTextToSpeechManagerService(context, t);
+ startAmbientContextService(t);
// System Speech Recognition Service
t.traceBegin("StartSpeechRecognitionManagerService");
@@ -3162,6 +3164,17 @@ public final class SystemServer implements Dumpable {
}
+ private void startAmbientContextService(@NonNull TimingsTraceAndSlog t) {
+ if (!AmbientContextManagerService.isDetectionServiceConfigured()) {
+ Slog.d(TAG, "AmbientContextDetectionService is not configured on this device");
+ return;
+ }
+
+ t.traceBegin("StartAmbientContextService");
+ mSystemServiceManager.startService(AmbientContextManagerService.class);
+ t.traceEnd();
+ }
+
private static void startSystemUi(Context context, WindowManagerService windowManager) {
PackageManagerInternal pm = LocalServices.getService(PackageManagerInternal.class);
Intent intent = new Intent();