Commit 2fc75b31 by Lee Munkyeong

コードレビュー対応。

parent 65e462e8
......@@ -243,7 +243,7 @@
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity android:name="jp.agentec.abook.abv.ui.home.activity.ChatWebviewActivity" android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
<activity android:name="jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity" android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
android:resizeableActivity="true"
android:supportsPictureInPicture="true"/>
......
......@@ -864,7 +864,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
ll_menuItem_chat.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ActivityHandlingHelper.getInstance().startChatWebviewActivity();
ActivityHandlingHelper.getInstance().startChatWebViewActivity();
mCommunicationMenuDialog.dismiss();
}
});
......@@ -939,7 +939,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
if(dto.roomName != null && dto.roomId != 0)
{
pushMessageLogic.updateReadingFlg(dto.pushMessageId);
ActivityHandlingHelper.getInstance().startChatWebviewActivityWithPushMessage(dto);
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithPushMessage(dto);
mPushMessageListDialog.dismiss();
} else {
showPushMessageDetailView(dto);
......
......@@ -140,9 +140,9 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
Logger.d("tempDate","date : " + tempDate);
}
if (StringUtil.isNullOrEmpty(collaborationType)) {
ActivityHandlingHelper.getInstance().startChatWebviewActivity(roomId, roomName);
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName);
} else {
ActivityHandlingHelper.getInstance().startChatWebviewActivityWithCollaboration(roomId, roomName, collaborationType);
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, roomName, collaborationType);
}
}
}
......
......@@ -113,11 +113,11 @@ import static org.chromium.net.NetError.ERR_FAILED;
* Created by AIS-NB-048 on 2019/07/31.
*/
public class ChatWebviewActivity extends CommunicationWebViewActivity {
public class ChatWebViewActivity extends CommunicationWebViewActivity {
private WebView mChatWebView;
private String chatWebviewUrl;
private final String TAG = "ChatWebviewActivity";
private final String TAG = "ChatWebViewActivity";
private final String NETWORK_ERROR_PLACE_HOLDER = "file:///android_asset/chat/public_new/chat.html";
//private final String NETWORK_ERROR_PLACE_HOLDER = "file:///android_asset/chat/public/networkError.html";
......@@ -325,10 +325,10 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
boolean result = false;
// 画像が選択された場合
if (fileChooserParams.getAcceptTypes()[0].toLowerCase().indexOf(ABookKeys.IMAGE) != -1) {
result = startCameraIntent(103, "Camera", ABookKeys.IMAGE, true);
result = startCameraIntent(ABOOK_CHECK_TASK_IMAGE, "Camera", ABookKeys.IMAGE, true);
// 動画が選択された場合
} else if (fileChooserParams.getAcceptTypes()[0].toLowerCase().indexOf(ABookKeys.VIDEO) != -1) {
result = startCameraIntent(104, "Camera", ABookKeys.VIDEO, true);
result = startCameraIntent(ABOOK_CHECK_TASK_VIDEO, "Camera", ABookKeys.VIDEO, true);
}
if (result) {
if (mUploadMessage != null) {
......@@ -378,7 +378,7 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
final String tempMessage = message;
ABookAlertDialog dialog = AlertDialogUtil.createAlertDialog(ChatWebviewActivity.this, R.string.app_name);
ABookAlertDialog dialog = AlertDialogUtil.createAlertDialog(ChatWebViewActivity.this, R.string.app_name);
dialog.setMessage(message);
dialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
......@@ -424,7 +424,7 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
} else if (message.equals("방장 권한을 전달 받으시겠습니까?")){
message = getString(R.string.msg_confirm_send_host_change);
}
ABookAlertDialog confirmAlert = AlertDialogUtil.createAlertDialog(ChatWebviewActivity.this, R.string.app_name);
ABookAlertDialog confirmAlert = AlertDialogUtil.createAlertDialog(ChatWebViewActivity.this, R.string.app_name);
confirmAlert.setMessage(message);
if (message.equals(getString(R.string.msg_error_already_exist_same_room))) {
......@@ -679,10 +679,10 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
// チャット利用のはネットワークが繋がる時のみ
if (ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
showProgressPopup();
ActivityHandlingHelper.getInstance().startChatWebviewActivity();
ActivityHandlingHelper.getInstance().startChatWebViewActivity();
mCommunicationMenuDialog.dismiss();
} else {
ABVToastUtil.showMakeText(ChatWebviewActivity.this, R.string.request_network_connection, Toast.LENGTH_SHORT);
ABVToastUtil.showMakeText(ChatWebViewActivity.this, R.string.request_network_connection, Toast.LENGTH_SHORT);
return;
}
}
......@@ -867,7 +867,7 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
mChatWebView.post(new Runnable() {
@Override
public void run() {
ActivityHandlingHelper.getInstance().startChatWebviewActivity();
ActivityHandlingHelper.getInstance().startChatWebViewActivity();
}
});
......@@ -1406,7 +1406,7 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
} catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
}
finishBeforeContentListActiviry();
finishBeforeContentListActivity();
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
startContentListActivity(true);
......@@ -1425,7 +1425,7 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
} catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
}
finishBeforeContentListActiviry();
finishBeforeContentListActivity();
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
startContentListActivity(false);
......@@ -1440,7 +1440,7 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
@JavascriptInterface
public void exitMeetingRoom() {
exitMettingRoom();
exitMeetingRoom();
}
}
......@@ -1449,22 +1449,22 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
*/
private void backToHome() {
mChatWebView.loadUrl("javascript:CHAT.leaveRoom()");
exitMettingRoom();
exitMeetingRoom();
finish();
Intent intent = new Intent();
intent.setClass(ChatWebviewActivity.this, OperationListActivity.class);
intent.setClass(ChatWebViewActivity.this, OperationListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent, NaviConsts.Left);
}
private void finishBeforeContentListActiviry() {
private void finishBeforeContentListActivity() {
OperationRelatedContentActivity beforeActiryty = activityHandlingHelper.getActivity(OperationRelatedContentActivity.class);
if (beforeActiryty != null) {
beforeActiryty.finish();
}
}
public void exitMettingRoom() {
public void exitMeetingRoom() {
if (meetingManager.isConnected() && meetingManager.isOwner()) {
try {
meetingManager.deleteMeeting();
......@@ -1478,7 +1478,7 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
private void startContentListActivity(boolean isOwner) {
Activity targetActivity = activityHandlingHelper.getCurrentActivity();
if (targetActivity instanceof ChatWebviewActivity) {
if (targetActivity instanceof ChatWebViewActivity) {
Stack<ABVAuthenticatedActivity> stack = activityHandlingHelper.getCurrentActivityStack();
if (stack.size() > 1){
targetActivity = stack.get(stack.size()-2);
......@@ -1673,7 +1673,7 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
// 共通資料画面表示
private void showCommonContent() {
Intent intent = new Intent();
intent.setClass(ChatWebviewActivity.this, OperationRelatedContentActivity.class);
intent.setClass(ChatWebViewActivity.this, OperationRelatedContentActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intent, NaviConsts.Left);
}
......@@ -1730,7 +1730,7 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
@Override
public void onDestroy(){
exitMettingRoom();
exitMeetingRoom();
super.onDestroy();
if (receiver != null) {
unregisterReceiver(receiver);
......@@ -1745,17 +1745,9 @@ public class ChatWebviewActivity extends CommunicationWebViewActivity {
case KeyEvent.KEYCODE_BACK:
backToHome();
eventPrevent = true;
break;
}
return eventPrevent;
}
@Override
public void onResume() {
super.onResume();
}
@Override
public void onPause() {
super.onPause();
}
}
......@@ -357,7 +357,7 @@ public class OperationListActivity extends ABVUIActivity {
// プッシュメッセージがある場合
else if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
ActivityHandlingHelper.getInstance().startChatWebviewActivity(
ActivityHandlingHelper.getInstance().startChatWebViewActivity(
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName));
}
......
......@@ -71,7 +71,7 @@ import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.home.activity.ChatWebviewActivity;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationMeetingListActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity;
......@@ -246,7 +246,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
// ページの場合、0から始まるのでシーン設定は+1する
path += "&startscene=scene" + (intent.getIntExtra(ABVActivity.PAGE, 1) + 1);
}
// 管理者モードで開く場合、パラメータ追加cr
// 管理者モードで開く場合、パラメータ追加
path += "&isManagementMode=true";
}
......@@ -386,7 +386,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
Activity targetActivity = getCurrentActivity();
if (targetActivity instanceof ChatWebviewActivity) {
if (targetActivity instanceof ChatWebViewActivity) {
Stack<ABVAuthenticatedActivity> stack = getCurrentActivityStack();
if (stack.size() > 1){
targetActivity = stack.get(stack.size()-2);
......@@ -1578,8 +1578,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
//プシュメッセージ一覧からチャットに入る
public void startChatWebviewActivityWithPushMessage(PushMessageDto dto) {
String className = ChatWebviewActivity.class.getName();
public void startChatWebViewActivityWithPushMessage(PushMessageDto dto) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent();
......@@ -1603,8 +1603,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
for(int i = size-1; i >= 0; i--) {
ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i);
if (activity instanceof ChatWebviewActivity) {
activity2 = (ChatWebviewActivity) activity;
if (activity instanceof ChatWebViewActivity) {
activity2 = (ChatWebViewActivity) activity;
}
}
}
......@@ -1621,8 +1621,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
//チャットに入る
public void startChatWebviewActivity() {
String className = ChatWebviewActivity.class.getName();
public void startChatWebViewActivity() {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
......@@ -1640,8 +1640,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
for(int i = size-1; i >= 0; i--) {
ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i);
if (activity instanceof ChatWebviewActivity) {
activity2 = (ChatWebviewActivity) activity;
if (activity instanceof ChatWebViewActivity) {
activity2 = (ChatWebViewActivity) activity;
}
}
}
......@@ -1658,8 +1658,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
// プシュメッセージからチャットに入る
public void startChatWebviewActivity(Long roomId, String roomName) {
String className = ChatWebviewActivity.class.getName();
public void startChatWebViewActivity(Long roomId, String roomName) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
......@@ -1680,8 +1680,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
for(int i = size-1; i >= 0; i--) {
ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i);
if (activity instanceof ChatWebviewActivity) {
activity2 = (ChatWebviewActivity) activity;
if (activity instanceof ChatWebViewActivity) {
activity2 = (ChatWebViewActivity) activity;
}
}
}
......@@ -1922,8 +1922,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
this.previousOfSettingActivity2 = activity;
}
public void startChatWebviewActivityWithCollaboration(Long roomId, String roomName, String collaborationType) {
String className = ChatWebviewActivity.class.getName();
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
......@@ -1945,8 +1945,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
for (int i = size - 1; i >= 0; i--) {
ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i);
if (activity instanceof ChatWebviewActivity) {
activity2 = (ChatWebviewActivity) activity;
if (activity instanceof ChatWebViewActivity) {
activity2 = (ChatWebViewActivity) activity;
}
}
}
......
......@@ -57,7 +57,7 @@ import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
public class CommunicationWebViewActivity extends ABVAuthenticatedActivity {
private static final String TAG = "ParentWebViewActivity";
private static final String TAG = "CommunicationWebViewActivity";
private LinearLayout historyLayout;
private ImageButton addSceneButton;
......
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