Commit 6ae3e3c6 by Lee Munkyeong

Merge branch 'communication/feature/42996' into 'communication/develop'

43094対応

See merge request !176
parents a168da56 ee0e39b9
...@@ -1515,6 +1515,8 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1515,6 +1515,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 {
...@@ -1530,14 +1532,15 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1530,14 +1532,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();
...@@ -1546,31 +1549,32 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1546,31 +1549,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
...@@ -1715,12 +1719,12 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1715,12 +1719,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'));");
...@@ -1823,7 +1827,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1823,7 +1827,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
mChatWebView.loadUrl("javascript:$('.pip_indicator').removeClass('none');"); mChatWebView.loadUrl("javascript:$('.pip_indicator').removeClass('none');");
} else { } else {
if (isStop) { if (isStop) {
exitAndDeleteMeetingRoom(); mChatWebView.loadUrl("javascript:Coview_exitCollaboration();");
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClass(getApplicationContext(), OperationListActivity.class); intent.setClass(getApplicationContext(), OperationListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK);
......
...@@ -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,7 +886,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -886,7 +886,7 @@ 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);
boolean isCollaboration = false; isCollaboration = false;
ChatWebViewActivity chatWebViewActivity = getActivity(ChatWebViewActivity.class); ChatWebViewActivity chatWebViewActivity = getActivity(ChatWebViewActivity.class);
if (chatWebViewActivity != null && chatWebViewActivity.isInPictureInPictureMode()) { if (chatWebViewActivity != null && chatWebViewActivity.isInPictureInPictureMode()) {
isCollaboration = true; isCollaboration = true;
...@@ -1115,10 +1115,13 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1115,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;
} }
...@@ -1256,36 +1259,43 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1256,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;
}
});
}
} }
/** /**
...@@ -1328,6 +1338,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1328,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();
} }
......
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