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."

This commit is contained in:
Kathy Chen
2022-01-23 01:54:29 +00:00
committed by Android (Google) Code Review
28 changed files with 2295 additions and 1 deletions

View File

@@ -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();