Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b4bd776 authored by Shuang Hao's avatar Shuang Hao Committed by Android (Google) Code Review
Browse files

Merge "Not to start CredentialManagerService on wear if flag not enabled." into main

parents 620e26b4 f657346f
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import android.content.pm.PackageManagerInternal;
import android.content.res.Configuration;
import android.content.res.Resources.Theme;
import android.credentials.CredentialManager;
import android.credentials.flags.Flags;
import android.database.sqlite.SQLiteCompatibilityWalFlags;
import android.database.sqlite.SQLiteGlobal;
import android.graphics.GraphicsStatsService;
@@ -2795,9 +2796,14 @@ public final class SystemServer implements Dumpable {
                    DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_CREDENTIAL,
                    CredentialManager.DEVICE_CONFIG_ENABLE_CREDENTIAL_MANAGER, true);
            if (credentialManagerEnabled) {
                if(isWatch &&
                  !android.credentials.flags.Flags.wearCredentialManagerEnabled()) {
                  Slog.d(TAG, "CredentialManager disabled on wear.");
                } else {
                  t.traceBegin("StartCredentialManagerService");
                  mSystemServiceManager.startService(CREDENTIAL_MANAGER_SERVICE_CLASS);
                  t.traceEnd();
                }
            } else {
                Slog.d(TAG, "CredentialManager disabled.");
            }