Commit fe60a519 by Kim Jinsung

撮影したあと、Wi-Fi機能をOFFにした場合、ダイアログが2個表示される問題対応

parent 0e1c9ffd
......@@ -111,6 +111,14 @@ public class MJpegView extends SurfaceView implements SurfaceHolder.Callback {
play();
}
/**
* Get source stream for receiving motion JPEG
* @return Source stream
*/
public MJpegInputStream getSource() {
return mMJpegInputStream;
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
existSurface = true;
......
......@@ -49,6 +49,8 @@ public class ThetaActivity extends ABVUIActivity {
if (mWifiScanType == Constant.WifiScanType.CloseCameraActivity) {
//THETAカメラのWi-Fi機能を無効にするAPI送信
new FinishWlanTask((ThetaCameraActivity) ActivityHandlingHelper.getInstance().getCurrentActivity()).execute();
} else if (mWifiScanType == Constant.WifiScanType.ThetaConnectError) {
thetaCameraWifiConnected();
}
} else {
Logger.d(TAG, "ThetaカメラWi-Fi非接続状態");
......@@ -96,4 +98,9 @@ public class ThetaActivity extends ABVUIActivity {
mWifiManager.startScan();
mWifiScanType = Constant.WifiScanType.CloseCameraActivity;
}
/**
* 子クラスで定義
*/
protected void thetaCameraWifiConnected() {}
}
......@@ -203,13 +203,7 @@ public class ThetaCameraActivity extends ThetaActivity {
@Override
public void run() {
mShootBtn.setEnabled(true);
if (fileId.equals(ABookValues.FAIL)) {
mLiveView.play();
if (mLivePreviewTask != null) {
mLivePreviewTask.cancel(true);
mLivePreviewTask = new ShowLiveViewTask(ThetaCameraActivity.this);
mLivePreviewTask.execute();
}
if (!fileId.equals(ABookValues.FAIL)) {
thetaConnectError(R.string.msg_theta_shoot_fail);
} else {
Intent intent = new Intent();
......@@ -275,4 +269,20 @@ public class ThetaCameraActivity extends ThetaActivity {
Logger.e(TAG, "setOptionExposureTaskFinish fail");
}
}
/**
* 撮影したあと、THETAカメラと通信失敗時、
* Wi-Fiが接続状態の場合、ライブ映像を再表示
*/
@Override
protected void thetaCameraWifiConnected() {
if (mLiveView.getSource() == null) {
if (mLivePreviewTask != null) {
mLivePreviewTask.cancel(true);
mLivePreviewTask = new ShowLiveViewTask(ThetaCameraActivity.this);
mLivePreviewTask.execute();
}
mLiveView.play();
}
}
}
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