mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-09-11 16:56:30 +02: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