Commit ac47e259 by onuma

遠隔支援(会議室)接続中には、プッシュメッセージを受信してもチャットに行かないように修正。

parent a1f1b4e5
......@@ -1490,7 +1490,7 @@
<string name="msg_destroy_exist_collaboration">進行中の協業が存在します。既存協業を終了し、新しい協業を開始してもよろしいですか</string>
<string name="not_found_camera">利用可能なカメラを見つかりませんでした。</string>
<string name="error_fail_record">レコーディングに失敗しました。管理者にお問い合わせしてください。</string>
<string name="chat_open_fail_meeting_connected">会議室接続中にはチャットルームは開けません。</string>
<string name="chat_open_fail_meeting_connected">遠隔支援中にはチャットルームは開けません。</string>
<string name="chat_open_fail_collaborattion_connected">協業中にはチャットルームは開けません。</string>
<!-- 連続作業 -->
<string name="msg_error_all_process_delete">全削除の送信に失敗しました。</string>
......
......@@ -1498,7 +1498,7 @@
<string name="not_found_camera">사용 가능한 카메라 기기를 찾을수 없습니다.</string>
<string name="msg_destroy_exist_collaboration">진행중인 협업이 존재합니다. 기존 협업을 종료하고 새로운 협업을 시작 하시겠습니까?</string>
<string name="error_fail_record">레코드에 실패했습니다. 관리자에게 문의해주세요.</string>
<string name="chat_open_fail_meeting_connected">회의실 접속 중에는 채팅방을 열수 없습니다.</string>
<string name="chat_open_fail_meeting_connected">원격 지원 접속 중에는 채팅방을 열 수 없습니다.</string>
<string name="chat_open_fail_collaborattion_connected">문서협업 접속 중에는 채팅방을 열수 없습니다.</string>
<!-- Communication 会議室 -->
<string name="msg_error_favorites_100_over">즐겨찾기는 최대 100개까지 입니다.</string>
......
......@@ -1495,7 +1495,7 @@
<string name="not_found_camera">Not found camera device.</string>
<string name="msg_destroy_exist_collaboration">Ongoing collaboration exist. Do you want to terminate exist collaboration and start new?</string>
<string name="error_fail_record">Recording failed. Please contact the administrator.</string>
<string name="chat_open_fail_meeting_connected">Chat rooms cannot be opened while the meeting room is connected.</string>
<string name="chat_open_fail_meeting_connected">Can’t open chat room during distance support. </string>
<string name="chat_open_fail_collaborattion_connected">Chat rooms cannot be opened while the document collaboration is connected.</string>
<!-- Communication 会議室 -->
<string name="msg_error_favorites_100_over">You can have up to 100 favorites.</string>
......
......@@ -12,6 +12,7 @@ import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.bl.websocket.MeetingManager;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.PushMessageKey;
......@@ -29,6 +30,7 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
private static final String TAG = "ShowPushMessageDailogActivity";
OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
boolean isMeetingRoomConnected = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -121,9 +123,35 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
alertDialog.setPositiveButton(R.string.move, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
isMeetingRoomConnected = MeetingManager.getInstance().isConnected();
// Check PushMessage
Bundle extras = getIntent().getExtras();
if (extras != null) {
if (extras != null && !isMeetingRoomConnected) {
moveChatRoom(extras);
finish();
}
if (isMeetingRoomConnected) {
showCannotMoveChatRoomDialog();
}
}
});
alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
});
}
alertDialog.show();
}
}
}
/**
* チャットルームへ遷移するための処理
* @param extras
*/
private void moveChatRoom(Bundle extras) {
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
String roomName = extras.getString(AppDefType.ChatPushMessageKey.roomName);
String pushSendLoginId = extras.getString(AppDefType.ChatPushMessageKey.pushSendLoginId);
......@@ -133,7 +161,6 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) {
List<PushMessageDto> pushMessageDtoList = AbstractLogic.getLogic(PushMessageLogic.class).getAllPushMessageList();
Logger.d("pushSendDate", "pushSendDate : " + pushSendDate);
String pushSendDateDate = DateTimeUtil.toString(new Date(pushSendDate), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("pushSendDate", "pushSendDateDate : " + pushSendDateDate);
......@@ -142,7 +169,6 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
for (int i = 0; i < pushMessageDtoList.size() - 1; i++) {
String tempDate = DateTimeUtil.toString(pushMessageDtoList.get(i).pushSendDate, DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("tempDate", "date : " + tempDate);
}
if (StringUtil.isNullOrEmpty(collaborationType)) {
......@@ -152,25 +178,23 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
}
}
}
finish();
}
});
alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
/**
* 遠隔支援中(会議室接続中)はチャットルームにはいけない。
*/
private void showCannotMoveChatRoomDialog() {
handler.post(new Runnable() {
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
});
}
alertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
public void run() {
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ShowPushMessageDailogActivity.this, "だー","もー");
alertDialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onDismiss(DialogInterface dialog) {
public void onClick(DialogInterface dialog, int which) {
finish();
}
});
alertDialog.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