Merge "Only honor preferUiBrandingComponentName with permission" into udc-dev

This commit is contained in:
Treehugger Robot
2023-05-09 17:09:12 +00:00
committed by Android (Google) Code Review

View File

@@ -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())