Commit 4a4dfd74 by onuma

Task #42647 OS10 で THETAが認識されない。

parent f7f0d433
...@@ -114,13 +114,6 @@ android { ...@@ -114,13 +114,6 @@ android {
abiFilters "x86_64", "" abiFilters "x86_64", ""
} }
} }
// 容量が大きいため、コメントアウト
// x86_armv7 {
// ndk {
// abiFilters "x86", "armeabi-v7a", ""
// }
// }
} else { } else {
armv7 { armv7 {
versionCode defaultConfig.versionCode versionCode defaultConfig.versionCode
...@@ -128,6 +121,7 @@ android { ...@@ -128,6 +121,7 @@ android {
abiFilters "armeabi-v7a", "" abiFilters "armeabi-v7a", ""
} }
} }
armv8 { armv8 {
versionCode defaultConfig.versionCode + 1 versionCode defaultConfig.versionCode + 1
ndk { ndk {
......
...@@ -47,7 +47,6 @@ public class ThetaHelper { ...@@ -47,7 +47,6 @@ public class ThetaHelper {
* @return true:接続成功、false:接続失敗 * @return true:接続成功、false:接続失敗
*/ */
public boolean connectThetaCameraWifi(int networkId) { public boolean connectThetaCameraWifi(int networkId) {
Logger.i(TAG,"connectThetaCameraWifi : " + networkId);
WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE); WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager == null) { if (wifiManager == null) {
Logger.e(TAG, "wifiManager == null"); Logger.e(TAG, "wifiManager == null");
...@@ -67,7 +66,6 @@ public class ThetaHelper { ...@@ -67,7 +66,6 @@ public class ThetaHelper {
* @return networkIdを返す(-1は失敗) * @return networkIdを返す(-1は失敗)
*/ */
public int saveThetaCameraWifi(String ssid) { public int saveThetaCameraWifi(String ssid) {
Logger.i(TAG, "saveThetaCameraWifi : " + ssid);
WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE); WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager == null) { if (wifiManager == null) {
Logger.e(TAG, "wifiManager == null"); Logger.e(TAG, "wifiManager == null");
...@@ -109,7 +107,6 @@ public class ThetaHelper { ...@@ -109,7 +107,6 @@ public class ThetaHelper {
* @return 存在有無(true:存在する,false:存在しない) * @return 存在有無(true:存在する,false:存在しない)
*/ */
private boolean checkWifiNetwork(String ssid) { private boolean checkWifiNetwork(String ssid) {
Logger.i(TAG,"checkWifiNetwork : " + ssid);
WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE); WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager == null) { if (wifiManager == null) {
Logger.e(TAG, "wifiManager == null"); Logger.e(TAG, "wifiManager == null");
...@@ -121,7 +118,7 @@ public class ThetaHelper { ...@@ -121,7 +118,7 @@ public class ThetaHelper {
for (ScanResult scanResult : wifiManager.getScanResults()) { for (ScanResult scanResult : wifiManager.getScanResults()) {
String scanResultSSID = scanResult.SSID.replace("\"", ""); String scanResultSSID = scanResult.SSID.replace("\"", "");
int index = scanResultSSID.indexOf(ssid); int index = scanResultSSID.indexOf(ssid);
Logger.i(TAG, "scanResultSSID = " + scanResultSSID); Logger.d(TAG, "scanResultSSID = " + scanResultSSID);
if (index != -1) { if (index != -1) {
hasWifiList = true; hasWifiList = true;
} }
...@@ -134,7 +131,7 @@ public class ThetaHelper { ...@@ -134,7 +131,7 @@ public class ThetaHelper {
* @param ssid アクセスポイント * @param ssid アクセスポイント
* @return 接続パスワード * @return 接続パスワード
*/ */
public static String getPassword(String ssid) { public String getPassword(String ssid) {
String password = ssid.replace("THETA",""); String password = ssid.replace("THETA","");
password = password.replace(".OSC",""); password = password.replace(".OSC","");
return password.substring(2); return password.substring(2);
...@@ -219,7 +216,6 @@ public class ThetaHelper { ...@@ -219,7 +216,6 @@ public class ThetaHelper {
* @return true:接続状態、false:非接続状態 * @return true:接続状態、false:非接続状態
*/ */
public boolean checkThetaCameraWifiConnected(@NonNull WifiManager wifiManager) { public boolean checkThetaCameraWifiConnected(@NonNull WifiManager wifiManager) {
Logger.i(TAG,"--- checkThetaCameraWifiConnected");
List<ScanResult> results = wifiManager.getScanResults(); List<ScanResult> results = wifiManager.getScanResults();
boolean isConnected = false; boolean isConnected = false;
for (ScanResult scanResult : results) { for (ScanResult scanResult : results) {
...@@ -251,7 +247,7 @@ public class ThetaHelper { ...@@ -251,7 +247,7 @@ public class ThetaHelper {
* THETAカメラWi-Fiと非接続 * THETAカメラWi-Fiと非接続
*/ */
public void disConnectThetaCameraWifi(WifiManager wifiManager) { public void disConnectThetaCameraWifi(WifiManager wifiManager) {
Logger.i(TAG,"--- disConnectThetaCameraWifi"); Logger.d(TAG,"disConnectThetaCameraWifi");
//既存接続中のネットワーク切断 //既存接続中のネットワーク切断
WifiInfo wifi_inf = wifiManager.getConnectionInfo(); WifiInfo wifi_inf = wifiManager.getConnectionInfo();
if (wifi_inf.getNetworkId() != -1 ) { if (wifi_inf.getNetworkId() != -1 ) {
...@@ -261,30 +257,6 @@ public class ThetaHelper { ...@@ -261,30 +257,6 @@ public class ThetaHelper {
wifiManager.disconnect(); wifiManager.disconnect();
} }
public static ConnectivityManager.NetworkCallback networkCallback_ = new ConnectivityManager.NetworkCallback() {
@Override
public void onAvailable(@NonNull Network network) {
super.onAvailable(network);
}
@Override
public void onLost(@NonNull Network network) {
super.onLost(network);
}
@Override
public void onUnavailable() {
super.onUnavailable();
}
};
public static ConnectivityManager.NetworkCallback getNetworkCallback(){
if (networkCallback_ == null) {
networkCallback_ = new ConnectivityManager.NetworkCallback();
}
return networkCallback_;
}
/** /**
* ConnectivityManagerを利用してアプリ(プロセス)全体のネットワークを設定します。 * ConnectivityManagerを利用してアプリ(プロセス)全体のネットワークを設定します。
...@@ -310,7 +282,6 @@ public class ThetaHelper { ...@@ -310,7 +282,6 @@ public class ThetaHelper {
* ConnectivityManagerを利用してアプリ(プロセス)全体のネットワークを解除する。 * ConnectivityManagerを利用してアプリ(プロセス)全体のネットワークを解除する。
*/ */
public void appConnectedWifiDefault() { public void appConnectedWifiDefault() {
Logger.i(TAG,"---- appConnectedWifiDefault");
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
ConnectivityManager connectivityManager = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); ConnectivityManager connectivityManager = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectivityManager != null) { if (connectivityManager != null) {
......
...@@ -10,13 +10,10 @@ import java.io.IOException; ...@@ -10,13 +10,10 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.Properties; import java.util.Properties;
import jp.agentec.abook.abv.bl.common.log.Logger;
/** /**
* Input stream for motion JPEG data * Input stream for motion JPEG data
*/ */
public class MJpegInputStream extends DataInputStream { public class MJpegInputStream extends DataInputStream {
private static final String TAG = "MJpegInputStream";
private final byte[] SOI_MARKER = {(byte) 0xFF, (byte) 0xD8}; private final byte[] SOI_MARKER = {(byte) 0xFF, (byte) 0xD8};
private final byte[] EOF_MARKER = {(byte) 0xFF, (byte) 0xD9}; private final byte[] EOF_MARKER = {(byte) 0xFF, (byte) 0xD9};
private final static String CONTENT_LENGTH = "Content-Length"; private final static String CONTENT_LENGTH = "Content-Length";
...@@ -80,17 +77,13 @@ public class MJpegInputStream extends DataInputStream { ...@@ -80,17 +77,13 @@ public class MJpegInputStream extends DataInputStream {
properties.load(bais); properties.load(bais);
return Integer.parseInt(properties.getProperty(CONTENT_LENGTH)); return Integer.parseInt(properties.getProperty(CONTENT_LENGTH));
} }
private int systemCount_ = 0;
/** /**
* Acquire image data for 1 frame * Acquire image data for 1 frame
* @return Image data for 1 frame * @return Image data for 1 frame
* @throws IOException * @throws IOException
*/ */
public Bitmap readMJpegFrame() throws IOException { public Bitmap readMJpegFrame() throws IOException {
if (systemCount_%10 == 0) {
Logger.i(TAG, "--- readMJpegFrame");
}
systemCount_++;
mark(FRAME_MAX_LENGTH); mark(FRAME_MAX_LENGTH);
int headerLength = getStartOfSequence(this, SOI_MARKER); int headerLength = getStartOfSequence(this, SOI_MARKER);
int contentLength; int contentLength;
......
package jp.agentec.abook.abv.ui.common.activity; package jp.agentec.abook.abv.ui.common.activity;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.Activity; import android.app.Activity;
import android.app.ActivityManager; import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo; import android.app.ActivityManager.RunningTaskInfo;
import android.app.AlarmManager;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.PendingIntent;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.graphics.Color; import android.graphics.Color;
......
...@@ -3,74 +3,43 @@ package jp.agentec.abook.abv.ui.common.activity; ...@@ -3,74 +3,43 @@ package jp.agentec.abook.abv.ui.common.activity;
import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType; import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.CommonExecutor; import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.exception.ABVException; import jp.agentec.abook.abv.bl.common.exception.ABVException;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode; import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
import jp.agentec.abook.abv.bl.common.exception.AcmsException; import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException; import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache; import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import jp.agentec.abook.abv.bl.download.ContentDownloader; import jp.agentec.abook.abv.bl.download.ContentDownloader;
import jp.agentec.abook.abv.bl.download.ContentFileExtractor; import jp.agentec.abook.abv.bl.download.ContentFileExtractor;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification; import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.ContentDto; import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.FixPushMessageDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.cl.environment.DeviceInfo; import jp.agentec.abook.abv.cl.environment.DeviceInfo;
import jp.agentec.abook.abv.cl.helper.ContentMarkingFileHelper; import jp.agentec.abook.abv.cl.helper.ContentMarkingFileHelper;
import jp.agentec.abook.abv.cl.util.AndroidStringUtil; import jp.agentec.abook.abv.cl.util.AndroidStringUtil;
import jp.agentec.abook.abv.launcher.android.ABVApplication; import jp.agentec.abook.abv.launcher.android.ABVApplication;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode; import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts; import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.KeyboardUtils;
import jp.agentec.abook.abv.ui.common.util.LogUtil; import jp.agentec.abook.abv.ui.common.util.LogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity; import jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity;
import jp.agentec.abook.abv.ui.home.adapter.FixPushMessageAdapter;
import jp.agentec.abook.abv.ui.home.adapter.OperationSelectAdapter;
import jp.agentec.abook.abv.ui.home.adapter.PushMessageListAdapter;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.viewer.activity.DeviceImageListActivity;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import android.app.Dialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.LinearInterpolator; import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation; import android.view.animation.RotateAnimation;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RadioGroup;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.handmark.pulltorefresh.library.PullToRefreshBase; import com.handmark.pulltorefresh.library.PullToRefreshBase;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
public abstract class ABVUIActivity extends ABVAuthenticatedActivity { public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
private final static String TAG = "ABVUIActivity"; private final static String TAG = "ABVUIActivity";
...@@ -534,7 +503,6 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity { ...@@ -534,7 +503,6 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
* @return true:有効, false:無効 * @return true:有効, false:無効
*/ */
protected boolean deviceWifiEnable() { protected boolean deviceWifiEnable() {
Logger.i(TAG,"--------- deviceWifiEnable");
if (DeviceInfo.isDeviceWifiEnabled(this)) { if (DeviceInfo.isDeviceWifiEnabled(this)) {
return true; return true;
} else { } else {
......
...@@ -30,12 +30,10 @@ import java.util.Stack; ...@@ -30,12 +30,10 @@ import java.util.Stack;
import jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON; import jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON; import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.acms.type.DeliveryType;
import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType; import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys; import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.exception.AcmsException; import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.common.util.ContentFileUtil; import jp.agentec.abook.abv.bl.common.util.ContentFileUtil;
import jp.agentec.abook.abv.bl.common.util.JsonUtil; import jp.agentec.abook.abv.bl.common.util.JsonUtil;
...@@ -69,7 +67,6 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; ...@@ -69,7 +67,6 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey;
import jp.agentec.abook.abv.ui.common.appinfo.AppNaviType; import jp.agentec.abook.abv.ui.common.appinfo.AppNaviType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts; import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
...@@ -81,7 +78,6 @@ import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity; ...@@ -81,7 +78,6 @@ import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity;
import jp.agentec.abook.abv.ui.viewer.activity.AudioPlayActivity; import jp.agentec.abook.abv.ui.viewer.activity.AudioPlayActivity;
import jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.DeviceImageListActivity;
import jp.agentec.abook.abv.ui.viewer.activity.EnqueteWebViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.EnqueteWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity;
...@@ -90,7 +86,6 @@ import jp.agentec.abook.abv.ui.viewer.activity.ParentWebViewActivity; ...@@ -90,7 +86,6 @@ import jp.agentec.abook.abv.ui.viewer.activity.ParentWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.PreviewActivity; import jp.agentec.abook.abv.ui.viewer.activity.PreviewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.VideoViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.VideoViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.theta.ThetaActivity; import jp.agentec.abook.abv.ui.viewer.activity.theta.ThetaActivity;
import jp.agentec.abook.abv.ui.viewer.view.OperationTaskLayout;
import jp.agentec.adf.net.http.HttpDownloadSimpleNotification; import jp.agentec.adf.net.http.HttpDownloadSimpleNotification;
import jp.agentec.adf.util.CollectionUtil; import jp.agentec.adf.util.CollectionUtil;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
...@@ -1884,7 +1879,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1884,7 +1879,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* THETAカメラと接続が切れたときにTHETA関連Activityをすべて終了させる * THETAカメラと接続が切れたときにTHETA関連Activityをすべて終了させる
*/ */
public synchronized void finishAllThetaActivity() { public synchronized void finishAllThetaActivity() {
Logger.i(TAG,"---- finishAllThetaActivity");
for (ABVAuthenticatedActivity activity : currentActivityStack) { for (ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof ThetaActivity) { if (activity instanceof ThetaActivity) {
activity.finish(); activity.finish();
......
...@@ -531,7 +531,7 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -531,7 +531,7 @@ public class DeviceImageListActivity extends ABVUIActivity {
registerButton.setOnClickListener(new View.OnClickListener() { registerButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.i(TAG,"registerButton.onClick"); Logger.v(TAG,"registerButton.onClick");
buttonDoubleTapControl(registerButton); buttonDoubleTapControl(registerButton);
if (deviceWifiEnable()) { if (deviceWifiEnable()) {
wifiScanStart(); wifiScanStart();
...@@ -585,7 +585,7 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -585,7 +585,7 @@ public class DeviceImageListActivity extends ABVUIActivity {
* ブロードキャスト リスナーを登録し、Wifiスキャンを開始する。 * ブロードキャスト リスナーを登録し、Wifiスキャンを開始する。
*/ */
private void wifiScanStart() { private void wifiScanStart() {
Logger.i(TAG,"---- wifiScanStart"); Logger.v(TAG,"wifiScanStart");
showProgressPopup(); showProgressPopup();
registerReceiver(wifiReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)); registerReceiver(wifiReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
mWifiManager.startScan(); mWifiManager.startScan();
...@@ -597,15 +597,14 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -597,15 +597,14 @@ public class DeviceImageListActivity extends ABVUIActivity {
* @param networkId 接続可能なネットワークID * @param networkId 接続可能なネットワークID
*/ */
private void connectThetaWifi(final String ssid, int networkId) { private void connectThetaWifi(final String ssid, int networkId) {
Logger.i(TAG,"connectThetaWifi"); Logger.i(TAG,"connectThetaWifi ssid=%s, networdId=%s, Build.VERSION_CODE=%s", ssid, networkId, Build.VERSION.SDK_INT);
showProgressPopup(getString(R.string.msg_wifi_connecting));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
Logger.i(TAG,"connectThetaWifi Android10");
showProgressPopup(getString(R.string.msg_wifi_connecting));
WifiNetworkSpecifier.Builder builder = new WifiNetworkSpecifier.Builder(); WifiNetworkSpecifier.Builder builder = new WifiNetworkSpecifier.Builder();
builder.setSsid(ssid); builder.setSsid(ssid);
String pass = ThetaHelper.getPassword(ssid); String pass = mThetaHelper.getPassword(ssid);
builder.setWpa2Passphrase(pass); builder.setWpa2Passphrase(pass);
WifiNetworkSpecifier wifiNetworkSpecifier = builder.build(); WifiNetworkSpecifier wifiNetworkSpecifier = builder.build();
...@@ -620,7 +619,6 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -620,7 +619,6 @@ public class DeviceImageListActivity extends ABVUIActivity {
@Override @Override
public void onAvailable(Network network) { public void onAvailable(Network network) {
super.onAvailable(network); super.onAvailable(network);
closeProgressPopup();
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
if (cm != null) { if (cm != null) {
// 接続したら保存 // 接続したら保存
...@@ -651,8 +649,6 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -651,8 +649,6 @@ public class DeviceImageListActivity extends ABVUIActivity {
cm.requestNetwork(networkRequest, networkCallback_); cm.requestNetwork(networkRequest, networkCallback_);
} }
} else { } else {
Logger.i(TAG,"connectThetaWifi Android9以下");
showProgressPopup(getString(R.string.msg_wifi_connecting));
if (networkId == -1) { if (networkId == -1) {
networkId = mThetaHelper.saveThetaCameraWifi(ssid); networkId = mThetaHelper.saveThetaCameraWifi(ssid);
...@@ -705,15 +701,14 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -705,15 +701,14 @@ public class DeviceImageListActivity extends ABVUIActivity {
* @param deviceInfo THETAカメラ情報 * @param deviceInfo THETAカメラ情報
*/ */
public void thetaDeviceInfoTaskFinish(ThetaDeviceInfo deviceInfo) { public void thetaDeviceInfoTaskFinish(ThetaDeviceInfo deviceInfo) {
Logger.i(TAG, "--- thetaDeviceInfoTaskFinish");
closeProgressPopup(); closeProgressPopup();
if (deviceInfo != null && deviceInfo.getModel().length() != 0) { if (deviceInfo != null && deviceInfo.getModel().length() != 0) {
if (deviceInfo.getModel().equals(ABookValues.THETA_MODEL_NAME_THETA_S) || deviceInfo.getModel().equals(ABookValues.THETA_MODEL_NAME_THETA_SC)) { if (deviceInfo.getModel().equals(ABookValues.THETA_MODEL_NAME_THETA_S) || deviceInfo.getModel().equals(ABookValues.THETA_MODEL_NAME_THETA_SC)) {
putUserPref(ABookKeys.THETA_OLD_VERSION_FLG, true); putUserPref(ABookKeys.THETA_OLD_VERSION_FLG, true);
Logger.i(TAG, "thetaDeviceInfoTaskFinish use API2.0"); Logger.d(TAG, "thetaDeviceInfoTaskFinish use API2.0");
} else { } else {
putUserPref(ABookKeys.THETA_OLD_VERSION_FLG, false); putUserPref(ABookKeys.THETA_OLD_VERSION_FLG, false);
Logger.i(TAG, "thetaDeviceInfoTaskFinish use API2.1"); Logger.d(TAG, "thetaDeviceInfoTaskFinish use API2.1");
} }
if (mThetaDeviceConnectDialog != null && mThetaDeviceConnectDialog.isShowing()) { if (mThetaDeviceConnectDialog != null && mThetaDeviceConnectDialog.isShowing()) {
...@@ -729,7 +724,6 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -729,7 +724,6 @@ public class DeviceImageListActivity extends ABVUIActivity {
AlertDialogUtil.showAlertDialog(this, R.string.app_name, R.string.msg_fail_connect_theta_wifi, true, new DialogInterface.OnClickListener() { AlertDialogUtil.showAlertDialog(this, R.string.app_name, R.string.msg_fail_connect_theta_wifi, true, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
Logger.i(TAG,"---AlertDialogUtil.onClick");
wifiScanStart(); wifiScanStart();
} }
}); });
...@@ -742,7 +736,6 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -742,7 +736,6 @@ public class DeviceImageListActivity extends ABVUIActivity {
BroadcastReceiver wifiReceiver = new BroadcastReceiver() { BroadcastReceiver wifiReceiver = new BroadcastReceiver() {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
Logger.i(TAG,"--- wifiReceiver onReceive");
unregisterReceiver(wifiReceiver); unregisterReceiver(wifiReceiver);
thetaWifiScanResult(); thetaWifiScanResult();
} }
...@@ -755,25 +748,23 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -755,25 +748,23 @@ public class DeviceImageListActivity extends ABVUIActivity {
* ③未登録の端末情報取得し、画面再描画 * ③未登録の端末情報取得し、画面再描画
*/ */
public void thetaWifiScanResult() { public void thetaWifiScanResult() {
Logger.i(TAG, "--- thetaWifiScanResult");
List<ScanResult> results = mWifiManager.getScanResults(); List<ScanResult> results = mWifiManager.getScanResults();
boolean isConnected = false; boolean isConnected = false;
List<ThetaDeviceInfo> scanWifiList = new ArrayList<>(); List<ThetaDeviceInfo> scanWifiList = new ArrayList<>();
List<ThetaDeviceInfo> scanSavedWifiList = new ArrayList<>(); List<ThetaDeviceInfo> scanSavedWifiList = new ArrayList<>();
for (ScanResult scanResult : results) { for (ScanResult scanResult : results) {
String scanSSID = scanResult.SSID.replace("\"", ""); String scanSSID = scanResult.SSID.replace("\"", "");
Logger.i(TAG, "*****scanSSID = "+ scanSSID); Logger.d(TAG, "*****scanSSID = "+ scanSSID);
if (scanSSID.length() != 0) { if (scanSSID.length() != 0) {
int index = scanSSID.indexOf(ABookValues.THETA_MODEL_NAME_THETA); int index = scanSSID.indexOf(ABookValues.THETA_MODEL_NAME_THETA);
ThetaDeviceInfo deviceInfo = new ThetaDeviceInfo(); ThetaDeviceInfo deviceInfo = new ThetaDeviceInfo();
if (index != -1) { if (index != -1) {
int networkId = -1; int networkId = -1;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
Logger.i(TAG, "--- thetaWifiScanResult --- Q以上");
deviceInfo.setSSID(scanSSID); deviceInfo.setSSID(scanSSID);
String[] ssid = PreferenceUtil.get(getApplicationContext(), AppDefType.DefPrefKey.THETA_SSID_STRING); String[] ssid = PreferenceUtil.get(getApplicationContext(), AppDefType.DefPrefKey.THETA_SSID_STRING);
if (ssid != null) { if (ssid != null) {
savedThetaList_ = Arrays.asList(ssid); savedThetaList_ = new ArrayList<>(Arrays.asList(ssid));
if (findThetaSSID(scanSSID)) { if (findThetaSSID(scanSSID)) {
networkId = 0; // -1 だと未登録になるので networkId = 0; // -1 だと未登録になるので
deviceInfo.setSSID(scanSSID); deviceInfo.setSSID(scanSSID);
...@@ -781,7 +772,6 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -781,7 +772,6 @@ public class DeviceImageListActivity extends ABVUIActivity {
} }
} }
} else { } else {
Logger.i(TAG, "--- thetaWifiScanResult --- OS9 以下");
for (WifiConfiguration configuration : mWifiManager.getConfiguredNetworks()) { for (WifiConfiguration configuration : mWifiManager.getConfiguredNetworks()) {
// Android4.2以降よりダブルクォーテーションが付いてくるので除去 // Android4.2以降よりダブルクォーテーションが付いてくるので除去
String configurationSSID = configuration.SSID.replace("\"", ""); String configurationSSID = configuration.SSID.replace("\"", "");
...@@ -831,15 +821,8 @@ public class DeviceImageListActivity extends ABVUIActivity { ...@@ -831,15 +821,8 @@ public class DeviceImageListActivity extends ABVUIActivity {
* @return ssidの追加された、あたらしいsavedThetaList_ * @return ssidの追加された、あたらしいsavedThetaList_
*/ */
private List<String> addThetaSSID(String ssid) { private List<String> addThetaSSID(String ssid) {
if (savedThetaList_.size()==0){ if (!findThetaSSID(ssid)) {
// 最初の1つめは必ず登録
savedThetaList_.add(ssid); savedThetaList_.add(ssid);
} else {
for (String id : savedThetaList_) {
if (!findThetaSSID(id)) {
savedThetaList_.add(id);
}
}
} }
return savedThetaList_; return savedThetaList_;
} }
......
...@@ -5,9 +5,7 @@ import android.content.Context; ...@@ -5,9 +5,7 @@ import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.wifi.WifiManager; import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import com.theta.helper.ThetaHelper; import com.theta.helper.ThetaHelper;
...@@ -43,13 +41,11 @@ public class ThetaActivity extends ABVUIActivity { ...@@ -43,13 +41,11 @@ public class ThetaActivity extends ABVUIActivity {
BroadcastReceiver wifiReceiver = new BroadcastReceiver() { BroadcastReceiver wifiReceiver = new BroadcastReceiver() {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
Logger.i(TAG,"---- wifiReceiver onReceive");
unregisterReceiver(wifiReceiver); unregisterReceiver(wifiReceiver);
boolean isConnected = mThetaHelper.checkThetaCameraWifiConnected(mWifiManager); boolean isConnected = mThetaHelper.checkThetaCameraWifiConnected(mWifiManager);
closeProgressPopup(); closeProgressPopup();
//THETAカメラ画面閉じる //THETAカメラ画面閉じる
if (mWifiScanType == Constant.WifiScanType.CloseCameraActivity) { if (mWifiScanType == Constant.WifiScanType.CloseCameraActivity) {
isConnected = true;
if (isConnected) { if (isConnected) {
mThetaHelper.disConnectThetaCameraWifi(mWifiManager); mThetaHelper.disConnectThetaCameraWifi(mWifiManager);
} }
...@@ -94,7 +90,7 @@ public class ThetaActivity extends ABVUIActivity { ...@@ -94,7 +90,7 @@ public class ThetaActivity extends ABVUIActivity {
* Wi-Fiが接続状態かチェックする。 * Wi-Fiが接続状態かチェックする。
*/ */
protected void closeThetaCameraActivity() { protected void closeThetaCameraActivity() {
Logger.i(TAG,"---- closeThetaCameraActivity"); Logger.i(TAG,"closeThetaCameraActivity");
showProgressPopup(); showProgressPopup();
//現在接続状態なのかチェック //現在接続状態なのかチェック
registerReceiver(wifiReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)); registerReceiver(wifiReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
......
...@@ -54,6 +54,7 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -54,6 +54,7 @@ public class ThetaCameraActivity extends ThetaActivity {
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
Logger.i(TAG,"onCreate");
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.ac_theta_camera); setContentView(R.layout.ac_theta_camera);
mLiveView = findViewById(R.id.live_view); mLiveView = findViewById(R.id.live_view);
...@@ -62,7 +63,7 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -62,7 +63,7 @@ public class ThetaCameraActivity extends ThetaActivity {
closeBtn.setOnClickListener(new View.OnClickListener() { closeBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.i(TAG, "--- CloseBtn.onClick"); Logger.v(TAG, "CloseBtn.onClick");
buttonDoubleTapControl(closeBtn); buttonDoubleTapControl(closeBtn);
mLiveView.stopPlay(); mLiveView.stopPlay();
if (deviceWifiEnable()) { if (deviceWifiEnable()) {
...@@ -78,7 +79,6 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -78,7 +79,6 @@ public class ThetaCameraActivity extends ThetaActivity {
mShootBtn.setOnClickListener(new View.OnClickListener() { mShootBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.i(TAG, "--- mShootBtn.onClick");
buttonDoubleTapControl(mShootBtn); buttonDoubleTapControl(mShootBtn);
showProgressPopup(); showProgressPopup();
new ShootTask(ThetaCameraActivity.this).execute(); new ShootTask(ThetaCameraActivity.this).execute();
...@@ -92,7 +92,6 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -92,7 +92,6 @@ public class ThetaCameraActivity extends ThetaActivity {
mImageListBtn.setOnClickListener(new View.OnClickListener() { mImageListBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.i(TAG, "--- mImageListBtn.onClick");
buttonDoubleTapControl(mImageListBtn); buttonDoubleTapControl(mImageListBtn);
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClassName(getPackageName(), ThetaImageListActivity.class.getName()); intent.setClassName(getPackageName(), ThetaImageListActivity.class.getName());
...@@ -257,7 +256,7 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -257,7 +256,7 @@ public class ThetaCameraActivity extends ThetaActivity {
* @param mJpegInputStream Live画像データ * @param mJpegInputStream Live画像データ
*/ */
public void showLiveViewTaskFinish(MJpegInputStream mJpegInputStream) { public void showLiveViewTaskFinish(MJpegInputStream mJpegInputStream) {
Logger.i(TAG,"----- showLiveViewTaskFinish");
if (mJpegInputStream != null) { if (mJpegInputStream != null) {
mLiveView.setSource(mJpegInputStream); mLiveView.setSource(mJpegInputStream);
new GetOptionExposureTask(ThetaCameraActivity.this).execute(); new GetOptionExposureTask(ThetaCameraActivity.this).execute();
...@@ -314,7 +313,6 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -314,7 +313,6 @@ public class ThetaCameraActivity extends ThetaActivity {
*/ */
@Override @Override
protected void thetaCameraWifiConnected() { protected void thetaCameraWifiConnected() {
Logger.i(TAG,"thetaCameraWifiConnected");
if (mLiveView.getSource() == null) { if (mLiveView.getSource() == null) {
if (mLivePreviewTask != null) { if (mLivePreviewTask != null) {
mLivePreviewTask.cancel(true); mLivePreviewTask.cancel(true);
......
...@@ -48,7 +48,6 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -48,7 +48,6 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
backBtn.setOnClickListener(new View.OnClickListener() { backBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.i(TAG, "--- backBtn.onClick");
//転送後にTHETAライブラリ再描画のため //転送後にTHETAライブラリ再描画のため
if (isThetaListActivityBack && isSavedSuccess) { if (isThetaListActivityBack && isSavedSuccess) {
setResult(RESULT_OK); setResult(RESULT_OK);
...@@ -62,7 +61,6 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -62,7 +61,6 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
mSaveBtn.setOnClickListener(new View.OnClickListener() { mSaveBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.i(TAG,"mSaveBtn.onClick");
buttonDoubleTapControl(mSaveBtn); buttonDoubleTapControl(mSaveBtn);
AlertDialogUtil.showAlertDialog(ThetaImagePreviewActivity.this, R.string.app_name, R.string.msg_theta_image_send_confirm, false, new DialogInterface.OnClickListener() { AlertDialogUtil.showAlertDialog(ThetaImagePreviewActivity.this, R.string.app_name, R.string.msg_theta_image_send_confirm, false, new DialogInterface.OnClickListener() {
@Override @Override
...@@ -72,11 +70,9 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -72,11 +70,9 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
@Override @Override
public void run() { public void run() {
if (mThetaHelper.thetaImageLocalSave(mTexture.getPhoto(), mFileId)) { if (mThetaHelper.thetaImageLocalSave(mTexture.getPhoto(), mFileId)) {
Logger.i(TAG,"画像転送に成功しました。");
showSimpleAlertDialog(R.string.app_name, R.string.msg_theta_image_send_success); showSimpleAlertDialog(R.string.app_name, R.string.msg_theta_image_send_success);
isSavedSuccess = true; isSavedSuccess = true;
} else { } else {
Logger.i(TAG,"画像転送に失敗しました。");
showSimpleAlertDialog(R.string.app_name, R.string.msg_theta_image_send_fail); showSimpleAlertDialog(R.string.app_name, R.string.msg_theta_image_send_fail);
} }
closeProgressPopup(); closeProgressPopup();
...@@ -102,7 +98,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -102,7 +98,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
//端末の戻るボタン禁止 //端末の戻るボタン禁止
@Override @Override
public boolean dispatchKeyEvent(KeyEvent event) { public boolean dispatchKeyEvent(KeyEvent event) {
Logger.i(TAG, "dispatchKeyEvent %s", event); Logger.v(TAG, "dispatchKeyEvent %s", event);
if (event.getAction()==KeyEvent.ACTION_UP) { // 戻るボタンを抑止 if (event.getAction()==KeyEvent.ACTION_UP) { // 戻るボタンを抑止
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) { if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
return true; return true;
...@@ -116,7 +112,6 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -116,7 +112,6 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
* @param imageData 画像データ * @param imageData 画像データ
*/ */
public void loadPhotoTaskFinish(ImageData imageData) { public void loadPhotoTaskFinish(ImageData imageData) {
Logger.i(TAG, "--- loadPhotoTaskFinish");
if (imageData != null) { if (imageData != null) {
byte[] dataObject = imageData.getRawData(); byte[] dataObject = imageData.getRawData();
if (dataObject == null) { if (dataObject == null) {
......
...@@ -24,13 +24,12 @@ public class DeviceInfoTask extends AsyncTask<Void, String, ThetaDeviceInfo> { ...@@ -24,13 +24,12 @@ public class DeviceInfoTask extends AsyncTask<Void, String, ThetaDeviceInfo> {
private static final int FAIL_RETRAY_DELAY_MILLIS = 2000; private static final int FAIL_RETRAY_DELAY_MILLIS = 2000;
public DeviceInfoTask(DeviceImageListActivity refActivity) { public DeviceInfoTask(DeviceImageListActivity refActivity) {
Logger.i(TAG,"--- DeviceInfoTask");
this.refActivity = new WeakReference<>(refActivity); this.refActivity = new WeakReference<>(refActivity);
} }
@Override @Override
protected ThetaDeviceInfo doInBackground(Void... params) { protected ThetaDeviceInfo doInBackground(Void... params) {
Logger.i(TAG, "--- doInBackground"); Logger.d(TAG, "doInBackground");
HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS); HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS);
final int MAX_RETRY_COUNT = 6; final int MAX_RETRY_COUNT = 6;
ThetaDeviceInfo deviceInfo = null; ThetaDeviceInfo deviceInfo = null;
...@@ -57,7 +56,7 @@ public class DeviceInfoTask extends AsyncTask<Void, String, ThetaDeviceInfo> { ...@@ -57,7 +56,7 @@ public class DeviceInfoTask extends AsyncTask<Void, String, ThetaDeviceInfo> {
@Override @Override
protected void onPostExecute(ThetaDeviceInfo deviceInfo) { protected void onPostExecute(ThetaDeviceInfo deviceInfo) {
Logger.i(TAG, "--- onPostExecute"); Logger.d(TAG, "onPostExecute");
DeviceImageListActivity activity = refActivity.get(); DeviceImageListActivity activity = refActivity.get();
activity.thetaDeviceInfoTaskFinish(deviceInfo); activity.thetaDeviceInfoTaskFinish(deviceInfo);
} }
......
...@@ -32,7 +32,6 @@ public class ImageListTask extends AsyncTask<Void, String, List<ImageRow>> { ...@@ -32,7 +32,6 @@ public class ImageListTask extends AsyncTask<Void, String, List<ImageRow>> {
private final WeakReference<ThetaImageListActivity> refActivity; private final WeakReference<ThetaImageListActivity> refActivity;
public ImageListTask(ThetaImageListActivity refActivity) { public ImageListTask(ThetaImageListActivity refActivity) {
Logger.i(TAG, "--- ImageListTask");
this.refActivity = new WeakReference<>(refActivity); this.refActivity = new WeakReference<>(refActivity);
} }
...@@ -44,7 +43,7 @@ public class ImageListTask extends AsyncTask<Void, String, List<ImageRow>> { ...@@ -44,7 +43,7 @@ public class ImageListTask extends AsyncTask<Void, String, List<ImageRow>> {
@Override @Override
protected List<ImageRow> doInBackground(Void... params) { protected List<ImageRow> doInBackground(Void... params) {
try { try {
Logger.i(TAG, "---- doInBackground"); Logger.d(TAG, "doInBackground");
boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false); boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false);
HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi); HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi);
ArrayList<ImageInfo> objects = camera.getList(); ArrayList<ImageInfo> objects = camera.getList();
......
...@@ -34,14 +34,13 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> { ...@@ -34,14 +34,13 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> {
private long receivedDataSize = 0; private long receivedDataSize = 0;
public LoadPhotoTask(Activity refActivity, String fileId) { public LoadPhotoTask(Activity refActivity, String fileId) {
Logger.i(TAG,"--- LoadPhotoTask");
this.refActivity = new WeakReference<>(refActivity); this.refActivity = new WeakReference<>(refActivity);
this.mFileId = fileId; this.mFileId = fileId;
} }
@Override @Override
protected void onPreExecute() { protected void onPreExecute() {
Logger.i(TAG, "--- onPreExecute"); Logger.d(TAG, "onPreExecute");
Activity activity = refActivity.get(); Activity activity = refActivity.get();
if (activity instanceof ThetaImagePreviewActivity) { if (activity instanceof ThetaImagePreviewActivity) {
ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity; ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity;
...@@ -53,19 +52,17 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> { ...@@ -53,19 +52,17 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> {
@Override @Override
protected ImageData doInBackground(Void... params) { protected ImageData doInBackground(Void... params) {
try { try {
Logger.i(TAG,"start to download image" + mFileId); Logger.d(TAG,"start to download image" + mFileId);
boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false); boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false);
HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi); HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi);
ImageData resizedImageData = camera.getImage(mFileId, new HttpDownloadListener() { ImageData resizedImageData = camera.getImage(mFileId, new HttpDownloadListener() {
@Override @Override
public void onTotalSize(long totalSize) { public void onTotalSize(long totalSize) {
Logger.i(TAG,"----onTotalSize : " + totalSize);
fileSize = totalSize; fileSize = totalSize;
} }
@Override @Override
public void onDataReceived(int size) { public void onDataReceived(int size) {
//Logger.i(TAG,"----onDataReceived : " + size);
receivedDataSize += size; receivedDataSize += size;
if (fileSize != 0) { if (fileSize != 0) {
...@@ -90,12 +87,10 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> { ...@@ -90,12 +87,10 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> {
ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity; ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity;
for (Object param : values) { for (Object param : values) {
if (param instanceof Integer) { if (param instanceof Integer) {
if ((Integer)((Integer) param).intValue()%10 == 0) { Logger.d(TAG, "onProgressUpdate progress = " + param);
Logger.i(TAG, "--- onProgressUpdate progress = " + param);
}
previewActivity.progressDialogHorizontal.setProgress((Integer) param); previewActivity.progressDialogHorizontal.setProgress((Integer) param);
} else if (param instanceof String) { } else if (param instanceof String) {
Logger.i(TAG, "onProgressUpdate param = " + param); Logger.d(TAG, "onProgressUpdate param = " + param);
} }
} }
} }
...@@ -103,7 +98,7 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> { ...@@ -103,7 +98,7 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> {
@Override @Override
protected void onPostExecute(ImageData imageData) { protected void onPostExecute(ImageData imageData) {
Logger.i(TAG, "---- onPostExecute"); Logger.d(TAG, "onPostExecute");
Activity activity = refActivity.get(); Activity activity = refActivity.get();
if (activity instanceof ThetaImagePreviewActivity) { if (activity instanceof ThetaImagePreviewActivity) {
ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity; ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity;
......
...@@ -29,30 +29,23 @@ public class ShowLiveViewTask extends AsyncTask<Void, String, MJpegInputStream> ...@@ -29,30 +29,23 @@ public class ShowLiveViewTask extends AsyncTask<Void, String, MJpegInputStream>
private final WeakReference<ThetaCameraActivity> refActivity; private final WeakReference<ThetaCameraActivity> refActivity;
public ShowLiveViewTask(ThetaCameraActivity refActivity) { public ShowLiveViewTask(ThetaCameraActivity refActivity) {
Logger.i(TAG,"---- ShowLiveViewTask");
this.refActivity = new WeakReference<>(refActivity); this.refActivity = new WeakReference<>(refActivity);
} }
@Override @Override
protected MJpegInputStream doInBackground(Void... params) { protected MJpegInputStream doInBackground(Void... params) {
Logger.i(TAG, "--- doInBackground"); Logger.d(TAG, "doInBackground");
MJpegInputStream mjis = null; MJpegInputStream mjis = null;
final int MAX_RETRY_COUNT = 5; final int MAX_RETRY_COUNT = 5;
for (int retryCount = 0; retryCount < MAX_RETRY_COUNT; retryCount++) { for (int retryCount = 0; retryCount < MAX_RETRY_COUNT; retryCount++) {
Logger.i(TAG,"retryCount = " + retryCount);
try { try {
boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false); boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false);
//boolean isOldApi = false;
Logger.i(TAG,"1");
HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi); HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi);
Logger.i(TAG,"2");
InputStream is = camera.getLivePreview(); InputStream is = camera.getLivePreview();
Logger.i(TAG,"3");
mjis = new MJpegInputStream(is); mjis = new MJpegInputStream(is);
Logger.i(TAG,"4");
//正常にライブ再生されるか確認 //正常にライブ再生されるか確認
mjis.readMJpegFrame(); mjis.readMJpegFrame();
Logger.i(TAG,"5");
retryCount = MAX_RETRY_COUNT; retryCount = MAX_RETRY_COUNT;
} catch (IOException e) { } catch (IOException e) {
Logger.e(TAG,"doInBackground fail e = " + e.toString()); Logger.e(TAG,"doInBackground fail e = " + e.toString());
......
...@@ -93,7 +93,7 @@ hope_page=http://www.agentec.jp ...@@ -93,7 +93,7 @@ hope_page=http://www.agentec.jp
contact_email=abook-appsupport@agentec.jp contact_email=abook-appsupport@agentec.jp
#Log Settings #Log Settings
log_level=0 log_level=2
default_log_name=abvje default_log_name=abvje
#エラーレポート/Exportログ送信方法 1:acms 2:平文メール(開発・テスト時のみ) 3:暗号化添付メール #エラーレポート/Exportログ送信方法 1:acms 2:平文メール(開発・テスト時のみ) 3:暗号化添付メール
error_report_flg=1 error_report_flg=1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment