Load static RROs in OverlayManagerService
Only RROs targeting "android" are loaded from AssetManager, and so others should be loaded from OverlayManagerService. The RROs targeting "android" would be ingored as they are to avoid redundant loading. Bug: 76205654 Test: succeeded building and tested with taimen Change-Id: Ibeeb3c3f3338a845b2f4c485305636003d9dbd44
This commit is contained in:
@@ -179,15 +179,19 @@ final class OverlayManagerSettings {
|
||||
|
||||
List<OverlayInfo> getOverlaysForTarget(@NonNull final String targetPackageName,
|
||||
final int userId) {
|
||||
// Static RROs targeting "android" are loaded from AssetManager, and so they should be
|
||||
// ignored in OverlayManagerService.
|
||||
return selectWhereTarget(targetPackageName, userId)
|
||||
.filter((i) -> !i.isStatic())
|
||||
.filter((i) -> !(i.isStatic() && "android".equals(i.getTargetPackageName())))
|
||||
.map(SettingsItem::getOverlayInfo)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
ArrayMap<String, List<OverlayInfo>> getOverlaysForUser(final int userId) {
|
||||
// Static RROs targeting "android" are loaded from AssetManager, and so they should be
|
||||
// ignored in OverlayManagerService.
|
||||
return selectWhereUser(userId)
|
||||
.filter((i) -> !i.isStatic())
|
||||
.filter((i) -> !(i.isStatic() && "android".equals(i.getTargetPackageName())))
|
||||
.map(SettingsItem::getOverlayInfo)
|
||||
.collect(Collectors.groupingBy(info -> info.targetPackageName, ArrayMap::new,
|
||||
Collectors.toList()));
|
||||
|
||||
Reference in New Issue
Block a user