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

Commit 2b16923f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Ensure primary provider is contained in the list of enabled providers"...

Merge "Ensure primary provider is contained in the list of enabled providers" into udc-dev am: 8587f769 am: b3df42d4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23065921



Change-Id: I6cd7a83bd9c31e6c54a5e60cf24d8855c9559a02
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 4ac64964 b3df42d4
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 =