Commit 96ae6880 by Kim Jinsung

Merge branch 'communication/develop_kimjs' into 'communication/develop'

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

See merge request !233
parents 24cb50a1 36c20533
......@@ -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>
......@@ -231,7 +231,7 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
textMessage.contains(ABookCommConstants.COLLABORATION.INVITE_COLLABORATION.JP) ||
textMessage.contains(ABookCommConstants.COLLABORATION.INVITE_COLLABORATION.KR)
) {
roomType = Integer.toString(json.getInt(AppDefType.ChatPushMessageKey.roomType));
// roomType = Integer.toString(json.getInt(AppDefType.ChatPushMessageKey.roomType));
collaborationType = collaborationTypeToNum(textMessage);
}
String roomName = json.getString(AppDefType.ChatPushMessageKey.roomName);
......
......@@ -62,8 +62,9 @@ public class PushMessageJSON {
public String getRoomType() {
try {
int roomType = jsonObject.getInt(AppDefType.ChatPushMessageKey.roomType);
return Integer.toString(roomType);
// int roomType = jsonObject.getInt(AppDefType.ChatPushMessageKey.roomType);
// return Integer.toString(roomType);
return "";
} catch (Exception e){
return "";
}
......
......@@ -1276,10 +1276,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
* プッシュメッセージがあるので、チャットルームに遷移する。
*/
public boolean goChatRoom(final Intent intent, final String targetActivityName, final String baseActivityName) {
//一度チャットルームを開いたのかチェックし、開いたらい何もしない
if (!getABVUIDataCache().isChatPushMessageOpenOperationList) {
return false;
}
if (!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
......@@ -1306,7 +1302,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
}
}
}, 500);
getABVUIDataCache().isChatPushMessageOpenOperationList = false;
return true;
}
return false;
......
......@@ -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() {
......
......@@ -582,8 +582,12 @@ public class OperationListActivity extends ABVUIActivity {
screenRefresh();
// プッシュメッセージがある場合の処理
if (goChatRoom(getIntent(), ChatWebViewActivity.class.getName(), OperationListActivity.class.getName())) {
return;
//一度チャットルームを開いたのかチェックし、開いたらい何もしない
if (getABVUIDataCache().isChatPushMessageOpenOperationList) {
if (goChatRoom(getIntent(), ChatWebViewActivity.class.getName(), OperationListActivity.class.getName())) {
getABVUIDataCache().isChatPushMessageOpenOperationList = false;
return;
}
}
// 報告画面から作業一覧へ戻った時の同期処理
......
......@@ -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