Commit 463e989b by onuma

変数名を変更。

fromActivityName => baseActivityName
nextActivityName => targetActivityName
parent 32ca247f
...@@ -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;
...@@ -129,7 +128,7 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -129,7 +128,7 @@ 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) ||
...@@ -139,7 +138,7 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -139,7 +138,7 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
currentActivity.getClass().equals(AudioPlayActivity.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 {
...@@ -226,12 +225,12 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -226,12 +225,12 @@ 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 messageBosy = message.get(AppDefType.PushMessageKey.message); String messageBody = message.get(AppDefType.PushMessageKey.message);
if (Objects.requireNonNull(messageBosy).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) <= 0) { if (Objects.requireNonNull(messageBody).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) <= 0) {
return intent; return intent;
} }
JSONObject json = new JSONObject(messageBosy); JSONObject json = new JSONObject(messageBody);
String textMessage = json.getString(AppDefType.PushMessageKey.message); String textMessage = json.getString(AppDefType.PushMessageKey.message);
String roomType = ""; String roomType = "";
String collaborationType = ""; String collaborationType = "";
......
...@@ -166,7 +166,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -166,7 +166,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// 遷移元のアクティビティ名 // 遷移元のアクティビティ名
// PushMessage受信時に直接ChatRoomへ行かずに、ひとつまえのActivityに戻る為に使用する。 // PushMessage受信時に直接ChatRoomへ行かずに、ひとつまえのActivityに戻る為に使用する。
public String fromActivityName; public String baseActivityName;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
...@@ -876,13 +876,13 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -876,13 +876,13 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
@Override @Override
public void onClick(View view) { public void onClick(View view) {
// 戻り先 // 戻り先
String nextActivity; String targetActivityName;
if (baseActivity instanceof OperationListActivity) { if (baseActivity instanceof OperationListActivity) {
nextActivity = OperationListActivity.class.getName(); targetActivityName = OperationListActivity.class.getName();
} else { } else {
nextActivity = OperationRelatedContentActivity.class.getName(); targetActivityName = OperationRelatedContentActivity.class.getName();
} }
ActivityHandlingHelper.getInstance().startChatWebViewActivity(new Long(0),"", ChatWebViewActivity.class.getName(), nextActivity); ActivityHandlingHelper.getInstance().startChatWebViewActivity(new Long(0),"", ChatWebViewActivity.class.getName(), targetActivityName);
mCommunicationMenuDialog.dismiss(); mCommunicationMenuDialog.dismiss();
} }
}); });
...@@ -1259,7 +1259,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -1259,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) {
...@@ -1275,14 +1275,14 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -1275,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);
...@@ -1320,7 +1320,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -1320,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);
......
...@@ -160,7 +160,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -160,7 +160,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1); mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1);
// 戻り先のActivity名を保存しておく // 戻り先のActivity名を保存しておく
fromActivityName = 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);
......
...@@ -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());
// どのアクティビティから遷移してきたか保存 // どのアクティビティから遷移してきたか保存
fromActivityName = 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(chatData.shopName,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");
} }
...@@ -789,13 +789,13 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -789,13 +789,13 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
// 戻るの作業一覧か、関連資料のどちらかのActivityのみ // 戻るの作業一覧か、関連資料のどちらかのActivityのみ
// デフォルトでは、作業一覧に戻る // デフォルトでは、作業一覧に戻る
Intent intent = new Intent(); Intent intent = new Intent();
if (OperationRelatedContentActivity.class.getName().equals(fromActivityName)) { if (OperationRelatedContentActivity.class.getName().equals(baseActivityName)) {
intent.setClass(ChatWebViewActivity.this, OperationRelatedContentActivity.class); intent.setClass(ChatWebViewActivity.this, OperationRelatedContentActivity.class);
} else { } else {
intent.setClass(ChatWebViewActivity.this, OperationListActivity.class); 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.fromActivityName, ChatWebViewActivity.class.getName()); intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, ChatWebViewActivity.class.getName());
startActivity(intent, NaviConsts.Left); startActivity(intent, NaviConsts.Left);
} }
......
...@@ -446,7 +446,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -446,7 +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.fromActivityName, OperationListActivity.class.getName()); 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);
} }
...@@ -793,7 +793,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -793,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);
...@@ -1011,7 +1011,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1011,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);
......
...@@ -288,7 +288,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -288,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) {
...@@ -411,7 +411,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -411,7 +411,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClass(OperationRelatedContentActivity.this, OperationListActivity.class); intent.setClass(OperationRelatedContentActivity.this, OperationListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, OperationRelatedContentActivity.class.getName()); intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationRelatedContentActivity.class.getName());
// 左へ移動しながら戻る // 左へ移動しながら戻る
startActivity(intent, NaviConsts.Left); startActivity(intent, NaviConsts.Left);
} }
......
...@@ -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);
} }
......
...@@ -3828,9 +3828,9 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -3828,9 +3828,9 @@ public class ContentViewActivity extends ABVContentViewActivity {
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) { if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合 // プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(fromActivityName)) { if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
finishActivity(); finishActivity();
goChatRoom(intent, fromActivityName, ContentViewActivity.class.getName()); goChatRoom(intent, baseActivityName, ContentViewActivity.class.getName());
} }
return; return;
} }
......
...@@ -744,9 +744,9 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -744,9 +744,9 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) { if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合 // プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(fromActivityName)) { if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
finishActivity(); finishActivity();
goChatRoom(intent, fromActivityName, HTMLWebViewActivity.class.getName()); goChatRoom(intent, baseActivityName, HTMLWebViewActivity.class.getName());
} }
return; return;
} }
......
...@@ -215,9 +215,9 @@ public class NoPdfViewActivity extends ABVContentViewActivity { ...@@ -215,9 +215,9 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) { if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合 // プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(fromActivityName)) { if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
finishActivity(); finishActivity();
goChatRoom(intent, fromActivityName, getClass().getName()); goChatRoom(intent, baseActivityName, getClass().getName());
} }
return; return;
} }
......
...@@ -82,12 +82,11 @@ public class AudioPlayView extends RelativeLayout { ...@@ -82,12 +82,11 @@ public class AudioPlayView extends RelativeLayout {
// コントロールレイアウト // コントロールレイアウト
LayoutInflater layoutInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); LayoutInflater layoutInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
controlLayout = (RelativeLayout) layoutInflater.inflate(R.layout.audioview, this); controlLayout = (RelativeLayout) layoutInflater.inflate(R.layout.audioview, this);
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);
} }
...@@ -320,7 +314,7 @@ public class AudioPlayView extends RelativeLayout { ...@@ -320,7 +314,7 @@ public class AudioPlayView extends RelativeLayout {
public boolean onKeyUp(int keyCode, KeyEvent event) { public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) { if (keyCode == KeyEvent.KEYCODE_BACK) {
close(); close();
} else { } else {
return super.onKeyUp(keyCode, event); return super.onKeyUp(keyCode, event);
} }
return false; return false;
...@@ -399,15 +393,15 @@ public class AudioPlayView extends RelativeLayout { ...@@ -399,15 +393,15 @@ public class AudioPlayView extends RelativeLayout {
} }
public void stop() { public void stop() {
if (mMediaPlayer != null) { if (mMediaPlayer != null) {
mVisualizer.release(); mVisualizer.release();
if (mMediaPlayer.isPlaying()){ if (mMediaPlayer.isPlaying()){
mMediaPlayer.stop(); mMediaPlayer.stop();
} }
mMediaPlayer.reset(); mMediaPlayer.reset();
mMediaPlayer.release(); mMediaPlayer.release();
mMediaPlayer = null; mMediaPlayer = null;
} }
if (mExecutor != null) { if (mExecutor != null) {
mExecutor.shutdownNow(); mExecutor.shutdownNow();
} }
......
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