cacheIsFull = true;
}
}
- catch (Exception e)
+ catch (Throwable e)
{
e.printStackTrace();
cacheIsFull = true;
cachePics.remove(0);
}
}
- catch (Exception e)
+ catch (Throwable e)
{
e.printStackTrace();
data = null;
outputStream = null;
System.gc();
}
- catch (Exception eee)
+ catch (Throwable eee)
{
eee.printStackTrace();
}
import androidx.core.content.res.ResourcesCompat;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.preference.PreferenceManager;
LoadSaveMyCameraPropertyDialog dialog = new LoadSaveMyCameraPropertyDialog();
dialog.setTargetFragment(this, COMMAND_MY_PROPERTY);
dialog.setPropertyOperationsHolder(new LoadSaveCameraProperties(getActivity(), interfaceProvider.getOlympusInterface()));
- FragmentManager manager = getFragmentManager();
- if (manager != null)
+ FragmentActivity activity = getActivity();
+ if (activity != null)
{
+ FragmentManager manager = activity.getSupportFragmentManager();
dialog.show(manager, "my_dialog");
}
}
{
try
{
- // FUJI X用のステータス表示ダイアログを表示する
- FragmentManager manager = getFragmentManager();
- if (manager != null)
+ FragmentActivity activity = getActivity();
+ if (activity != null)
{
+ // FUJI X用のステータス表示ダイアログを表示する
+ FragmentManager manager = activity.getSupportFragmentManager();
FujiXCameraStatusDialog.newInstance(interfaceProvider.getFujiXInterface()).show(manager, "statusDialog");
}
}
String NUMBER_OF_CACHE_PICTURES = "number_of_cache_pictures";
String NUMBER_OF_CACHE_PICTURES_DEFAULT_VALUE = "500";
+ String SEND_MESSAGE_DIALOG = "dialog_message_send";
+
+
+
/*
int CHOICE_SPLASH_SCREEN = 10;
import java.util.Map;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.EXIT_APPLICATION;
+import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.SEND_MESSAGE_DIALOG;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.WIFI_SETTINGS;
/**
{
private final String TAG = toString();
private AppCompatActivity context = null;
+ private IChangeScene changeScene = null;
private SharedPreferences preferences = null;
private PtpIpCameraPowerOff powerOffController = null;
powerOffController.prepare();
this.context = context;
+ this.changeScene = changeScene;
}
catch (Exception e)
{
{
exitApplication.setOnPreferenceClickListener(powerOffController);
}
+
+ Preference ptpIpDialog = findPreference(SEND_MESSAGE_DIALOG);
+ if (ptpIpDialog != null)
+ {
+ ptpIpDialog.setOnPreferenceClickListener(this);
+ }
}
catch (Exception e)
{
context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
}
}
+ else if (preferenceKey.contains(SEND_MESSAGE_DIALOG))
+ {
+ // コマンド送信ダイアログを表示する
+ if (changeScene != null)
+ {
+ changeScene.changeSceneToCameraPropertyList();
+ }
+ }
return (true);
}
catch (Exception e)
import androidx.preference.PreferenceManager;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.EXIT_APPLICATION;
+import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.SEND_MESSAGE_DIALOG;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.WIFI_SETTINGS;
/**
{
private final String TAG = toString();
private AppCompatActivity context = null;
+ private IChangeScene changeScene = null;
private SharedPreferences preferences = null;
private CameraPowerOffFujiX powerOffController = null;
powerOffController.prepare();
this.context = context;
+ this.changeScene = changeScene;
}
catch (Exception e)
{
{
exitApplication.setOnPreferenceClickListener(powerOffController);
}
+
+ Preference httpDialog = findPreference(SEND_MESSAGE_DIALOG);
+ if (httpDialog != null)
+ {
+ httpDialog.setOnPreferenceClickListener(this);
+ }
}
catch (Exception e)
{
context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
}
}
+ else if (preferenceKey.contains(SEND_MESSAGE_DIALOG))
+ {
+ // コマンド送信ダイアログを表示する
+ if (changeScene != null)
+ {
+ changeScene.changeSceneToCameraPropertyList();
+ }
+ }
return (true);
}
catch (Exception e)
import java.util.Map;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.EXIT_APPLICATION;
+import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.SEND_MESSAGE_DIALOG;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.WIFI_SETTINGS;
/**
{
private final String TAG = toString();
private AppCompatActivity context = null;
+ private IChangeScene changeScene = null;
private SharedPreferences preferences = null;
private PtpIpCameraPowerOff powerOffController = null;
powerOffController.prepare();
this.context = context;
+ this.changeScene = changeScene;
}
catch (Exception e)
{
{
exitApplication.setOnPreferenceClickListener(powerOffController);
}
+
+ Preference ptpIpDialog = findPreference(SEND_MESSAGE_DIALOG);
+ if (ptpIpDialog != null)
+ {
+ ptpIpDialog.setOnPreferenceClickListener(this);
+ }
}
catch (Exception e)
{
context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
}
}
+ else if (preferenceKey.contains(SEND_MESSAGE_DIALOG))
+ {
+ // コマンド送信ダイアログを表示する
+ if (changeScene != null)
+ {
+ changeScene.changeSceneToCameraPropertyList();
+ }
+ }
return (true);
}
catch (Exception e)
import java.util.Map;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.EXIT_APPLICATION;
+import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.SEND_MESSAGE_DIALOG;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.WIFI_SETTINGS;
/**
{
private final String TAG = toString();
private AppCompatActivity context = null;
+ private IChangeScene changeScene = null;
private SharedPreferences preferences = null;
private OlympusPenCameraPowerOff powerOffController = null;
powerOffController.prepare();
this.context = context;
+ this.changeScene = changeScene;
}
catch (Exception e)
{
{
exitApplication.setOnPreferenceClickListener(powerOffController);
}
+
+ Preference httpDialog = findPreference(SEND_MESSAGE_DIALOG);
+ if (httpDialog != null)
+ {
+ httpDialog.setOnPreferenceClickListener(this);
+ }
}
catch (Exception e)
{
context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
}
}
+ else if (preferenceKey.contains(SEND_MESSAGE_DIALOG))
+ {
+ // HTTP送信ダイアログを表示する
+ if (changeScene != null)
+ {
+ changeScene.changeSceneToCameraPropertyList();
+ }
+ }
return (true);
}
catch (Exception e)
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceManager;
+import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.SEND_MESSAGE_DIALOG;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.WIFI_SETTINGS;
/**
{
private final String TAG = toString();
private AppCompatActivity context = null;
+ private IChangeScene changeScene = null;
private SharedPreferences preferences = null;
private CameraPowerOffPanasonic powerOffController = null;
powerOffController.prepare();
this.context = context;
+ this.changeScene = changeScene;
}
catch (Exception e)
{
{
exitApplication.setOnPreferenceClickListener(powerOffController);
}
+
+ Preference httpDialog = findPreference(SEND_MESSAGE_DIALOG);
+ if (httpDialog != null)
+ {
+ httpDialog.setOnPreferenceClickListener(this);
+ }
}
catch (Exception e)
{
context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
}
}
+ else if (preferenceKey.contains(SEND_MESSAGE_DIALOG))
+ {
+ // コマンド送信ダイアログを表示する
+ if (changeScene != null)
+ {
+ changeScene.changeSceneToCameraPropertyList();
+ }
+ }
return (true);
}
catch (Exception e)
import androidx.preference.PreferenceManager;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.EXIT_APPLICATION;
+import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.SEND_MESSAGE_DIALOG;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.WIFI_SETTINGS;
public class RicohGr2PreferenceFragment extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener, Preference.OnPreferenceClickListener
{
private final String TAG = toString();
private AppCompatActivity context = null;
+ private IChangeScene changeScene = null;
private SharedPreferences preferences = null;
private CameraPowerOffRicohGr2 powerOffController = null;
powerOffController.prepare();
this.context = context;
+ this.changeScene = changeScene;
}
catch (Exception e)
{
{
exitApplication.setOnPreferenceClickListener(powerOffController);
}
+
+ Preference httpDialog = findPreference(SEND_MESSAGE_DIALOG);
+ if (httpDialog != null)
+ {
+ httpDialog.setOnPreferenceClickListener(this);
+ }
}
catch (Exception e)
{
context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
}
}
+ else if (preferenceKey.contains(SEND_MESSAGE_DIALOG))
+ {
+ // HTTP送信ダイアログを表示する
+ if (changeScene != null)
+ {
+ changeScene.changeSceneToCameraPropertyList();
+ }
+ }
return (true);
}
catch (Exception e)
{
nikon_settings.setOnPreferenceClickListener(this);
}
-
Preference exitApplication = findPreference(EXIT_APPLICATION);
if (exitApplication != null)
{
import java.util.Map;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.EXIT_APPLICATION;
+import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.SEND_MESSAGE_DIALOG;
import static net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.WIFI_SETTINGS;
/**
{
private final String TAG = toString();
private AppCompatActivity context = null;
+ private IChangeScene changeScene = null;
private SharedPreferences preferences = null;
private PtpIpCameraPowerOff powerOffController = null;
powerOffController.prepare();
this.context = context;
+ this.changeScene = changeScene;
}
catch (Exception e)
{
{
exitApplication.setOnPreferenceClickListener(powerOffController);
}
+ Preference httpDialog = findPreference(SEND_MESSAGE_DIALOG);
+ if (httpDialog != null)
+ {
+ httpDialog.setOnPreferenceClickListener(this);
+ }
}
catch (Exception e)
{
context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
}
}
+ else if (preferenceKey.contains(SEND_MESSAGE_DIALOG))
+ {
+ // HTTP送信ダイアログを表示する
+ if (changeScene != null)
+ {
+ changeScene.changeSceneToCameraPropertyList();
+ }
+ }
return (true);
}
catch (Exception e)
<string name="pref_capture_only_live_view">カメラのシャッターを使用しない</string>
<string name="pref_summary_capture_only_live_view">チェックを入れると、シャッターを押してもリモート(カメラ)側で撮影を行いません。</string>
+ <string name="pref_open_send_command_dialog">メッセージ送信</string>
+
</resources>
<string name="pref_capture_only_live_view">DO NOT USE REMOTE SHUTTER</string>
<string name="pref_summary_capture_only_live_view"> </string>
+
+ <string name="pref_open_send_command_dialog">SEND COMMAND DIALOG</string>
+
</resources>
android:title="@string/pref_wifi_settings"
android:summary="@string/pref_summary_wifi_settings" />
-->
+ <PreferenceScreen
+ android:key="dialog_message_send"
+ android:icon="@drawable/ic_linked_camera_black_24dp"
+ android:title="@string/pref_open_send_command_dialog"
+ />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_wifi_settings"
android:summary="@string/pref_summary_wifi_settings" />
-->
+ <PreferenceScreen
+ android:key="dialog_message_send"
+ android:icon="@drawable/ic_linked_camera_black_24dp"
+ android:title="@string/pref_open_send_command_dialog"
+ />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_wifi_settings"
android:summary="@string/pref_summary_wifi_settings" />
-->
+ <PreferenceScreen
+ android:key="dialog_message_send"
+ android:icon="@drawable/ic_linked_camera_black_24dp"
+ android:title="@string/pref_open_send_command_dialog"
+ />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_wifi_settings"
android:summary="@string/pref_summary_wifi_settings" />
-->
+
+ <PreferenceScreen
+ android:key="dialog_message_send"
+ android:icon="@drawable/ic_linked_camera_black_24dp"
+ android:title="@string/pref_open_send_command_dialog"
+ />
+
</PreferenceCategory>
+
<!--
<PreferenceCategory
android:title="@string/pref_cat_camera">
-
- <CheckBoxPreference
- android:key="capture_both_camera_and_live_view"
- android:title="@string/pref_capture_both_camera_and_live_view" />
-
+ <CheckBoxPreference
+ android:key="capture_both_camera_and_live_view"
+ android:title="@string/pref_capture_both_camera_and_live_view" />
</PreferenceCategory>
+-->
+<!--
<PreferenceCategory
android:title="@string/pref_cat_initialize">
android:title="@string/pref_wifi_settings"
android:summary="@string/pref_summary_wifi_settings" />
-->
+ <PreferenceScreen
+ android:key="dialog_message_send"
+ android:icon="@drawable/ic_linked_camera_black_24dp"
+ android:title="@string/pref_open_send_command_dialog"
+ />
+
</PreferenceCategory>
<!--
android:title="@string/pref_wifi_settings"
android:summary="@string/pref_summary_wifi_settings" />
-->
+ <PreferenceScreen
+ android:key="dialog_message_send"
+ android:icon="@drawable/ic_linked_camera_black_24dp"
+ android:title="@string/pref_open_send_command_dialog"
+ />
</PreferenceCategory>
<!--
android:title="@string/pref_wifi_settings"
android:summary="@string/pref_summary_wifi_settings" />
-->
- </PreferenceCategory>
-
- <PreferenceCategory
- android:title="@string/pref_cat_camera">
-
<PreferenceScreen
android:key="sony_api_list"
android:title="@string/pref_sony_api_list"
android:summary="@string/pref_summary_sony_api_list" />
+
+ </PreferenceCategory>
<!--
+ <PreferenceCategory
+ android:title="@string/pref_cat_camera">
+
<CheckBoxPreference
android:key="capture_both_camera_and_live_view"
android:title="@string/pref_capture_both_camera_and_live_view" />
--->
- </PreferenceCategory>
+ </PreferenceCategory>
+-->
<!--
<PreferenceCategory
android:title="@string/pref_cat_initialize">
android:title="@string/pref_wifi_settings"
android:summary="@string/pref_summary_wifi_settings" />
-->
+ <PreferenceScreen
+ android:key="dialog_message_send"
+ android:icon="@drawable/ic_linked_camera_black_24dp"
+ android:title="@string/pref_open_send_command_dialog"
+ />
+
</PreferenceCategory>
<PreferenceCategory