summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PermissionController/role-controller/java/com/android/role/controller/behavior/WalletRoleBehavior.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/PermissionController/role-controller/java/com/android/role/controller/behavior/WalletRoleBehavior.java b/PermissionController/role-controller/java/com/android/role/controller/behavior/WalletRoleBehavior.java
index 0e1447598..855012cf1 100644
--- a/PermissionController/role-controller/java/com/android/role/controller/behavior/WalletRoleBehavior.java
+++ b/PermissionController/role-controller/java/com/android/role/controller/behavior/WalletRoleBehavior.java
@@ -40,6 +40,7 @@ import androidx.annotation.RequiresApi;
import com.android.modules.utils.build.SdkLevel;
import com.android.role.controller.model.Role;
import com.android.role.controller.model.RoleBehavior;
+import com.android.role.controller.util.CollectionUtils;
import com.android.role.controller.util.UserUtils;
import org.xmlpull.v1.XmlPullParserException;
@@ -81,6 +82,13 @@ public class WalletRoleBehavior implements RoleBehavior {
@Nullable
@Override
+ public String getFallbackHolderAsUser(@NonNull Role role, @NonNull UserHandle user,
+ @NonNull Context context) {
+ return CollectionUtils.firstOrNull(role.getDefaultHoldersAsUser(user, context));
+ }
+
+ @Nullable
+ @Override
public Boolean isPackageQualifiedAsUser(@NonNull Role role, @NonNull String packageName,
@NonNull UserHandle user, @NonNull Context context) {
return !getQualifyingPackageNamesInternal(packageName, user, context).isEmpty();