private void publishHandler(Protocol protocol, PortTable portTable, String topic, Object transportHandlerObject, String ip, int port, byte[] message) {
TransportHandler transportHandler;
if (transportHandlerObject == null) {
- transportHandler = TransportFactory.createTransport(protocol, mJniInterface);
+ transportHandler = TransportFactory.createTransport(protocol);
if (transportHandler != null)
transportHandler.setAppContext(appContext);
portTable.portMap.replace(port, new Pair<>(protocol, transportHandler));
for (Protocol pro : protocols) {
try {
- TransportHandler transportHandler = TransportFactory.createTransport(pro, mJniInterface);
+ TransportHandler transportHandler = TransportFactory.createTransport(pro);
if (transportHandler != null) {
synchronized (this) {
import com.samsung.android.aittnative.JniInterface;
class IpcHandler implements TransportHandler {
- private JniInterface mJniInterface;
- public IpcHandler(JniInterface jniInterface){
- mJniInterface = jniInterface;
+ public IpcHandler() {
+ //ToDo : Copy jni interface and use to communicate with JNI
}
@Override
import com.samsung.android.aittnative.JniInterface;
class TransportFactory {
- public static TransportHandler createTransport(Aitt.Protocol protocol, JniInterface mJniInterface) {
+ public static TransportHandler createTransport(Aitt.Protocol protocol) {
TransportHandler transportHandler;
switch (protocol) {
case WEBRTC:
- transportHandler = new WebRTCHandler(mJniInterface);
+ transportHandler = new WebRTCHandler();
break;
case IPC:
- transportHandler = new IpcHandler(mJniInterface);
+ transportHandler = new IpcHandler();
break;
default:
transportHandler = null;
private byte[] publishData;
private WebRTC webrtc;
private WebRTCServer ws;
- private JniInterface mJniInterface;
//ToDo - For now using sample app parameters, later fetch frameWidth & frameHeight from app
private final Integer frameWidth = 640;
private final Integer frameHeight = 480;
- public WebRTCHandler(JniInterface jniInterface){
- mJniInterface = jniInterface;
+ public WebRTCHandler() {
+ //ToDo : Copy jni interface and use to communicate with JNI
}
@Override