Refactor getting allowlist set from feature provider.

(1) Use Set<CharSequence> for all the allowlists.
(2) The contains() method of Set<CharSequence> also works for String. No
    need an extra contains() util function.

Bug: 262802531
Fix: 262802531
Test: presubmit
Change-Id: Ib2aaf9a3b8db4618a8c46f138e8d35f15b77c104
This commit is contained in:
Zaiyue Xue
2022-12-15 17:48:12 +08:00
parent 6c4f83f33d
commit bce700f1db
6 changed files with 28 additions and 52 deletions

View File

@@ -162,8 +162,8 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
}
@Override
public CharSequence[] getHideApplicationEntries(Context context) {
return new CharSequence[0];
public Set<CharSequence> getHideApplicationSet(Context context) {
return new ArraySet<>();
}
@Override