Commit 17680174 by Lee Munkyeong

Merge branch 'features/abcomm_sp6_document_collaboration' into 'communication/develop'

Features/abcomm sp6 document collaboration

See merge request !146
parents e9ad4810 2fc75b31
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity> </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:resizeableActivity="true"
android:supportsPictureInPicture="true"/> android:supportsPictureInPicture="true"/>
......
...@@ -864,7 +864,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -864,7 +864,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
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(); ActivityHandlingHelper.getInstance().startChatWebViewActivity();
mCommunicationMenuDialog.dismiss(); mCommunicationMenuDialog.dismiss();
} }
}); });
...@@ -939,7 +939,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -939,7 +939,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
if(dto.roomName != null && dto.roomId != 0) if(dto.roomName != null && dto.roomId != 0)
{ {
pushMessageLogic.updateReadingFlg(dto.pushMessageId); pushMessageLogic.updateReadingFlg(dto.pushMessageId);
ActivityHandlingHelper.getInstance().startChatWebviewActivityWithPushMessage(dto); ActivityHandlingHelper.getInstance().startChatWebViewActivityWithPushMessage(dto);
mPushMessageListDialog.dismiss(); mPushMessageListDialog.dismiss();
} else { } else {
showPushMessageDetailView(dto); showPushMessageDetailView(dto);
......
...@@ -140,9 +140,9 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -140,9 +140,9 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
Logger.d("tempDate","date : " + tempDate); Logger.d("tempDate","date : " + tempDate);
} }
if (StringUtil.isNullOrEmpty(collaborationType)) { if (StringUtil.isNullOrEmpty(collaborationType)) {
ActivityHandlingHelper.getInstance().startChatWebviewActivity(roomId, roomName); ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName);
} else { } else {
ActivityHandlingHelper.getInstance().startChatWebviewActivityWithCollaboration(roomId, roomName, collaborationType); ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, roomName, collaborationType);
} }
} }
} }
......
...@@ -357,7 +357,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -357,7 +357,7 @@ public class OperationListActivity extends ABVUIActivity {
// プッシュメッセージがある場合 // プッシュメッセージがある場合
else if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)) && else if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) { getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
ActivityHandlingHelper.getInstance().startChatWebviewActivity( ActivityHandlingHelper.getInstance().startChatWebViewActivity(
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'), getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)); getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName));
} }
......
...@@ -8,12 +8,14 @@ import android.view.KeyEvent; ...@@ -8,12 +8,14 @@ import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Stack;
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;
...@@ -28,6 +30,7 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic; ...@@ -28,6 +30,7 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.websocket.MeetingManager; import jp.agentec.abook.abv.bl.websocket.MeetingManager;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVAuthenticatedActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity; import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode; import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
...@@ -57,15 +60,18 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -57,15 +60,18 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
private TextView mTxtOperationRelatedContent; private TextView mTxtOperationRelatedContent;
private Button mAllSaveButton; private Button mAllSaveButton;
private boolean isCollaboration;
private boolean isCollaborationOwner;
private ListView mContentListView; private ListView mContentListView;
private List<CategoryContentDto> mOperationContentList; private List<CategoryContentDto> mOperationContentList;
private LinearLayout mToolbar;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class); private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
isCollaboration = getIntent().getBooleanExtra("isCollaboration", false);
isCollaborationOwner = getIntent().getBooleanExtra("isCollaborationOwner", false);
setContentView(R.layout.ac_operation_related_content); setContentView(R.layout.ac_operation_related_content);
// ホームボタン(作業一覧へ遷移ボタン) // ホームボタン(作業一覧へ遷移ボタン)
...@@ -78,7 +84,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -78,7 +84,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
mAllSaveButton = (Button) findViewById(R.id.btn_all_save); mAllSaveButton = (Button) findViewById(R.id.btn_all_save);
mContentListView = (ListView) findViewById(R.id.lv_content_list); mContentListView = (ListView) findViewById(R.id.lv_content_list);
showContentList();
mTxtOperationRelatedContent = (TextView) findViewById(R.id.txt_operation_related_content); mTxtOperationRelatedContent = (TextView) findViewById(R.id.txt_operation_related_content);
mQuickReportPrintButton = (ImageButton) findViewById(R.id.btn_operation_print); mQuickReportPrintButton = (ImageButton) findViewById(R.id.btn_operation_print);
...@@ -86,12 +92,11 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -86,12 +92,11 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
mTxtOperationRelatedContent.setText("" + PatternStringUtil.patternToString(getApplicationContext(), mTxtOperationRelatedContent.setText("" + PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_common_content, R.string.title_common_content,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
mToolbar = (LinearLayout)findViewById(R.id.toolbar2);
mAllSaveButton.setVisibility(View.GONE); mAllSaveButton.setVisibility(View.GONE);
settingBottomToolbar();
setOnButtonEvent(); setOnButtonEvent();
settingBottomToolbar();
} }
// 下辺のツールバー設定 // 下辺のツールバー設定
...@@ -117,6 +122,22 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -117,6 +122,22 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
} }
} }
private void hideBottomToolbar() {
mToolbar.setVisibility(View.GONE);
}
private void showBottomToolbar() {
mToolbar.setVisibility(View.VISIBLE);
}
private void hideContentList() {
mContentListView.setVisibility(View.GONE);
}
private void showContentList() {
mContentListView.setVisibility(View.VISIBLE);
}
@Override @Override
public void onDownloadingContentZip(final ContentZipDownloadNotification notification) { public void onDownloadingContentZip(final ContentZipDownloadNotification notification) {
super.onDownloadingContentZip(notification); super.onDownloadingContentZip(notification);
...@@ -445,8 +466,11 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -445,8 +466,11 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
@Override @Override
public boolean onKeyUp(int keyCode, KeyEvent event) { public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) { if (keyCode == KeyEvent.KEYCODE_BACK) {
// 端末の戻るボタン処理
Logger.d(TAG, "onKeyUp.Back"); Logger.d(TAG, "onKeyUp.Back");
// 端末の戻るボタン処理
if (isCollaboration) {
return true;
}
backToHome(); backToHome();
return true; return true;
} }
...@@ -482,11 +506,27 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -482,11 +506,27 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
}); });
} }
@Override @Override
public void onResume() { public void onResume() {
Logger.i(TAG, "onResume:start"); Logger.i(TAG, "onResume:start");
Stack<ABVAuthenticatedActivity> stack = activityHandlingHelper.getCurrentActivityStack();
super.onResume(); super.onResume();
if (isCollaboration) {
hideBottomToolbar();
if (!isCollaborationOwner) {
showProgressPopup();
hideContentList();
MeetingManager meetingManager = MeetingManager.getInstance();
if (!meetingManager.isConnected()) {
backToHome();
}
}
} else {
showBottomToolbar();
showContentList();
}
showOperationRelatedContentList(); showOperationRelatedContentList();
} }
......
...@@ -71,7 +71,7 @@ import jp.agentec.abook.abv.ui.common.constant.NaviConsts; ...@@ -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.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; 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.OperationListActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationMeetingListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationMeetingListActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity; import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity;
...@@ -384,15 +384,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -384,15 +384,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
recordContentReadLog(context, contentId); recordContentReadLog(context, contentId);
} }
Activity act = getCurrentActivity();
if (act instanceof ChatWebviewActivity) { Activity targetActivity = getCurrentActivity();
act = getActivity(OperationRelatedContentActivity.class); if (targetActivity instanceof ChatWebViewActivity) {
Stack<ABVAuthenticatedActivity> stack = getCurrentActivityStack();
if (stack.size() > 1){
targetActivity = stack.get(stack.size()-2);
}
} }
intent.setClass(act, ContentViewActivity.class);
intent.setClass(targetActivity, ContentViewActivity.class);
if (!StringUtil.equalsAny(contentType, if (!StringUtil.equalsAny(contentType,
ContentJSON.KEY_HTML_TYPE, ContentJSON.KEY_LINK_TYPE, ContentJSON.KEY_ENQUETE_TYPE, ContentJSON.KEY_EXAM_TYPE, ContentJSON.KEY_HTML_TYPE, ContentJSON.KEY_LINK_TYPE, ContentJSON.KEY_ENQUETE_TYPE, ContentJSON.KEY_EXAM_TYPE,
ContentJSON.KEY_PANO_MOVIE_TYPE, ContentJSON.KEY_PANO_IMAGE_TYPE, ContentJSON.KEY_OBJECTVR_TYPE)) { ContentJSON.KEY_PANO_MOVIE_TYPE, ContentJSON.KEY_PANO_IMAGE_TYPE, ContentJSON.KEY_OBJECTVR_TYPE)) {
act.startActivity(intent); targetActivity.startActivity(intent);
} }
} }
...@@ -701,6 +706,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -701,6 +706,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
public synchronized void removeContentViewActivity(ABVContentViewActivity contentViewActivity) { public synchronized void removeContentViewActivity(ABVContentViewActivity contentViewActivity) {
sendToBookShelf(); sendToBookShelf();
if (this.contentViewActivity != null && this.contentViewActivity.equals(contentViewActivity)) { if (this.contentViewActivity != null && this.contentViewActivity.equals(contentViewActivity)) {
contentViewActivity.finish();
setContentViewActivity(null); setContentViewActivity(null);
} }
} }
...@@ -716,7 +722,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -716,7 +722,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
*/ */
public synchronized void finishAllContentViewActivity() { public synchronized void finishAllContentViewActivity() {
for (ABVAuthenticatedActivity activity : currentActivityStack) { for (ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof ABVContentViewActivity && !(activity instanceof ChatWebviewActivity)) { if (activity instanceof ABVContentViewActivity) {
activity.finish(); activity.finish();
} }
} }
...@@ -733,7 +739,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -733,7 +739,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
int activitySize = currentActivityStack.size(); int activitySize = currentActivityStack.size();
for (int i = 1; i < activitySize - 1; i++) { for (int i = 1; i < activitySize - 1; i++) {
ABVAuthenticatedActivity activity = currentActivityStack.get(currentActivityStack.size() - i); ABVAuthenticatedActivity activity = currentActivityStack.get(currentActivityStack.size() - i);
if (activity instanceof ABVContentViewActivity && !(activity instanceof ChatWebviewActivity)) { if (activity instanceof ABVContentViewActivity) {
activity.finish(); activity.finish();
} }
} }
...@@ -1572,8 +1578,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1572,8 +1578,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
} }
//プシュメッセージ一覧からチャットに入る //プシュメッセージ一覧からチャットに入る
public void startChatWebviewActivityWithPushMessage(PushMessageDto dto) { public void startChatWebViewActivityWithPushMessage(PushMessageDto dto) {
String className = ChatWebviewActivity.class.getName(); String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL; boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent(); Intent intent = new Intent();
...@@ -1597,8 +1603,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1597,8 +1603,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
for(int i = size-1; i >= 0; i--) { for(int i = size-1; i >= 0; i--) {
ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i); ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i);
if (activity instanceof ChatWebviewActivity) { if (activity instanceof ChatWebViewActivity) {
activity2 = (ChatWebviewActivity) activity; activity2 = (ChatWebViewActivity) activity;
} }
} }
} }
...@@ -1615,8 +1621,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1615,8 +1621,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
} }
//チャットに入る //チャットに入る
public void startChatWebviewActivity() { public void startChatWebViewActivity() {
String className = ChatWebviewActivity.class.getName(); String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL; boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
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/");
...@@ -1634,8 +1640,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1634,8 +1640,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
for(int i = size-1; i >= 0; i--) { for(int i = size-1; i >= 0; i--) {
ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i); ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i);
if (activity instanceof ChatWebviewActivity) { if (activity instanceof ChatWebViewActivity) {
activity2 = (ChatWebviewActivity) activity; activity2 = (ChatWebViewActivity) activity;
} }
} }
} }
...@@ -1652,8 +1658,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1652,8 +1658,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
} }
// プシュメッセージからチャットに入る // プシュメッセージからチャットに入る
public void startChatWebviewActivity(Long roomId, String roomName) { public void startChatWebViewActivity(Long roomId, String roomName) {
String className = ChatWebviewActivity.class.getName(); String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL; boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
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/");
...@@ -1674,8 +1680,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1674,8 +1680,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
for(int i = size-1; i >= 0; i--) { for(int i = size-1; i >= 0; i--) {
ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i); ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i);
if (activity instanceof ChatWebviewActivity) { if (activity instanceof ChatWebViewActivity) {
activity2 = (ChatWebviewActivity) activity; activity2 = (ChatWebViewActivity) activity;
} }
} }
} }
...@@ -1916,8 +1922,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1916,8 +1922,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
this.previousOfSettingActivity2 = activity; this.previousOfSettingActivity2 = activity;
} }
public void startChatWebviewActivityWithCollaboration(Long roomId, String roomName, String collaborationType) { public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType) {
String className = ChatWebviewActivity.class.getName(); String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL; boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
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/");
...@@ -1939,8 +1945,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1939,8 +1945,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
for (int i = size - 1; i >= 0; i--) { for (int i = size - 1; i >= 0; i--) {
ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i); ABVAuthenticatedActivity activity = currentActivityStack.elementAt(i);
if (activity instanceof ChatWebviewActivity) { if (activity instanceof ChatWebViewActivity) {
activity2 = (ChatWebviewActivity) activity; activity2 = (ChatWebViewActivity) activity;
} }
} }
} }
......
package jp.agentec.abook.abv.ui.viewer.activity;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.provider.MediaStore;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.acms.type.OperationType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Callback;
import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.ContentObjectLogLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVAuthenticatedActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity;
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.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.ContentViewHelper;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
public class CommunicationWebViewActivity extends ABVAuthenticatedActivity {
private static final String TAG = "CommunicationWebViewActivity";
private LinearLayout historyLayout;
private ImageButton addSceneButton;
protected ImageButton promoteBtn;
protected ImageButton pauseBtn;
protected ImageButton mBtnRemoteStart;
protected Button historyListBtn;
protected ImageButton btnWebClose;
protected Button closeButton;
protected Button btnLinkOriginalBack;
protected Button btnWebBack;
protected Button btnWebForward;
private ProgressBar m_progress;
protected ContentDto mContentDto;
protected File mLocalFile;
public final static int ABOOK_CHECK_TASK_IMAGE = 103;
public final static int ABOOK_CHECK_TASK_VIDEO = 104;
@Override
protected void onDestroy() {
Logger.d(TAG, "onDestroy");
super.onDestroy();
}
protected Uri attachmentImageProcessing(Uri uri) throws Exception {
if (uri == null) {
return null;
}
String[] operationion = {MediaStore.MediaColumns.DATA};
Cursor cursor = getContentResolver().query(uri, operationion, null, null, null);
String photoFilePath = ABookCheckWebViewHelper.getInstance().contentSchemeUriToFilePath(cursor);
try {
int rotationAngle = ABookCheckWebViewHelper.getInstance().rotateBitmapOrientation(photoFilePath);
mLocalFile = new File(photoFilePath);
if (mLocalFile.exists()) {
return Uri.fromFile(mLocalFile);
}
} catch (FileNotFoundException e) {
Logger.e(TAG, "image file is not found", e);
}
return 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