Commit a8bb02dc by Kim Jinsung

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

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