Onl apply flag when it has been changed
The properies object provided in onPropertiesChanged only contains flag(s) that have been added/deleted/updated. Bug: 144693310 Test: atest AppsFilterTest Change-Id: I8b9f90efff83da367189c9b218251c4d777afcee
This commit is contained in:
@@ -136,8 +136,11 @@ public class AppsFilter {
|
||||
DeviceConfig.addOnPropertiesChangedListener(
|
||||
NAMESPACE_PACKAGE_MANAGER_SERVICE, FgThread.getExecutor(),
|
||||
properties -> {
|
||||
synchronized (FeatureConfigImpl.this) {
|
||||
mFeatureEnabled = properties.getBoolean(FILTERING_ENABLED_NAME, false);
|
||||
if (properties.getKeyset().contains(FILTERING_ENABLED_NAME)) {
|
||||
synchronized (FeatureConfigImpl.this) {
|
||||
mFeatureEnabled = properties.getBoolean(FILTERING_ENABLED_NAME,
|
||||
false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user