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,56 +123,78 @@ 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) {
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
String roomName = extras.getString(AppDefType.ChatPushMessageKey.roomName);
String pushSendLoginId = extras.getString(AppDefType.ChatPushMessageKey.pushSendLoginId);
long pushSendDate = extras.getLong(AppDefType.ChatPushMessageKey.pushSendDate);
String collaborationType = extras.getString(AppDefType.ChatPushMessageKey.collaborationType);
String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType);
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);
String pushSendDateDate2 = DateTimeUtil.toString(DateTimeUtil.toDate(pushSendDateDate, DateTimeFormat.yyyyMMddHHmmssSSS_none), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("pushSendDate", "pushSendDateDate2 : " + pushSendDateDate2);
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)) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName);
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, roomName, collaborationType, roomType);
}
}
if (extras != null && !isMeetingRoomConnected) {
moveChatRoom(extras);
finish();
}
if (isMeetingRoomConnected) {
showCannotMoveChatRoomDialog();
}
finish();
}
});
alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
});
}
alertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
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);
long pushSendDate = extras.getLong(AppDefType.ChatPushMessageKey.pushSendDate);
String collaborationType = extras.getString(AppDefType.ChatPushMessageKey.collaborationType);
String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType);
if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) {
List<PushMessageDto> pushMessageDtoList = AbstractLogic.getLogic(PushMessageLogic.class).getAllPushMessageList();
  • pushMessageDtoList この変数を使っている箇所はログ出力しかないですが、、いらないのではないでしょうか? ここからFor文までは、、不要な処理だと思います。

  • ログ出力も含めて削除します。pushSendLoginIdも未使用なので削除します。

Please register or sign in to reply
Logger.d("pushSendDate", "pushSendDate : " + pushSendDate);
String pushSendDateDate = DateTimeUtil.toString(new Date(pushSendDate), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("pushSendDate", "pushSendDateDate : " + pushSendDateDate);
String pushSendDateDate2 = DateTimeUtil.toString(DateTimeUtil.toDate(pushSendDateDate, DateTimeFormat.yyyyMMddHHmmssSSS_none), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("pushSendDate", "pushSendDateDate2 : " + pushSendDateDate2);
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)) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName);
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, roomName, collaborationType, roomType);
}
}
}
/**
* 遠隔支援中(会議室接続中)はチャットルームにはいけない。
*/
private void showCannotMoveChatRoomDialog() {
handler.post(new Runnable() {
@Override
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