cqm score is less because of un used variable
authorCHANDRASHEKHAR S BYADGI <chandru.b@samsung.com>
Tue, 18 Oct 2022 14:12:23 +0000 (19:42 +0530)
committerYoungjae Shin <yj99.shin@samsung.com>
Wed, 9 Nov 2022 08:18:46 +0000 (17:18 +0900)
android/aitt/src/main/java/com/samsung/android/aitt/Aitt.java
android/aitt/src/main/java/com/samsung/android/aitt/IpcHandler.java
android/aitt/src/main/java/com/samsung/android/aitt/TransportFactory.java
android/aitt/src/main/java/com/samsung/android/aitt/WebRTCHandler.java

index 46c3b3e..f14c980 100644 (file)
@@ -307,7 +307,7 @@ public class Aitt {
     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));
@@ -393,7 +393,7 @@ public class Aitt {
 
         for (Protocol pro : protocols) {
             try {
-                TransportHandler transportHandler = TransportFactory.createTransport(pro, mJniInterface);
+                TransportHandler transportHandler = TransportFactory.createTransport(pro);
 
                 if (transportHandler != null) {
                     synchronized (this) {
index 66e3c29..13afc4e 100644 (file)
@@ -20,9 +20,8 @@ import android.content.Context;
 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
index fe2c252..ed9ce06 100644 (file)
@@ -18,14 +18,14 @@ package com.samsung.android.aitt;
 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;
index 927ba35..62626d6 100644 (file)
@@ -30,13 +30,12 @@ class WebRTCHandler implements TransportHandler {
     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