<commit_before>package com.cloudwebrtc.webrtc;

import java.nio.charset.Charset;
import android.util.Base64;

import org.webrtc.DataChannel;
import io.flutter.plugin.common.EventChannel;
import com.cloudwebrtc.webrtc.utils.ConstraintsMap;

class DataChannelObserver implements DataChannel.Observer, EventChannel.StreamHandler {
    private final int mId;
    private final DataChannel mDataChannel;
    private final String peerConnectionId;
    private final FlutterWebRTCPlugin plugin;
    private EventChannel eventChannel;
    private EventChannel.EventSink eventSink;

    DataChannelObserver(FlutterWebRTCPlugin plugin, String peerConnectionId, int id, DataChannel dataChannel) {
        this.peerConnectionId = peerConnectionId;
        mId = id;
        mDataChannel = dataChannel;
        this.plugin = plugin;
        this.eventChannel =
                new EventChannel(
                        plugin.registrar().messenger(),
                        "cloudwebrtc.com/WebRTC/dataChannelEvent" + dataChannel);<commit_msg>Fix DataChannel on Android<commit_after>package com.cloudwebrtc.webrtc;

import java.nio.charset.Charset;
import android.util.Base64;

import org.webrtc.DataChannel;
import io.flutter.plugin.common.EventChannel;
import com.cloudwebrtc.webrtc.utils.ConstraintsMap;

class DataChannelObserver implements DataChannel.Observer, EventChannel.StreamHandler {
    private final int mId;
    private final DataChannel mDataChannel;
    private final String peerConnectionId;
    private final FlutterWebRTCPlugin plugin;
    private EventChannel eventChannel;
    private EventChannel.EventSink eventSink;

    DataChannelObserver(FlutterWebRTCPlugin plugin, String peerConnectionId, int id, DataChannel dataChannel) {
        this.peerConnectionId = peerConnectionId;
        mId = id;
        mDataChannel = dataChannel;
        this.plugin = plugin;
        this.eventChannel =
                new EventChannel(
                        plugin.registrar().messenger(),
                        "cloudwebrtc.com/WebRTC/dataChannelEvent" + String.valueOf(id));
{'fraction_non_alphanumeric': 0.06964457252641691, 'fraction_numerical': 0.0019212295869356388, 'mean_word_length': 3.44136460554371, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3403643', 'n_tokens_mistral': 564, 'n_tokens_neox': 547, 'n_words': 124}