Commit a8bb02dc by Kim Jinsung

Bug #44047【ABook Communication】文書協業中にPIPモードではホスト変更ができない。

parent 24cb50a1
...@@ -1502,5 +1502,6 @@ ...@@ -1502,5 +1502,6 @@
<string name="msg_error_connection_error_meeting_room">会議室サーバに接続できませんでした。</string> <string name="msg_error_connection_error_meeting_room">会議室サーバに接続できませんでした。</string>
<string name="msg_fail_collaboration_not_action_allow">文書協業中には利用できない機能です。</string> <string name="msg_fail_collaboration_not_action_allow">文書協業中には利用できない機能です。</string>
<string name="msg_fail_collaboration_join_error">協業に参加することができませんでした。</string> <string name="msg_fail_collaboration_join_error">協業に参加することができませんでした。</string>
<string name="msg_fail_collaboration_pip_change_host">PIP状態ではホスト変更できません。PIPを解除してください。</string>
</resources> </resources>
...@@ -1507,4 +1507,5 @@ ...@@ -1507,4 +1507,5 @@
<string name="msg_error_connection_error_meeting_room">회의실 서버에 연결할 수 없습니다.</string> <string name="msg_error_connection_error_meeting_room">회의실 서버에 연결할 수 없습니다.</string>
<string name="msg_fail_collaboration_not_action_allow">문서협업 중에는 이용할 수 없는 기능입니다.</string> <string name="msg_fail_collaboration_not_action_allow">문서협업 중에는 이용할 수 없는 기능입니다.</string>
<string name="msg_fail_collaboration_join_error">협업에 참여하실수 없습니다.</string> <string name="msg_fail_collaboration_join_error">협업에 참여하실수 없습니다.</string>
<string name="msg_fail_collaboration_pip_change_host">PIP 상태에서는 호스트 변경이 불가능합니다. PIP 모드를 해제해 주세요.</string>
</resources> </resources>
\ No newline at end of file
...@@ -1503,4 +1503,5 @@ ...@@ -1503,4 +1503,5 @@
<string name="msg_error_connection_error_meeting_room">Could not connect to the meeting room server.</string> <string name="msg_error_connection_error_meeting_room">Could not connect to the meeting room server.</string>
<string name="msg_fail_collaboration_not_action_allow">This function cannot be used during document collaboration.</string> <string name="msg_fail_collaboration_not_action_allow">This function cannot be used during document collaboration.</string>
<string name="msg_fail_collaboration_join_error">Could not connect to the collaboration.</string> <string name="msg_fail_collaboration_join_error">Could not connect to the collaboration.</string>
<string name="msg_fail_collaboration_pip_change_host">Host change is not possible in PIP state. Please turn off picture-in-picture mode.</string>
</resources> </resources>
...@@ -126,7 +126,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -126,7 +126,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
private final CommunicationLogic communicationLogic = AbstractLogic.getLogic(CommunicationLogic.class); private final CommunicationLogic communicationLogic = AbstractLogic.getLogic(CommunicationLogic.class);
private boolean needHostAlert = false; private boolean needHostAlert = false;
private boolean mIsInPictureInPictureMode = false;
public Long getRoomID() { public Long getRoomID() {
return chatData.roomId; return chatData.roomId;
} }
...@@ -432,6 +432,25 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -432,6 +432,25 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
// message.equals で、 fermi側のHTMLを解析して、処理を分けている。 // message.equals で、 fermi側のHTMLを解析して、処理を分けている。
@Override @Override
public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) { public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) {
if (mIsInPictureInPictureMode) {
final ABookAlertDialog dialog = AlertDialogUtil
.createAlertDialog(activityHandlingHelper.getCurrentActivity(), R.string.app_name);
dialog.setMessage(R.string.msg_fail_collaboration_pip_change_host);
//PIP状態ではホスト変更できません。PIPを解除してください。
dialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
result.cancel();
}
});
//PIPモード画面が「戻る」ではなく、小さく全画面モードにされる問題対応
mChatWebView.removePIPIndicator();
dialog.show();
return true;
}
if (message.equals("Do you want to leave this room?")) { if (message.equals("Do you want to leave this room?")) {
message = getString(R.string.msg_chat_confirm_exit); message = getString(R.string.msg_chat_confirm_exit);
} else if (message.equals("Do you want to remove selected members from the list?")) { } else if (message.equals("Do you want to remove selected members from the list?")) {
...@@ -906,6 +925,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -906,6 +925,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
@Override @Override
public void onPictureInPictureModeChanged (boolean isInPictureInPictureMode, Configuration newConfig) { public void onPictureInPictureModeChanged (boolean isInPictureInPictureMode, Configuration newConfig) {
mIsInPictureInPictureMode = isInPictureInPictureMode;
if (isInPictureInPictureMode) { if (isInPictureInPictureMode) {
// true になったら、PIPのインディケーターを消す // true になったら、PIPのインディケーターを消す
mChatWebView.removePIPIndicator(); mChatWebView.removePIPIndicator();
...@@ -1335,7 +1355,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -1335,7 +1355,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
* PIPモードに変更 * PIPモードに変更
*/ */
public void startPIPMode() { public void startPIPMode() {
if (!startPIP) { if (!mIsInPictureInPictureMode) {
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder(); PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build()); enterPictureInPictureMode(mPipBuilder.build());
startPIP = true; startPIP = true;
...@@ -1354,6 +1374,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -1354,6 +1374,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
ActivityHandlingHelper.getInstance().finishCollaborationOperationRelatedContentActivity(); ActivityHandlingHelper.getInstance().finishCollaborationOperationRelatedContentActivity();
//コンテンツ閲覧画面閉じる //コンテンツ閲覧画面閉じる
ActivityHandlingHelper.getInstance().finishAllContentViewActivity(); ActivityHandlingHelper.getInstance().finishAllContentViewActivity();
mIsInPictureInPictureMode = false;
} }
public void finishPIP() { public void finishPIP() {
......
...@@ -490,7 +490,8 @@ public class ChatWebView extends WebView { ...@@ -490,7 +490,8 @@ public class ChatWebView extends WebView {
@JavascriptInterface @JavascriptInterface
public void finishPIP() { public void finishPIP() {
chatActivity.finishPIP(); Logger.d(TAG, "finishPIP");
//Androidの場合、PIP解除はできないので、不要(リクエスト要請時に呼ばれる)
} }
@JavascriptInterface @JavascriptInterface
......
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