OSDN Git Service

FUJI用のコマンド送信ダイアログを搭載。
[gokigen/Gr2Control.git] / app / src / main / java / net / osdn / gokigen / gr2control / camera / fuji_x / wrapper / FujiXInterfaceProvider.java
index 22d43f3..d6fa055 100644 (file)
@@ -1,11 +1,9 @@
 package net.osdn.gokigen.gr2control.camera.fuji_x.wrapper;
 
 import android.app.Activity;
-import android.content.SharedPreferences;
 import android.util.Log;
 
 import androidx.annotation.NonNull;
-import androidx.preference.PreferenceManager;
 
 import net.osdn.gokigen.gr2control.camera.ICameraButtonControl;
 import net.osdn.gokigen.gr2control.camera.ICameraConnection;
@@ -36,10 +34,8 @@ import net.osdn.gokigen.gr2control.camera.fuji_x.wrapper.connection.FujiXConnect
 import net.osdn.gokigen.gr2control.camera.fuji_x.wrapper.playback.FujiXPlaybackControl;
 import net.osdn.gokigen.gr2control.camera.playback.IPlaybackControl;
 import net.osdn.gokigen.gr2control.liveview.IAutoFocusFrameDisplay;
-import net.osdn.gokigen.gr2control.liveview.ICameraStatusUpdateNotify;
 import net.osdn.gokigen.gr2control.liveview.IIndicatorControl;
 import net.osdn.gokigen.gr2control.liveview.liveviewlistener.ILiveViewListener;
-import net.osdn.gokigen.gr2control.preference.IPreferencePropertyAccessor;
 
 public class FujiXInterfaceProvider implements IFujiXInterfaceProvider, IDisplayInjector
 {
@@ -51,7 +47,6 @@ public class FujiXInterfaceProvider implements IFujiXInterfaceProvider, IDisplay
     private static final String CAMERA_IP = "192.168.0.1";
 
     private final Activity activity;
-    //private final ICameraStatusReceiver provider;
     private final FujiXCommandPublisher commandPublisher;
     private final FujiXLiveViewControl liveViewControl;
     private final FujiXAsyncResponseReceiver asyncReceiver;
@@ -73,22 +68,7 @@ public class FujiXInterfaceProvider implements IFujiXInterfaceProvider, IDisplay
      */
     public FujiXInterfaceProvider(@NonNull Activity context, @NonNull ICameraStatusReceiver provider)
     {
-        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
-        int communicationTimeoutMs;
-        try
-        {
-            communicationTimeoutMs = Integer.parseInt(preferences.getString(IPreferencePropertyAccessor.RICOH_GET_PICS_LIST_TIMEOUT, IPreferencePropertyAccessor.RICOH_GET_PICS_LIST_TIMEOUT_DEFAULT_VALUE)) * 1000;
-            if (communicationTimeoutMs < 5000)
-            {
-                communicationTimeoutMs = 5000;  // 最小値は 5000msとする。
-            }
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-        }
         this.activity = context;
-        //this.provider = provider;
         this.commandPublisher = new FujiXCommandPublisher(CAMERA_IP, CONTROL_PORT);
         fujiXConnection = new FujiXConnection(context, provider, this);
         liveViewControl = new FujiXLiveViewControl(context, CAMERA_IP, STREAM_PORT);
@@ -109,7 +89,7 @@ public class FujiXInterfaceProvider implements IFujiXInterfaceProvider, IDisplay
     @Override
     public void injectDisplay(IAutoFocusFrameDisplay frameDisplayer, IIndicatorControl indicator, IFocusingModeNotify focusingModeNotify)
     {
-        Log.v(TAG, "injectDisplay()");
+        Log.v(TAG, " injectDisplay()");
         focusControl = new FujiXFocusingControl(activity, commandPublisher, frameDisplayer, indicator);
         captureControl = new FujiXCaptureControl(commandPublisher, frameDisplayer);
     }
@@ -219,12 +199,6 @@ public class FujiXInterfaceProvider implements IFujiXInterfaceProvider, IDisplay
     }
 
     @Override
-    public ICameraStatusUpdateNotify getStatusListener()
-    {
-        return statusChecker.getStatusListener();
-    }
-
-    @Override
     public IFujiXCommandPublisher getCommandPublisher()
     {
         return (commandPublisher);