Only honor preferUiBrandingComponentName with permission
preferUiBrandingComponentName should only be honored if the caller app has the permission android.permission.CREDENTIAL_MANAGER_SET_ALLOWED_PROVIDERS. Bug: 281599707 Test: manual Change-Id: I8e9db2b89b37f05515f05fc5e8c64d27cd5b9e51
This commit is contained in:
@@ -201,7 +201,8 @@ class GetFlowUtils {
|
||||
ComponentName::class.java
|
||||
)
|
||||
val preferTopBrandingContent: TopBrandingContent? =
|
||||
if (preferUiBrandingComponentName == null) null
|
||||
if (!requestInfo.hasPermissionToOverrideDefault() ||
|
||||
preferUiBrandingComponentName == null) null
|
||||
else {
|
||||
val (displayName, icon) = getServiceLabelAndIcon(
|
||||
context.packageManager, preferUiBrandingComponentName.flattenToString())
|
||||
|
||||
Reference in New Issue
Block a user