Yet another (major) refactoring on Content Capture and Augmented Autofill.
Bunch of changes:
- Split public SmartSuggestionsService info ContentCaptureService and
AugmentedAutofillService
- Renamed 'intelligence' packages to either 'contentcapture' or
'autofil.augmented'
- Renamed internal packages and classes.
- Changed permissions, resource names, etc...
- Moved Augmented Autofill logic from IntelligeceManagerService (R.I.P.) to
Autofill.
- Optimized IPCs by passing a String instead of the InteractionSessionId
(that also solves the view -> service dependency).
Test: atest CtsContentCaptureServiceTestCases \
CtsAutoFillServiceTestCases \
FrameworksCoreTests:SettingsBackupTest
Test: manual verification with Augmented Autofill Service
Bug: 119638877
Bug: 117944706
Change-Id: I787fc2a0dbd9ad53e4d5edb0d2a9242346e4652d
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index c4d2a91..744d386 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -239,8 +239,8 @@
"com.android.server.wallpaper.WallpaperManagerService$Lifecycle";
private static final String AUTO_FILL_MANAGER_SERVICE_CLASS =
"com.android.server.autofill.AutofillManagerService";
- private static final String INTELLIGENCE_MANAGER_SERVICE_CLASS =
- "com.android.server.intelligence.IntelligenceManagerService";
+ private static final String CONTENT_CAPTURE_MANAGER_SERVICE_CLASS =
+ "com.android.server.contentcapture.ContentCaptureManagerService";
private static final String TIME_ZONE_RULES_MANAGER_SERVICE_CLASS =
"com.android.server.timezone.RulesManagerService$Lifecycle";
private static final String IOT_SERVICE_CLASS =
@@ -1136,7 +1136,7 @@
traceEnd();
}
- startIntelligenceService(context);
+ startContentCaptureService(context);
// NOTE: ClipboardService indirectly depends on IntelligenceService
traceBeginAndSlog("StartClipboardService");
@@ -2100,18 +2100,18 @@
}, BOOT_TIMINGS_TRACE_LOG);
}
- private void startIntelligenceService(@NonNull Context context) {
+ private void startContentCaptureService(@NonNull Context context) {
// First check if it was explicitly enabled by Settings
boolean explicitlySupported = false;
final String settings = Settings.Global.getString(context.getContentResolver(),
- Settings.Global.SMART_SUGGESTIONS_SERVICE_EXPLICITLY_ENABLED);
+ Settings.Global.CONTENT_CAPTURE_SERVICE_EXPLICITLY_ENABLED);
if (settings != null) {
explicitlySupported = Boolean.parseBoolean(settings);
if (explicitlySupported) {
- Slog.d(TAG, "IntelligenceService explicitly enabled by Settings");
+ Slog.d(TAG, "ContentCaptureService explicitly enabled by Settings");
} else {
- Slog.d(TAG, "IntelligenceService explicitly disabled by Settings");
+ Slog.d(TAG, "ContentCaptureService explicitly disabled by Settings");
return;
}
}
@@ -2119,15 +2119,15 @@
// Then check if OEM overlaid the resource that defines the service.
if (!explicitlySupported) {
final String serviceName = context
- .getString(com.android.internal.R.string.config_defaultSmartSuggestionsService);
+ .getString(com.android.internal.R.string.config_defaultContentCaptureService);
if (TextUtils.isEmpty(serviceName)) {
- Slog.d(TAG, "IntelligenceService disabled because config resource is not overlaid");
+ Slog.d(TAG, "ContentCaptureService disabled because resource is not overlaid");
return;
}
}
- traceBeginAndSlog("StartIntelligenceService");
- mSystemServiceManager.startService(INTELLIGENCE_MANAGER_SERVICE_CLASS);
+ traceBeginAndSlog("StartContentCaptureService");
+ mSystemServiceManager.startService(CONTENT_CAPTURE_MANAGER_SERVICE_CLASS);
traceEnd();
}