OMS: never filter out isStatic="true" overlays
Now that the OMS knows about overlays with the isStatic="true" attribute, stop filtering out those overlays that have both isStatic="true" and targetPackage="android". This makes the OMS API more consistent: IOverlayManager.getAllOverlays and "adb exec-out cmd overlay list" now no longer hides anything from the caller, as was already the case for "adb exec-out cmd overlay dump" and IOverlayManager.getOverlayInfo. Test: manual: prepare file system, check output of adb exec-out cmd overlay list Change-Id: I5aec941f6fd1e653910e02ed459b61f30949f8f8
This commit is contained in:
committed by
Todd Kennedy
parent
8c12dcd11a
commit
84638af35a
@@ -179,19 +179,13 @@ 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() && "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() && "android".equals(i.getTargetPackageName())))
|
||||
.map(SettingsItem::getOverlayInfo)
|
||||
.collect(Collectors.groupingBy(info -> info.targetPackageName, ArrayMap::new,
|
||||
Collectors.toList()));
|
||||
|
||||
Reference in New Issue
Block a user