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

Commit 8587f769 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ensure primary provider is contained in the list of enabled providers" into udc-dev

parents fa4ff95c e0daeb4c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.app.ActivityManager;
import android.provider.Settings;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageInfo;
@@ -727,10 +726,13 @@ public final class CredentialManagerService
                            "setEnabledProviders",
                            null);

            Set<String> enableProvider = new HashSet<>(providers);
            enableProvider.addAll(primaryProviders);

            boolean writeEnabledStatus =
                    Settings.Secure.putStringForUser(getContext().getContentResolver(),
                            Settings.Secure.CREDENTIAL_SERVICE,
                            String.join(":", providers),
                            String.join(":", enableProvider),
                            userId);

            boolean writePrimaryStatus =