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
4e03e1bd
Commit
4e03e1bd
authored
Apr 24, 2020
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
・新着更新中にログアウトするとアプリ強制される問題対応
・新着更新中にログアウトするとサーバ通信エラーメッセージ非表示
parent
52f75401
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
13 deletions
+31
-13
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentDownloader.java
+5
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
+13
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVUIActivity.java
+6
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ABookSettingActivity.java
+4
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ABookSettingFragment.java
+3
-6
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentDownloader.java
View file @
4e03e1bd
...
@@ -171,6 +171,8 @@ public class ContentDownloader {
...
@@ -171,6 +171,8 @@ public class ContentDownloader {
Logger
.
e
(
TAG
,
"execKickTask encountered an exception."
,
e
);
Logger
.
e
(
TAG
,
"execKickTask encountered an exception."
,
e
);
}
catch
(
NetworkDisconnectedException
e
)
{
}
catch
(
NetworkDisconnectedException
e
)
{
Logger
.
e
(
TAG
,
"execKickTask encountered an exception."
,
e
);
Logger
.
e
(
TAG
,
"execKickTask encountered an exception."
,
e
);
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"execKickTask encountered an exception."
,
e
);
}
finally
{
}
finally
{
isKickTask
=
false
;
isKickTask
=
false
;
}
}
...
@@ -178,7 +180,7 @@ public class ContentDownloader {
...
@@ -178,7 +180,7 @@ public class ContentDownloader {
});
});
}
}
private
void
execKickTask
()
throws
AcmsException
,
NetworkDisconnectedException
{
private
void
execKickTask
()
throws
AcmsException
,
NetworkDisconnectedException
,
Exception
{
autoPaused
=
false
;
autoPaused
=
false
;
if
(
Logger
.
isDebugEnabled
())
{
if
(
Logger
.
isDebugEnabled
())
{
Logger
.
d
(
TAG
,
"downloaderMap %s"
,
getDownloadMapForDebug
());
Logger
.
d
(
TAG
,
"downloaderMap %s"
,
getDownloadMapForDebug
());
...
@@ -622,7 +624,7 @@ public class ContentDownloader {
...
@@ -622,7 +624,7 @@ public class ContentDownloader {
* @throws AcmsException
* @throws AcmsException
* @throws NetworkDisconnectedException
* @throws NetworkDisconnectedException
*/
*/
private
void
startDownload
(
ContentDto
contentDto
)
throws
AcmsException
,
NetworkDisconnectedException
{
private
void
startDownload
(
ContentDto
contentDto
)
throws
AcmsException
,
NetworkDisconnectedException
,
Exception
{
contentDto
.
status
=
DownloadStatusType
.
Downloading
.
type
();
contentDto
.
status
=
DownloadStatusType
.
Downloading
.
type
();
contentDto
.
resourcePath
=
ABVEnvironment
.
getInstance
().
getContentResourcesDirectoryPath
(
contentDto
.
contentId
,
false
);
contentDto
.
resourcePath
=
ABVEnvironment
.
getInstance
().
getContentResourcesDirectoryPath
(
contentDto
.
contentId
,
false
);
contentDto
.
downloadStartDate
=
DateTimeUtil
.
getCurrentDate
();
contentDto
.
downloadStartDate
=
DateTimeUtil
.
getCurrentDate
();
...
@@ -691,7 +693,7 @@ public class ContentDownloader {
...
@@ -691,7 +693,7 @@ public class ContentDownloader {
return
downloadUrl
;
return
downloadUrl
;
}
}
private
GetContentParameters
getContentParameter
(
ContentDto
contentDto
)
{
private
GetContentParameters
getContentParameter
(
ContentDto
contentDto
)
throws
NullPointerException
{
GetContentParameters
param
;
GetContentParameters
param
;
param
=
new
GetContentParameters
(
contentDto
.
contentId
,
cache
.
getMemberInfo
().
sid
,
ContentZipType
.
ContentDownload
);
param
=
new
GetContentParameters
(
contentDto
.
contentId
,
cache
.
getMemberInfo
().
sid
,
ContentZipType
.
ContentDownload
);
return
param
;
return
param
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
View file @
4e03e1bd
...
@@ -500,7 +500,10 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -500,7 +500,10 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
configureKeepScreen
();
configureKeepScreen
();
}
}
if
(
e
!=
null
)
{
if
(
e
!=
null
)
{
handleError
(
e
);
//新着更新時にログアウトすることで、SIDが取得できなく、例外が発生したときにはトースト非表示
if
(
ABVDataCache
.
getInstance
().
getMemberInfo
()
!=
null
)
{
handleError
(
e
);
}
}
}
}
}
});
});
...
@@ -737,6 +740,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -737,6 +740,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
ErrorMessage
.
showErrorMessageToast
(
ABVAuthenticatedActivity
.
this
,
error
);
ErrorMessage
.
showErrorMessageToast
(
ABVAuthenticatedActivity
.
this
,
error
);
}
}
}
}
public
void
showUnAuthorizedContentWarningDialog
(
String
msg
)
{
public
void
showUnAuthorizedContentWarningDialog
(
String
msg
)
{
ABookAlertDialog
alertDialog
=
AlertDialogUtil
.
createAlertDialog
(
this
,
getString
(
R
.
string
.
app_name
),
msg
);
ABookAlertDialog
alertDialog
=
AlertDialogUtil
.
createAlertDialog
(
this
,
getString
(
R
.
string
.
app_name
),
msg
);
alertDialog
.
setPositiveButton
(
R
.
string
.
ok
,
null
);
alertDialog
.
setPositiveButton
(
R
.
string
.
ok
,
null
);
...
@@ -765,4 +769,12 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -765,4 +769,12 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
public
boolean
isShowingBatchSync
()
{
public
boolean
isShowingBatchSync
()
{
return
batchSyncView
!=
null
&&
batchSyncView
.
isShowing
();
return
batchSyncView
!=
null
&&
batchSyncView
.
isShowing
();
}
}
/**
* @version 1.2.300
* 新着情報更新処理を中止
*/
public
void
stopContentRefresher
()
{
contentRefresher
.
stopRefresh
();
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVUIActivity.java
View file @
4e03e1bd
...
@@ -442,9 +442,12 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
...
@@ -442,9 +442,12 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
}
}
});
});
}
}
//ログアウト時にも呼ばれるのでチェック
// 自動ダウンロード対象がある場合、新着更新が完了したあとに開始するように修正(jang)
ABVDataCache
cache
=
ABVDataCache
.
getInstance
();
ContentDownloader
.
getInstance
().
autoDownload
();
if
(
cache
.
getMemberInfo
()
!=
null
)
{
// 自動ダウンロード対象がある場合、新着更新が完了したあとに開始するように修正(jang)
ContentDownloader
.
getInstance
().
autoDownload
();
}
}
}
/**
/**
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ABookSettingActivity.java
View file @
4e03e1bd
...
@@ -83,4 +83,8 @@ public class ABookSettingActivity extends PreferenceActivity {
...
@@ -83,4 +83,8 @@ public class ABookSettingActivity extends PreferenceActivity {
return
(
getResources
().
getConfiguration
().
screenLayout
&
Configuration
.
SCREENLAYOUT_SIZE_MASK
)
==
Configuration
.
SCREENLAYOUT_SIZE_NORMAL
;
return
(
getResources
().
getConfiguration
().
screenLayout
&
Configuration
.
SCREENLAYOUT_SIZE_MASK
)
==
Configuration
.
SCREENLAYOUT_SIZE_NORMAL
;
}
}
public
void
stopContentRefresher
()
{
ABVUIActivity
activity
=
ActivityHandlingHelper
.
getInstance
().
getPreviousOfSettingActivity
();
activity
.
stopContentRefresher
();
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ABookSettingFragment.java
View file @
4e03e1bd
...
@@ -35,7 +35,6 @@ import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
...
@@ -35,7 +35,6 @@ import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.CommonExecutor
;
import
jp.agentec.abook.abv.bl.common.CommonExecutor
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.ABVDataCache
;
import
jp.agentec.abook.abv.bl.data.ABVDataCache
;
import
jp.agentec.abook.abv.bl.dto.MemberInfoDto
;
import
jp.agentec.abook.abv.bl.dto.MemberInfoDto
;
...
@@ -49,19 +48,14 @@ import jp.agentec.abook.abv.launcher.android.OnAppDownloadReceiver;
...
@@ -49,19 +48,14 @@ import jp.agentec.abook.abv.launcher.android.OnAppDownloadReceiver;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey
;
import
jp.agentec.abook.abv.ui.common.appinfo.options.Options
;
import
jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog
;
import
jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog
;
import
jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper
;
import
jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper
;
import
jp.agentec.abook.abv.ui.common.util.ABVToastUtil
;
import
jp.agentec.abook.abv.ui.common.util.ABVToastUtil
;
import
jp.agentec.abook.abv.ui.common.util.AlertDialogUtil
;
import
jp.agentec.abook.abv.ui.common.util.AlertDialogUtil
;
import
jp.agentec.abook.abv.ui.common.util.PatternStringUtil
;
import
jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper
;
import
jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
PreferenceUtil
.
getUserPref
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
PreferenceUtil
.
putUserPref
;
public
class
ABookSettingFragment
extends
PreferenceFragment
{
public
class
ABookSettingFragment
extends
PreferenceFragment
{
private
static
final
String
TAG
=
"ABookSettingActivity"
;
private
static
final
String
TAG
=
"ABookSettingActivity"
;
...
@@ -191,6 +185,9 @@ public class ABookSettingFragment extends PreferenceFragment {
...
@@ -191,6 +185,9 @@ public class ABookSettingFragment extends PreferenceFragment {
ABVToastUtil
.
showMakeText
(
getActivity
(),
R
.
string
.
ERROR
,
Toast
.
LENGTH_SHORT
);
ABVToastUtil
.
showMakeText
(
getActivity
(),
R
.
string
.
ERROR
,
Toast
.
LENGTH_SHORT
);
}
}
// 新着更新が実行されている場合停止
((
ABookSettingActivity
)
getActivity
()).
stopContentRefresher
();
SharedPreferences
sharedPreferences
=
getActivity
().
getSharedPreferences
(
AppDefType
.
PrefName
.
USER_PREFERENCE
,
Context
.
MODE_PRIVATE
);
SharedPreferences
sharedPreferences
=
getActivity
().
getSharedPreferences
(
AppDefType
.
PrefName
.
USER_PREFERENCE
,
Context
.
MODE_PRIVATE
);
sharedPreferences
.
edit
().
remove
(
AppDefType
.
UserPrefKey
.
GUEST_LOGIN
).
commit
();
sharedPreferences
.
edit
().
remove
(
AppDefType
.
UserPrefKey
.
GUEST_LOGIN
).
commit
();
...
...
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