mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-05 17:45:49 +01:00
add a null check for parseEnabledMap context param
This commit is contained in:
parent
b094547dd3
commit
804dae3731
@ -96,6 +96,9 @@ public class Whitelist {
|
||||
}
|
||||
|
||||
private static Map<WhitelistType, Boolean> parseEnabledMap(Context context) {
|
||||
if (context == null) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Map<WhitelistType, Boolean> enabledMap = new EnumMap<>(WhitelistType.class);
|
||||
for (WhitelistType whitelistType : WhitelistType.values()) {
|
||||
enabledMap.put(whitelistType, SharedPrefUtils.getBoolean(context, whitelistType.getSharedPreferencesName(), whitelistType.getPreferenceEnabledName()));
|
||||
|
Loading…
Reference in New Issue
Block a user