Commit 2a2a26b3 by yuichiro ogawa

Merge remote-tracking branch 'origin/features/1.2.302' into features/1.2.360_ogawa-y

# Conflicts:
#	ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/ServiceOption.java
#	ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataCache.java
parents b0b09483 e0f4e275
......@@ -162,5 +162,11 @@ public interface ServiceOption {
* 利用しない:N(通常)、利用する:Y
*/
int Chat = 183;
/**
* I/O帳票使用
* 利用しない:N(通常)、利用する:Y
*/
int UsableIOReport = 186;
}
}
\ No newline at end of file
......@@ -339,6 +339,10 @@ public class ABVDataCache {
return isServiceOptionEnable(ServiceOptionId.Chat);
}
public boolean isUnableIOReport() {
return isServiceOptionEnable(ServiceOptionId.UsableIOReport);
}
/**
* @version 1.2.300
* サービスオプション(ユーザパスワードソルト付加)返す
......

642 Bytes | W: | H:

1.47 KB | W: | H:

ABVJE_Res_Default_Android/res/drawable-xhdpi/home_print_on.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_print_on.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_print_on.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_print_on.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_enabled="true" android:drawable="@drawable/ic_history_back_off" />
<item android:state_enabled="false" android:drawable="@drawable/ic_history_back_disable" />
</selector>
\ No newline at end of file
......@@ -533,7 +533,7 @@
<string name="title_all_operation">全作業</string>
<!-- ABookCheck 1.2.3 -->
<string name="title_quick_report_output">簡易帳票出力</string>
<string name="title_quick_report_output">帳票確認</string>
<!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0-->
......
......@@ -531,12 +531,12 @@
<string name="msg_batch_sync_new_content_updating">새로운 정보갱신 중에는 일괄 동기을 하실 수 없습니다.</string>
<string name="msg_batch_sync_error">「%1$s」정보갱신에 실패하였습니다. 동기처리을 중지합니다.\n</string>
<string name="msg_batch_sync_move_operation_view">일괄 동기 처리 중에는 점검작업 보고화면으로 이동하실 수 없습니다.</string>
<string name="category_list">분류 일람</string>
<string name="category_list">분류 목록</string>
<string name="title_category">분류</string>
<string name="title_all_operation">전체 작업</string>
<!-- ABookCheck 1.2.3 -->
<string name="title_quick_report_output">簡易帳票出力</string>
<string name="title_quick_report_output">장표 확인</string>
<!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0-->
......
......@@ -540,7 +540,7 @@
<string name="title_all_operation">All</string>
<!-- ABookCheck 1.2.3 -->
<string name="title_quick_report_output">簡易帳票出力</string>
<string name="title_quick_report_output">Report confirmation</string>
<!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0-->
......
......@@ -136,6 +136,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/print_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
......
......@@ -139,6 +139,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/print_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
......
......@@ -136,6 +136,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/print_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
......
......@@ -129,6 +129,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/print_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
......
......@@ -135,8 +135,8 @@
android:layout_weight="1"
android:background="@drawable/btn_operation_print_white"
android:contentDescription="@string/print"
android:scaleX="0.7"
android:scaleY="0.7"
android:scaleX="0.6"
android:scaleY="0.6"
android:visibility="gone" />
<ImageButton
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -12,22 +13,38 @@
android:background="@color/app_color"
android:minHeight="50dp" >
<Button
android:id="@+id/closeBtn"
<ImageButton
android:id="@+id/backBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="false"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignTop="@+id/linearLayout"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:background="@null"
android:src="@drawable/btn_history_back_for_webview" />
<Button
android:id="@+id/closeBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="false"
android:layout_alignParentStart="false"
android:layout_centerVertical="true"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/btn_close"
android:contentDescription="@string/cont_desc" />
android:contentDescription="@string/cont_desc"
android:layout_alignParentRight="true" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
android:layout_centerInParent="true"
android:id="@+id/linearLayout">
<TextView
android:id="@+id/title"
......
......@@ -22,8 +22,11 @@ import java.math.RoundingMode;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.TimeZone;
import java.util.Timer;
import java.util.TimerTask;
......@@ -357,6 +360,7 @@ public class HttpConnector {
try {
//API2.0
if (mIsOldApi) {
//画像ファイルの場合、「recordTime」がないのでJSONException発生
entry.getInt("recordTime");
//動画ファイルは保存しない。
continue;
......@@ -1110,6 +1114,8 @@ public class HttpConnector {
//API2.0
if (mSessionId != null) {
parameters.put("sessionId", mSessionId);
//THETA S端末の時間初期化問題で、現在時間は常に設定
options.put("dateTimeZone", currentDateTimeZone());
}
parameters.put("options", options);
......@@ -1520,4 +1526,12 @@ public class HttpConnector {
return isSuccess;
}
/**
* yyyy:MM:dd HH:mm:ssXXXフォマットで現在の日付を返す。
* @return 現在の日付
*/
private String currentDateTimeZone() {
return new SimpleDateFormat("yyyy:MM:dd HH:mm:ssXXX").format(new Date());
}
}
......@@ -12,16 +12,28 @@ import android.view.SurfaceView;
import java.io.IOException;
import jp.agentec.abook.abv.bl.common.log.Logger;
/**
* Motion JPEG view
*/
public class MJpegView extends SurfaceView implements SurfaceHolder.Callback {
private static final String TAG = "MJpegView";
private MJpegViewThread mMJpegViewThread = null;
private MJpegInputStream mMJpegInputStream = null;
private boolean existSurface = false;
private int mDisplayWidth;
private int mDisplayHeight;
private MJpegView.LiveCameraListener mListener;
public interface LiveCameraListener {
void liveCameraPlayFail();
}
public void setLiveCameraListenerListener(MJpegView.LiveCameraListener listener) {
this.mListener = listener;
}
/**
* Constructor
* @param context
......@@ -107,9 +119,13 @@ public class MJpegView extends SurfaceView implements SurfaceHolder.Callback {
* @param source Source stream
*/
public void setSource(MJpegInputStream source) {
if (source == null) { //mMJpegInputStreamのクローズ作業のため、現在スレッドをストップする。
stopPlay();
} else {
mMJpegInputStream = source;
play();
}
}
/**
* Get source stream for receiving motion JPEG
......@@ -185,7 +201,6 @@ public class MJpegView extends SurfaceView implements SurfaceHolder.Callback {
Bitmap bitmap;
Rect bitmapRect;
Canvas bitmapCanvas = null;
while (keepRunning) {
if (existSurface) {
try {
......@@ -201,7 +216,9 @@ public class MJpegView extends SurfaceView implements SurfaceHolder.Callback {
}
} catch (IOException e) {
e.getStackTrace();
Logger.e(TAG, "MJpegView IOException = " + e.toString());
keepRunning = false;
mListener.liveCameraPlayFail();
}
}
} finally {
......@@ -226,8 +243,10 @@ public class MJpegView extends SurfaceView implements SurfaceHolder.Callback {
if (mMJpegInputStream != null) {
try {
mMJpegInputStream.close();
mMJpegInputStream = null;
} catch (IOException e) {
e.printStackTrace();
Logger.e(TAG, "mMJpegInputStream IOException = " + e.toString());
}
}
}
......
......@@ -259,6 +259,7 @@ public class OperationListActivity extends ABVUIActivity {
}
});
if (ABVDataCache.getInstance().serviceOption.isUnableIOReport()) {
// 簡易帳票印刷ボタン
mQuickReportPrintButton.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -267,6 +268,10 @@ public class OperationListActivity extends ABVUIActivity {
}
});
mQuickReportPrintButton.setVisibility(View.VISIBLE);
} else {
findViewById(R.id.print_layout).setVisibility(View.GONE);
mQuickReportPrintButton.setVisibility(View.GONE);
}
// 一括同期ボタン
mOperationBatchSyncButton.setOnClickListener(new View.OnClickListener() {
......
......@@ -109,8 +109,12 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showCommunicationMenuDialog();
}
});
// 印刷ボタン活性化
if (ABVDataCache.getInstance().serviceOption.isUnableIOReport()) {
mQuickReportPrintButton.setVisibility(View.VISIBLE);
} else {
findViewById(R.id.print_layout).setVisibility(View.GONE);
mQuickReportPrintButton.setVisibility(View.GONE);
}
}
@Override
......
......@@ -623,7 +623,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
*/
private void printButtonActivityControl() {
OperationDto operation = mOperationDao.getOperation(mOperationId);
if (operation != null && operation.quickReport == 1) {
if (operation != null && operation.quickReport == 1 && ABVDataCache.getInstance().serviceOption.isUnableIOReport()) {
printButton.setVisibility(View.VISIBLE);
} else {
printButton.setVisibility(View.GONE);
......
......@@ -10,10 +10,12 @@ import android.view.Window;
import android.webkit.CookieManager;
import android.webkit.DownloadListener;
import android.webkit.URLUtil;
import android.webkit.WebBackForwardList;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
......@@ -34,6 +36,7 @@ public class OnlineHTMLWebViewActivity extends ABVContentViewActivity {
private WebView webView;
private Button closeButton;
private ImageButton backButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -59,7 +62,7 @@ public class OnlineHTMLWebViewActivity extends ABVContentViewActivity {
OnlineHTMLWebViewLogic logic = AbstractLogic.getLogic(OnlineHTMLWebViewLogic.class);
webView.postUrl(url, logic.getPostData(param));
// ***** るボタン
// ***** 閉じるボタン
closeButton = findViewById(R.id.closeBtn);
closeButton.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -67,6 +70,26 @@ public class OnlineHTMLWebViewActivity extends ABVContentViewActivity {
finishActivity();
}
});
// ***** 戻るボタン
backButton = findViewById(R.id.backBtn);
backButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// PDFダウンロードの場合はスキップする
WebBackForwardList bfList = webView.copyBackForwardList();
for (int i = 0, len = bfList.getCurrentIndex(); i < len; i++) {
String url = bfList.getItemAtIndex(len - i).getUrl();
if (url.contains("fileSelect")) {
continue;
}
if (webView.canGoBackOrForward(-1 * (i + 1))) {
webView.goBackOrForward(-1 * (i + 1));
break;
}
}
}
});
}
private void setWebView() {
......@@ -98,6 +121,12 @@ public class OnlineHTMLWebViewActivity extends ABVContentViewActivity {
Logger.v(TAG, "shouldOverrideUrlLoading: %s", url);
return false;
}
@Override
public void onPageFinished(WebView view, String url) {
// ***** 戻るボタンの活性制御
backButton.setEnabled(webView.canGoBack());
super.onPageFinished(view, url);
}
});
webView.setDownloadListener(new DownloadListener() {
......
......@@ -38,7 +38,9 @@ public class ThetaCameraActivity extends ThetaActivity {
private static final String TAG = "ThetaCameraActivity";
//画面表示後、ライブビューア取得を0.5秒後に取得
private static final int LIVE_VIEW_START_DELAY = 500;
private static final int LIVE_VIEW_FAIL_START_DELAY = 1000;
private static final int EV_TEXT_VIEW_TEXT_SIZE_PHONE = 16;
private static final int LIVE_VIDEO_FAIL_MAX_COUNT = 3;
private MJpegView mLiveView;
private ShowLiveViewTask mLivePreviewTask;
private Button mShootBtn;
......@@ -46,6 +48,8 @@ public class ThetaCameraActivity extends ThetaActivity {
private TextView mExposureTextView;
private SeekBar mExposureSeekBar;
private int mCurrentSeekBarProgress;
private int mLiveViewFailCount;
private boolean mInitOnResumeFlg = false;
private static final List<String> mExposureValues = new ArrayList<>(Arrays.asList("-2.0", "-1.7", "-1.3", "-1.0", "-0.7", "-0.3", "0.0", "0.3", "0.7", "1.0", "1.3", "1.7", "2.0"));
@Override
......@@ -78,6 +82,7 @@ public class ThetaCameraActivity extends ThetaActivity {
showProgressPopup();
new ShootTask(ThetaCameraActivity.this).execute();
mLiveView.setSource(null);
mLiveViewFailCount = 0;
}
});
......@@ -90,22 +95,54 @@ public class ThetaCameraActivity extends ThetaActivity {
Intent intent = new Intent();
intent.setClassName(getPackageName(), ThetaImageListActivity.class.getName());
startActivity(intent);
mLiveViewFailCount = 0;
}
});
//露出シークバー
settingSeekbar();
showProgressPopup();
startLiveCameraTask(false);
mLiveViewFailCount = 0;
mLiveView.setLiveCameraListenerListener(new MJpegView.LiveCameraListener() {
@Override
public void liveCameraPlayFail() {
mLiveViewFailCount++;
Logger.e(TAG,"mLiveViewFailCount = " + mLiveViewFailCount);
if (mLiveViewFailCount == LIVE_VIDEO_FAIL_MAX_COUNT) {
handler.post(new Runnable() {
@Override
public void run() {
mLiveView.setSource(null);
thetaConnectError(R.string.msg_theta_live_image_fail);
}
});
return;
}
startLiveCameraTask(true);
}
});
}
private void startLiveCameraTask(final boolean isFailRetry) {
int delayTime = LIVE_VIEW_START_DELAY;
if (isFailRetry) { //失敗時にはリトライを1秒後に行うように設定
delayTime = LIVE_VIEW_FAIL_START_DELAY;
}
handler.postDelayed(new Runnable() {
@Override
public void run() {
if (isFailRetry) {
showProgressPopup();
}
if (mLivePreviewTask != null) {
mLivePreviewTask.cancel(true);
}
mLivePreviewTask = new ShowLiveViewTask(ThetaCameraActivity.this);
mLivePreviewTask.execute();
}
}, LIVE_VIEW_START_DELAY);
}, delayTime);
}
//端末の戻るボタン禁止
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
......@@ -121,19 +158,18 @@ public class ThetaCameraActivity extends ThetaActivity {
@Override
protected void onPause() {
super.onPause();
mLiveView.stopPlay();
mLiveView.setSource(null);
}
@Override
protected void onResume() {
super.onResume();
mLiveView.play();
if (mLivePreviewTask != null) {
mLivePreviewTask.cancel(true);
mLivePreviewTask = new ShowLiveViewTask(this);
mLivePreviewTask.execute();
Logger.d(TAG, "super.onResume()");
if (mInitOnResumeFlg) { //初回呼ばれた時は実行しない。(初期表示時)
showProgressPopup();
startLiveCameraTask(false);
}
mInitOnResumeFlg = true;
}
@Override
protected void onDestroy() {
......@@ -189,8 +225,6 @@ public class ThetaCameraActivity extends ThetaActivity {
public void onStartTrackingTouch(SeekBar seekBar) {}
});
}
/**
......@@ -225,7 +259,7 @@ public class ThetaCameraActivity extends ThetaActivity {
mLiveView.setSource(mJpegInputStream);
new GetOptionExposureTask(ThetaCameraActivity.this).execute();
} else {
Logger.e("failed to start live view");
Logger.e(TAG, "failed to start live view");
thetaConnectError(R.string.msg_theta_live_image_fail);
}
}
......
......@@ -25,7 +25,7 @@ import jp.agentec.abook.abv.ui.viewer.activity.theta.ThetaCameraActivity;
*/
public class ShowLiveViewTask extends AsyncTask<Void, String, MJpegInputStream> {
private static final String TAG = "ShowLiveViewTask";
private static final int FAIL_RETRAY_DELAY_MILLIS = 500;
private static final int FAIL_RETRAY_DELAY_MILLIS = 1000;
private final WeakReference<ThetaCameraActivity> refActivity;
public ShowLiveViewTask(ThetaCameraActivity refActivity) {
......@@ -43,8 +43,20 @@ public class ShowLiveViewTask extends AsyncTask<Void, String, MJpegInputStream>
HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi);
InputStream is = camera.getLivePreview();
mjis = new MJpegInputStream(is);
//正常にライブ再生されるか確認
mjis.readMJpegFrame();
retryCount = MAX_RETRY_COUNT;
} catch (IOException e) {
Logger.e(TAG,"doInBackground fail e = " + e.toString());
if (mjis != null) {
try {
mjis.close();
} catch (IOException ex) {
Logger.e(TAG, "doInBackground fail ex = " + ex.toString());
}
}
try {
Thread.sleep(FAIL_RETRAY_DELAY_MILLIS);
} catch (InterruptedException e1) {
......
......@@ -72,9 +72,12 @@ public class OperationTaskLayout extends RelativeLayout {
super(context);
mContext = (ContentViewActivity)context;
if (isNormalSize) {
setPadding(0, 130, 0, 0);
}
// #39410 【Check】報告タブの上部にグレー帯と×ボタンが表示されない
// android 10 で setPaddingすると、Paddingの値分WebView が表示されないので
// setPaddingを実行せずに、WebViewを全画面表示にする。
//if (isNormalSize) {
// setPadding(0, 130, 0, 0);
//}
mWebView = new EnqueteWebView(context);
mWebView.setVerticalScrollbarOverlay(true); // スクロールバー部分の隙間を消す
......
......@@ -86,8 +86,8 @@ is_check_invalid_passward_limit=true
repeat_default=true
#Setting Info(設定画面のABookについての設定情報)
version_name=1.2.300
release_date=2020/07/06
version_name=1.2.301
release_date=2020/08/31
copy_right=2016 AGENTEC Co.,Ltd. All rights reserved.
hope_page=http://www.agentec.jp
contact_email=abook-appsupport@agentec.jp
......
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