Commit 7362826b by Lee Munkyeong

Merge branch 'communication/develop' of…

Merge branch 'communication/develop' of https://gitlab.agentec.jp/abook_android/abook_check into communication/feature/finish_all_collaboration
parents b2e86c83 6ae3e3c6
Subproject commit 76f2642396962fb9b6e8bb35a2aaa8a9949075d0 Subproject commit b4450c27e35d46a203c6b12e2656baebef9b80bd
...@@ -494,7 +494,7 @@ ...@@ -494,7 +494,7 @@
<string name="ReportReply">報告(回答)</string> <string name="ReportReply">報告(回答)</string>
<string name="content_link_update">資料名「%1$s」は更新状態となります。\n更新しますか?</string> <string name="content_link_update">資料名「%1$s」は更新状態となります。\n更新しますか?</string>
<string name="msg_non_target_meeting_content">遠隔支援中には対象外の資料なので、開けません。</string> <string name="msg_non_target_meeting_content">遠隔支援中には対象外の資料なので、開けません。</string>
<string name="msg_non_target_collaboration_content">協業中は閲覧できない資料です。</string>
<string name="msg_help_operation_list_list_view">リスト表示に変更できます。</string> <string name="msg_help_operation_list_list_view">リスト表示に変更できます。</string>
<string name="msg_help_operation_list_panel_view">パネル表示に変更できます。</string> <string name="msg_help_operation_list_panel_view">パネル表示に変更できます。</string>
<string name="msg_help_operation_list_filter">表示する作業の種類を選択できます。</string> <string name="msg_help_operation_list_filter">表示する作業の種類を選択できます。</string>
...@@ -1482,6 +1482,10 @@ ...@@ -1482,6 +1482,10 @@
<string name="msg_confirm_send_host_change">ホスト権限変更の依頼があります。変更しますか?</string> <string name="msg_confirm_send_host_change">ホスト権限変更の依頼があります。変更しますか?</string>
<string name="msg_confirm_share_image">キャプチャーした写真を共有しますか?</string> <string name="msg_confirm_share_image">キャプチャーした写真を共有しますか?</string>
<string name="msg_invite_collaboration">協業に招待されました。</string> <string name="msg_invite_collaboration">協業に招待されました。</string>
<string name="msg_wait_for_host">ホストが文書を選択中です</string>
<string name="msg_rejected_by_host">ホストの変更依頼は拒否されました。</string>
<string name="msg_invalid_parameters">通信に失敗しました。チャットルームに戻ります。</string>
<!-- 連続作業 --> <!-- 連続作業 -->
<string name="msg_error_all_process_delete">全削除の送信に失敗しました。</string> <string name="msg_error_all_process_delete">全削除の送信に失敗しました。</string>
<string name="msg_ozd_file_could_not_opened">帳票ファイルを開くことができませんでした。</string> <string name="msg_ozd_file_could_not_opened">帳票ファイルを開くことができませんでした。</string>
......
...@@ -497,7 +497,7 @@ ...@@ -497,7 +497,7 @@
<string name="ReportReply">보고(응답)</string> <string name="ReportReply">보고(응답)</string>
<string name="content_link_update">자료명[%1$s]는 업데이트 가능한 상태입니다.\n업데이트 하시겠습니까?</string> <string name="content_link_update">자료명[%1$s]는 업데이트 가능한 상태입니다.\n업데이트 하시겠습니까?</string>
<string name="msg_non_target_meeting_content">원격 지원 접속 중에는 열람할 수 없는 자료입니다.</string> <string name="msg_non_target_meeting_content">원격 지원 접속 중에는 열람할 수 없는 자료입니다.</string>
<string name="msg_non_target_collaboration_content">협업중에는 열람할 수 없는 자료입니다.</string>
<string name="msg_help_operation_list_list_view">리스트 표시로 변경 가능합니다.</string> <string name="msg_help_operation_list_list_view">리스트 표시로 변경 가능합니다.</string>
<string name="msg_help_operation_list_panel_view">패널 표시로 변경 가능합니다.</string> <string name="msg_help_operation_list_panel_view">패널 표시로 변경 가능합니다.</string>
<string name="msg_help_operation_list_filter">표시할 작업의 종류를 선택 가능합니다.</string> <string name="msg_help_operation_list_filter">표시할 작업의 종류를 선택 가능합니다.</string>
...@@ -1490,4 +1490,7 @@ ...@@ -1490,4 +1490,7 @@
<string name="msg_confirm_send_host_change">방장 권한을 전달 받으시겠습니까?</string> <string name="msg_confirm_send_host_change">방장 권한을 전달 받으시겠습니까?</string>
<string name="msg_confirm_share_image">캡쳐한 사진을 공유 하시겠습니까?</string> <string name="msg_confirm_share_image">캡쳐한 사진을 공유 하시겠습니까?</string>
<string name="msg_invite_collaboration">협업에 초대되셨습니다.</string> <string name="msg_invite_collaboration">협업에 초대되셨습니다.</string>
<string name="msg_wait_for_host">호스트가 문서를 선택중입니다.</string>
<string name="msg_rejected_by_host">호스트가 요청을 거절하셨습니다.</string>
<string name="msg_invalid_parameters">통신에 실패했습니다. 채팅룸으로 돌아갑니다.</string>
</resources> </resources>
\ No newline at end of file
...@@ -501,7 +501,7 @@ ...@@ -501,7 +501,7 @@
<string name="ReportReply">ReportReply</string> <string name="ReportReply">ReportReply</string>
<string name="content_link_update">The document name [%1$s] will be updated. \nDo you want to update it?</string> <string name="content_link_update">The document name [%1$s] will be updated. \nDo you want to update it?</string>
<string name="msg_non_target_meeting_content">It is the document that can not be read during distance support connection.</string> <string name="msg_non_target_meeting_content">It is the document that can not be read during distance support connection.</string>
<string name="msg_non_target_collaboration_content">It is the document that can not be read during collaboration.</string>
<string name="msg_help_operation_list_list_view">You can change to list display.</string> <string name="msg_help_operation_list_list_view">You can change to list display.</string>
<string name="msg_help_operation_list_panel_view">You can change to panel display.</string> <string name="msg_help_operation_list_panel_view">You can change to panel display.</string>
<string name="msg_help_operation_list_filter">You can select the type of work to be displayed.</string> <string name="msg_help_operation_list_filter">You can select the type of work to be displayed.</string>
...@@ -1487,4 +1487,7 @@ ...@@ -1487,4 +1487,7 @@
<string name="msg_confirm_send_host_change">Do you want to receive host permissions?</string> <string name="msg_confirm_send_host_change">Do you want to receive host permissions?</string>
<string name="msg_confirm_share_image">Do you want to share captured image?</string> <string name="msg_confirm_share_image">Do you want to share captured image?</string>
<string name="msg_invite_collaboration">You are invited to collaboration.</string> <string name="msg_invite_collaboration">You are invited to collaboration.</string>
<string name="msg_wait_for_host">Please wait for selecting document by host</string>
<string name="msg_rejected_by_host">Rejected host request.</string>
<string name="msg_invalid_parameters">Communication failed. Return to the chat room.</string>
</resources> </resources>
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/related_content_third_linear"
android:orientation="vertical" > android:orientation="vertical" >
<FrameLayout <FrameLayout
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/related_content_third_linear"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout <FrameLayout
......
...@@ -572,7 +572,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -572,7 +572,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
return; return;
} }
textView.setVisibility(View.GONE); textView.setVisibility(View.GONE);
if (isVisible) { if (isVisible && !isCollaboration) {
if (meetingManager.isConnected() && meetingManager.isOwner()) { if (meetingManager.isConnected() && meetingManager.isOwner()) {
textView.setVisibility(View.VISIBLE); textView.setVisibility(View.VISIBLE);
CommonExecutor.execute(new Runnable() { CommonExecutor.execute(new Runnable() {
......
...@@ -61,6 +61,8 @@ import java.util.List; ...@@ -61,6 +61,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Stack; import java.util.Stack;
import java.util.Timer;
import java.util.TimerTask;
import jp.agentec.abook.abv.bl.acms.client.AcmsClient; import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
import jp.agentec.abook.abv.bl.acms.client.json.ArchiveDetailJSON; import jp.agentec.abook.abv.bl.acms.client.json.ArchiveDetailJSON;
...@@ -147,6 +149,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -147,6 +149,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
private String mSkey; private String mSkey;
private Integer joinMeetingId; private Integer joinMeetingId;
private boolean isPIP; private boolean isPIP;
private boolean isStop;
private String encodedFilePath; private String encodedFilePath;
private Uri encodedVideoPath; private Uri encodedVideoPath;
...@@ -383,6 +386,13 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -383,6 +386,13 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
mChatWebView.loadUrl("javascript:$('#userNameCardInCollaboration').modal('hide');"); mChatWebView.loadUrl("javascript:$('#userNameCardInCollaboration').modal('hide');");
result.confirm(); result.confirm();
return true; return true;
} else if (message.contains("REJECT for owner user")) {
mChatWebView.loadUrl("javascript:$('#userNameCardInCollaboration').modal('hide');");
mChatWebView.loadUrl("javascript:$('#hostRequestModal').modal('hide');");
mChatWebView.loadUrl("javascript:$('#userNameCardInCollaboration').modal('hide');");
message = getString(R.string.msg_rejected_by_host);
} else if (message.contains("Invalid Parameters")) {
message = getString(R.string.msg_invalid_parameters);
} }
final String tempMessage = message; final String tempMessage = message;
...@@ -406,6 +416,12 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -406,6 +416,12 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
} else if (tempMessage.equals(getString(R.string.msg_error_chat_join))) { } else if (tempMessage.equals(getString(R.string.msg_error_chat_join))) {
getLogin(); getLogin();
finish(); finish();
} else if (tempMessage.equals(getString(R.string.msg_invalid_parameters))) {
if (roomId != null) {
mChatWebView.loadUrl(String.format("javascript:CHAT_UI.joinRoom('%s', '%s');", roomId.toString(), roomName.toString()));
} else {
mChatWebView.loadUrl(CHAT_PAGE_URL);
}
} }
} }
}); });
...@@ -442,7 +458,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -442,7 +458,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
} else if (message.equals("캡쳐한 사진을 공유 하시겠습니까?")) { } else if (message.equals("캡쳐한 사진을 공유 하시겠습니까?")) {
message = getString(R.string.msg_confirm_share_image); message = getString(R.string.msg_confirm_share_image);
} }
ABookAlertDialog confirmAlert = AlertDialogUtil.createAlertDialog(ChatWebViewActivity.this, R.string.app_name); final ABookAlertDialog confirmAlert = AlertDialogUtil.createAlertDialog(ChatWebViewActivity.this, R.string.app_name);
confirmAlert.setMessage(message); confirmAlert.setMessage(message);
if (message.equals(getString(R.string.msg_error_already_exist_same_room))) { if (message.equals(getString(R.string.msg_error_already_exist_same_room))) {
...@@ -1504,6 +1520,8 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1504,6 +1520,8 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
@JavascriptInterface @JavascriptInterface
public int createContentView() { public int createContentView() {
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
Integer meetingId = null; Integer meetingId = null;
meetingManager.close(); meetingManager.close();
try { try {
...@@ -1519,14 +1537,15 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1519,14 +1537,15 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
} catch (Exception e) { } catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');"); mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
} }
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
startContentListActivity(true); startContentListActivity(true);
return meetingId.intValue(); return meetingId.intValue();
} }
@JavascriptInterface @JavascriptInterface
public void startContentView() { public void startContentView() throws InterruptedException {
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
startContentListActivity(false);
meetingManager.close(); meetingManager.close();
try { try {
connectMeetingServer(); connectMeetingServer();
...@@ -1535,31 +1554,32 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1535,31 +1554,32 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
} catch (Exception e) { } catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');"); mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
} }
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
startContentListActivity(false);
} }
@JavascriptInterface @JavascriptInterface
public void joinMeetingRoom(int newMeetingId) { public void joinMeetingRoom(int newMeetingId) throws InterruptedException {
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
startContentListActivity(false);
meetingManager.close(); meetingManager.close();
try { try {
connectMeetingServer(); connectMeetingServer();
List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey); List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey);
meetingManager.join(newMeetingId, mSkey, roomId.toString(), false); meetingManager.join(joinMeetingId, mSkey, roomId.toString(), false);
} catch (Exception e) { } catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');"); mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
} }
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
startContentListActivity(false);
} }
@JavascriptInterface @JavascriptInterface
public void startPipMode() { public void startPipMode() {
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder(); PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build()); enterPictureInPictureMode(mPipBuilder.build());
}
@JavascriptInterface
public void exitPIPmode() {
finishPIPmode();
} }
@JavascriptInterface @JavascriptInterface
...@@ -1704,12 +1724,12 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1704,12 +1724,12 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
.insertFavoriteGroup(sid, Integer.parseInt(groupId)); .insertFavoriteGroup(sid, Integer.parseInt(groupId));
return result; return result;
} }
@Override @Override
public void onBackPressed() { public void onBackPressed() {
super.onBackPressed(); super.onBackPressed();
} }
private void moveCollaborationScreen(Integer collaborationType) { private void moveCollaborationScreen(Integer collaborationType) {
if (collaborationType.equals(ABookCommConstants.FLAG.COLLABORATION_TYPE.DOCUMENT) && !isValidVersion()) { if (collaborationType.equals(ABookCommConstants.FLAG.COLLABORATION_TYPE.DOCUMENT) && !isValidVersion()) {
mChatWebView.loadUrl("javascript:alert(getLocalizedString('not_support_version'));"); mChatWebView.loadUrl("javascript:alert(getLocalizedString('not_support_version'));");
...@@ -1811,6 +1831,13 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1811,6 +1831,13 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
if (isInPictureInPictureMode) { if (isInPictureInPictureMode) {
mChatWebView.loadUrl("javascript:$('.pip_indicator').removeClass('none');"); mChatWebView.loadUrl("javascript:$('.pip_indicator').removeClass('none');");
} else { } else {
if (isStop) {
mChatWebView.loadUrl("javascript:Coview_exitCollaboration();");
Intent intent = new Intent();
intent.setClass(getApplicationContext(), OperationListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent, NaviConsts.Left);
}
mChatWebView.loadUrl("javascript:$('.pip_indicator').addClass('none');"); mChatWebView.loadUrl("javascript:$('.pip_indicator').addClass('none');");
if (!meetingManager.isConnected()) { if (!meetingManager.isConnected()) {
mChatWebView.loadUrl("javascript:$('.start_pip_btn').addClass('none');"); mChatWebView.loadUrl("javascript:$('.start_pip_btn').addClass('none');");
...@@ -1818,6 +1845,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1818,6 +1845,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
} }
} }
// 共通資料画面表示 // 共通資料画面表示
private void showCommonContent() { private void showCommonContent() {
Intent intent = new Intent(); Intent intent = new Intent();
...@@ -1877,6 +1905,21 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1877,6 +1905,21 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
} }
@Override @Override
protected void onResume() {
isStop = false;
super.onResume();
if (mChatWebView.getUrl() != null && mChatWebView.getUrl().equals(CHAT_ROOM_PAGE_URL)) {
mChatWebView.loadUrl("javascript:CHAT_SOCKET.socketCheck();");
}
}
@Override
protected void onStop() {
isStop = true;
super.onStop();
}
@Override
public void onDestroy(){ public void onDestroy(){
exitAndDeleteMeetingRoom(); exitAndDeleteMeetingRoom();
super.onDestroy(); super.onDestroy();
......
...@@ -2,10 +2,15 @@ package jp.agentec.abook.abv.ui.home.activity; ...@@ -2,10 +2,15 @@ package jp.agentec.abook.abv.ui.home.activity;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.graphics.Color;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.Gravity;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.LinearLayout; import android.widget.LinearLayout;
...@@ -66,6 +71,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -66,6 +71,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
private List<CategoryContentDto> mOperationContentList; private List<CategoryContentDto> mOperationContentList;
private LinearLayout mToolbar; private LinearLayout mToolbar;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class); private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
TextView mWaitOwnerTextView;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
...@@ -304,7 +310,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -304,7 +310,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
public void run() { public void run() {
final ABookAlertDialog nonTargetMeetingContentDialog = AlertDialogUtil.createAlertDialog(OperationRelatedContentActivity.this, R.string.app_name); final ABookAlertDialog nonTargetMeetingContentDialog = AlertDialogUtil.createAlertDialog(OperationRelatedContentActivity.this, R.string.app_name);
nonTargetMeetingContentDialog.setCancelable(false); nonTargetMeetingContentDialog.setCancelable(false);
nonTargetMeetingContentDialog.setMessage(R.string.msg_non_target_meeting_content); nonTargetMeetingContentDialog.setMessage(isCollaboration? R.string.msg_non_target_meeting_content : R.string.msg_non_target_meeting_content);
nonTargetMeetingContentDialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { nonTargetMeetingContentDialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int whichButton) { public void onClick(DialogInterface dialog, int whichButton) {
...@@ -501,7 +507,11 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -501,7 +507,11 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
} }
} }
} }
mAllSaveButton.setVisibility(visible); if (isCollaboration) {
mAllSaveButton.setVisibility(isCollaborationOwner ? visible : View.GONE);
} else {
mAllSaveButton.setVisibility(visible);
}
} }
}); });
} }
...@@ -511,16 +521,19 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -511,16 +521,19 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
activityHandlingHelper.removeContentViewActivity(activityHandlingHelper.getContentViewActivity()); activityHandlingHelper.removeContentViewActivity(activityHandlingHelper.getContentViewActivity());
hideBottomToolbar(); hideBottomToolbar();
if (isCollaborationOwner) { if (isCollaborationOwner) {
closeProgressPopup(); hideWaitOwnerSelect();
showContentList(); showContentList();
mAllSaveButton.setVisibility(View.VISIBLE);
} else { } else {
showProgressPopup(); showWaitOwnerSelect();
hideContentList(); hideContentList();
mAllSaveButton.setVisibility(View.GONE);
} }
} else { } else {
closeProgressPopup(); hideWaitOwnerSelect();
showBottomToolbar(); showBottomToolbar();
showContentList(); showContentList();
mAllSaveButton.setVisibility(View.VISIBLE);
} }
} }
...@@ -543,4 +556,31 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -543,4 +556,31 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
public void onClickSetting(View v) { public void onClickSetting(View v) {
showSetting(); showSetting();
} }
public void showWaitOwnerSelect() {
if (mWaitOwnerTextView != null) {
mWaitOwnerTextView.setVisibility(View.VISIBLE);
return;
}
Display display = getWindowManager().getDefaultDisplay();
DisplayMetrics outMetrics = new DisplayMetrics ();
display.getMetrics(outMetrics);
LinearLayout container = (LinearLayout) findViewById(R.id.related_content_third_linear);
mWaitOwnerTextView = new TextView(this);
mWaitOwnerTextView.setText(getString(R.string.msg_wait_for_host));
mWaitOwnerTextView.setGravity(Gravity.CENTER);
mWaitOwnerTextView.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
LinearLayout mainLayout = (LinearLayout) findViewById(R.id.related_content_main_linear);
mWaitOwnerTextView.setHeight((int) (outMetrics.heightPixels / 2));
mWaitOwnerTextView.setTextSize(20);
mWaitOwnerTextView.setTextColor(Color.BLACK);
container.addView(mWaitOwnerTextView);
mWaitOwnerTextView.setVisibility(View.VISIBLE);
}
public void hideWaitOwnerSelect() {
if (mWaitOwnerTextView != null) {
mWaitOwnerTextView.setVisibility(View.GONE);
}
}
} }
...@@ -120,7 +120,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -120,7 +120,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
private long lastDisconnect; private long lastDisconnect;
private static Dialog meetingAlertDialog; private static Dialog meetingAlertDialog;
private ABVUIActivity previousOfSettingActivity; private ABVUIActivity previousOfSettingActivity;
private boolean isCollaboration;
// Chat // Chat
private ParentWebViewActivity previousOfSettingActivity2; private ParentWebViewActivity previousOfSettingActivity2;
...@@ -886,8 +886,12 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -886,8 +886,12 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
final String cmd = json.getString(MeetingManager.CMD); final String cmd = json.getString(MeetingManager.CMD);
final long contentId = JsonUtil.getLong(json, MeetingManager.CONTENTID); final long contentId = JsonUtil.getLong(json, MeetingManager.CONTENTID);
final int pageNumber = JsonUtil.getInt(json, MeetingManager.PAGE_NUMBER); final int pageNumber = JsonUtil.getInt(json, MeetingManager.PAGE_NUMBER);
isCollaboration = false;
if (cmd.equals(MeetingManager.CMD_MEETINGINFO)) { // 入室結果 ChatWebViewActivity chatWebViewActivity = getActivity(ChatWebViewActivity.class);
if (chatWebViewActivity != null && chatWebViewActivity.isInPictureInPictureMode()) {
isCollaboration = true;
}
if (cmd.equals(MeetingManager.CMD_MEETINGINFO) && !isCollaboration) { // 入室結果
showToast(mContext.getString(meetingManager.isOwner() ? R.string.msg_enter_as_publisher : R.string.msg_enter_as_subscriber)); showToast(mContext.getString(meetingManager.isOwner() ? R.string.msg_enter_as_publisher : R.string.msg_enter_as_subscriber));
return; return;
} }
...@@ -1111,10 +1115,13 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1111,10 +1115,13 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
*/ */
public boolean checkContent(final long contentId, int page) { public boolean checkContent(final long contentId, int page) {
try { try {
final ContentDto contentDto = contentDao.getContent(contentId); final ContentDto contentDto = contentDao.getContent(contentId);
if (contentDto == null) { if (contentDto == null) {
Logger.e(TAG, "Content not found. contentId=" + contentId); Logger.e(TAG, "Content not found. contentId=" + contentId);
showToast(mContext.getString(R.string.no_content_need_refresh)); if (!isCollaboration) {
showToast(mContext.getString(R.string.no_content_need_refresh));
}
return false; return false;
} }
...@@ -1252,36 +1259,43 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1252,36 +1259,43 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
} }
String unAuthorizedContentDownloadMsg = getCurrentActivity().getString(R.string.request_download_un_authorized_content); String unAuthorizedContentDownloadMsg = getCurrentActivity().getString(R.string.request_download_un_authorized_content);
final boolean isNoAuthorizedContentDownloadRequest = contentName.equals(unAuthorizedContentDownloadMsg); final boolean isNoAuthorizedContentDownloadRequest = contentName.equals(unAuthorizedContentDownloadMsg);
if (isCollaboration) {
downloadConfirmDialog = AlertDialogUtil.createAlertDialog(getCurrentActivity(), R.string.confirm); if (isNoAuthorizedContentDownloadRequest) {
downloadConfirmDialog.setCancelable(false); downloadUnAuthorizedContentInfo(contentId);
if (isNoAuthorizedContentDownloadRequest) { }
downloadConfirmDialog.setMessage(unAuthorizedContentDownloadMsg); downloadContent(contentId);
downloadConfirmDialog = null;
} else { } else {
downloadConfirmDialog.setMessage(String.format(mContext.getString(R.string.no_content2), contentName)); downloadConfirmDialog = AlertDialogUtil.createAlertDialog(getCurrentActivity(), R.string.confirm);
} downloadConfirmDialog.setCancelable(false);
downloadConfirmDialog.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { if (isNoAuthorizedContentDownloadRequest) {
@Override downloadConfirmDialog.setMessage(unAuthorizedContentDownloadMsg);
public void onClick(DialogInterface dialog, int whichButton) { } else {
downloadConfirmDialog.dismiss(); downloadConfirmDialog.setMessage(String.format(mContext.getString(R.string.no_content2), contentName));
//権限の無いコンテンツの場合:コンテンツ情報を先にダウンロード
if (isNoAuthorizedContentDownloadRequest) {
downloadUnAuthorizedContentInfo(contentId);
}
downloadContent(contentId);
downloadConfirmDialog = null;
} }
}); downloadConfirmDialog.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
downloadConfirmDialog.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() { @Override
@Override public void onClick(DialogInterface dialog, int whichButton) {
public void onClick(DialogInterface dialog, int whichButton) { downloadConfirmDialog.dismiss();
downloadConfirmDialog.dismiss(); //権限の無いコンテンツの場合:コンテンツ情報を先にダウンロード
if (meetingManager.isConnected()) { if (isNoAuthorizedContentDownloadRequest) {
meetingManager.setPaused(false); downloadUnAuthorizedContentInfo(contentId);
}
downloadContent(contentId);
downloadConfirmDialog = null;
} }
downloadConfirmDialog = null; });
} downloadConfirmDialog.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
}); @Override
public void onClick(DialogInterface dialog, int whichButton) {
downloadConfirmDialog.dismiss();
if (meetingManager.isConnected()) {
meetingManager.setPaused(false);
}
downloadConfirmDialog = null;
}
});
}
} }
/** /**
...@@ -1324,6 +1338,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1324,6 +1338,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
*/ */
private void showDownloadConfirm(final long contentId, String contentName) { private void showDownloadConfirm(final long contentId, String contentName) {
createDownloadConfirm(contentId, contentName); createDownloadConfirm(contentId, contentName);
if (isCollaboration) {
return;
}
downloadConfirmDialog.show(); downloadConfirmDialog.show();
} }
......
...@@ -710,6 +710,11 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -710,6 +710,11 @@ public class ContentViewActivity extends ABVContentViewActivity {
setToolbarVisableForTask(true); setToolbarVisableForTask(true);
} }
} }
if (isCollaboration) {
mPageNumberLayout.setVisibility(View.GONE);
mSeekBarLayout.setVisibility(View.GONE);
}
} }
private void configureSize() { private void configureSize() {
...@@ -949,6 +954,7 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -949,6 +954,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
}); });
if (isCollaboration) { if (isCollaboration) {
titleTxt.setVisibility(View.GONE);
pauseBtn.setVisibility(View.GONE); pauseBtn.setVisibility(View.GONE);
exitMeetingBtn.setVisibility(View.GONE); exitMeetingBtn.setVisibility(View.GONE);
exitBtn.setVisibility(View.GONE); exitBtn.setVisibility(View.GONE);
...@@ -1411,6 +1417,7 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -1411,6 +1417,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
marking.setVisibility(View.GONE); marking.setVisibility(View.GONE);
bookmark.setVisibility(View.GONE); bookmark.setVisibility(View.GONE);
subMenuBtn.setVisibility(View.GONE); subMenuBtn.setVisibility(View.GONE);
tvContentTitle.setVisibility(View.GONE);
} }
} }
...@@ -1780,6 +1787,12 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -1780,6 +1787,12 @@ public class ContentViewActivity extends ABVContentViewActivity {
// ページ番号を表示する // ページ番号を表示する
setCurrentPageNumber(); setCurrentPageNumber();
} }
if (isCollaboration) {
mPageNumberLayout.setVisibility(View.GONE);
mSeekBarLayout.setVisibility(View.GONE);
bookmark.setVisibility(View.GONE);
}
} }
else { else {
if (hasMultiPages) { if (hasMultiPages) {
...@@ -1882,7 +1895,7 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -1882,7 +1895,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
} }
} else { } else {
TranslateAnimation toolBarAnimation; TranslateAnimation toolBarAnimation;
if (mToolBar.getVisibility() == View.GONE) { if (mToolBar.getVisibility() == View.GONE && !(meetingManager.isSubscribed() && isCollaboration)) {
setToolbarVisable(true); setToolbarVisable(true);
toolBarAnimation = new TranslateAnimation(0, 0, -mToolBar.getHeight(), 0); toolBarAnimation = new TranslateAnimation(0, 0, -mToolBar.getHeight(), 0);
Logger.d(TAG, "[singleTapMotion]:[mToolBar]:VISIBLE"); Logger.d(TAG, "[singleTapMotion]:[mToolBar]:VISIBLE");
......
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