Loading services/java/com/android/server/SystemServer.java +22 −12 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.os.IServiceManager.DUMP_FLAG_PROTO; import static android.view.Display.DEFAULT_DISPLAY; import android.annotation.NonNull; import android.annotation.StringRes; import android.app.ActivityThread; import android.app.INotificationManager; import android.app.usage.UsageStatsManagerInternal; Loading Loading @@ -1251,14 +1252,22 @@ public final class SystemServer { startSystemCaptionsManagerService(context); // App prediction manager service if (deviceHasConfigString(context, R.string.config_defaultAppPredictionService)) { traceBeginAndSlog("StartAppPredictionService"); mSystemServiceManager.startService(APP_PREDICTION_MANAGER_SERVICE_CLASS); traceEnd(); } else { Slog.d(TAG, "AppPredictionService not defined by OEM"); } // Content suggestions manager service if (deviceHasConfigString(context, R.string.config_defaultContentSuggestionsService)) { traceBeginAndSlog("StartContentSuggestionsService"); mSystemServiceManager.startService(CONTENT_SUGGESTIONS_SERVICE_CLASS); traceEnd(); } else { Slog.d(TAG, "ContentSuggestionsService not defined by OEM"); } traceBeginAndSlog("InitNetworkStackClient"); try { Loading Loading @@ -2249,10 +2258,13 @@ public final class SystemServer { }, BOOT_TIMINGS_TRACE_LOG); } private boolean deviceHasConfigString(@NonNull Context context, @StringRes int resId) { String serviceName = context.getString(resId); return !TextUtils.isEmpty(serviceName); } private void startSystemCaptionsManagerService(@NonNull Context context) { String serviceName = context.getString( com.android.internal.R.string.config_defaultSystemCaptionsManagerService); if (TextUtils.isEmpty(serviceName)) { if (!deviceHasConfigString(context, R.string.config_defaultSystemCaptionsManagerService)) { Slog.d(TAG, "SystemCaptionsManagerService disabled because resource is not overlaid"); return; } Loading @@ -2279,9 +2291,7 @@ public final class SystemServer { // Then check if OEM overlaid the resource that defines the service. if (!explicitlyEnabled) { final String serviceName = context .getString(com.android.internal.R.string.config_defaultContentCaptureService); if (TextUtils.isEmpty(serviceName)) { if (!deviceHasConfigString(context, R.string.config_defaultContentCaptureService)) { Slog.d(TAG, "ContentCaptureService disabled because resource is not overlaid"); return; } Loading Loading
services/java/com/android/server/SystemServer.java +22 −12 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.os.IServiceManager.DUMP_FLAG_PROTO; import static android.view.Display.DEFAULT_DISPLAY; import android.annotation.NonNull; import android.annotation.StringRes; import android.app.ActivityThread; import android.app.INotificationManager; import android.app.usage.UsageStatsManagerInternal; Loading Loading @@ -1251,14 +1252,22 @@ public final class SystemServer { startSystemCaptionsManagerService(context); // App prediction manager service if (deviceHasConfigString(context, R.string.config_defaultAppPredictionService)) { traceBeginAndSlog("StartAppPredictionService"); mSystemServiceManager.startService(APP_PREDICTION_MANAGER_SERVICE_CLASS); traceEnd(); } else { Slog.d(TAG, "AppPredictionService not defined by OEM"); } // Content suggestions manager service if (deviceHasConfigString(context, R.string.config_defaultContentSuggestionsService)) { traceBeginAndSlog("StartContentSuggestionsService"); mSystemServiceManager.startService(CONTENT_SUGGESTIONS_SERVICE_CLASS); traceEnd(); } else { Slog.d(TAG, "ContentSuggestionsService not defined by OEM"); } traceBeginAndSlog("InitNetworkStackClient"); try { Loading Loading @@ -2249,10 +2258,13 @@ public final class SystemServer { }, BOOT_TIMINGS_TRACE_LOG); } private boolean deviceHasConfigString(@NonNull Context context, @StringRes int resId) { String serviceName = context.getString(resId); return !TextUtils.isEmpty(serviceName); } private void startSystemCaptionsManagerService(@NonNull Context context) { String serviceName = context.getString( com.android.internal.R.string.config_defaultSystemCaptionsManagerService); if (TextUtils.isEmpty(serviceName)) { if (!deviceHasConfigString(context, R.string.config_defaultSystemCaptionsManagerService)) { Slog.d(TAG, "SystemCaptionsManagerService disabled because resource is not overlaid"); return; } Loading @@ -2279,9 +2291,7 @@ public final class SystemServer { // Then check if OEM overlaid the resource that defines the service. if (!explicitlyEnabled) { final String serviceName = context .getString(com.android.internal.R.string.config_defaultContentCaptureService); if (TextUtils.isEmpty(serviceName)) { if (!deviceHasConfigString(context, R.string.config_defaultContentCaptureService)) { Slog.d(TAG, "ContentCaptureService disabled because resource is not overlaid"); return; } Loading