Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
8c2bdcbe
Commit
8c2bdcbe
authored
Feb 19, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ソース分離(未使用クラス・メソッド削除、プロパティの整理)
parent
68f613b8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
67 additions
and
694 deletions
+67
-694
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/LoginMode.java
+0
-2
ABVJE_Res_Default_Android/build.gradle
+0
-7
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVActivity.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
+5
-104
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+10
-32
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVNoAuthenticatedActivity.java
+11
-70
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVSplashActivity.java
+21
-31
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
+0
-7
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/options/ABVFunctionOptions.java
+0
-25
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/options/IOptions.java
+0
-31
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/util/Initializer.java
+9
-14
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/util/NtpUtil.java
+0
-69
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ABookSettingFragment.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/LoginActivity.java
+1
-54
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/EnqueteWebViewActivity.java
+7
-16
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
+0
-4
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLXWalkWebViewActivity.java
+0
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ParentWebViewActivity.java
+0
-10
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/PreviewActivity.java
+2
-5
ABVJE_UI_Android/src/org/itri/html5webview/HTML5WebView.java
+0
-193
gradle.properties
+1
-17
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/LoginMode.java
View file @
8c2bdcbe
package
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
;
package
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
;
public
interface
LoginMode
{
public
interface
LoginMode
{
int
NO_AUTH
=
0
;
// 認証なし
int
ID_PASS
=
1
;
// ID、パスワード
int
ID_PASS
=
1
;
// ID、パスワード
int
PATH_ID_PASS
=
2
;
// ACCONT_PATH、ID、パスワード
int
PATH_ID_PASS
=
2
;
// ACCONT_PATH、ID、パスワード
int
SITE_PATH_ID_PASS
=
3
;
// SITE_ID、ACCONT_PATH、ID、パスワード
int
SITE_PATH_ID_PASS
=
3
;
// SITE_ID、ACCONT_PATH、ID、パスワード
int
SITE_PATH
=
4
;
// 認証なし(SITE_ID、ACCONT_PATH)
}
}
ABVJE_Res_Default_Android/build.gradle
View file @
8c2bdcbe
...
@@ -56,13 +56,6 @@ android {
...
@@ -56,13 +56,6 @@ android {
//abvFunctionOptions
//abvFunctionOptions
resValue
(
"integer"
,
"login_mode"
,
"${login_mode}"
)
resValue
(
"integer"
,
"login_mode"
,
"${login_mode}"
)
resValue
(
"string"
,
"account_path"
,
"${account_path}"
)
resValue
(
"string"
,
"account_path"
,
"${account_path}"
)
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_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}"
)
resValue
(
"integer"
,
"setting_menu_loginId"
,
"${setting_menu_loginId}"
)
resValue
(
"integer"
,
"push_message"
,
"${push_message}"
)
resValue
(
"integer"
,
"push_message"
,
"${push_message}"
)
resValue
(
"integer"
,
"check_app_update"
,
"${check_app_update}"
)
resValue
(
"integer"
,
"check_app_update"
,
"${check_app_update}"
)
resValue
(
"integer"
,
"not_delete_all_contents"
,
"${not_delete_all_contents}"
)
resValue
(
"integer"
,
"not_delete_all_contents"
,
"${not_delete_all_contents}"
)
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVActivity.java
View file @
8c2bdcbe
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
View file @
8c2bdcbe
...
@@ -116,14 +116,11 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -116,14 +116,11 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
protected
ContentDao
contentDao
=
AbstractDao
.
getDao
(
ContentDao
.
class
);
protected
ContentDao
contentDao
=
AbstractDao
.
getDao
(
ContentDao
.
class
);
protected
GroupLogic
groupLogic
=
AbstractLogic
.
getLogic
(
GroupLogic
.
class
);
protected
MemoLogic
memoLogic
=
AbstractLogic
.
getLogic
(
MemoLogic
.
class
);
protected
MemoLogic
memoLogic
=
AbstractLogic
.
getLogic
(
MemoLogic
.
class
);
protected
BookmarkLogic
bookmarkLogic
=
AbstractLogic
.
getLogic
(
BookmarkLogic
.
class
);
protected
BookmarkLogic
bookmarkLogic
=
AbstractLogic
.
getLogic
(
BookmarkLogic
.
class
);
protected
CategoryLogic
categoryLogic
=
AbstractLogic
.
getLogic
(
CategoryLogic
.
class
);
protected
ContentDownloader
contentDownloader
=
ContentDownloader
.
getInstance
();
protected
ContentDownloader
contentDownloader
=
ContentDownloader
.
getInstance
();
protected
ContentRefresher
contentRefresher
=
ContentRefresher
.
getInstance
();
protected
ContentRefresher
contentRefresher
=
ContentRefresher
.
getInstance
();
protected
String
dateFormat
;
private
ExecutorService
initilizeExecutor
=
Executors
.
newFixedThreadPool
(
2
);
// DL後の初期化専用
private
ExecutorService
initilizeExecutor
=
Executors
.
newFixedThreadPool
(
2
);
// DL後の初期化専用
protected
ImageButton
btnDownload
;
protected
ImageButton
btnDownload
;
...
@@ -169,7 +166,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -169,7 +166,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
try
{
try
{
// 既にMacAddress使用に同意している場合はMacAddressを使う
// 既にMacAddress使用に同意している場合はMacAddressを使う
// 認証なしの場合はUUIDを使用する
// 認証なしの場合はUUIDを使用する
if
(
ABVEnvironment
.
getInstance
().
deviceIdType
!=
Constant
.
DeviceIdType
.
MAC_ADDRESS
||
((
getRInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
NO_AUTH
||
getRInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
SITE_PATH
)
&&
!
PreferenceUtil
.
getUserPref
(
this
,
AppDefType
.
UserPrefKey
.
AGREE_MACINFO
,
false
))
)
{
if
(
ABVEnvironment
.
getInstance
().
deviceIdType
!=
Constant
.
DeviceIdType
.
MAC_ADDRESS
)
{
AbstractLogic
.
getLogic
(
UserAuthenticateLogic
.
class
).
updateDeviceTokenByUUID
(
fcmToken
);
AbstractLogic
.
getLogic
(
UserAuthenticateLogic
.
class
).
updateDeviceTokenByUUID
(
fcmToken
);
}
else
{
}
else
{
AbstractLogic
.
getLogic
(
UserAuthenticateLogic
.
class
).
updateDeviceTokenByMacAdress
(
fcmToken
);
AbstractLogic
.
getLogic
(
UserAuthenticateLogic
.
class
).
updateDeviceTokenByMacAdress
(
fcmToken
);
...
@@ -206,9 +203,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -206,9 +203,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
}
}
contentDownloader
.
addContentDownloadListener
(
this
);
contentDownloader
.
addContentDownloadListener
(
this
);
dateFormat
=
"yyyy'"
+
getResources
().
getString
(
R
.
string
.
date_format_year
)
+
"'MM'"
+
getResources
().
getString
(
R
.
string
.
date_format_month
)
+
"'dd'"
+
getResources
().
getString
(
R
.
string
.
date_format_day
)
+
"'HH:mm:ss"
;
}
}
@Override
@Override
...
@@ -300,19 +294,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -300,19 +294,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
*/
*/
private
boolean
checkPanoContent
(
long
contentId
)
{
private
boolean
checkPanoContent
(
long
contentId
)
{
int
ret
=
ContentViewHelper
.
getInstance
().
check360Content
(
contentId
);
int
ret
=
ContentViewHelper
.
getInstance
().
check360Content
(
contentId
);
if
(
ret
==
0
)
{
return
ret
==
0
?
false
:
true
;
return
false
;
}
// OS4.4以下
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
KITKAT
)
{
return
false
;
}
// OS4.4で動画の場合
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
LOLLIPOP
&&
ret
==
1
)
{
return
false
;
}
// OS 4.4でバーチャルツアー or OS5以上の場合
return
true
;
}
}
private
void
contentViewActivityMoveWithContentAlert
(
final
Intent
intent
,
final
long
contentId
,
final
NaviConsts
ABVNavi
)
{
private
void
contentViewActivityMoveWithContentAlert
(
final
Intent
intent
,
final
long
contentId
,
final
NaviConsts
ABVNavi
)
{
...
@@ -326,12 +308,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -326,12 +308,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
showContentMessageDialog
(
intent
,
contentId
,
contentDto
.
alertMessage
,
ABVNavi
);
showContentMessageDialog
(
intent
,
contentId
,
contentDto
.
alertMessage
,
ABVNavi
);
break
;
break
;
case
AlertMessageLevel
.
PASSWORD
:
case
AlertMessageLevel
.
PASSWORD
:
// 認証なしの場合、パスワードチェックは行わない
showPasswordCheckDialog
(
intent
,
contentId
,
null
,
ABVNavi
);
if
(
requireAuthentication
())
{
showPasswordCheckDialog
(
intent
,
contentId
,
null
,
ABVNavi
);
}
else
{
contentViewActivityMoveWithAccessLocationAlert
(
intent
,
contentId
,
NaviConsts
.
Right
);
}
break
;
break
;
}
}
}
}
...
@@ -480,21 +457,8 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -480,21 +457,8 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
@Override
@Override
public
void
onAuthenticationFailed
()
{
public
void
onAuthenticationFailed
()
{
if
(
requireAuthentication
())
{
handleErrorMessageToast
(
ErrorCode
.
S_E_ACMS_1403
);
handleErrorMessageToast
(
ErrorCode
.
S_E_ACMS_1403
);
callLoginActivity
(
true
,
false
,
false
);
}
else
{
handleErrorMessageToast
(
ErrorCode
.
L124
);
}
if
(
requireAuthentication
())
{
callLoginActivity
(
true
,
false
,
false
);
}
else
{
// 認証なしなのに認証エラーが発生してしまった場合、ユーザ情報を削除してSplash画面を起動する(新規ユーザでログインされる)
AbstractDao
.
getDao
(
MemberInfoDao
.
class
).
deleteMemberInfo
();
Intent
intent
=
new
Intent
(
this
,
SplashScreenActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NO_HISTORY
);
startActivity
(
intent
);
}
}
}
@Override
@Override
...
@@ -734,29 +698,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -734,29 +698,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
}
}
}
}
protected
String
handleException
(
final
AcmsException
e
)
{
String
msg
;
if
(
e
.
getHttpStatus
()
==
401
)
{
// パスワードが不正な場合
msg
=
null
;
}
else
if
(
e
.
getLoginErrorMessage
()
!=
null
)
{
msg
=
e
.
getLoginErrorMessage
();
}
else
if
(
e
.
getMessage
()
!=
null
)
{
msg
=
e
.
getMessage
();
}
else
if
(
e
.
getHttpStatus
()
==
403
)
{
msg
=
ErrorMessage
.
getErrorMessage
(
this
,
R
.
string
.
reader_content_download_403
);
}
else
if
(
e
.
getHttpStatus
()
==
404
)
{
msg
=
ErrorMessage
.
getErrorMessage
(
this
,
R
.
string
.
reader_content_download_404
);
}
else
{
msg
=
ErrorMessage
.
getErrorMessage
(
this
,
e
);
}
return
msg
;
}
public
abstract
boolean
contentValidCheckAndDownload
(
long
contentId
);
public
abstract
boolean
contentValidCheckAndDownload
(
long
contentId
);
public
void
startContentViewActivity
(
long
contentId
)
{
public
void
startContentViewActivity
(
long
contentId
)
{
...
@@ -776,28 +717,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -776,28 +717,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
Logger
.
v
(
TAG
,
"[Size] display width=%s, height=%s"
,
mDisplaySize
.
width
,
mDisplaySize
.
height
);
Logger
.
v
(
TAG
,
"[Size] display width=%s, height=%s"
,
mDisplaySize
.
width
,
mDisplaySize
.
height
);
}
}
/**
* 共有URLがあるかどうか
*
* @param contentDto
* @return
*/
protected
boolean
hasShareUrl
(
ContentDto
contentDto
)
{
String
shareUrl
=
(
contentDto
.
shortUrl
!=
null
)?
contentDto
.
shortUrl
:
contentDto
.
shareUrl
;
return
shareUrl
!=
null
&&
shareUrl
.
matches
(
"https?://([^/]+)/(.+)"
);
}
private
void
initializeContent
(
long
contentId
)
throws
IOException
{
ContentDto
contentDto
=
AbstractDao
.
getDao
(
ContentDao
.
class
).
getContent
(
contentId
);
if
(
contentDto
.
isPdf
())
{
// PDFイメージ取得
PdfImageProvider
.
createPdfImage
(
this
,
mDisplaySize
,
contentId
);
}
else
{
String
cacheDir
=
ContentFileExtractor
.
getInstance
().
getContentCacheDirWithExtract
(
contentId
);
Logger
.
i
(
TAG
,
"extract content files to cache dir. contentId=%s, cacheDir=%s"
,
contentId
,
cacheDir
);
}
}
private
void
handleError
(
final
Exception
e
)
{
private
void
handleError
(
final
Exception
e
)
{
ErrorCode
error
;
ErrorCode
error
;
...
@@ -815,24 +734,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -815,24 +734,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
}
}
/**
/**
* XWalkWebViewとSlideShowViewの共通処理のため、親クラスであるABVAuthenticatedActivityで定義
* javaScript実行処理PLY.recieveSignageCmd('cmd');
* @param cmd
* @param xWalkView
*/
public
void
javaScriptSignageCmd
(
final
String
cmd
,
final
XWalkView
xWalkView
)
{
Logger
.
v
(
TAG
,
"run javaScript for Signage : cmd=%s"
,
cmd
);
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
xWalkView
!=
null
)
{
xWalkView
.
loadUrl
(
"javascript:PLY.recieveSignageCmd('"
+
cmd
+
"')"
);
}
}
});
}
/**
* ヘルプ画面を表示
* ヘルプ画面を表示
* @param helpViewType ヘルプ表示種類
* @param helpViewType ヘルプ表示種類
*/
*/
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
8c2bdcbe
...
@@ -96,16 +96,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -96,16 +96,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected
final
static
int
ABOOK_CHECK_SELECT_SCENE
=
105
;
protected
final
static
int
ABOOK_CHECK_SELECT_SCENE
=
105
;
protected
long
contentId
;
// 表示中のコンテンツID
protected
long
contentId
;
// 表示中のコンテンツID
protected
long
linkOriginalContentId
;
// リンク元コンテンツのコンテンツID
protected
int
linkOriginalContentPageNo
;
// リンク元コンテンツのスタートページ
protected
int
siteId
;
// Reader サイトID
protected
long
objectId
;
// オブジェクトID(オブジェクト用のActivityのときのみ使用)
protected
long
objectId
;
// オブジェクトID(オブジェクト用のActivityのときのみ使用)
protected
int
objectPageNumber
;
// オブジェクトが配置されているページ番号(オブジェクト用のActivityのときのみ使用)
protected
int
objectPageNumber
;
// オブジェクトが配置されているページ番号(オブジェクト用のActivityのときのみ使用)
protected
MeetingManager
meetingManager
;
// 遠隔連動
protected
MeetingManager
meetingManager
;
// 遠隔連動
protected
boolean
mActivityFinishFlg
=
false
;
protected
boolean
mActivityFinishFlg
=
false
;
protected
String
mContentDir
;
protected
String
mContentDir
;
protected
String
contentType
;
protected
String
contentType
;
// protected String backHomeClass;
protected
ABVPopupListWindow
mShowedPopupWindow
=
null
;
protected
ABVPopupListWindow
mShowedPopupWindow
=
null
;
protected
int
readingLogId
;
protected
int
readingLogId
;
protected
String
path
;
// PanoViewController
protected
String
path
;
// PanoViewController
...
@@ -188,14 +184,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -188,14 +184,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
}
}
}
SharedPreferences
pref
=
getSharedPreferences
(
PrefName
.
AUTODOWNLOAD_INFO
,
MODE_PRIVATE
);
SharedPreferences
.
Editor
editor
=
pref
.
edit
();
editor
.
putBoolean
(
AppDefType
.
AutoDownloadPrefKey
.
CONTENT_OPEN
,
true
);
editor
.
commit
();
// 遠隔連動
// 遠隔連動
meetingManager
=
MeetingManager
.
getInstance
();
meetingManager
=
MeetingManager
.
getInstance
();
if
(
meetingManager
.
isSendable
()
&&
objectId
==
-
1
&&
!
StringUtil
.
contains
(
contentType
,
new
String
[]{
ContentJSON
.
KEY_PDF_TYPE
,
ContentJSON
.
KEY_NONE_TYPE
}))
{
if
(
meetingManager
.
isSendable
()
&&
objectId
==
-
1
&&
!
StringUtil
.
contains
(
contentType
,
new
String
[]{
ContentJSON
.
KEY_PDF_TYPE
,
ContentJSON
.
KEY_NONE_TYPE
}))
{
...
@@ -300,22 +288,17 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -300,22 +288,17 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
}
super
.
onDestroy
();
super
.
onDestroy
();
if
(
meetingManager
.
isSendable
())
{
if
(
meetingManager
.
isSendable
()
&&
objectId
!=
-
1
)
{
if
(
objectId
==
-
1
)
{
meetingManager
.
sendWs
(
MeetingManager
.
CMD_CLOSEPOPUP
,
contentId
,
objectPageNumber
,
objectId
,
null
);
// meetingManager.sendWs(MeetingManager.CMD_TOBOOKSHELF, contentId, 0, null, null);
}
}
else
{
meetingManager
.
sendWs
(
MeetingManager
.
CMD_CLOSEPOPUP
,
contentId
,
objectPageNumber
,
objectId
,
null
);
}
}
if
(
meetingManager
.
isSubscribed
())
{
if
(
meetingManager
.
isSubscribed
())
{
ActivityHandlingHelper
.
getInstance
().
refreshMeetingListActivity
();
ActivityHandlingHelper
.
getInstance
().
refreshMeetingListActivity
();
}
}
if
(
objectId
==
-
1
)
{
if
(
objectId
==
-
1
)
{
ActivityHandlingHelper
.
getInstance
().
removeContentViewActivity
(
this
);
ActivityHandlingHelper
.
getInstance
().
removeContentViewActivity
(
this
);
}
}
else
{
else
{
ActivityHandlingHelper
.
getInstance
().
removeObjectViewActivity
(
this
);
ActivityHandlingHelper
.
getInstance
().
removeObjectViewActivity
(
this
);
}
}
...
@@ -429,11 +412,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -429,11 +412,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
mShowedPopupWindow
.
showAsDropDown
(
anchor
);
mShowedPopupWindow
.
showAsDropDown
(
anchor
);
}
}
// protected void exitActivity() {
// // activity終了処理
// // 各自必要な場合に実装する
// }
protected
void
releaseInit
()
{
protected
void
releaseInit
()
{
// Activity終了時に初期化が必要な処理を作成
// Activity終了時に初期化が必要な処理を作成
// 各自必要な場合に実装する
// 各自必要な場合に実装する
...
@@ -633,7 +611,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -633,7 +611,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
/**
/**
* 戻る用コンテンツIDリストを取得
* 戻る用コンテンツIDリストを取得
*/
*/
public
List
<
long
[]>
getReturnContentIdList
()
{
public
List
<
long
[]>
getReturnContentIdList
()
{
return
getABVUIDataCache
().
getReturnContentIdList
();
return
getABVUIDataCache
().
getReturnContentIdList
();
}
}
...
@@ -642,11 +620,11 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -642,11 +620,11 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
*/
*/
public
void
moveToBack
()
{
public
void
moveToBack
()
{
//戻る用コンテンツIDの数
//戻る用コンテンツIDの数
int
listSize
=
get
ABVUIDataCache
().
get
ReturnContentIdList
().
size
();
int
listSize
=
getReturnContentIdList
().
size
();
if
(
listSize
==
0
)
{
if
(
listSize
==
0
)
{
finish
();
finish
();
}
else
{
}
else
{
long
[]
contentInfo
=
get
ABVUIDataCache
().
get
ReturnContentIdList
().
get
(
listSize
-
1
);
long
[]
contentInfo
=
getReturnContentIdList
().
get
(
listSize
-
1
);
// 直前のコンテンツが360コンテンツか確認⇒画面遷移ではなくfinish()で廃棄することで戻る
// 直前のコンテンツが360コンテンツか確認⇒画面遷移ではなくfinish()で廃棄することで戻る
if
(
ActivityHandlingHelper
.
getInstance
().
hasPreviousPanoContentId
(
contentInfo
[
0
]))
{
if
(
ActivityHandlingHelper
.
getInstance
().
hasPreviousPanoContentId
(
contentInfo
[
0
]))
{
finish
();
finish
();
...
@@ -656,7 +634,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -656,7 +634,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if
(
this
instanceof
HTMLXWalkWebViewActivity
)
{
if
(
this
instanceof
HTMLXWalkWebViewActivity
)
{
return
;
return
;
}
}
getABVUIDataCache
().
getReturnContentIdList
().
remove
(
listSize
-
1
);
getReturnContentIdList
().
remove
(
listSize
-
1
);
}
}
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVNoAuthenticatedActivity.java
View file @
8c2bdcbe
...
@@ -151,37 +151,15 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -151,37 +151,15 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
}
catch
(
final
NetworkDisconnectedException
e
)
{
}
catch
(
final
NetworkDisconnectedException
e
)
{
Logger
.
e
(
TAG
,
"NetworkDisconnectedException"
,
e
);
Logger
.
e
(
TAG
,
"NetworkDisconnectedException"
,
e
);
if
(
getResources
().
getInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
SITE_PATH
)
{
// 汎用版の場合
showErrorDialog
(
e
);
closeProgressPopup
();
handler
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
showErrorDialog
(
e
);
}
});
}
else
{
showErrorDialog
(
e
);
}
}
catch
(
final
Exception
e
)
{
}
catch
(
final
Exception
e
)
{
Logger
.
e
(
TAG
,
"noAuthenticatedShowMain error."
,
e
);
Logger
.
e
(
TAG
,
"noAuthenticatedShowMain error."
,
e
);
if
(
getResources
().
getInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
SITE_PATH
)
{
// 汎用版の場合
runOnUiThread
(
new
Runnable
()
{
closeProgressPopup
();
@Override
handler
.
post
(
new
Runnable
()
{
public
void
run
()
{
@Override
showErrorDialog
(
e
);
public
void
run
()
{
}
showErrorDialog
(
e
);
});
}
});
}
else
{
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
showErrorDialog
(
e
);
}
});
}
}
}
}
}
...
@@ -229,9 +207,6 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -229,9 +207,6 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
@Override
@Override
public
void
onAnimationEnd
(
Animation
animation
)
{
public
void
onAnimationEnd
(
Animation
animation
)
{
v
.
setVisibility
(
View
.
INVISIBLE
);
v
.
setVisibility
(
View
.
INVISIBLE
);
if
(!
requireAuthentication
())
{
// 認証なしの場合このタイミングでプログレスを閉じる。
closeProgressPopup
();
}
showMain
();
showMain
();
}
}
});
});
...
@@ -361,16 +336,12 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -361,16 +336,12 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
final
ABVEnvironment
abvEnvironment
=
ABVEnvironment
.
getInstance
();
final
ABVEnvironment
abvEnvironment
=
ABVEnvironment
.
getInstance
();
AppLastVersionParameters
param
;
AppLastVersionParameters
param
;
// 既にMacAddress使用に同意している場合はMacAddressを使う
// 既にMacAddress使用に同意している場合はMacAddressを使う
// 認証なしの場合はUUIDを使用する
if
(
ABVEnvironment
.
getInstance
().
deviceIdType
==
Constant
.
DeviceIdType
.
MAC_ADDRESS
)
{
if
(!
requireAuthentication
()
&&
!
getUserPref
(
UserPrefKey
.
AGREE_MACINFO
,
false
))
{
param
=
new
AppLastVersionParameters
(
dataCache
.
getMemberInfo
().
sid
,
abvEnvironment
.
appVersion
,
String
.
valueOf
(
ABVEnvironment
.
AppId
),
null
,
abvEnvironment
.
deviceId
);
param
=
new
AppLastVersionParameters
(
dataCache
.
getMemberInfo
().
sid
,
abvEnvironment
.
appVersion
,
String
.
valueOf
(
ABVEnvironment
.
AppId
),
abvEnvironment
.
deviceId
,
null
);
}
else
{
}
else
{
if
(
ABVEnvironment
.
getInstance
().
deviceIdType
==
Constant
.
DeviceIdType
.
MAC_ADDRESS
)
{
param
=
new
AppLastVersionParameters
(
dataCache
.
getMemberInfo
().
sid
,
abvEnvironment
.
appVersion
,
String
.
valueOf
(
ABVEnvironment
.
AppId
),
abvEnvironment
.
deviceId
,
null
);
param
=
new
AppLastVersionParameters
(
dataCache
.
getMemberInfo
().
sid
,
abvEnvironment
.
appVersion
,
String
.
valueOf
(
ABVEnvironment
.
AppId
),
null
,
abvEnvironment
.
deviceId
);
}
else
{
param
=
new
AppLastVersionParameters
(
dataCache
.
getMemberInfo
().
sid
,
abvEnvironment
.
appVersion
,
String
.
valueOf
(
ABVEnvironment
.
AppId
),
abvEnvironment
.
deviceId
,
null
);
}
}
}
final
String
version
=
AcmsClient
.
getInstance
(
ABVDataCache
.
getInstance
().
getUrlPath
(),
ABVEnvironment
.
getInstance
().
networkAdapter
).
appLatestVersion
(
param
);
final
String
version
=
AcmsClient
.
getInstance
(
ABVDataCache
.
getInstance
().
getUrlPath
(),
ABVEnvironment
.
getInstance
().
networkAdapter
).
appLatestVersion
(
param
);
Logger
.
d
(
TAG
,
"Last Version=%s, Current Version=%s"
,
version
,
ABVEnvironment
.
getInstance
().
appVersion
);
Logger
.
d
(
TAG
,
"Last Version=%s, Current Version=%s"
,
version
,
ABVEnvironment
.
getInstance
().
appVersion
);
if
(
version
!=
null
&&
version
.
length
()
>
0
)
{
if
(
version
!=
null
&&
version
.
length
()
>
0
)
{
...
@@ -429,36 +400,6 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -429,36 +400,6 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
}
}
}
}
private
void
showUploadAlertDialog
(
final
Intent
intent
,
final
int
titleResId
,
final
String
body
)
{
handler
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
final
ABookAlertDialog
alertDialog
=
AlertDialogUtil
.
createAlertDialog
(
mContext
,
getString
(
titleResId
),
body
);
alertDialog
.
setPositiveButton
(
R
.
string
.
ok
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
final
DialogInterface
dialog
,
int
id
)
{
moveToHome
(
intent
,
alertDialog
);
// Homeに遷移
}
});
showAlertDialog
(
alertDialog
);
}
});
}
private
void
moveToHome
(
final
Intent
intent
,
DialogInterface
dialog
)
{
showProgressPopup
();
dialog
.
dismiss
();
handler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
startActivity
(
intent
);
// HOME画面へ遷移
finish
();
closeProgressPopup
();
}
},
1000
);
}
/**
/**
* カスタムURL対応
* カスタムURL対応
* @param uri
* @param uri
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVSplashActivity.java
View file @
8c2bdcbe
...
@@ -106,44 +106,34 @@ public abstract class ABVSplashActivity extends ABVNoAuthenticatedActivity {
...
@@ -106,44 +106,34 @@ public abstract class ABVSplashActivity extends ABVNoAuthenticatedActivity {
UserAuthenticateLogic
logic
=
AbstractLogic
.
getLogic
(
UserAuthenticateLogic
.
class
);
UserAuthenticateLogic
logic
=
AbstractLogic
.
getLogic
(
UserAuthenticateLogic
.
class
);
MemberInfoDto
memberInfo
=
logic
.
getMemberInfo
();
MemberInfoDto
memberInfo
=
logic
.
getMemberInfo
();
if
(
getRInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
NO_AUTH
)
{
// Adモードの時はログイン画面を表示する
loadAddressIfSaasGeneral
();
// 認証なしログインの場合
// 通常ログインの場合
finishActivityFlag
=
false
;
if
(
memberInfo
==
null
)
{
//noinspection VariableNotUsedInsideIf
// ログイン画面へ遷移する
if
(
memberInfo
==
null
)
{
callLoginActivity
(
false
,
false
,
false
);
noAuthenticatedLogin
(
false
,
null
);
}
else
{
startLogoAnimation
();
}
}
else
{
}
else
{
loadAddressIfSaasGeneral
();
// 一定期間経過後強制ログアウトチェック
// 通常ログインの場合
if
(!
checkForceOfflineLogout
())
{
if
(
memberInfo
==
null
)
{
// 最後のログインから90日のチェック
// ログイン画面へ遷移する
if
(!
checkValidAuthTime
())
{
callLoginActivity
(
false
,
false
,
false
);
// キャンセルした場合のイベントリスナ
}
else
{
OnClickListener
cancelListener
=
new
OnClickListener
()
{
// 一定期間経過後強制ログアウトチェック
@Override
if
(!
checkForceOfflineLogout
())
{
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
// 最後のログインから90日のチェック
if
(!
checkValidAuthTime
())
{
// キャンセルした場合のイベントリスナ
OnClickListener
cancelListener
=
new
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
startLogoAnimation
();
}
};
// パスワード定期変更チェック
if
(
checkRequiredChangePassword
(
cancelListener
))
{
finishActivityFlag
=
false
;
}
else
{
finishActivityFlag
=
false
;
startLogoAnimation
();
startLogoAnimation
();
}
}
};
// パスワード定期変更チェック
if
(
checkRequiredChangePassword
(
cancelListener
))
{
finishActivityFlag
=
false
;
}
else
{
finishActivityFlag
=
false
;
startLogoAnimation
();
}
}
}
}
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Logger
.
e
(
"ABVException Login"
,
e
);
Logger
.
e
(
"ABVException Login"
,
e
);
Intent
intent
=
new
Intent
();
Intent
intent
=
new
Intent
();
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
View file @
8c2bdcbe
...
@@ -123,13 +123,6 @@ public interface AppDefType {
...
@@ -123,13 +123,6 @@ public interface AppDefType {
String
SYNCED_PROJECT_ID
=
"syncedProjectId_%d"
;
//一日一回情報更新が出来るように
String
SYNCED_PROJECT_ID
=
"syncedProjectId_%d"
;
//一日一回情報更新が出来るように
}
}
interface
AutoDownloadPrefKey
{
//自動ダウンロードサービス用
String
AUTO_DOWNLOAD_STARTED_TIME
=
"autoDownloadStartedTime"
;
String
AUTO_DOWNLOAD_WAITTING
=
"autoDownloadWaitting"
;
String
CONTENT_OPEN
=
"contentOpen"
;
}
/**
/**
* 表示するデータタイプ
* 表示するデータタイプ
* 全て、クラウド、デバイス
* 全て、クラウド、デバイス
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/options/ABVFunctionOptions.java
View file @
8c2bdcbe
...
@@ -16,31 +16,6 @@ public class ABVFunctionOptions extends AbstractOptions {
...
@@ -16,31 +16,6 @@ public class ABVFunctionOptions extends AbstractOptions {
}
}
@Override
@Override
public
int
getSettingMenuAccount
()
{
return
context
.
getResources
().
getInteger
(
R
.
integer
.
setting_menu_account
);
}
@Override
public
int
getSettingMenuAppInfo
()
{
return
context
.
getResources
().
getInteger
(
R
.
integer
.
setting_menu_app_info
);
}
@Override
public
int
getSettingMenuLogout
()
{
return
context
.
getResources
().
getInteger
(
R
.
integer
.
setting_menu_logout
);
}
@Override
public
int
getSettingMenuPasswordChange
()
{
return
context
.
getResources
().
getInteger
(
R
.
integer
.
setting_menu_password_change
);
}
@Override
public
int
getSettingMenuLogInfo
()
{
return
context
.
getResources
().
getInteger
(
R
.
integer
.
setting_menu_log_info
);
}
@Override
public
int
getViewerMenuTextcopy
()
{
public
int
getViewerMenuTextcopy
()
{
return
ABVDataCache
.
getInstance
().
serviceOption
.
isServiceOptionEnable
(
ServiceOptionId
.
PdfTextCopy
)
?
1
:
0
;
return
ABVDataCache
.
getInstance
().
serviceOption
.
isServiceOptionEnable
(
ServiceOptionId
.
PdfTextCopy
)
?
1
:
0
;
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/options/IOptions.java
View file @
8c2bdcbe
package
jp
.
agentec
.
abook
.
abv
.
ui
.
common
.
appinfo
.
options
;
package
jp
.
agentec
.
abook
.
abv
.
ui
.
common
.
appinfo
.
options
;
public
interface
IOptions
{
public
interface
IOptions
{
/**
* 設定:アカウント
* @return 0:非表示 1:表示
*/
int
getSettingMenuAccount
();
/**
* 設定:アプリ情報
* @return 0:非表示 1:表示
*/
int
getSettingMenuAppInfo
();
/**
* ログアウト表示
* @return 0:非表示 1:表示
*/
int
getSettingMenuLogout
();
/**
* 設定:パスワード変更
* @return 0:非表示 1:表示
*/
int
getSettingMenuPasswordChange
();
/**
* 設定:ログ情報
* @return 0:非表示 1:表示
*/
int
getSettingMenuLogInfo
();
/**
/**
* Viewerツールバー:テキストコピー
* Viewerツールバー:テキストコピー
* @return 0:非表示、1:表示
* @return 0:非表示、1:表示
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/util/Initializer.java
View file @
8c2bdcbe
...
@@ -92,7 +92,7 @@ public class Initializer {
...
@@ -92,7 +92,7 @@ public class Initializer {
int
logLevel
=
i
(
R
.
integer
.
log_level
);
int
logLevel
=
i
(
R
.
integer
.
log_level
);
boolean
isDebugMode
=
LogLevel
.
level
(
logLevel
).
level
()
<=
LogLevel
.
debug
.
level
();
boolean
isDebugMode
=
LogLevel
.
level
(
logLevel
).
level
()
<=
LogLevel
.
debug
.
level
();
env
.
appVersion
=
s
(
R
.
string
.
version_name
);
env
.
appVersion
=
s
(
R
.
string
.
version_name
);
if
(
i
(
R
.
integer
.
login_mode
)
!=
LoginMode
.
SITE_PATH_ID_PASS
&&
i
(
R
.
integer
.
login_mode
)
!=
LoginMode
.
SITE_PATH
)
{
if
(
i
(
R
.
integer
.
login_mode
)
!=
LoginMode
.
SITE_PATH_ID_PASS
)
{
env
.
acmsAddress
=
StringUtil
.
addSlashToUrlString
(
s
(
R
.
string
.
acms_address
));
env
.
acmsAddress
=
StringUtil
.
addSlashToUrlString
(
s
(
R
.
string
.
acms_address
));
env
.
downloadServerAddress
=
StringUtil
.
addSlashToUrlString
(
s
(
R
.
string
.
download_server_address
));
env
.
downloadServerAddress
=
StringUtil
.
addSlashToUrlString
(
s
(
R
.
string
.
download_server_address
));
env
.
websocketServerHttpUrl
=
s
(
R
.
string
.
websocket_server_http_url
);
env
.
websocketServerHttpUrl
=
s
(
R
.
string
.
websocket_server_http_url
);
...
@@ -106,7 +106,6 @@ public class Initializer {
...
@@ -106,7 +106,6 @@ public class Initializer {
env
.
setLogLevel
(
LogLevel
.
level
(
logLevel
));
env
.
setLogLevel
(
LogLevel
.
level
(
logLevel
));
env
.
mainFolderName
=
s
(
R
.
string
.
top
);
env
.
mainFolderName
=
s
(
R
.
string
.
top
);
env
.
rootDirectory
=
context
.
getFilesDir
().
getPath
();
env
.
rootDirectory
=
context
.
getFilesDir
().
getPath
();
// env.rootDirectory = android.os.Environment.getExternalStorageDirectory().getPath();
Logger
.
d
(
TAG
,
"setRootDirectory="
+
env
.
rootDirectory
);
Logger
.
d
(
TAG
,
"setRootDirectory="
+
env
.
rootDirectory
);
env
.
networkAdapter
=
network
;
env
.
networkAdapter
=
network
;
...
@@ -115,19 +114,15 @@ public class Initializer {
...
@@ -115,19 +114,15 @@ public class Initializer {
// 既にMacAddress使用に同意している場合はMacAddressを使う
// 既にMacAddress使用に同意している場合はMacAddressを使う
// 認証なしの場合はUUIDを使用する
// 認証なしの場合はUUIDを使用する
int
loginMode
=
context
.
getResources
().
getInteger
(
R
.
integer
.
login_mode
);
int
loginMode
=
context
.
getResources
().
getInteger
(
R
.
integer
.
login_mode
);
if
((
loginMode
==
LoginMode
.
NO_AUTH
||
loginMode
==
LoginMode
.
SITE_PATH
)
&&
!
PreferenceUtil
.
getUserPref
(
context
,
UserPrefKey
.
AGREE_MACINFO
,
false
)){
// Wifiがオンになっていない場合アラートを表示できないので最初の設定はログイン前に行う。例外が発生しても無視。
env
.
deviceId
=
DeviceInfo
.
getDeviceUUID
(
context
);
try
{
env
.
encryptKey
=
DeviceInfo
.
getEncryptKeyByUUID
(
context
);
env
.
deviceId
=
DeviceInfo
.
getDeviceId
(
context
,
isDebugMode
);
env
.
deviceIdType
=
Constant
.
DeviceIdType
.
UUID
;
env
.
encryptKey
=
DeviceInfo
.
getEncryptKey
(
context
,
isDebugMode
);
}
else
{
// Wifiがオンになっていない場合アラートを表示できないので最初の設定はログイン前に行う。例外が発生しても無視。
env
.
deviceIdType
=
DeviceInfo
.
getDeviceIdType
(
context
,
isDebugMode
);
try
{
}
catch
(
ABVException
e
)
{
env
.
deviceId
=
DeviceInfo
.
getDeviceId
(
context
,
isDebugMode
);
Logger
.
w
(
TAG
,
"getWiFiMacAddress failed. "
+
e
.
toString
());
// ignore
env
.
encryptKey
=
DeviceInfo
.
getEncryptKey
(
context
,
isDebugMode
);
env
.
deviceIdType
=
DeviceInfo
.
getDeviceIdType
(
context
,
isDebugMode
);
}
catch
(
ABVException
e
)
{
Logger
.
w
(
TAG
,
"getWiFiMacAddress failed. "
+
e
.
toString
());
// ignore
}
}
}
env
.
screenSizeForAcmsParam
=
DeviceInfo
.
getScreenSizeForAcmsParam
(
context
);
env
.
screenSizeForAcmsParam
=
DeviceInfo
.
getScreenSizeForAcmsParam
(
context
);
env
.
cacheDirectory
=
context
.
getCacheDir
().
getPath
();
env
.
cacheDirectory
=
context
.
getCacheDir
().
getPath
();
env
.
cacheSize
=
i
(
R
.
integer
.
cache_size
);
env
.
cacheSize
=
i
(
R
.
integer
.
cache_size
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/util/NtpUtil.java
deleted
100644 → 0
View file @
68f613b8
package
jp
.
agentec
.
abook
.
abv
.
ui
.
common
.
util
;
import
org.json.adf.JSONObject
;
import
java.io.DataOutputStream
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.sql.Timestamp
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.adf.net.http.HttpRequestSender
;
import
jp.agentec.adf.net.http.HttpResponse
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.RuntimeUtil
;
/**
* Created by leej on 2018/01/25.
*/
public
class
NtpUtil
{
private
static
final
String
TAG
=
"NtpUtil"
;
public
static
void
synchronizingNtpServerDate
()
{
synchronized
(
NtpUtil
.
class
)
{
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
()
&&
DateTimeUtil
.
isAbnormalYear
()
&&
RuntimeUtil
.
deviceRootCheck
())
{
try
{
URL
url
=
new
URL
(
"http://ntp-a1.nict.go.jp/cgi-bin/json"
);
HttpResponse
response
=
HttpRequestSender
.
get
(
url
);
Logger
.
d
(
TAG
,
"[synchronizingNtpServerDate]:url=%s, httpResponseCode=%s"
,
url
,
response
.
httpResponseCode
);
if
(
response
.
httpResponseCode
==
200
)
{
JSONObject
jsonObject
=
new
JSONObject
(
response
.
httpResponseBody
);
Long
ntpTimeMillis
=
(
long
)
((
Double
)
jsonObject
.
get
(
"st"
)
*
1000
);
String
cmd
=
"date "
+
DateTimeUtil
.
toString
(
new
Timestamp
(
ntpTimeMillis
),
DateTimeFormat
.
MMddHHmmyyyyss__colon
);
Logger
.
d
(
TAG
,
"Current Date=%s,Command=%s, NtpDate=%s"
,
DateTimeUtil
.
toString
(
DateTimeUtil
.
getCurrentDate
(),
DateTimeFormat
.
yyyyMMddHHmmss_slash
),
cmd
,
DateTimeUtil
.
toString
(
new
Timestamp
(
ntpTimeMillis
),
DateTimeFormat
.
yyyyMMddHHmmss_slash
));
runAsRoot
(
cmd
);
}
}
catch
(
IOException
e
)
{
Logger
.
e
(
TAG
,
"synchronizingNtpServerDate error."
,
e
);
}
}
}
}
/**
* Root化端末のコマンド実行
*
* @param cmd
* @throws IOException
*/
private
static
final
void
runAsRoot
(
String
cmd
)
{
try
{
Process
process
=
Runtime
.
getRuntime
().
exec
(
"su"
);
DataOutputStream
dataOutputStream
=
new
DataOutputStream
(
process
.
getOutputStream
());
dataOutputStream
.
writeBytes
(
cmd
+
"\n"
);
dataOutputStream
.
writeBytes
(
"exit\n"
);
dataOutputStream
.
flush
();
}
catch
(
IOException
e
)
{
Logger
.
w
(
TAG
,
"runAsRoot error."
,
e
);
//何も処理しない
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ABookSettingFragment.java
View file @
8c2bdcbe
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/LoginActivity.java
View file @
8c2bdcbe
...
@@ -124,25 +124,11 @@ public class LoginActivity extends ABVLoginActivity {
...
@@ -124,25 +124,11 @@ public class LoginActivity extends ABVLoginActivity {
mEdtUrlPath
.
setVisibility
(
View
.
GONE
);
mEdtUrlPath
.
setVisibility
(
View
.
GONE
);
mEdtUrlPathGoneFlg
=
true
;
// TODO:このフラグ必要?
mEdtUrlPathGoneFlg
=
true
;
// TODO:このフラグ必要?
}
}
if
(
getRInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
SITE_PATH_ID_PASS
||
getRInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
SITE_PATH
)
{
// Saas汎用版の場合
if
(
getRInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
SITE_PATH_ID_PASS
)
{
if
(
StringUtil
.
isNullOrWhiteSpace
(
ABVEnvironment
.
getInstance
().
acmsAddress
))
{
// urlPathとはセットで有無が合っている前提
if
(
StringUtil
.
isNullOrWhiteSpace
(
ABVEnvironment
.
getInstance
().
acmsAddress
))
{
// urlPathとはセットで有無が合っている前提
mEdtSiteId
.
setVisibility
(
View
.
VISIBLE
);
mEdtSiteId
.
setVisibility
(
View
.
VISIBLE
);
}
}
}
}
if
(
getRInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
SITE_PATH
)
{
mEdtLoginId
.
setVisibility
(
View
.
GONE
);
mEdtPassword
.
setVisibility
(
View
.
GONE
);
mEdtUrlPath
.
setOnKeyListener
(
new
OnKeyListener
()
{
@Override
public
boolean
onKey
(
View
v
,
int
keyCode
,
KeyEvent
event
)
{
if
(
event
.
getAction
()
==
KeyEvent
.
ACTION_DOWN
&&
keyCode
==
KeyEvent
.
KEYCODE_ENTER
)
{
tryLogin
();
return
true
;
}
return
false
;
}
});
}
mEdtPassword
.
setOnKeyListener
(
new
OnKeyListener
()
{
mEdtPassword
.
setOnKeyListener
(
new
OnKeyListener
()
{
@Override
@Override
...
@@ -315,12 +301,6 @@ public class LoginActivity extends ABVLoginActivity {
...
@@ -315,12 +301,6 @@ public class LoginActivity extends ABVLoginActivity {
}
}
if
(
validate
())
{
if
(
validate
())
{
if
(
getRInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
SITE_PATH
)
{
// Saas環境用認証なしで初回ログインの場合、任意のID&PWDを生成してサーバへ登録する
threadSaasLogin
();
return
;
}
boolean
agree_macInfor
;
boolean
agree_macInfor
;
agree_macInfor
=
getUserPref
(
UserPrefKey
.
AGREE_MACINFO
,
false
);
agree_macInfor
=
getUserPref
(
UserPrefKey
.
AGREE_MACINFO
,
false
);
// Macアドレスに既に同意している場合、ログイン
// Macアドレスに既に同意している場合、ログイン
...
@@ -365,20 +345,6 @@ public class LoginActivity extends ABVLoginActivity {
...
@@ -365,20 +345,6 @@ public class LoginActivity extends ABVLoginActivity {
return
false
;
return
false
;
}
}
}
}
if
(
getRInteger
(
R
.
integer
.
login_mode
)
!=
LoginMode
.
SITE_PATH
)
{
if
(
StringUtil
.
isNullOrWhiteSpace
(
mLoginId
))
{
handleErrorMessageToast
(
ErrorCode
.
E001
);
mEdtLoginId
.
requestFocus
();
return
false
;
}
if
(
StringUtil
.
isNullOrWhiteSpace
(
mPassword
))
{
handleErrorMessageToast
(
ErrorCode
.
E002
);
mEdtPassword
.
requestFocus
();
return
false
;
}
}
return
true
;
return
true
;
}
}
...
@@ -431,25 +397,6 @@ public class LoginActivity extends ABVLoginActivity {
...
@@ -431,25 +397,6 @@ public class LoginActivity extends ABVLoginActivity {
}
}
/**
/**
* Saas用ログインスレッドの起動
*/
private
void
threadSaasLogin
()
{
showProgressPopup
();
CommonExecutor
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
checkSiteId
();
//noinspection VariableNotUsedInsideIf
if
(
ABVEnvironment
.
getInstance
().
acmsAddress
==
null
)
{
closeProgressPopup
();
}
else
{
noAuthenticatedLogin
(
false
,
mUrlPath
);
}
}
});
}
/**
* サーバと通信せずにパスワードのチェックを行う。<br>
* サーバと通信せずにパスワードのチェックを行う。<br>
* 正しい場合、メイン画面を表示する。
* 正しい場合、メイン画面を表示する。
*/
*/
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
View file @
8c2bdcbe
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/EnqueteWebViewActivity.java
View file @
8c2bdcbe
...
@@ -2,7 +2,6 @@ package jp.agentec.abook.abv.ui.viewer.activity;
...
@@ -2,7 +2,6 @@ package jp.agentec.abook.abv.ui.viewer.activity;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
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.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
...
@@ -17,23 +16,16 @@ import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
...
@@ -17,23 +16,16 @@ import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.EnqueteDto
;
import
jp.agentec.abook.abv.bl.dto.EnqueteDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.ContractLogic
;
import
jp.agentec.abook.abv.bl.logic.EnqueteLogic
;
import
jp.agentec.abook.abv.bl.logic.EnqueteLogic
;
import
jp.agentec.abook.abv.cl.util.ContentLogUtil
;
import
jp.agentec.abook.abv.cl.util.ContentLogUtil
;
import
jp.agentec.abook.abv.cl.util.LocationManagerUtil
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity
;
import
jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey
;
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.view.ABVPopupListWindow
;
import
jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow
;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
org.itri.html5webview.HTML5WebView
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.location.Location
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
...
@@ -53,7 +45,6 @@ import android.webkit.WebViewClient;
...
@@ -53,7 +45,6 @@ import android.webkit.WebViewClient;
import
android.widget.AdapterView
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView.OnItemClickListener
;
import
android.widget.AdapterView.OnItemClickListener
;
import
android.widget.Button
;
import
android.widget.Button
;
import
android.widget.FrameLayout
;
import
android.widget.ImageButton
;
import
android.widget.ImageButton
;
import
android.widget.ProgressBar
;
import
android.widget.ProgressBar
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
...
@@ -79,12 +70,12 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
...
@@ -79,12 +70,12 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
private
ImageButton
downloadButton
;
private
ImageButton
downloadButton
;
private
int
objectLogId
;
private
int
objectLogId
;
private
boolean
isPageFinished
;
private
boolean
mPageFinishedFlg
;
private
WebView
webView
;
private
WebView
webView
;
private
Double
l
atitude
;
private
Double
mL
atitude
;
private
Double
l
ongitude
;
private
Double
mL
ongitude
;
private
JsInf
jsInf
=
new
JsInf
();
private
JsInf
jsInf
=
new
JsInf
();
private
boolean
pageStart
;
private
boolean
pageStart
;
...
@@ -438,8 +429,8 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
...
@@ -438,8 +429,8 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
Logger
.
d
(
TAG
,
"ReloadUrl"
);
Logger
.
d
(
TAG
,
"ReloadUrl"
);
if
(
latitude
!=
null
&&
l
ongitude
!=
null
)
{
if
(
mLatitude
!=
null
&&
mL
ongitude
!=
null
)
{
webView
.
loadUrl
(
url
+
"&reload=true&
latitude="
+
latitude
+
"&longitude="
+
l
ongitude
);
webView
.
loadUrl
(
url
+
"&reload=true&
mLatitude="
+
mLatitude
+
"&mLongitude="
+
mL
ongitude
);
}
}
else
{
else
{
webView
.
loadUrl
(
url
+
"&reload=true"
);
webView
.
loadUrl
(
url
+
"&reload=true"
);
...
@@ -552,7 +543,7 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
...
@@ -552,7 +543,7 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
public
void
existSetLocation
(
String
ret
)
{
public
void
existSetLocation
(
String
ret
)
{
Logger
.
d
(
TAG
,
"existSetLocation=%s"
,
ret
);
Logger
.
d
(
TAG
,
"existSetLocation=%s"
,
ret
);
if
(
ret
!=
null
&&
ret
.
equals
(
"true"
))
{
// setLocationメソッドが存在する場合、ページ読み込み完了とみなす
if
(
ret
!=
null
&&
ret
.
equals
(
"true"
))
{
// setLocationメソッドが存在する場合、ページ読み込み完了とみなす
isPageFinished
=
true
;
mPageFinishedFlg
=
true
;
}
}
else
{
// 存在しない場合、ページ読み込み未完了とみなし1秒後に再度呼出しを繰り返す
else
{
// 存在しない場合、ページ読み込み未完了とみなし1秒後に再度呼出しを繰り返す
handler
.
postDelayed
(
new
Runnable
()
{
handler
.
postDelayed
(
new
Runnable
()
{
...
@@ -597,7 +588,7 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
...
@@ -597,7 +588,7 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
@Override
@Override
public
void
run
()
{
public
void
run
()
{
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
if
(
isPageFinished
)
{
if
(
mPageFinishedFlg
)
{
break
;
break
;
}
}
try
{
try
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
View file @
8c2bdcbe
package
jp
.
agentec
.
abook
.
abv
.
ui
.
viewer
.
activity
;
package
jp
.
agentec
.
abook
.
abv
.
ui
.
viewer
.
activity
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.location.Location
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
...
@@ -21,7 +20,6 @@ import android.webkit.WebView;
...
@@ -21,7 +20,6 @@ import android.webkit.WebView;
import
android.webkit.WebViewClient
;
import
android.webkit.WebViewClient
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView.OnItemClickListener
;
import
android.widget.AdapterView.OnItemClickListener
;
import
android.widget.FrameLayout
;
import
android.widget.ImageButton
;
import
android.widget.ImageButton
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.Toast
;
import
android.widget.Toast
;
...
@@ -30,7 +28,6 @@ import org.apache.http.HttpResponse;
...
@@ -30,7 +28,6 @@ import org.apache.http.HttpResponse;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.impl.client.DefaultHttpClient
;
import
org.apache.http.impl.client.DefaultHttpClient
;
import
org.itri.html5webview.HTML5WebView
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -75,7 +72,6 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
...
@@ -75,7 +72,6 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
private
int
objectLogId
;
private
int
objectLogId
;
private
WebView
webView
;
private
WebView
webView
;
private
HTML5WebView
html5WebView
;
private
JsInf
jsInf
=
new
JsInf
();
private
JsInf
jsInf
=
new
JsInf
();
private
ValueCallback
<
Uri
[]>
mUploadMessage
;
private
ValueCallback
<
Uri
[]>
mUploadMessage
;
@Override
@Override
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLXWalkWebViewActivity.java
View file @
8c2bdcbe
...
@@ -18,7 +18,6 @@ import android.widget.ImageButton;
...
@@ -18,7 +18,6 @@ import android.widget.ImageButton;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.Toast
;
import
android.widget.Toast
;
import
org.itri.html5webview.HTML5WebView
;
import
org.xwalk.core.XWalkNavigationHistory
;
import
org.xwalk.core.XWalkNavigationHistory
;
import
org.xwalk.core.XWalkResourceClient
;
import
org.xwalk.core.XWalkResourceClient
;
import
org.xwalk.core.XWalkSettings
;
import
org.xwalk.core.XWalkSettings
;
...
@@ -69,9 +68,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
...
@@ -69,9 +68,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
private
ImageButton
reloadButton
;
private
ImageButton
reloadButton
;
private
ImageButton
downloadButton
;
private
ImageButton
downloadButton
;
private
int
objectLogId
;
private
int
objectLogId
;
private
XWalkView
webView
;
private
XWalkView
webView
;
private
HTML5WebView
html5WebView
;
private
HTMLXWalkWebViewActivity
.
JsInf
jsInf
=
new
HTMLXWalkWebViewActivity
.
JsInf
();
private
HTMLXWalkWebViewActivity
.
JsInf
jsInf
=
new
HTMLXWalkWebViewActivity
.
JsInf
();
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ParentWebViewActivity.java
View file @
8c2bdcbe
...
@@ -46,8 +46,6 @@ import jp.agentec.adf.util.FileUtil;
...
@@ -46,8 +46,6 @@ import jp.agentec.adf.util.FileUtil;
public
class
ParentWebViewActivity
extends
ABVContentViewActivity
{
public
class
ParentWebViewActivity
extends
ABVContentViewActivity
{
private
static
final
String
TAG
=
"ParentWebViewActivity"
;
private
static
final
String
TAG
=
"ParentWebViewActivity"
;
protected
ABVUIActivity
mUIActivity
;
private
LinearLayout
historyLayout
;
private
LinearLayout
historyLayout
;
private
ImageButton
addSceneButton
;
private
ImageButton
addSceneButton
;
...
@@ -62,10 +60,6 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
...
@@ -62,10 +60,6 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
protected
Button
btnWebForward
;
protected
Button
btnWebForward
;
private
ProgressBar
m_progress
;
private
ProgressBar
m_progress
;
private
Double
reportLatitude
;
private
Double
reportLongitude
;
protected
void
commonOnCreate
()
{
protected
void
commonOnCreate
()
{
historyLayout
=
(
LinearLayout
)
findViewById
(
R
.
id
.
historyLayout
);
historyLayout
=
(
LinearLayout
)
findViewById
(
R
.
id
.
historyLayout
);
addSceneButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_add_scene
);
addSceneButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_add_scene
);
...
@@ -96,10 +90,6 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
...
@@ -96,10 +90,6 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
}
}
}
}
protected
void
commonOpenFileChooser
(
ValueCallback
<
Uri
>
uploadFile
,
String
acceptType
,
String
capture
)
{
}
protected
void
commonOnReceivedResponseHeaders
(
String
uri
,
int
statusCode
)
{
protected
void
commonOnReceivedResponseHeaders
(
String
uri
,
int
statusCode
)
{
if
(
uri
.
contains
(
"vtour"
)
||
uri
.
contains
(
"authByCheck"
))
{
if
(
uri
.
contains
(
"vtour"
)
||
uri
.
contains
(
"authByCheck"
))
{
if
(
statusCode
>=
400
)
{
if
(
statusCode
>=
400
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/PreviewActivity.java
View file @
8c2bdcbe
...
@@ -104,10 +104,8 @@ public class PreviewActivity extends ABVContentViewActivity {
...
@@ -104,10 +104,8 @@ public class PreviewActivity extends ABVContentViewActivity {
mFlipperLayout
[
i
].
setGravity
(
Gravity
.
CENTER
);
mFlipperLayout
[
i
].
setGravity
(
Gravity
.
CENTER
);
LinearLayout
.
LayoutParams
paramFlipperLayout
=
new
LinearLayout
.
LayoutParams
(
matchParent
,
matchParent
);
LinearLayout
.
LayoutParams
paramFlipperLayout
=
new
LinearLayout
.
LayoutParams
(
matchParent
,
matchParent
);
mViewFlipper
.
addView
(
mFlipperLayout
[
i
],
paramFlipperLayout
);
mViewFlipper
.
addView
(
mFlipperLayout
[
i
],
paramFlipperLayout
);
// float tmpDensity = getResources().getDisplayMetrics().density;
LinearLayout
.
LayoutParams
paramThumbnail
=
new
LinearLayout
.
LayoutParams
(
THUMBNAIL_WIDTH
,
THUMBNAIL_HEIGHT
);
// LinearLayout.LayoutParams paramThumbnail = new LinearLayout.LayoutParams((int)(THUMBNAIL_WIDTH * tmpDensity + 0.5f), (int)(THUMBNAIL_HEIGHT * tmpDensity + 0.5f));
LinearLayout
.
LayoutParams
paramThumbnail
=
new
LinearLayout
.
LayoutParams
(
THUMBNAIL_WIDTH
,
THUMBNAIL_HEIGHT
);
mLayoutThumbnail
.
addView
(
imgBtn
[
i
],
paramThumbnail
);
mLayoutThumbnail
.
addView
(
imgBtn
[
i
],
paramThumbnail
);
setBtnClick
(
imgBtn
[
i
],
i
);
setBtnClick
(
imgBtn
[
i
],
i
);
}
}
...
@@ -231,7 +229,6 @@ public class PreviewActivity extends ABVContentViewActivity {
...
@@ -231,7 +229,6 @@ public class PreviewActivity extends ABVContentViewActivity {
flipperImageView
.
setScaleType
(
ScaleType
.
FIT_CENTER
);
//CENTER_INSIDE
flipperImageView
.
setScaleType
(
ScaleType
.
FIT_CENTER
);
//CENTER_INSIDE
flipperImageView
.
setAdjustViewBounds
(
true
);
flipperImageView
.
setAdjustViewBounds
(
true
);
flipperImageView
.
setImageURI
(
Uri
.
parse
(
mFilePath
[
index
]));
flipperImageView
.
setImageURI
(
Uri
.
parse
(
mFilePath
[
index
]));
// int WC = LinearLayout.LayoutParams.WRAP_CONTENT;
int
MP
=
ViewGroup
.
LayoutParams
.
MATCH_PARENT
;
int
MP
=
ViewGroup
.
LayoutParams
.
MATCH_PARENT
;
LinearLayout
.
LayoutParams
param
=
new
LinearLayout
.
LayoutParams
(
MP
,
MP
);
LinearLayout
.
LayoutParams
param
=
new
LinearLayout
.
LayoutParams
(
MP
,
MP
);
mFlipperLayout
[
index
].
removeAllViews
();
mFlipperLayout
[
index
].
removeAllViews
();
...
...
ABVJE_UI_Android/src/org/itri/html5webview/HTML5WebView.java
deleted
100644 → 0
View file @
68f613b8
package
org
.
itri
.
html5webview
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.util.AttributeSet
;
import
android.view.KeyEvent
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.Window
;
import
android.webkit.GeolocationPermissions
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebSettings
;
import
android.webkit.WebView
;
import
android.widget.FrameLayout
;
public
class
HTML5WebView
extends
WebView
{
private
Context
mContext
;
private
MyWebChromeClient
mWebChromeClient
;
private
View
mCustomView
;
private
FrameLayout
mCustomViewContainer
;
private
WebChromeClient
.
CustomViewCallback
mCustomViewCallback
;
private
FrameLayout
mContentView
;
private
FrameLayout
mBrowserFrameLayout
;
// private FrameLayout mLayout;
static
final
String
LOGTAG
=
"HTML5WebView"
;
private
void
init
(
Context
context
)
{
mContext
=
context
;
Activity
a
=
(
Activity
)
mContext
;
// mLayout = new FrameLayout(context);
mBrowserFrameLayout
=
(
FrameLayout
)
LayoutInflater
.
from
(
a
).
inflate
(
R
.
layout
.
custom_screen
,
null
);
mContentView
=
(
FrameLayout
)
mBrowserFrameLayout
.
findViewById
(
R
.
id
.
main_content
);
mCustomViewContainer
=
(
FrameLayout
)
mBrowserFrameLayout
.
findViewById
(
R
.
id
.
fullscreen_custom_content
);
// mLayout.addView(mBrowserFrameLayout, COVER_SCREEN_PARAMS);
mWebChromeClient
=
new
MyWebChromeClient
();
setWebChromeClient
(
mWebChromeClient
);
// Configure the webview
WebSettings
s
=
getSettings
();
s
.
setBuiltInZoomControls
(
true
);
s
.
setLayoutAlgorithm
(
WebSettings
.
LayoutAlgorithm
.
NARROW_COLUMNS
);
s
.
setUseWideViewPort
(
true
);
s
.
setLoadWithOverviewMode
(
true
);
//noinspection deprecation(API21から非推奨になった。無視)
s
.
setSavePassword
(
true
);
s
.
setSaveFormData
(
true
);
s
.
setJavaScriptEnabled
(
true
);
// enable navigator.geolocation
// s.setGeolocationEnabled(true);
// s.setGeolocationDatabasePath("/data/data/org.itri.html5webview/databases/");
// enable Web Storage: localStorage, sessionStorage
s
.
setDomStorageEnabled
(
true
);
mContentView
.
addView
(
this
);
}
public
HTML5WebView
(
Context
context
)
{
super
(
context
);
init
(
context
);
}
public
HTML5WebView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
init
(
context
);
}
public
HTML5WebView
(
Context
context
,
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
init
(
context
);
}
// public FrameLayout getLayout() {
// return mLayout;
// }
public
FrameLayout
getBrowserLayout
()
{
return
mBrowserFrameLayout
;
}
public
boolean
inCustomView
()
{
return
(
mCustomView
!=
null
);
}
public
void
hideCustomView
()
{
mWebChromeClient
.
onHideCustomView
();
}
@Override
public
boolean
onKeyDown
(
int
keyCode
,
KeyEvent
event
)
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
if
((
mCustomView
==
null
)
&&
canGoBack
()){
goBack
();
return
true
;
}
}
return
super
.
onKeyDown
(
keyCode
,
event
);
}
private
class
MyWebChromeClient
extends
WebChromeClient
{
private
Bitmap
mDefaultVideoPoster
;
private
View
mVideoProgressView
;
@Override
public
void
onShowCustomView
(
View
view
,
WebChromeClient
.
CustomViewCallback
callback
)
{
//Log.i(LOGTAG, "here in on ShowCustomView");
HTML5WebView
.
this
.
setVisibility
(
View
.
GONE
);
// if a view already exists then immediately terminate the new one
if
(
mCustomView
==
null
)
{
mCustomViewContainer
.
addView
(
view
);
mCustomView
=
view
;
mCustomViewCallback
=
callback
;
mCustomViewContainer
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
callback
.
onCustomViewHidden
();
return
;
}
}
@Override
public
void
onHideCustomView
()
{
if
(
mCustomView
==
null
)
{
return
;
}
// Hide the custom view.
mCustomView
.
setVisibility
(
View
.
GONE
);
// Remove the custom view from its container.
mCustomViewContainer
.
removeView
(
mCustomView
);
mCustomView
=
null
;
mCustomViewContainer
.
setVisibility
(
View
.
GONE
);
mCustomViewCallback
.
onCustomViewHidden
();
HTML5WebView
.
this
.
setVisibility
(
View
.
VISIBLE
);
//Log.i(LOGTAG, "set it to webVew");
}
@Override
public
Bitmap
getDefaultVideoPoster
()
{
//Log.i(LOGTAG, "here in on getDefaultVideoPoster");
if
(
mDefaultVideoPoster
==
null
)
{
mDefaultVideoPoster
=
BitmapFactory
.
decodeResource
(
getResources
(),
R
.
drawable
.
play
);
}
return
mDefaultVideoPoster
;
}
@Override
public
View
getVideoLoadingProgressView
()
{
//Log.i(LOGTAG, "here in on getVideoLoadingPregressView");
if
(
mVideoProgressView
==
null
)
{
LayoutInflater
inflater
=
LayoutInflater
.
from
(
mContext
);
mVideoProgressView
=
inflater
.
inflate
(
R
.
layout
.
video_loading_progress
,
null
);
}
return
mVideoProgressView
;
}
@Override
public
void
onReceivedTitle
(
WebView
view
,
String
title
)
{
((
Activity
)
mContext
).
setTitle
(
title
);
}
@Override
public
void
onProgressChanged
(
WebView
view
,
int
newProgress
)
{
((
Activity
)
mContext
).
getWindow
().
setFeatureInt
(
Window
.
FEATURE_PROGRESS
,
newProgress
*
100
);
}
@Override
public
void
onGeolocationPermissionsShowPrompt
(
String
origin
,
GeolocationPermissions
.
Callback
callback
)
{
callback
.
invoke
(
origin
,
true
,
false
);
}
}
// static final FrameLayout.LayoutParams COVER_SCREEN_PARAMS =
// new FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
}
\ No newline at end of file
gradle.properties
View file @
8c2bdcbe
...
@@ -86,7 +86,7 @@ is_check_invalid_passward_limit=true
...
@@ -86,7 +86,7 @@ is_check_invalid_passward_limit=true
repeat_default
=
true
repeat_default
=
true
#Setting Info(設定画面のABookについての設定情報)
#Setting Info(設定画面のABookについての設定情報)
version_name
=
1.
9.401
version_name
=
1.
0.0
release_date
=
2019/01/30
release_date
=
2019/01/30
copy_right
=
2016 AGENTEC Co.,Ltd. All rights reserved.
copy_right
=
2016 AGENTEC Co.,Ltd. All rights reserved.
hope_page
=
http://www.agentec.jp
hope_page
=
http://www.agentec.jp
...
@@ -112,22 +112,6 @@ login_mode=2
...
@@ -112,22 +112,6 @@ login_mode=2
#login_modeが0、1の場合のアカウントパス
#login_modeが0、1の場合のアカウントパス
account_path
=
agtcatalog
account_path
=
agtcatalog
#Setting Menu
#アカウント
setting_menu_account
=
1
#ログアウト
setting_menu_logout
=
1
#パスワード変更
setting_menu_password_change
=
1
#ログ情報
setting_menu_log_info
=
1
#アプリ情報
setting_menu_app_info
=
1
#事業者 1:表示 0:非表示
setting_menu_url_path
=
1
#ログインID 1:表示 0:非表示
setting_menu_loginId
=
1
#GCM
#GCM
push_message
=
1
push_message
=
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment