Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Build;
import java.util.ArrayList;
import java.util.List;

Expand All @@ -43,7 +44,13 @@ public static void initWithDefaults(Context context, List<Handler> initialHandle
handlers.add(handler);
}
DebugBroadcastReceiver receiver = new DebugBroadcastReceiver();
context.registerReceiver(receiver, intent);

// FIX (F-01): Specifying RECEIVER_NOT_EXPORTED for Android 13+ (API 33+) to prevent SecurityException crashes and unauthorized RIB tree exposure.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.registerReceiver(receiver, intent, Context.RECEIVER_NOT_EXPORTED);
} else {
context.registerReceiver(receiver, intent);
}
}

@Override
Expand Down Expand Up @@ -93,4 +100,4 @@ public interface Handler<T> {

void handle(DebugBroadcastRequest request);
}
}
}