Skip to content
Snippets Groups Projects
Commit 422e321a authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/25754135'] into 24Q1-release.

Change-Id: Ife8b3d657ec4db0e6f734353b13aaea2a0b54065
parents 4ece5732 9888ccd2
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,6 @@ import android.util.Slog;
import android.util.SparseArray;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.content.PackageMonitor;
import com.android.server.credentials.metrics.ApiName;
import com.android.server.credentials.metrics.ApiStatus;
import com.android.server.infra.AbstractMasterSystemService;
......@@ -1204,6 +1203,9 @@ public final class CredentialManagerService
// If the app being removed matches any of the package names from
// this list then don't add it in the output.
Set<String> providers = new HashSet<>();
if (rawProviders == null || packageName == null) {
return providers;
}
for (String rawComponentName : rawProviders.split(":")) {
if (TextUtils.isEmpty(rawComponentName)
|| rawComponentName.equals("null")) {
......
......@@ -52,6 +52,12 @@ public final class CredentialManagerServiceTest {
assertThat(providers.size()).isEqualTo(0);
}
@Test
public void getStoredProviders_nullValue_success() {
Set<String> providers = CredentialManagerService.getStoredProviders(null, null);
assertThat(providers.size()).isEqualTo(0);
}
@Test
public void getStoredProviders_success() {
Set<String> providers =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment