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

@@ -146,9 +146,9 @@ public interface PowerUsageFeatureProvider {
Set<CharSequence> getHideBackgroundUsageTimeSet(Context context);
/**
* Returns package names for hiding application in the usage screen.
* Returns {@link Set} for hiding application package names in the usage screen.
*/
CharSequence[] getHideApplicationEntries(Context context);
Set<CharSequence> getHideApplicationSet(Context context);
/**
* Returns {@link Set} for ignoring task root class names for screen on time.