Commit 1e0ec13b by Lee Jaebin

ソース分離(ABookCheckフラグ削除、バックアップ・リストア機能削除、必要ない設定項目削除)

parent 60051bac
......@@ -231,10 +231,6 @@ public class ABVEnvironment {
return logLevel;
}
public boolean isABookCheck() {
return editionType == Constant.editionType.CHECK;
}
///////////////////////////////////////     以下ファイルパス関係     ///////////////////////////////////////
......
......@@ -144,8 +144,4 @@ public class Constant {
int Camera = 2;
int Audio =3;
}
public interface editionType {
int CHECK = 5;
}
}
......@@ -356,10 +356,6 @@ public class ABVDataCache {
return !isServiceOptionEnable(ServiceOptionId.CatalogEdition) && !isServiceOptionEnable(ServiceOptionId.Publisher);
}
public boolean isABookCheck() {
return isServiceOptionEnable(ServiceOptionId.ABookCheck);
}
public boolean isReportGPS() {
return isServiceOptionEnable(ServiceOptionId.REPORT_GPS);
}
......
......@@ -98,7 +98,6 @@ public class ABVDataOpenHelper {
iTableScripts.add(new TEnquete());
iTableScripts.add(new TSubscriptionHistory());
if (ABVEnvironment.getInstance().isABookCheck()) {
iTableScripts.add(new MWorkerGroup());
iTableScripts.add(new TProject());
iTableScripts.add(new RProjectContent());
......@@ -110,7 +109,7 @@ public class ABVDataOpenHelper {
iTableScripts.add(new TTaskReportItems());
iTableScripts.add(new TPushMessage());
iTableScripts.add(new TInspectTaskReport());
}
return iTableScripts;
}
......
......@@ -744,9 +744,7 @@ public class ContentDao extends AbstractDao {
delete("r_content_category", "content_id=?", keyValues);
delete("r_content_group", "content_id=?", keyValues);
delete("t_interactive_info", "dst_content_id=?", keyValues);
if (ABVEnvironment.getInstance().isABookCheck()) {
delete("r_project_content", "content_id=?", keyValues);
}
delete("t_content", "content_id=?", keyValues);
} else {
// 削除したコンテンツは自動ダウンロード禁止フラグをtrueにする
......
......@@ -101,10 +101,9 @@ public class ContentFileExtractor {
extractResourceZipFile(contentId, contentPath, contentDir);
doContentResourceFile(contentId, contentDir);
if (contentDto.isPanoImage() || ABVDataCache.getInstance().serviceOption.isABookCheck()) { // pano imageの場合キャッシュに解凍
String cacheDir = getContentCacheDirWithExtract(contentId);
Logger.i(TAG, "extract content files to cache dir. contentId=%s, cacheDir=%s", contentId, cacheDir);
}
}
private void extractResourceZipFile(long contentId, String contentPath, File contentDir) throws ZipException, NoSuchAlgorithmException, IOException, ABVException {
......@@ -121,7 +120,6 @@ public class ContentFileExtractor {
}
};
if (ABVDataCache.getInstance().serviceOption.isABookCheck()) {
File panoImageFile = new File(ABVEnvironment.getInstance().getPanoImageName(contentPath));
//存在チェック
if (panoImageFile.exists()) {
......@@ -132,7 +130,7 @@ public class ContentFileExtractor {
File[] zipFiles = panoImageDir.listFiles(fileFilter);
if (zipFiles != null) {
for(File zipFile : zipFiles) {
for (File zipFile : zipFiles) {
String folderPath = zipFile.getPath().replace(".zip", "");
extractZipFile(contentId, zipFile.getPath(), folderPath);
}
......@@ -150,7 +148,7 @@ public class ContentFileExtractor {
File[] zipFiles = panoImageDir.listFiles(fileFilter);
if (zipFiles != null) {
for(File zipFile : zipFiles) {
for (File zipFile : zipFiles) {
String folderPath = zipFile.getPath().replace(".zip", "");
extractZipFile(contentId, zipFile.getPath(), folderPath);
}
......@@ -167,13 +165,13 @@ public class ContentFileExtractor {
File[] zipFiles = taskListDir.listFiles(fileFilter);
if (zipFiles != null) {
for(File zipFile : zipFiles) {
for (File zipFile : zipFiles) {
String folderPath = zipFile.getPath().replace(".zip", "");
extractZipFile(contentId, zipFile.getPath(), folderPath);
}
}
}
}
// それ以外のzip
ContentDto contentDto = contentDao.getContent(contentId);
......
......@@ -374,7 +374,6 @@ public class ContentRefresher {
}
if (contentDownloadListener != null) {
if (ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck()) {
if (!isRefreshing() && e == null) {
// 新着処理が終わったら以下の処理が実行
try {
......@@ -385,7 +384,6 @@ public class ContentRefresher {
e = e1;
}
}
}
contentDownloadListener.onRefreshedContent(e == null, contentId, e);
}
}
......
package jp.agentec.abook.abv.bl.logic;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Calendar;
import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
import jp.agentec.abook.abv.bl.acms.client.json.GetBackupFileListJSON;
import jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetBackupFileParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.UploadBackupFileParameters;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Constant.BackupFileName;
import jp.agentec.abook.abv.bl.common.Constant.BackupFileType;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
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.ContentMemoDao;
import jp.agentec.abook.abv.bl.dto.ContentMemoDto;
import jp.agentec.adf.util.FileUtil;
import org.json.adf.JSONObject;
public class BackupRestoreLogic extends AbstractLogic {
private static final String TAG = "BackupRestoreLogic";
private ContentMemoDao contentMemoDao = AbstractDao.getDao(ContentMemoDao.class);
public GetBackupFileListJSON getBackupFileList() throws AcmsException, NetworkDisconnectedException {
AcmsClient acms = AcmsClient.getInstance(cache.getUrlPath(), networkAdapter);
AcmsParameters BFparam = new AcmsParameters(cache.getMemberInfo().sid);
return acms.getBackupFileList(BFparam);
}
public boolean getBackupFile(String fileType) throws MalformedURLException {
boolean result;
AcmsClient acms;
String path = ABVEnvironment.getInstance().getBackupFileDirectoryPath();
File pathDirectory = new File(path);
if (!pathDirectory.exists()) {
pathDirectory.mkdir();
}
acms = AcmsClient.getInstance(cache.getUrlPath(), networkAdapter);
GetBackupFileParameters BFparam= new GetBackupFileParameters(cache.getMemberInfo().sid, fileType);
if (fileType.equals(BackupFileType.Memo)) {
path = path + "/" + BackupFileName.Memo;
}else if (fileType.equals(BackupFileType.Marking)) {
path = path + "/" + BackupFileName.Marking;
}else if (fileType.equals(BackupFileType.Bookmark)) {
path = path + "/" + BackupFileName.Bookmark;
}
File checkFile = new File(path);
if (checkFile.exists()) {
checkFile.delete();
}
result = acms.getBackupFile(BFparam,path);
return result;
}
public boolean uploadBackupFile(File fileList) throws AcmsException, NetworkDisconnectedException, IOException{
AcmsClient acms = AcmsClient.getInstance(cache.getUrlPath(), networkAdapter);
UploadBackupFileParameters UBparam= new UploadBackupFileParameters(cache.getMemberInfo().sid, fileList);
String list = acms.uploadBackupFile(UBparam);
return list.equals("success");
}
public String notifyBackupStart(String fileType) throws AcmsException, NetworkDisconnectedException{
AcmsClient acms = AcmsClient.getInstance(cache.getUrlPath(), networkAdapter);
GetBackupFileParameters nbp = new GetBackupFileParameters(cache.getMemberInfo().sid, fileType);
return acms.notifyBackupStart(nbp);
}
public String notifyBackupFinish(String fileType) throws AcmsException, NetworkDisconnectedException{
AcmsClient acms = AcmsClient.getInstance(cache.getUrlPath(), networkAdapter);
GetBackupFileParameters nbp = new GetBackupFileParameters(cache.getMemberInfo().sid, fileType);
return acms.notifyBackupFinish(nbp);
}
public boolean[] isRestoreItem(GetBackupFileListJSON json) {
boolean[] restoreItem = new boolean[3];
if (json.fileList == null) {
return restoreItem;
}
for (int i=0; i<json.fileList.length(); i++) {
JSONObject jitem = (JSONObject)json.fileList.get(i);
String fileName = jitem.getString("filename");
if (fileName.equals(BackupFileName.Memo)) {
restoreItem[0] = true;
}else if (fileName.equals(BackupFileName.Marking)) {
restoreItem[1] = true;
}else if (fileName.equals(BackupFileName.Bookmark)) {
restoreItem[2] = true;
}
}
return restoreItem;
}
public void deleteBackupFile() {
String path = ABVEnvironment.getInstance().getBackupFileDirectoryPath();
File dir = new File(path);
if (dir.exists()) {
File[] files = dir.listFiles();
if (files != null) {
for (int i = 0; i < files.length; i++) {
files[i].delete();
}
}
}
}
public void restoreMemo(ContentMemoDto dto) {
contentMemoDao.restoreMemo(dto);
}
public void setBackupRestoreTime(String type, int type2) {
//type : 백업/복구
//type2 : 1=완료 2=부분완료
String path= ABVEnvironment.getInstance().getBackupTimeDirectoryPath()+"/time";
File pathDirectory = new File(path);
if (!pathDirectory.exists()) {
pathDirectory.mkdir();
}
String backupTimepath = path + "/backupTime.txt";
String restoreTimepath = path + "/restoreTime.txt";
String backupTimepath2 = path + "/backupTime2.txt";
String restoreTimepath2 = path + "/restoreTime2.txt";
String time;
Calendar cal = Calendar.getInstance();
String dateToString;
String timeToString;
dateToString = String.format("%04d/%02d/%02d", cal.get(Calendar.YEAR), cal.get(Calendar.MONTH)+1, cal.get(Calendar.DAY_OF_MONTH));
timeToString = String.format("%02d:%02d", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));
time = dateToString + " " + timeToString;
String timeType;
if (type2==1) {
timeType = BackupFileType.Memo;
}else{
timeType = BackupFileType.Marking;
}
File file = null;
File file2 = null;
if (type.equals("backup")) {
file = new File(backupTimepath);
file2= new File(backupTimepath2);
} else if (type.equals("restore")) {
file = new File(restoreTimepath);
file2= new File(restoreTimepath2);
}
FileWriter filewriter = null;
try {
if (file != null) {
filewriter = new FileWriter(file);
filewriter.write(time);
filewriter.flush();
filewriter.close();
filewriter = new FileWriter(file2);
filewriter.write(timeType);
}
} catch (Exception e) {
Logger.e(TAG, e.toString()); // FIXME: 例外処理
} finally {
if (filewriter != null) {
try {
filewriter.flush();
filewriter.close();
} catch (Exception e) {
}
}
}
}
public ArrayList<String> getBackupRestoreTime(String type) throws IOException{
String path = ABVEnvironment.getInstance().getBackupTimeDirectoryPath()+"/time";
String backupTimePath = path + "/backupTime.txt";
String restoreTimePath = path + "/restoreTime.txt";
String backupTimePath2 = path + "/backupTime2.txt";
String restoreTimePath2 = path + "/restoreTime2.txt";
File file;
File file2;
String time;
String time2;
if (type.equals("backup")) {
file = new File(backupTimePath);
file2= new File(backupTimePath2);
} else {
file = new File(restoreTimePath);
file2= new File(restoreTimePath2);
}
time = FileUtil.readTextFile(file.getPath());
time2 = FileUtil.readTextFile(file2.getPath());
ArrayList<String> returnTime = new ArrayList<String>();
returnTime.add(time);
returnTime.add(time2);
return returnTime;
}
public void deleteBackupRestoreTime() {
String path = ABVEnvironment.getInstance().getBackupTimeDirectoryPath()+"/time";
File dir = new File(path);
if (dir.exists()) {
File[] files = dir.listFiles();
if (files != null) {
for (int i = 0; i < files.length; i++) {
files[i].delete();
}
}
}
}
}
......@@ -57,15 +57,9 @@ android {
resValue("integer", "login_mode", "${login_mode}")
resValue("string", "account_path", "${account_path}")
resValue("integer", "location_mode", "${location_mode}")
resValue("integer", "view_mode_type", "${view_mode_type}")
resValue("integer", "filer_favorite", "${filer_favorite}")
resValue("integer", "filer_content_type", "${filer_content_type}")
resValue("integer", "setting_menu_general", "${setting_menu_general}")
resValue("integer", "setting_menu_viewer", "${setting_menu_viewer}")
resValue("integer", "setting_menu_account", "${setting_menu_account}")
resValue("integer", "setting_menu_logout", "${setting_menu_logout}")
resValue("integer", "setting_menu_password_change", "${setting_menu_password_change}")
resValue("integer", "setting_menu_backup", "${setting_menu_backup}")
resValue("integer", "setting_menu_log_info", "${setting_menu_log_info}")
resValue("integer", "setting_menu_app_info", "${setting_menu_app_info}")
resValue("integer", "setting_menu_url_path", "${setting_menu_url_path}")
......@@ -74,9 +68,6 @@ android {
resValue("integer", "viewer_menu_history", "${viewer_menu_history}")
resValue("integer", "viewer_menu_index", "${viewer_menu_index}")
resValue("integer", "viewer_menu_search", "${viewer_menu_search}")
resValue("integer", "viewer_menu_share", "${viewer_menu_share}")
resValue("integer", "viewer_menu_pdf_send_mail", "${viewer_menu_pdf_send_mail}")
resValue("integer", "viewer_menu_cursor", "${viewer_menu_cursor}")
resValue("integer", "viewer_menu_memo", "${viewer_menu_memo}")
resValue("integer", "viewer_menu_marking", "${viewer_menu_marking}")
resValue("integer", "viewer_menu_bookmark", "${viewer_menu_bookmark}")
......
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory android:title="@string/general_settings" android:key="general_settings" >
<CheckBoxPreference
android:defaultValue="true"
android:key="wifiAlertEnable"
android:summary="@string/wifi_alert_summary"
android:title="@string/wifi_alert" />
<CheckBoxPreference
android:defaultValue="false"
android:key="permissionAccessLocation"
android:summary="@string/location_info_summary"
android:title="@string/location_info" />
<CheckBoxPreference
android:defaultValue="false"
android:key="autoDownload"
android:summary="@string/auto_download_summary"
android:title="@string/auto_download" />
<ListPreference
android:defaultValue="0"
android:key="tapActionOnUpdate"
android:summary="@string/tap_action_on_update_summary"
android:title="@string/tap_action_on_update"
android:dialogTitle="@string/tap_action_on_update"
android:entries="@array/tap_action_on_update"
android:entryValues="@array/tap_action_on_update_values" />
<ListPreference
android:defaultValue="2"
android:key="tapActionOnDeliverySelect"
android:summary="@string/tap_action_on_delivery_select_summary"
android:title="@string/tap_action_on_delivery_select"
android:dialogTitle="@string/tap_action_on_delivery_select"
android:entries="@array/tap_action_on_delivery_select"
android:entryValues="@array/tap_action_on_delivery_select_values" />
<PreferenceScreen
android:key="pushMessage"
android:title="@string/push_message_setting" >
</PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory android:title="@string/viewer_setting" android:key="viewer_setting" >
<CheckBoxPreference
android:defaultValue="@bool/repeat_default"
android:key="repeatablePlay"
android:summary="@string/repeat_summary"
android:title="@string/repeat" />
<CheckBoxPreference
android:defaultValue="false"
android:key="cursorEnable"
android:summary="@string/cursor_summary"
android:title="@string/cursor" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/meetingroom_setting" android:key="meetingroom_setting" >
<CheckBoxPreference
android:defaultValue="false"
android:key="chairmanMarkingShareFlag"
android:summary="@string/chairman_marking_share_summary"
android:title="@string/chairman_marking_share" />
<CheckBoxPreference
android:defaultValue="false"
android:key="meetingMarkingAutoSaveFlag"
android:summary="@string/marking_share_auto_save_summary"
android:title="@string/marking_share_auto_save" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/account" android:key="account_set">
<PreferenceScreen
android:key="accountPath"
......@@ -89,22 +28,6 @@
android:title="@string/logout" >
</PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory android:title="@string/data_mgt" android:key="data_set">
<PreferenceScreen
android:key="backup"
android:summary="@string/last_operation_date_default"
android:title="@string/backup" >
</PreferenceScreen>
<PreferenceScreen
android:key="restore"
android:summary="@string/last_operation_date_default"
android:title="@string/restore" >
</PreferenceScreen>
<PreferenceScreen
android:key="restore_purchase_history"
android:title="@string/restore_purchase_history" >
</PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory android:title="@string/log_info" android:key="log_info">
<CheckBoxPreference
android:defaultValue="true"
......
......@@ -47,11 +47,9 @@ public class ABVApplication extends MultiDexApplication {
exceptionHandler.init(this);
Thread.setDefaultUncaughtExceptionHandler(exceptionHandler);
if (ABVEnvironment.getInstance().isABookCheck()) {
//添付ファイル臨時保存場所削除
FileUtil.delete(ABVEnvironment.getInstance().getCacheTempAttachedImageDirPath());
}
}
@Override
public void onTerminate() { // 呼ばれることはないので意味がないが
......
......@@ -158,7 +158,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
isLinkedContent = intent.getBooleanExtra("isLinkedContent", false);
mProjectId = intent.getLongExtra(ABookKeys.PROJECT_ID, -1);
if (ABVEnvironment.getInstance().isABookCheck() && !isLinkedContent) {
if (!isLinkedContent) {
projectDto = AbstractLogic.getLogic(ProjectLogic.class).getProject(mProjectId);
mXWalkOpenType = intent.getIntExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, -1);
if (mXWalkOpenType == Constant.XWalkOpenType.TASK_REPORT || mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION || mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
......@@ -222,11 +222,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
showUpdateContentAlert(contentId);
}
protected boolean isShowFavoriteItem() {
ContentDto contentDto = contentDao.getContent(contentId);
return Options.getInstance(ABVContentViewActivity.this).getFilerFavorite() == 1 && !contentDto.isUnAuthorizedContent;
}
private void showUpdateContentAlert(long contentId) {
if (meetingManager.isConnected()) {
ContentDto contentDto = contentDao.getContent(contentId);
......@@ -325,16 +320,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
ActivityHandlingHelper.getInstance().removeObjectViewActivity(this);
}
/**
* Checkの場合、リストに戻る時、interrupt=trueで
* コンテンツダウンロード中止になるので、kickTask()を実行しない。
* 代わりに「ContentRefresher.RefreshContentWorker.contentDownloader.kickTask()」で実行される
*/
if (!ABVEnvironment.getInstance().isABookCheck()) {
// 待機中のダウンロードがあれば開始する。
ContentDownloader.getInstance().kickTask();
}
//キャッシュを使用しない場合、ディレクトリが残っていれば削除
if (!getRBoolean(R.bool.use_cache) && objectId == -1) {
ContentFileExtractor.getInstance().removeContentCash(contentId);
......@@ -634,7 +619,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (this instanceof NoPdfViewActivity) {
if(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if(isLinkedContent) {
goToBack();
} else {
this.finish();
......@@ -1234,7 +1219,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
protected boolean isProjectPdf() {
return ABVEnvironment.getInstance().isABookCheck() && isProjectPdf;
return isProjectPdf;
}
public boolean isDirector() {
......
......@@ -25,21 +25,6 @@ public class ABVFunctionOptions extends AbstractOptions {
}
@Override
public int getFilerFavorite() {
return context.getResources().getInteger(R.integer.filer_favorite);
}
@Override
public int getSettingMenuGeneral() {
return context.getResources().getInteger(R.integer.setting_menu_general);
}
@Override
public int getSettingMenuViewer() {
return context.getResources().getInteger(R.integer.setting_menu_viewer);
}
@Override
public int getSettingMenuAccount() {
return context.getResources().getInteger(R.integer.setting_menu_account);
}
......@@ -60,15 +45,6 @@ public class ABVFunctionOptions extends AbstractOptions {
}
@Override
public int getSettingMenuBackup() {
if (ABVDataCache.getInstance().serviceOption.isServiceOptionEnable(ServiceOptionId.Backup)) {
return context.getResources().getInteger(R.integer.setting_menu_backup);
} else {
return 0;
}
}
@Override
public int getSettingMenuLogInfo() {
return context.getResources().getInteger(R.integer.setting_menu_log_info);
}
......@@ -79,11 +55,6 @@ public class ABVFunctionOptions extends AbstractOptions {
}
@Override
public int getViewerMenuHistory() {
return context.getResources().getInteger(R.integer.viewer_menu_history);
}
@Override
public int getViewerMenuIndex() {
return context.getResources().getInteger(R.integer.viewer_menu_index);
}
......@@ -94,34 +65,11 @@ public class ABVFunctionOptions extends AbstractOptions {
}
@Override
public int getViewerMenuShare(long contentId) {
if (context.getResources().getBoolean(R.bool.follow_service_option)) {
return getContentShareVisibility(contentId);
} else {
return context.getResources().getInteger(R.integer.viewer_menu_share);
}
}
@Override
public int getViewerMenuPdfSendMail(long contentId) {
if (context.getResources().getBoolean(R.bool.follow_service_option)) {
return getPdfSendMailVisibility(contentId);
} else {
return context.getResources().getInteger(R.integer.viewer_menu_pdf_send_mail);
}
}
@Override
public int getViewerMenuTextcopy() {
return ABVDataCache.getInstance().serviceOption.isServiceOptionEnable(ServiceOptionId.PdfTextCopy) ? 1 : 0;
}
@Override
public int getViewerMenuCursor() {
return context.getResources().getInteger(R.integer.viewer_menu_cursor);
}
@Override
public int getViewerMenuMemo() {
return context.getResources().getInteger(R.integer.viewer_menu_memo);
}
......
......@@ -18,21 +18,6 @@ public class DefaultOptions extends AbstractOptions {
}
@Override
public int getFilerFavorite() {
return 0;
}
@Override
public int getSettingMenuGeneral() {
return 0;
}
@Override
public int getSettingMenuViewer() {
return 1;
}
@Override
public int getSettingMenuAccount() {
return 1;
}
......@@ -53,11 +38,6 @@ public class DefaultOptions extends AbstractOptions {
}
@Override
public int getSettingMenuBackup() {
return 0;
}
@Override
public int getSettingMenuLogInfo() {
return 1;
}
......@@ -68,11 +48,6 @@ public class DefaultOptions extends AbstractOptions {
}
@Override
public int getViewerMenuHistory() {
return 1;
}
@Override
public int getViewerMenuIndex() {
return 0;
}
......@@ -83,26 +58,11 @@ public class DefaultOptions extends AbstractOptions {
}
@Override
public int getViewerMenuShare(long contentId) {
return getContentShareVisibility(contentId);
}
@Override
public int getViewerMenuPdfSendMail(long contentId) {
return 0;
}
@Override
public int getViewerMenuTextcopy() {
return 0;
}
@Override
public int getViewerMenuCursor() {
return 0;
}
@Override
public int getViewerMenuMemo() {
return 0;
}
......
......@@ -8,24 +8,6 @@ public interface IOptions {
int getLocationMode();
/**
* 絞り込み:お気に入り
* @return 0:非表示 1:表示
*/
int getFilerFavorite();
/**
* 設定:一般
* @return 0:非表示 1:表示
*/
int getSettingMenuGeneral();
/**
* 設定:ビューア
* @return 0:非表示 1:表示
*/
int getSettingMenuViewer();
/**
* 設定:アカウント
* @return 0:非表示 1:表示
*/
......@@ -50,12 +32,6 @@ public interface IOptions {
int getSettingMenuPasswordChange();
/**
* 設定:バックアップ
* @return 0:非表示 1:表示
*/
int getSettingMenuBackup();
/**
* 設定:ログ情報
* @return 0:非表示 1:表示
*/
......@@ -74,12 +50,6 @@ public interface IOptions {
int getViewerMenuExit();
/**
* Viewerツールバー:履歴
* @return 0:非表示、1:表示
*/
int getViewerMenuHistory();
/**
* Viewerツールバー:インデックス
* @return 0:非表示、1:表示
*/
......@@ -92,30 +62,12 @@ public interface IOptions {
int getViewerMenuSearch();
/**
* Viewerツールバー:共有
* @return 0:非表示、1:表示
*/
int getViewerMenuShare(long contentId);
/**
* Viewerツールバー:共有
* @return 0:非表示、1:表示
*/
int getViewerMenuPdfSendMail(long contentId);
/**
* Viewerツールバー:テキストコピー
* @return 0:非表示、1:表示
*/
int getViewerMenuTextcopy();
/**
* Viewerツールバー:カーソル
* @return 0:非表示、1:表示
*/
int getViewerMenuCursor();
/**
* Viewer:メモ
* @return
*/
......
......@@ -20,21 +20,6 @@ public class LargeOptions extends AbstractOptions {
}
@Override
public int getFilerFavorite() {
return 1;
}
@Override
public int getSettingMenuGeneral() {
return 1;
}
@Override
public int getSettingMenuViewer() {
return 1;
}
@Override
public int getSettingMenuAccount() {
return 1;
}
......@@ -55,15 +40,6 @@ public class LargeOptions extends AbstractOptions {
}
@Override
public int getSettingMenuBackup() {
if (ABVDataCache.getInstance().serviceOption.isServiceOptionEnable(ServiceOptionId.Backup)) {
return 1;
} else {
return 0;
}
}
@Override
public int getSettingMenuLogInfo() {
return 1;
}
......@@ -74,11 +50,6 @@ public class LargeOptions extends AbstractOptions {
}
@Override
public int getViewerMenuHistory() {
return 1;
}
@Override
public int getViewerMenuIndex() {
return 1;
}
......@@ -89,26 +60,11 @@ public class LargeOptions extends AbstractOptions {
}
@Override
public int getViewerMenuShare(long contentId) {
return getContentShareVisibility(contentId);
}
@Override
public int getViewerMenuPdfSendMail(long contentId) {
return getPdfSendMailVisibility(contentId);
}
@Override
public int getViewerMenuTextcopy() {
return ABVDataCache.getInstance().serviceOption.isServiceOptionEnable(ServiceOptionId.PdfTextCopy) ? 1 : 0;
}
@Override
public int getViewerMenuCursor() {
return 0;
}
@Override
public int getViewerMenuMemo() {
return 1;
}
......
......@@ -20,21 +20,6 @@ public class MidOptions extends AbstractOptions {
}
@Override
public int getFilerFavorite() {
return 0;
}
@Override
public int getSettingMenuGeneral() {
return 1;
}
@Override
public int getSettingMenuViewer() {
return 1;
}
@Override
public int getSettingMenuAccount() {
return 1;
}
......@@ -55,15 +40,6 @@ public class MidOptions extends AbstractOptions {
}
@Override
public int getSettingMenuBackup() {
if (ABVDataCache.getInstance().serviceOption.isServiceOptionEnable(ServiceOptionId.Backup)) {
return 1;
} else {
return 0;
}
}
@Override
public int getSettingMenuLogInfo() {
return 1;
}
......@@ -74,11 +50,6 @@ public class MidOptions extends AbstractOptions {
}
@Override
public int getViewerMenuHistory() {
return 1;
}
@Override
public int getViewerMenuIndex() {
return 0;
}
......@@ -89,26 +60,11 @@ public class MidOptions extends AbstractOptions {
}
@Override
public int getViewerMenuShare(long contentId) {
return getContentShareVisibility(contentId);
}
@Override
public int getViewerMenuPdfSendMail(long contentId) {
return getPdfSendMailVisibility(contentId);
}
@Override
public int getViewerMenuTextcopy() {
return 0;
}
@Override
public int getViewerMenuCursor() {
return 0;
}
@Override
public int getViewerMenuMemo() {
return 0;
}
......
......@@ -38,7 +38,6 @@ public class ABookSettingActivity extends PreferenceActivity {
backToHome();
}
});
if (ABVEnvironment.getInstance().isABookCheck()) {
//操作説明書コピー(バージョン変更もあるので毎回コピー)
try {
ContentFileExtractor.getInstance().removeContentCash(0L);
......@@ -48,8 +47,6 @@ public class ABookSettingActivity extends PreferenceActivity {
} catch (IOException e) {
Logger.e(TAG, "copyGuidePDFFile Exception = " + e);
}
}
}
@Override
......
......@@ -609,26 +609,9 @@ public class GuideViewActivity extends ABVContentViewActivity {
private void unlimitViewer() {
overlapLayout.setVisibility(View.GONE);
// mBtnRemoteStart.setVisibility(View.GONE);
//
// if (meetingManager.isSubscribed()) {
// mBtnMeetingRoomSetting.setVisibility(View.GONE);
// }
// if (meetingManager.isSendable()) {
// if(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck()) {
// mBtnMeetingRoomSetting.setVisibility(View.GONE);
// } else {
// mBtnMeetingRoomSetting.setVisibility(View.VISIBLE);
// }
// }
if (Options.getInstance(this).getViewerMenuExit() == 1) {
mExitBtn.setVisibility(View.VISIBLE);
}
//
// if (Options.getInstance(this).getViewerMenuHistory() == 1 && !(ABVEnvironment.getInstance().isABookCheck())) {
// mHistoryBtn.setVisibility(View.VISIBLE);
// }
}
private void initRemoteLayout() {
......@@ -721,9 +704,7 @@ public class GuideViewActivity extends ABVContentViewActivity {
}
});
if(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck()) {
meetingRoomSettingBtn.setVisibility(View.GONE);
}
ImageButton promoteBtn = (ImageButton) subscriberToolBar.findViewById(R.id.btn_promote);
promoteBtn.setOnClickListener(new View.OnClickListener() {
......
......@@ -23,7 +23,6 @@ import jp.agentec.abook.abv.bl.download.ContentRefresher;
import jp.agentec.abook.abv.bl.dto.MemberInfoDto;
import jp.agentec.abook.abv.bl.dto.PasswordLockInfoDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.BackupRestoreLogic;
import jp.agentec.abook.abv.bl.logic.ContractLogic;
import jp.agentec.abook.abv.bl.logic.ProjectLogic;
import jp.agentec.abook.abv.bl.logic.UserAuthenticateLogic;
......@@ -698,7 +697,6 @@ public class LoginActivity extends ABVLoginActivity {
PreferenceUtil.clearUserPref(this);
memberInfoDao.deleteMemberInfo();
BackupRestoreLogic brLogic = AbstractLogic.getLogic(BackupRestoreLogic.class);
contentLogic.deleteContentMarkingData();
boolean isAllDelete =true;
if (getRInteger(R.integer.not_delete_all_contents) == 1) {
......@@ -707,7 +705,6 @@ public class LoginActivity extends ABVLoginActivity {
contentLogic.deleteAllContent(isAllDelete);
ProjectLogic projectLogic = AbstractLogic.getLogic(ProjectLogic.class);
projectLogic.deleteAllProject();
brLogic.deleteBackupRestoreTime();
memberInfoDao.deleteMemberContentInfo(isAllDelete);
// バグ対応:ユーザ切り替え時検索結果の履歴が削除する。
SearchHistoryDao searchHistoryDao = AbstractDao.getDao(SearchHistoryDao.class);
......@@ -728,12 +725,7 @@ public class LoginActivity extends ABVLoginActivity {
*/
private void changeUserInit2() {
memberInfoDao.deleteMemberInfo();
BackupRestoreLogic brLogic = AbstractLogic.getLogic(BackupRestoreLogic.class);
contentLogic.deleteContentMarkingData();
brLogic.deleteBackupRestoreTime();
memberInfoDao.deleteMemberMydataInfo();
}
......
......@@ -142,16 +142,15 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
boolean isLinkedContent = false;
Long projectId = null;
int pageNo = 0;
if (ABVEnvironment.getInstance().isABookCheck()) {
ABVAuthenticatedActivity activity = getCurrentActivity();
if (activity instanceof ABVContentViewActivity) {
projectId = ((ABVContentViewActivity) activity).mProjectId;
isLinkedContent = ((ABVContentViewActivity) activity).isLinkedContent;
pageNo = ((ABVContentViewActivity) activity).pageNo;
}
}
if (ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if (isLinkedContent) {
startContentActivityForLinkedConent(projectId, contentId, pageNo);
} else {
startContentActivity(contentId, page, new Intent());
......@@ -1090,13 +1089,11 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
private void handleUpdateDownload(final ContentZipDownloadNotification data) {
if (data.getDownloadStatus() == DownloadStatusType.Succeeded) {
if(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck()) {
if (!hasProjectListActivity()) { // ProjectListActivityがStackにない場合無視
Logger.w(TAG, "No ProjectListActivity. Ignore download notification.");
return;
}
}
showToast(mContext.getString(R.string.download_success));
handler.postDelayed(new Runnable() { // DLのステータスがDBに反映されれるよりも先に通知が来るため1秒delayさせる。
......
......@@ -242,12 +242,9 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
} else {
historyListBtn.setVisibility(View.GONE);
subMenuBtn.setVisibility(View.GONE);
}
if(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck()) {
subMenuBtn.setVisibility(View.GONE);
}
final ImageButton btnWebClose = (ImageButton) findViewById(R.id.btnWebClose);
btnWebClose.setOnClickListener(new View.OnClickListener() {
......@@ -571,11 +568,6 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
}
});
if(!(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent)) {
configureRemote();
}
// 位置情報取得許可、サービスオプション、ビルドオプションチェック
if (isStreaming && PreferenceUtil.get(this, DefPrefKey.PERMISSION_ACCESS_LOCATION, false)
&& AbstractLogic.getLogic(ContractLogic.class).getUsableReadinglogGps()
......@@ -616,8 +608,7 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
locationManagerUtil.startLocationService();
}
if(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if(isLinkedContent) {
ContentDto contentDto = AbstractDao.getDao(ContentDao.class).getContent(contentId);
if (ContentJSON.KEY_ENQUETE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_EXAM_TYPE.equals(contentDto.contentType)) {
closeButton.setBackgroundResource(R.drawable.btn_first_back);
......@@ -631,6 +622,8 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
promoteBtn.setVisibility(View.GONE);
pauseBtn.setVisibility(View.GONE);
}
} else {
configureRemote();
}
}
......@@ -754,7 +747,7 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
setResult(RESULT_OK, new Intent());
finish();
if (objectId == -1) { // Enqueteコンテンツの場合で、KeyUpではない場合、全コンテンツActivityを終了
if(!(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent)) {
if(!isLinkedContent) {
ActivityHandlingHelper.getInstance().finishAllContentViewActivity();
}
}
......@@ -784,9 +777,6 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
closeButton.setVisibility(View.INVISIBLE);
historyListBtn.setVisibility(View.INVISIBLE);
if (meetingManager.isPaused()) {
if(!(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck())) {
subMenuBtn.setVisibility(View.VISIBLE);
}
mBtnRemoteStart.setVisibility(View.VISIBLE);
pauseBtn.setVisibility(View.GONE);
exitMeetingBtn.setVisibility(View.GONE);
......@@ -804,9 +794,6 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
closeButton.setVisibility(View.VISIBLE);
if (objectId == -1) {
historyListBtn.setVisibility(View.VISIBLE);
if(!(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck())) {
subMenuBtn.setVisibility(View.VISIBLE);
}
}
else {
historyListBtn.setVisibility(View.GONE);
......@@ -834,10 +821,8 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
}
});
}
if (ABVEnvironment.getInstance().isABookCheck()) {
historyListBtn.setVisibility(View.GONE);
}
}
@Override
public void onDownloadingContentZip(ContentZipDownloadNotification notification) { // Streaming表示でダウンロードが完了した場合
......
......@@ -215,9 +215,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
}
});
if(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck()) {
subMenuBtn.setVisibility(View.GONE);
}
if (isStreaming) {
btnWebBack.setVisibility(View.GONE);
......@@ -494,9 +492,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
}
});
if(!(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent)) {
configureRemote();
}
// 位置情報取得許可、サービスオプション、ビルドオプションチェック
if (isStreaming && PreferenceUtil.get(this, DefPrefKey.PERMISSION_ACCESS_LOCATION, false)
......@@ -537,12 +533,9 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
});
locationManagerUtil.startLocationService();
}
if (ABVEnvironment.getInstance().isABookCheck()) {
historyListBtn.setVisibility(View.GONE);
}
if(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if(isLinkedContent) {
ContentDto contentDto = AbstractDao.getDao(ContentDao.class).getContent(contentId);
if (ContentJSON.KEY_MOVIE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_MUSIC_TYPE.equals(contentDto.contentType)
|| ContentJSON.KEY_PANO_IMAGE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(contentDto.contentType)
......@@ -572,6 +565,8 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
historyListBtn.setVisibility(View.GONE);
subMenuBtn.setVisibility(View.GONE);
}
} else {
configureRemote();
}
}
......@@ -675,19 +670,16 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (ABVEnvironment.getInstance().isABookCheck() && mProjectId != null) {
if (mProjectId > -1) {
if (mProjectId != null && mProjectId > -1) {
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_PROJECT_ID, mProjectId);
}
}
if (isStreaming) {
callExistsSendLog();
return true;
}
else {
if(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if(isLinkedContent) {
goToBack();
// moveToBack();
} else {
finishActivity();
}
......@@ -715,7 +707,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
setResult(RESULT_OK, new Intent());
finish();
if (objectId == -1) { // HTMLコンテンツの場合で、KeyUpではない場合、全コンテンツActivityを終了
if (ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if (isLinkedContent) {
ActivityHandlingHelper.getInstance().finishAllLinkContentViewActivity();
} else {
ActivityHandlingHelper.getInstance().finishAllContentViewActivity();
......@@ -748,9 +740,6 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
closeButton.setVisibility(View.INVISIBLE);
historyListBtn.setVisibility(View.INVISIBLE);
if (meetingManager.isPaused()) {
if(!(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck())) {
subMenuBtn.setVisibility(View.VISIBLE);
}
mBtnRemoteStart.setVisibility(View.VISIBLE);
pauseBtn.setVisibility(View.GONE);
exitMeetingBtn.setVisibility(View.GONE);
......@@ -766,9 +755,6 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
closeButton.setVisibility(View.VISIBLE);
if (objectId == -1) {
historyListBtn.setVisibility(View.VISIBLE);
if(!(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck())) {
subMenuBtn.setVisibility(View.VISIBLE);
}
} else {
historyListBtn.setVisibility(View.GONE);
subMenuBtn.setVisibility(View.GONE);
......@@ -803,8 +789,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
runOnUiThread(new Runnable() {
@Override
public void run() {
Logger.i(TAG, "onDownloadingContentZip ...........................................>");
if(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck()) {
Logger.d(TAG, "onDownloadingContentZip ...........................................>");
if (notification.getDownloadStatus() == DownloadStatusType.Downloading) {
Logger.d(TAG, "onDownloadingContentZip .....................Downloading......................>");
ABVToastUtil.showMakeText(getApplicationContext(), R.string.reader_downloading, Toast.LENGTH_SHORT);
......@@ -815,9 +800,6 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
Logger.d(TAG, "onDownloadingContentZip .........................Succeeded..................>");
ABVToastUtil.showMakeText(getApplicationContext(), R.string.download_success, Toast.LENGTH_SHORT);
}
} else {
ABVToastUtil.showMakeText(getApplicationContext(), R.string.download_success, Toast.LENGTH_SHORT);
}
downloadButton.setVisibility(View.GONE);
}
});
......
......@@ -216,9 +216,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
}
});
if(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck()) {
subMenuBtn.setVisibility(View.GONE);
}
final Button btnWebBack = (Button) findViewById(R.id.btnWebBack);
final Button btnWebForward = (Button) findViewById(R.id.btnWebForward);
......@@ -384,7 +382,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
param.put(ABookKeys.URI, url);
// プロジェクト関連資料なのかをチェック
if ( url.startsWith(ABookKeys.CONTENTLINK) && ABVEnvironment.getInstance().isABookCheck()) {
if ( url.startsWith(ABookKeys.CONTENTLINK)) {
Long dstContentId = Long.valueOf(param.get("contentId"));
if (ActivityHandlingHelper.getInstance().isExistCommonContent(contentId)) {
if (!ActivityHandlingHelper.getInstance().isExistCommonContent(dstContentId)) {
......@@ -540,23 +538,15 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
configureRemote();
}
});
if(!(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent)) {
configureRemote();
}
// 位置情報取得許可、サービスオプション、ビルドオプションチェック
if (isStreaming && PreferenceUtil.get(this, AppDefType.DefPrefKey.PERMISSION_ACCESS_LOCATION, false)
&& AbstractLogic.getLogic(ContractLogic.class).getUsableReadinglogGps()
&& getResources().getInteger(R.integer.usable_location_service) == 1) {
setLocation(false, true);
}
if (ABVEnvironment.getInstance().isABookCheck()) {
historyListBtn.setVisibility(View.GONE);
}
if(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if(isLinkedContent) {
ContentDto contentDto = AbstractDao.getDao(ContentDao.class).getContent(contentId);
if (ContentJSON.KEY_MOVIE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_MUSIC_TYPE.equals(contentDto.contentType)
|| ContentJSON.KEY_PANO_IMAGE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(contentDto.contentType)
......@@ -586,8 +576,9 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
historyListBtn.setVisibility(View.GONE);
subMenuBtn.setVisibility(View.GONE);
}
} else {
configureRemote();
}
}
private void removeNewFlag() {
......@@ -690,19 +681,16 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (ABVEnvironment.getInstance().isABookCheck() && mProjectId != null ) {
if (mProjectId > -1) {
if (mProjectId != null && mProjectId > -1) {
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_PROJECT_ID, mProjectId);
}
}
if (isStreaming) {
callExistsSendLog();
return true;
}
else {
if(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if(isLinkedContent) {
goToBack();
// moveToBack();
} else {
finishActivity();
}
......@@ -728,7 +716,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
protected void finishActivity() {
setResult(RESULT_OK, new Intent());
finish();
if (ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if (isLinkedContent) {
ActivityHandlingHelper.getInstance().finishAllLinkContentViewActivity();
} else {
ActivityHandlingHelper.getInstance().finishAllContentViewActivity();
......@@ -763,15 +751,11 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
closeButton.setVisibility(View.INVISIBLE);
historyListBtn.setVisibility(View.INVISIBLE);
if (meetingManager.isPaused()) {
if(!(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck())) {
subMenuBtn.setVisibility(View.VISIBLE);
}
mBtnRemoteStart.setVisibility(View.VISIBLE);
pauseBtn.setVisibility(View.GONE);
exitMeetingBtn.setVisibility(View.GONE);
promoteBtn.setVisibility(View.GONE);
}
else {
} else {
subMenuBtn.setVisibility(View.GONE);
mBtnRemoteStart.setVisibility(View.GONE);
pauseBtn.setVisibility(View.VISIBLE);
......@@ -782,11 +766,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
closeButton.setVisibility(View.VISIBLE);
if (objectId == -1) {
historyListBtn.setVisibility(View.VISIBLE);
if(!(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck())) {
subMenuBtn.setVisibility(View.VISIBLE);
}
}
else {
} else {
historyListBtn.setVisibility(View.GONE);
subMenuBtn.setVisibility(View.GONE);
}
......
......@@ -68,9 +68,8 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
showHistoryList(v);
}
});
if (ABVEnvironment.getInstance().isABookCheck()) {
historyListBtn.setVisibility(View.INVISIBLE);
}
subMenuBtn = (ImageButton) findViewById(R.id.btn_sub_menu);
subMenuBtn.setOnClickListener(new OnClickListener() {
......@@ -84,30 +83,11 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
}
ArrayList<String> menuNameList = new ArrayList<>();
final boolean isExist = contentLogic.isExsitContentFavorite(getContentId());
final boolean isShowFavatite = isShowFavoriteItem();
if (isShowFavatite) {
if (isExist) {
menuNameList.add(getRString(R.string.remove_favorite_content));
} else {
menuNameList.add(getRString(R.string.add_favorite_content));
}
}
mShowedPopupWindow.setRepresentNames(menuNameList);
mShowedPopupWindow.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch (position) {
case 0:
// お気に入り
if (isShowFavatite) {
contentLogic.setFavoriteContent(getContentId(), !isExist);
break;
}
default:
break;
}
mShowedPopupWindow.dismiss();
}
});
......@@ -116,9 +96,7 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
}
});
if(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck()) {
subMenuBtn.setVisibility(View.GONE);
}
mBtnRemoteStart = (ImageButton) findViewById(R.id.btn_remote_start);
mBtnRemoteStart.setOnClickListener(new View.OnClickListener() {
......@@ -157,12 +135,7 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
}
});
if(!(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent)) {
configureRemote();
}
if(ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if(isLinkedContent) {
ContentDto contentDto = AbstractDao.getDao(ContentDao.class).getContent(contentId);
if (ContentJSON.KEY_IMAGE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_MOVIE_TYPE.equals(contentDto.contentType)
|| ContentJSON.KEY_PANO_IMAGE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(contentDto.contentType)
......@@ -179,6 +152,8 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
promoteBtn.setVisibility(View.GONE);
pauseBtn.setVisibility(View.GONE);
}
} else {
configureRemote();
}
}
......@@ -188,13 +163,7 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
exitBtn.setVisibility(View.INVISIBLE);
historyListBtn.setVisibility(View.INVISIBLE);
if (meetingManager.isPaused()) {
if (Options.getInstance(this).getFilerFavorite() == 1) {
if(!(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck())) {
subMenuBtn.setVisibility(View.VISIBLE);
}
} else {
subMenuBtn.setVisibility(View.GONE);
}
mBtnRemoteStart.setVisibility(View.VISIBLE);
pauseBtn.setVisibility(View.GONE);
exitMeetingBtn.setVisibility(View.GONE);
......@@ -211,27 +180,19 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
else {
exitBtn.setVisibility(View.VISIBLE);
historyListBtn.setVisibility(View.VISIBLE);
if (Options.getInstance(this).getFilerFavorite() == 1) {
if(!(ABVDataCache.getInstance().serviceOption.isABookCheck() && ABVEnvironment.getInstance().isABookCheck())) {
subMenuBtn.setVisibility(View.VISIBLE);
}
} else {
subMenuBtn.setVisibility(View.GONE);
}
mBtnRemoteStart.setVisibility(View.GONE);
pauseBtn.setVisibility(View.GONE);
switchMeetingExitButton();
promoteBtn.setVisibility(View.GONE);
}
if (ABVEnvironment.getInstance().isABookCheck()) {
historyListBtn.setVisibility(View.INVISIBLE);
}
}
protected void finishActivity() {
Logger.d(TAG, "finishActivity");
finish();
if (ABVEnvironment.getInstance().isABookCheck() && isLinkedContent) {
if (isLinkedContent) {
ActivityHandlingHelper.getInstance().finishAllLinkContentViewActivity();
} else {
ActivityHandlingHelper.getInstance().finishAllContentViewActivity();
......
......@@ -85,7 +85,7 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
btnLinkOriginalBack = (Button) findViewById(R.id.btn_link_original_back);
if (ABVEnvironment.getInstance().isABookCheck() && !isLinkedContent) {
if (!isLinkedContent) {
addSceneButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
......
......@@ -116,28 +116,13 @@ account_path=agtcatalog
#0:表示しない(全部の固定)、1:表示する
location_mode=1
#表示切り替え 2014/02/11 Ver1.1
#0:全部表示、1:サムネイル固定、2:パネル固定、3:リスト固定 (0:以外は「表示切替メニュー」を表示しない)
view_mode_type=0
#お気に入り
filer_favorite=0
#コンテンツタイプ
filer_content_type=1
#Setting Menu
#一般設定
setting_menu_general=1
#ビューア設定
setting_menu_viewer=1
#アカウント
setting_menu_account=1
#ログアウト
setting_menu_logout=1
#パスワード変更
setting_menu_password_change=1
#バックアップ/リストア
setting_menu_backup=1
#ログ情報
setting_menu_log_info=1
#アプリ情報
......@@ -156,12 +141,6 @@ viewer_menu_history=1
viewer_menu_index=1
#検索
viewer_menu_search=1
#共有
viewer_menu_share=1
#PDFメール送信
viewer_menu_pdf_send_mail=1
#カーソル
viewer_menu_cursor=1
#メモ
viewer_menu_memo=1
#マーキング
......
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