diff options
| -rw-r--r-- | core/java/android/app/SystemServiceRegistry.java | 15 | ||||
| -rw-r--r-- | services/java/com/android/server/SystemServer.java | 8 |
2 files changed, 23 insertions, 0 deletions
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java index d5b85cde4926..4ddfdb603e73 100644 --- a/core/java/android/app/SystemServiceRegistry.java +++ b/core/java/android/app/SystemServiceRegistry.java @@ -81,6 +81,8 @@ import android.content.pm.verify.domain.DomainVerificationManager; import android.content.pm.verify.domain.IDomainVerificationManager; import android.content.res.Resources; import android.content.rollback.RollbackManagerFrameworkInitializer; +import android.credentials.CredentialManager; +import android.credentials.ICredentialManager; import android.debug.AdbManager; import android.debug.IAdbManager; import android.graphics.fonts.FontManager; @@ -1138,6 +1140,19 @@ public final class SystemServiceRegistry { return new AutofillManager(ctx.getOuterContext(), service); }}); + registerService(Context.CREDENTIAL_SERVICE, CredentialManager.class, + new CachedServiceFetcher<CredentialManager>() { + @Override + public CredentialManager createService(ContextImpl ctx) + throws ServiceNotFoundException { + IBinder b = ServiceManager.getService(Context.CREDENTIAL_SERVICE); + ICredentialManager service = ICredentialManager.Stub.asInterface(b); + if (service != null) { + return new CredentialManager(ctx.getOuterContext(), service); + } + return null; + }}); + registerService(Context.MUSIC_RECOGNITION_SERVICE, MusicRecognitionManager.class, new CachedServiceFetcher<MusicRecognitionManager>() { @Override diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index d8f282aee5a8..9e449aedf0d9 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -331,6 +331,8 @@ public final class SystemServer implements Dumpable { "com.android.server.wallpaper.WallpaperManagerService$Lifecycle"; private static final String AUTO_FILL_MANAGER_SERVICE_CLASS = "com.android.server.autofill.AutofillManagerService"; + private static final String CREDENTIAL_MANAGER_SERVICE_CLASS = + "com.android.server.credentials.CredentialManagerService"; private static final String CONTENT_CAPTURE_MANAGER_SERVICE_CLASS = "com.android.server.contentcapture.ContentCaptureManagerService"; private static final String TRANSLATION_MANAGER_SERVICE_CLASS = @@ -2571,6 +2573,12 @@ public final class SystemServer implements Dumpable { t.traceEnd(); } + if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_CREDENTIALS)) { + t.traceBegin("StartCredentialManagerService"); + mSystemServiceManager.startService(CREDENTIAL_MANAGER_SERVICE_CLASS); + t.traceEnd(); + } + // Translation manager service if (deviceHasConfigString(context, R.string.config_defaultTranslationService)) { t.traceBegin("StartTranslationManagerService"); |