Commit e1d1f60d by Kim Jinsung

Merge branch 'communication/develop_44464' into 'communication/develop'

Bug #44464 文書協業接続して、閉じて、プッシュメッセージからもう一度招待プッシュメッセージ受信すると、 作業一覧画面でプッシュメッセージが表示され、移動すると何もしない

See merge request !226
parents 1097d66e 3574cb4b
...@@ -1319,10 +1319,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -1319,10 +1319,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// 協業 // 協業
String messageText = json.getMessage(); String messageText = json.getMessage();
if (json.isCollaboration()) {
messageText = getString(R.string.msg_invite_collaboration);
}
Intent pushMsgDialog = new Intent(context, ShowPushMessageDailogActivity.class); Intent pushMsgDialog = new Intent(context, ShowPushMessageDailogActivity.class);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.message, messageText); pushMsgDialog.putExtra(AppDefType.PushMessageKey.message, messageText);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.data, json.getData()); pushMsgDialog.putExtra(AppDefType.PushMessageKey.data, json.getData());
......
...@@ -124,24 +124,31 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -124,24 +124,31 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
isMeetingRoomConnected = MeetingManager.getInstance().isConnected(); isMeetingRoomConnected = MeetingManager.getInstance().isConnected();
isCollabration = MeetingManager.getInstance().isCollaboration(); isCollabration = MeetingManager.getInstance().isCollaboration();
Bundle extras = getIntent().getExtras(); Bundle extras = getIntent().getExtras();
if (extras != null && !isMeetingRoomConnected) {
boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (isNewVersion) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent());
} else {
moveChatRoom(extras);
}
finish();
}
if (isMeetingRoomConnected || isCollabration) { if (isMeetingRoomConnected || isCollabration) {
showCannotMoveChatRoomDialog(); showCannotMoveChatRoomDialog();
} else {
if (extras != null) {
boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (isNewVersion) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent());
} else {
moveChatRoom(extras);
}
}
} }
dialog.dismiss();
} }
}); });
alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.CANCEL, getIntent()); setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.CANCEL, getIntent());
dialog.dismiss();
}
});
alertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
finish(); finish();
} }
}); });
...@@ -161,15 +168,20 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -161,15 +168,20 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
String collaborationType = extras.getString(AppDefType.ChatPushMessageKey.collaborationType); String collaborationType = extras.getString(AppDefType.ChatPushMessageKey.collaborationType);
String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType); String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType);
if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) { if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) {
if (StringUtil.isNullOrEmpty(collaborationType)) { ChatWebViewActivity chatWebViewActivity= activityHandlingHelper.getChatWebViewActivity();
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName, ChatWebViewActivity.class.getName(),""); if (chatWebViewActivity != null) {
chatWebViewActivity.reloadRoomViewCollaboration(roomId, roomName, collaborationType);
} else { } else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, if (StringUtil.isNullOrEmpty(collaborationType)) {
roomName, ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName, ChatWebViewActivity.class.getName(),"");
collaborationType, } else {
roomType, ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId,
ChatWebViewActivity.class.getName(), roomName,
""); collaborationType,
roomType,
ChatWebViewActivity.class.getName(),
"");
}
} }
} }
} }
......
...@@ -820,20 +820,18 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -820,20 +820,18 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
if (startPIP) { if (startPIP) {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClass(this, ChatWebViewActivity.class); intent.setClass(this, ChatWebViewActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra(ABookCommConstants.KEY.SID, chatData.sid); intent.putExtra(ABookCommConstants.KEY.SID, chatData.sid);
intent.putExtra(ABookCommConstants.KEY.ROOM_ID, chatData.roomId); intent.putExtra(ABookCommConstants.KEY.ROOM_ID, chatData.roomId);
intent.putExtra(ABookCommConstants.KEY.ROOM_NAME, chatData.roomName); intent.putExtra(ABookCommConstants.KEY.ROOM_NAME, chatData.roomName);
intent.putExtra(ABookCommConstants.KEY.ROOM_TYPE, chatData.roomType); intent.putExtra(ABookCommConstants.KEY.ROOM_TYPE, chatData.roomType);
intent.putExtra(ABookCommConstants.KEY.LOGIN_ID, chatData.loginId); intent.putExtra(ABookCommConstants.KEY.LOGIN_ID, chatData.loginId);
intent.putExtra(ABookCommConstants.KEY.SHOP_NAME, chatData.shopName); intent.putExtra(ABookCommConstants.KEY.SHOP_NAME, chatData.shopName);
intent.putExtra(ABookCommConstants.KEY.COLLABORATION_TYPE, chatData.getStrCollaborationType());
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName); intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName);
activityHandlingHelper.getCurrentActivity().startActivity(intent);
getApplication().startActivity(intent);
collaborationType = Integer.toString(0); collaborationType = Integer.toString(0);
startPIP = false; startPIP = false;
finish();
} }
} }
...@@ -1355,6 +1353,8 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -1355,6 +1353,8 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
public void exitMeetingRoom() { public void exitMeetingRoom() {
exitAndDeleteMeetingRoom(); exitAndDeleteMeetingRoom();
finishPIPMode(); finishPIPMode();
//関連資料画面閉じる
ActivityHandlingHelper.getInstance().finishCollaborationOperationRelatedContentActivity();
} }
public void finishPIP() { public void finishPIP() {
...@@ -1391,4 +1391,17 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -1391,4 +1391,17 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
// 最後のチャットのルーム // 最後のチャットのルーム
PreferenceUtil.putUserPref(getApplicationContext(), AppDefType.UserPrefKey.CHAT_LAST_ROOMID, roomId); PreferenceUtil.putUserPref(getApplicationContext(), AppDefType.UserPrefKey.CHAT_LAST_ROOMID, roomId);
} }
/**
* プッシュメッセージ受信し、既にChatWebViewActivityが表示中の時、WebViewリロードする。
* @param roomId ルームID
* @param roomName ルーム名
* @param collaborationType 協業タイプ
*/
public void reloadRoomViewCollaboration(Long roomId, String roomName, String collaborationType) {
chatData.roomId = roomId;
chatData.roomName = roomName;
chatData.setStrCollaborationType(collaborationType);
registChatRoomPageLoader();
}
} }
...@@ -851,6 +851,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -851,6 +851,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
} }
} }
/**
* 文書協業用の関連資料画面を閉じる
*/
public void finishCollaborationOperationRelatedContentActivity() {
if (!currentActivityStack.isEmpty()) {
for (ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof OperationRelatedContentActivity) {
activity.finish();
break;
}
}
}
}
public Stack<ABVAuthenticatedActivity> getCurrentActivityStack() { public Stack<ABVAuthenticatedActivity> getCurrentActivityStack() {
return currentActivityStack; return currentActivityStack;
} }
...@@ -1871,6 +1885,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1871,6 +1885,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
} }
/** /**
* 使用中のChatWebViewActivityを返す
* @return 使用中のChatWebViewActivity
*/
public ChatWebViewActivity getChatWebViewActivity() {
if (!currentActivityStack.isEmpty()) {
for (final ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof ChatWebViewActivity) {
return (ChatWebViewActivity)activity;
}
}
}
return null;
}
/**
* 設定画面から戻る用 * 設定画面から戻る用
* @return 設定画面へ遷移前の画面 * @return 設定画面へ遷移前の画面
*/ */
......
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