add fix content provider patch

This commit is contained in:
LisoUseInAIKyrios 2025-11-08 18:34:00 +02:00
parent 0855290097
commit 675a2c4209
6 changed files with 81 additions and 39 deletions

View file

@ -0,0 +1,24 @@
package app.revanced.extension.youtube.patches;
import java.util.Map;
import app.revanced.extension.shared.Logger;
@SuppressWarnings("unused")
public class FixContentProviderPatch {
/**
* Injection point.
*/
public static void removeNullMapEntries(Map<?, ?> map) {
map.entrySet().removeIf(entry -> {
Object value = entry.getValue();
if (value == null) {
Logger.printDebug(() -> "Removing content provider key with null value: " + entry.getKey());
return true;
}
return false;
});
}
}