Commit fd82f189 by onuma

Merge branch 'communication/develop_onuma' into 'communication/develop'

問題点No.56,57,58,80,81,82,83,84 アプリの画面遷移を修正した。

See merge request !208
parents b24c1ccb 463e989b
...@@ -8,7 +8,6 @@ import android.app.PendingIntent; ...@@ -8,7 +8,6 @@ import android.app.PendingIntent;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Build; import android.os.Build;
import android.util.Log;
import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage; import com.google.firebase.messaging.RemoteMessage;
...@@ -35,6 +34,7 @@ import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; ...@@ -35,6 +34,7 @@ import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity; import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity;
import jp.agentec.abook.abv.ui.home.activity.SplashScreenActivity; import jp.agentec.abook.abv.ui.home.activity.SplashScreenActivity;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.viewer.activity.AudioPlayActivity;
import jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.ImageViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.ImageViewActivity;
...@@ -75,8 +75,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -75,8 +75,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
String messageBody = messageMap.get(AppDefType.PushMessageKey.message); String messageBody = messageMap.get(AppDefType.PushMessageKey.message);
String roomName = ""; String roomName = "";
Log.d(TAG,"messageBody : "+ messageBody);
if (Objects.requireNonNull(messageBody).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) > 0) { if (Objects.requireNonNull(messageBody).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) > 0) {
PushMessageJSON json = new PushMessageJSON(messageBody); PushMessageJSON json = new PushMessageJSON(messageBody);
roomName = json.getRoomName(); roomName = json.getRoomName();
...@@ -91,7 +89,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -91,7 +89,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
if (AppUtil.isAppForground(this)) { if (AppUtil.isAppForground(this)) {
if (roomName.length() > 0) { if (roomName.length() > 0) {
//showChatRoomPopupMessage(tempMsg, data, operationID, roomId, roomName, pushSendLoginId, pushSendDate);
showChatRoomPopupMessage(messageMap); showChatRoomPopupMessage(messageMap);
} else { } else {
String data = messageMap.get(AppDefType.PushMessageKey.data); String data = messageMap.get(AppDefType.PushMessageKey.data);
...@@ -131,16 +128,17 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -131,16 +128,17 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
} }
} }
String fromClassName = currentActivity.getClass().getName(); String baseActivityName = currentActivity.getClass().getName();
if (currentActivity.getClass().equals(HTMLWebViewActivity.class) || if (currentActivity.getClass().equals(HTMLWebViewActivity.class) ||
currentActivity.getClass().equals(ContentViewActivity.class) || currentActivity.getClass().equals(ContentViewActivity.class) ||
currentActivity.getClass().equals(OperationRelatedContentActivity.class) || currentActivity.getClass().equals(OperationRelatedContentActivity.class) ||
currentActivity.getClass().equals(OperationListActivity.class) || currentActivity.getClass().equals(OperationListActivity.class) ||
currentActivity.getClass().equals(ImageViewActivity.class) || currentActivity.getClass().equals(ImageViewActivity.class) ||
currentActivity.getClass().equals(VideoViewActivity.class) currentActivity.getClass().equals(VideoViewActivity.class) ||
currentActivity.getClass().equals(AudioPlayActivity.class)
){ ){
// 呼び出し元のActivityの名前をmessageMapに追加する // 呼び出し元のActivityの名前をmessageMapに追加する
messageMap.put(AppDefType.ChatPushMessageKey.fromActivityName, fromClassName); messageMap.put(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName);
messageMap.put(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen, "true"); messageMap.put(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen, "true");
((ABVAuthenticatedActivity)currentActivity).showChatRoomPopupMessage((Context)currentActivity, messageMap); ((ABVAuthenticatedActivity)currentActivity).showChatRoomPopupMessage((Context)currentActivity, messageMap);
} else { } else {
...@@ -227,21 +225,13 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -227,21 +225,13 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
if (StringUtil.isNullOrWhiteSpace(message.get(AppDefType.PushMessageKey.message))) { if (StringUtil.isNullOrWhiteSpace(message.get(AppDefType.PushMessageKey.message))) {
return intent; return intent;
} }
String tempMsg = message.get(AppDefType.PushMessageKey.message); String messageBody = message.get(AppDefType.PushMessageKey.message);
Log.d(TAG,"tempMsg : "+ tempMsg); if (Objects.requireNonNull(messageBody).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) <= 0) {
if (Objects.requireNonNull(tempMsg).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) <= 0) {
return intent; return intent;
} }
JSONObject json = new JSONObject(messageBody);
JSONObject json = new JSONObject(tempMsg);
String textMessage = json.getString(AppDefType.PushMessageKey.message); String textMessage = json.getString(AppDefType.PushMessageKey.message);
if (textMessage.length() > 0){
//tempMsg = textMessage;
}
String roomType = ""; String roomType = "";
String collaborationType = ""; String collaborationType = "";
if (textMessage.contains(ABookCommConstants.INVITE_COLLABORATION)) { if (textMessage.contains(ABookCommConstants.INVITE_COLLABORATION)) {
......
package jp.agentec.abook.abv.ui.common.activity; package jp.agentec.abook.abv.ui.common.activity;
import android.app.Activity;
import android.app.Dialog; import android.app.Dialog;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.Context; import android.content.Context;
...@@ -90,9 +91,11 @@ import jp.agentec.abook.abv.ui.common.util.KeyboardUtils; ...@@ -90,9 +91,11 @@ import jp.agentec.abook.abv.ui.common.util.KeyboardUtils;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil; import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView; import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView;
import jp.agentec.abook.abv.ui.common.vo.Size; import jp.agentec.abook.abv.ui.common.vo.Size;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.activity.HelpActivity; import jp.agentec.abook.abv.ui.home.activity.HelpActivity;
import jp.agentec.abook.abv.ui.home.activity.LoginActivity; import jp.agentec.abook.abv.ui.home.activity.LoginActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity;
import jp.agentec.abook.abv.ui.home.adapter.FixPushMessageAdapter; import jp.agentec.abook.abv.ui.home.adapter.FixPushMessageAdapter;
import jp.agentec.abook.abv.ui.home.adapter.OperationSelectAdapter; import jp.agentec.abook.abv.ui.home.adapter.OperationSelectAdapter;
import jp.agentec.abook.abv.ui.home.adapter.PushMessageListAdapter; import jp.agentec.abook.abv.ui.home.adapter.PushMessageListAdapter;
...@@ -868,10 +871,18 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -868,10 +871,18 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// chat // chat
LinearLayout ll_menuItem_chat = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_chat); LinearLayout ll_menuItem_chat = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_chat);
if (ABVDataCache.getInstance().serviceOption.isChat()) { if (ABVDataCache.getInstance().serviceOption.isChat()) {
final Activity baseActivity = this;
ll_menuItem_chat.setOnClickListener(new View.OnClickListener() { ll_menuItem_chat.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(); // 戻り先
String targetActivityName;
if (baseActivity instanceof OperationListActivity) {
targetActivityName = OperationListActivity.class.getName();
} else {
targetActivityName = OperationRelatedContentActivity.class.getName();
}
ActivityHandlingHelper.getInstance().startChatWebViewActivity(new Long(0),"", ChatWebViewActivity.class.getName(), targetActivityName);
mCommunicationMenuDialog.dismiss(); mCommunicationMenuDialog.dismiss();
} }
}); });
...@@ -1248,7 +1259,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -1248,7 +1259,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
/** /**
* プッシュメッセージがあるので、チャットルームに遷移する。 * プッシュメッセージがあるので、チャットルームに遷移する。
*/ */
public boolean goChatRoom(final Intent intent, final String nextActivityName, final String fromActivityName) { public boolean goChatRoom(final Intent intent, final String targetActivityName, final String baseActivityName) {
if (!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName)) && if (!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) { intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
...@@ -1264,14 +1275,14 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -1264,14 +1275,14 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName), intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName),
intent.getStringExtra(AppDefType.ChatPushMessageKey.collaborationType), intent.getStringExtra(AppDefType.ChatPushMessageKey.collaborationType),
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomType), intent.getStringExtra(AppDefType.ChatPushMessageKey.roomType),
nextActivityName, targetActivityName,
fromActivityName); baseActivityName);
} else { } else {
ActivityHandlingHelper.getInstance().startChatWebViewActivity( ActivityHandlingHelper.getInstance().startChatWebViewActivity(
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'), intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName), intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName),
nextActivityName, targetActivityName,
fromActivityName); baseActivityName);
} }
} }
}, 500); }, 500);
...@@ -1309,7 +1320,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -1309,7 +1320,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomType, json.getRoomType()); pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomType, json.getRoomType());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.collaborationType, json.getCollaborationType()); pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.collaborationType, json.getCollaborationType());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, messageMap.get(AppDefType.ChatPushMessageKey.fromActivityName)); pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, messageMap.get(AppDefType.ChatPushMessageKey.baseActivityName));
String newVersion = messageMap.get(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen); String newVersion = messageMap.get(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (newVersion != null && newVersion.equals(new String("true"))) { if (newVersion != null && newVersion.equals(new String("true"))) {
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen, true); pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen, true);
......
...@@ -159,8 +159,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -159,8 +159,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
isLinkedContent = intent.getBooleanExtra("isLinkedContent", false); isLinkedContent = intent.getBooleanExtra("isLinkedContent", false);
mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1); mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1);
// 遷移元のActivity // 戻り先のActivity名を保存しておく
baseActivityName = getIntent().getStringExtra(AppDefType.ChatPushMessageKey.fromActivityName); baseActivityName = getIntent().getStringExtra(AppDefType.ChatPushMessageKey.baseActivityName);
if (!isLinkedContent) { if (!isLinkedContent) {
operationDto = AbstractLogic.getLogic(OperationLogic.class).getOperation(mOperationId); operationDto = AbstractLogic.getLogic(OperationLogic.class).getOperation(mOperationId);
......
...@@ -128,10 +128,10 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -128,10 +128,10 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen); boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (isNewVersion) { if (isNewVersion) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent()); setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent());
finish();
} else { } else {
moveChatRoom(extras); moveChatRoom(extras);
} }
finish();
} }
if (isMeetingRoomConnected || isCollabration) { if (isMeetingRoomConnected || isCollabration) {
showCannotMoveChatRoomDialog(); showCannotMoveChatRoomDialog();
......
...@@ -147,7 +147,7 @@ public interface AppDefType { ...@@ -147,7 +147,7 @@ public interface AppDefType {
String roomType = "roomType"; String roomType = "roomType";
String shopName = "shopName"; String shopName = "shopName";
String loginId = "loginId"; String loginId = "loginId";
String fromActivityName = "fromActivityName"; String baseActivityName = "baseActivityName";
String needsDisplayOperationOrOperationRelatedContentScreen = "needsDisplayOperationOrOperationRelatedContentScreen"; String needsDisplayOperationOrOperationRelatedContentScreen = "needsDisplayOperationOrOperationRelatedContentScreen";
} }
} }
...@@ -168,7 +168,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -168,7 +168,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
chatData.setIsMobile(!isNormalSize()); chatData.setIsMobile(!isNormalSize());
// どのアクティビティから遷移してきたか保存 // どのアクティビティから遷移してきたか保存
baseActivityName = intent.getStringExtra(AppDefType.ChatPushMessageKey.fromActivityName); baseActivityName = intent.getStringExtra(AppDefType.ChatPushMessageKey.baseActivityName);
} }
private void setupChatWebView() { private void setupChatWebView() {
...@@ -191,7 +191,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -191,7 +191,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
} }
boolean isSIDValid = false; boolean isSIDValid = false;
try { try {
isSIDValid = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).checkSid(chatData.sid); isSIDValid = AcmsClient.getInstance(chatData.shopName, ABVEnvironment.getInstance().networkAdapter).checkSid(chatData.sid);
} catch (Exception e) { } catch (Exception e) {
Logger.d("SID_CHECK_ERROR"); Logger.d("SID_CHECK_ERROR");
} }
...@@ -787,13 +787,15 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -787,13 +787,15 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
finish(); finish();
// 戻るの作業一覧か、関連資料のどちらかのActivityのみ // 戻るの作業一覧か、関連資料のどちらかのActivityのみ
// デフォルトでは、作業一覧に戻る
Intent intent = new Intent(); Intent intent = new Intent();
if (OperationListActivity.class.getName().equals(baseActivityName)) { if (OperationRelatedContentActivity.class.getName().equals(baseActivityName)) {
intent.setClass(ChatWebViewActivity.this, OperationListActivity.class);
} else {
intent.setClass(ChatWebViewActivity.this, OperationRelatedContentActivity.class); intent.setClass(ChatWebViewActivity.this, OperationRelatedContentActivity.class);
} else {
intent.setClass(ChatWebViewActivity.this, OperationListActivity.class);
} }
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, ChatWebViewActivity.class.getName());
startActivity(intent, NaviConsts.Left); startActivity(intent, NaviConsts.Left);
} }
......
...@@ -21,7 +21,6 @@ import android.widget.ArrayAdapter; ...@@ -21,7 +21,6 @@ import android.widget.ArrayAdapter;
import android.widget.DatePicker; import android.widget.DatePicker;
import android.widget.EditText; import android.widget.EditText;
import android.widget.GridView; import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.ListView; import android.widget.ListView;
import android.widget.RadioGroup; import android.widget.RadioGroup;
import android.widget.TextView; import android.widget.TextView;
...@@ -98,7 +97,6 @@ import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView; ...@@ -98,7 +97,6 @@ import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView;
import jp.agentec.abook.abv.ui.common.view.ABVListDialog; import jp.agentec.abook.abv.ui.common.view.ABVListDialog;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.adapter.HierarchyOperationGroupListAdapter; import jp.agentec.abook.abv.ui.home.adapter.HierarchyOperationGroupListAdapter;
import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper; import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.HomeOperationListHelper; import jp.agentec.abook.abv.ui.home.helper.HomeOperationListHelper;
...@@ -448,6 +446,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -448,6 +446,7 @@ public class OperationListActivity extends ABVUIActivity {
private void showCommonContent() { private void showCommonContent() {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClass(OperationListActivity.this, OperationRelatedContentActivity.class); intent.setClass(OperationListActivity.this, OperationRelatedContentActivity.class);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationListActivity.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intent, NaviConsts.Right); startActivity(intent, NaviConsts.Right);
} }
...@@ -794,7 +793,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -794,7 +793,7 @@ public class OperationListActivity extends ABVUIActivity {
intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId); intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId);
intent.putExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.TASK_REPORT); intent.putExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.TASK_REPORT);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, OperationListActivity.class.getName()); intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationListActivity.class.getName());
if(operationDto.operationType == OperationType.PDF) { if(operationDto.operationType == OperationType.PDF) {
intent.putExtra("LINKURL", "file://" + path); intent.putExtra("LINKURL", "file://" + path);
...@@ -1012,7 +1011,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1012,7 +1011,7 @@ public class OperationListActivity extends ABVUIActivity {
intent.putExtra(ABookKeys.CONTENT_ID, operationDto.contentId); intent.putExtra(ABookKeys.CONTENT_ID, operationDto.contentId);
intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId); intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId);
intent.putExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.PANO_EDIT); intent.putExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.PANO_EDIT);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, OperationListActivity.class.getName()); intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationListActivity.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClass(OperationListActivity.this, HTMLXWalkWebViewActivity.class); intent.setClass(OperationListActivity.this, HTMLXWalkWebViewActivity.class);
ActivityHandlingHelper.getInstance().startHTMLXWalkWebActivity(OperationListActivity.this, intent, url, operationDto.contentId, -1, -1, -1, -1, -1); ActivityHandlingHelper.getInstance().startHTMLXWalkWebActivity(OperationListActivity.this, intent, url, operationDto.contentId, -1, -1, -1, -1, -1);
......
...@@ -75,6 +75,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -75,6 +75,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
Logger.i(TAG,"onCreate");
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
updateCollaborationInfo(); updateCollaborationInfo();
setContentView(R.layout.ac_operation_related_content); setContentView(R.layout.ac_operation_related_content);
...@@ -287,7 +288,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -287,7 +288,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
} }
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, OperationRelatedContentActivity.class.getName()); intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationRelatedContentActivity.class.getName());
ActivityHandlingHelper.getInstance().checkContentActivity(contentId, 0, intent); ActivityHandlingHelper.getInstance().checkContentActivity(contentId, 0, intent);
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -407,9 +408,12 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -407,9 +408,12 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
* 作業一覧へ戻る * 作業一覧へ戻る
*/ */
private void backToHome() { private void backToHome() {
finish(); Intent intent = new Intent();
// 終了後、アニメーション追加(左へ移動) intent.setClass(OperationRelatedContentActivity.this, OperationListActivity.class);
overridePendingTransition(R.anim.viewin_left_to_right, R.anim.viewout_left_to_right); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationRelatedContentActivity.class.getName());
// 左へ移動しながら戻る
startActivity(intent, NaviConsts.Left);
} }
public void showCancelDownloadDialog(final ContentDto contentDto) { public void showCancelDownloadDialog(final ContentDto contentDto) {
......
...@@ -1671,9 +1671,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1671,9 +1671,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* @param roomId chatRoom の Id * @param roomId chatRoom の Id
* @param roomName chatRoom の名前 * @param roomName chatRoom の名前
* @param targetActivityName 直接chatRoom に遷移する場合は、ChatWebViewActivity名。chatRoomに遷移する前に、別のActivityを経由する場合は、そのActivity名 * @param targetActivityName 直接chatRoom に遷移する場合は、ChatWebViewActivity名。chatRoomに遷移する前に、別のActivityを経由する場合は、そのActivity名
* @param fromActivityName この関数を呼び出したActivity名 * @param baseActivityName この関数を呼び出したActivity名。戻る時にはこのアクティビティに戻る
*/ */
public void startChatWebViewActivity(Long roomId, String roomName, String targetActivityName, String fromActivityName) { public void startChatWebViewActivity(Long roomId, String roomName, String targetActivityName, String baseActivityName) {
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/"); intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
String sid = ABVDataCache.getInstance().getMemberInfo().sid; String sid = ABVDataCache.getInstance().getMemberInfo().sid;
...@@ -1684,7 +1684,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1684,7 +1684,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName); intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId); intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName); intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, fromActivityName); intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName);
intent.setClassName(mContext.getPackageName(), targetActivityName); intent.setClassName(mContext.getPackageName(), targetActivityName);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent); getCurrentActivity().startActivity(intent);
...@@ -1922,7 +1922,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1922,7 +1922,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* @param collaborationType * @param collaborationType
* @param roomType * @param roomType
*/ */
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType, String roomType, String nextActivityName, String fromActivityName) { public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType, String roomType, String targetActivityName, String baseActivityName) {
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra("chatWebviewUrl", ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/"); intent.putExtra("chatWebviewUrl", ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
String sid = ABVDataCache.getInstance().getMemberInfo().sid; String sid = ABVDataCache.getInstance().getMemberInfo().sid;
...@@ -1935,8 +1935,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1935,8 +1935,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId); intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName); intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType); intent.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, fromActivityName); intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName);
intent.setClassName(mContext.getPackageName(), nextActivityName); intent.setClassName(mContext.getPackageName(), targetActivityName);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent); getCurrentActivity().startActivity(intent);
} }
......
...@@ -28,15 +28,8 @@ import android.webkit.URLUtil; ...@@ -28,15 +28,8 @@ import android.webkit.URLUtil;
import android.webkit.CookieManager; import android.webkit.CookieManager;
import android.webkit.DownloadListener; import android.webkit.DownloadListener;
import android.os.Environment; import android.os.Environment;
import android.webkit.WebViewClient;
import android.content.Context;
import android.graphics.Bitmap;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
import java.io.File;
import java.io.FileOutputStream;
import java.util.Objects;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON; import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis; import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
......
...@@ -147,7 +147,7 @@ public class FoxitPdfCore { ...@@ -147,7 +147,7 @@ public class FoxitPdfCore {
* @throws PDFException * @throws PDFException
*/ */
public PointF getPageSize(int pageIndex) throws PDFException { public PointF getPageSize(int pageIndex) throws PDFException {
Logger.i("getPageSize : " + pageIndex); Logger.d("getPageSize : " + pageIndex);
PDFPage pdfPage = mPDFDoc.getPage(pageIndex); PDFPage pdfPage = mPDFDoc.getPage(pageIndex);
return new PointF(pdfPage.getWidth(), pdfPage.getHeight()); return new PointF(pdfPage.getWidth(), pdfPage.getHeight());
} }
...@@ -165,7 +165,7 @@ public class FoxitPdfCore { ...@@ -165,7 +165,7 @@ public class FoxitPdfCore {
* @return * @return
*/ */
public Bitmap drawPage(int page, int pageW, int pageH, int patchX, int patchY, int patchW, int patchH) { public Bitmap drawPage(int page, int pageW, int pageH, int patchX, int patchY, int patchW, int patchH) {
Logger.i(TAG, "drawPage start."); Logger.d(TAG, "drawPage start.");
synchronized (mContext) { synchronized (mContext) {
Bitmap bm = Bitmap.createBitmap(patchW, patchH, Bitmap.Config.ARGB_8888); Bitmap bm = Bitmap.createBitmap(patchW, patchH, Bitmap.Config.ARGB_8888);
PDFPage pdfPage = loadPage(mPDFDoc, page, PDFPage.e_ParsePageNormal); PDFPage pdfPage = loadPage(mPDFDoc, page, PDFPage.e_ParsePageNormal);
...@@ -198,7 +198,7 @@ public class FoxitPdfCore { ...@@ -198,7 +198,7 @@ public class FoxitPdfCore {
Logger.e(TAG, "Failed to render the page No.%d! %s", page, e.getMessage()); Logger.e(TAG, "Failed to render the page No.%d! %s", page, e.getMessage());
} }
Logger.i(TAG, "drawPage end."); Logger.d(TAG, "drawPage end.");
return bm; return bm;
} }
} }
......
...@@ -264,7 +264,7 @@ public class PdfImageProvider { ...@@ -264,7 +264,7 @@ public class PdfImageProvider {
Logger.d(TAG, "setPauseTask " + ste.getClassName() + "#" + ste.getMethodName() + " " + pauseTask); Logger.d(TAG, "setPauseTask " + ste.getClassName() + "#" + ste.getMethodName() + " " + pauseTask);
} }
else { else {
Logger.i(TAG, "setPauseTask " + pauseTask); Logger.d(TAG, "setPauseTask " + pauseTask);
} }
if (pauseTask) { if (pauseTask) {
pauseTaskCount++; pauseTaskCount++;
...@@ -307,7 +307,7 @@ public class PdfImageProvider { ...@@ -307,7 +307,7 @@ public class PdfImageProvider {
int width = (int) (size.x * pageScale); int width = (int) (size.x * pageScale);
int height = (int) (size.y * pageScale); int height = (int) (size.y * pageScale);
Logger.i(TAG, "[drawPage]: pageNumber=" + pageNumber + " width=" + width + " height=" + height + " imagePath=" + imagePath); Logger.d(TAG, "[drawPage]: pageNumber=" + pageNumber + " width=" + width + " height=" + height + " imagePath=" + imagePath);
Bitmap bm = null; Bitmap bm = null;
try { try {
bm = mFoxitPdfCore.drawPage(pageNumber, width, height, 0, 0, width, height); bm = mFoxitPdfCore.drawPage(pageNumber, width, height, 0, 0, width, height);
......
...@@ -86,8 +86,7 @@ public class AudioPlayView extends RelativeLayout { ...@@ -86,8 +86,7 @@ public class AudioPlayView extends RelativeLayout {
if (StringUtil.isNullOrEmpty(contentName)) { // オーサリング動画の場合 if (StringUtil.isNullOrEmpty(contentName)) { // オーサリング動画の場合
LinearLayout linearLayout1 = (LinearLayout)controlLayout.findViewById(R.id.linear1); LinearLayout linearLayout1 = (LinearLayout)controlLayout.findViewById(R.id.linear1);
linearLayout1.setVisibility(View.GONE); linearLayout1.setVisibility(View.GONE);
} } else { // 動画コンテンツの場合
else { // 動画コンテンツの場合
TextView txtTitle = (TextView)controlLayout.findViewById(R.id.txtTitle); TextView txtTitle = (TextView)controlLayout.findViewById(R.id.txtTitle);
txtTitle.setText(contentName); txtTitle.setText(contentName);
...@@ -192,8 +191,7 @@ public class AudioPlayView extends RelativeLayout { ...@@ -192,8 +191,7 @@ public class AudioPlayView extends RelativeLayout {
if (mMediaPlayer.isPlaying()) { if (mMediaPlayer.isPlaying()) {
mBtnPlay.setImageDrawable(getResources().getDrawable(R.drawable.btn_play)); mBtnPlay.setImageDrawable(getResources().getDrawable(R.drawable.btn_play));
pause(); pause();
} } else{
else{
mBtnPlay.setImageDrawable(getResources().getDrawable(R.drawable.btn_pause)); mBtnPlay.setImageDrawable(getResources().getDrawable(R.drawable.btn_pause));
restart(); restart();
} }
...@@ -214,8 +212,7 @@ public class AudioPlayView extends RelativeLayout { ...@@ -214,8 +212,7 @@ public class AudioPlayView extends RelativeLayout {
position = 0; position = 0;
} }
jump(position); jump(position);
} } else {
else {
btnBackward.setImageDrawable(getResources().getDrawable(R.drawable.btn_backward)); btnBackward.setImageDrawable(getResources().getDrawable(R.drawable.btn_backward));
} }
return false; return false;
...@@ -236,8 +233,7 @@ public class AudioPlayView extends RelativeLayout { ...@@ -236,8 +233,7 @@ public class AudioPlayView extends RelativeLayout {
position = duration; position = duration;
} }
jump(position); jump(position);
} } else {
else {
btnForward.setImageDrawable(getResources().getDrawable(R.drawable.btn_forward)); btnForward.setImageDrawable(getResources().getDrawable(R.drawable.btn_forward));
} }
return false; return false;
...@@ -272,8 +268,7 @@ public class AudioPlayView extends RelativeLayout { ...@@ -272,8 +268,7 @@ public class AudioPlayView extends RelativeLayout {
LinearLayout.LayoutParams params; LinearLayout.LayoutParams params;
if (config.orientation == Configuration.ORIENTATION_LANDSCAPE && !isMobile) { if (config.orientation == Configuration.ORIENTATION_LANDSCAPE && !isMobile) {
params = new LinearLayout.LayoutParams((int) (density * 500), ViewGroup.LayoutParams.WRAP_CONTENT); params = new LinearLayout.LayoutParams((int) (density * 500), ViewGroup.LayoutParams.WRAP_CONTENT);
} } else {
else {
params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
} }
...@@ -285,8 +280,7 @@ public class AudioPlayView extends RelativeLayout { ...@@ -285,8 +280,7 @@ public class AudioPlayView extends RelativeLayout {
if (isMobile && point.x < point.y) { // モバイルで縦長の場合、戻り・早送りはなし if (isMobile && point.x < point.y) { // モバイルで縦長の場合、戻り・早送りはなし
btnBackward.setVisibility(View.GONE); btnBackward.setVisibility(View.GONE);
btnForward.setVisibility(View.GONE); btnForward.setVisibility(View.GONE);
} } else {
else {
btnBackward.setVisibility(View.VISIBLE); btnBackward.setVisibility(View.VISIBLE);
btnForward.setVisibility(View.VISIBLE); btnForward.setVisibility(View.VISIBLE);
} }
...@@ -401,6 +395,10 @@ public class AudioPlayView extends RelativeLayout { ...@@ -401,6 +395,10 @@ public class AudioPlayView extends RelativeLayout {
public void stop() { public void stop() {
if (mMediaPlayer != null) { if (mMediaPlayer != null) {
mVisualizer.release(); mVisualizer.release();
if (mMediaPlayer.isPlaying()){
mMediaPlayer.stop();
}
mMediaPlayer.reset();
mMediaPlayer.release(); mMediaPlayer.release();
mMediaPlayer = null; mMediaPlayer = null;
} }
......
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