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
5edc7403
Commit
5edc7403
authored
Jun 15, 2023
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
規約に同意しないときのログアウト時に、端末内に記憶されているログイン情報をクリアするようにした(ログイン済の場合を除く)。
parent
a314d3e0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/AcmsDao.java
+4
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/ContractLogic.java
+8
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVNoAuthenticatedActivity.java
+3
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/helper/LogoutHelper.java
+16
-2
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/AcmsDao.java
View file @
5edc7403
...
...
@@ -57,6 +57,10 @@ public class AcmsDao extends AbstractDao {
insert
(
"insert into m_acms (url_path, acms_address,download_server_address, websocket_server_http_url, websocket_server_ws_url, schedulelist_last_fetch_date, contentversion_last_fetch_date) values (?,?,?,?,?,?,?)"
,
acmsDto
.
getInsertValues
());
}
public
void
deleteAcms
()
{
delete
(
"m_acms"
,
""
,
null
);
}
public
boolean
isTodayLastAnnounceChangePasswordDate
()
{
int
ret
=
rawQueryGetInt
(
"select COUNT(url_path) AS last_count from m_acms where last_announce_change_password_date=DATE('NOW','LOCALTIME')"
,
null
);
return
ret
>
0
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/ContractLogic.java
View file @
5edc7403
...
...
@@ -352,6 +352,14 @@ public class ContractLogic extends AbstractLogic {
}
}
/**
* ログイン情報のアカウントパスを削除する
*/
public
void
deleteUrlPath
()
{
acmsDao
.
deleteAcms
();
cache
.
setUrlPath
(
null
);
}
public
static
boolean
getBooleanValue
(
String
value
)
{
return
True
.
equals
(
value
);
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVNoAuthenticatedActivity.java
View file @
5edc7403
...
...
@@ -83,7 +83,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
AlertDialog
dialog
=
AgreementToTermsHelper
.
getCurrentDialog
();
if
(
dialog
!=
null
&&
dialog
.
isShowing
())
{
dialog
.
dismiss
();
LogoutHelper
.
logout
(
this
,
false
);
LogoutHelper
.
logout
(
this
,
false
,
false
);
}
}
...
...
@@ -119,7 +119,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
doShowMainActivity
();
}
else
{
// 規約に同意しなかったので、ログアウト
LogoutHelper
.
logout
(
ABVNoAuthenticatedActivity
.
this
);
LogoutHelper
.
logout
(
ABVNoAuthenticatedActivity
.
this
,
true
,
true
);
}
}
...
...
@@ -467,7 +467,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
doMoveToHome
();
}
else
{
// 規約に同意しなかったので、ログアウト
LogoutHelper
.
logout
(
ABVNoAuthenticatedActivity
.
this
);
LogoutHelper
.
logout
(
ABVNoAuthenticatedActivity
.
this
,
false
,
true
);
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/helper/LogoutHelper.java
View file @
5edc7403
...
...
@@ -6,8 +6,11 @@ import android.content.Intent;
import
android.content.SharedPreferences
;
import
android.widget.Toast
;
import
jp.agentec.abook.abv.bl.acms.type.LoginMode
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.ContractLogic
;
import
jp.agentec.abook.abv.bl.logic.UserAuthenticateLogic
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
...
...
@@ -27,7 +30,7 @@ public class LogoutHelper {
* @param activity 呼び出し元アクティビティ
*/
public
static
void
logout
(
Activity
activity
)
{
logout
(
activity
,
true
);
logout
(
activity
,
false
,
true
);
}
/**
...
...
@@ -36,7 +39,7 @@ public class LogoutHelper {
* @param activity 呼び出し元アクティビティ
* @param launchLogin trueならLoginActivityをstart
*/
public
static
void
logout
(
Activity
activity
,
boolean
launchLogin
)
{
public
static
void
logout
(
Activity
activity
,
boolean
removeLoginInfo
,
boolean
launchLogin
)
{
try
{
// modify by Jang 2013.06.20
UserAuthenticateLogic
user
=
AbstractLogic
.
getLogic
(
UserAuthenticateLogic
.
class
);
...
...
@@ -60,6 +63,17 @@ public class LogoutHelper {
SharedPreferences
sharedPreferences
=
activity
.
getSharedPreferences
(
AppDefType
.
PrefName
.
USER_PREFERENCE
,
Context
.
MODE_PRIVATE
);
sharedPreferences
.
edit
().
remove
(
AppDefType
.
UserPrefKey
.
GUEST_LOGIN
).
apply
();
boolean
isLoginModePath
=
activity
.
getResources
().
getInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
PATH_ID_PASS
;
boolean
isLoginModeSite
=
activity
.
getResources
().
getInteger
(
R
.
integer
.
login_mode
)
==
LoginMode
.
SITE_PATH_ID_PASS
;
if
(
removeLoginInfo
&&
(
isLoginModePath
||
isLoginModeSite
))
{
ContractLogic
logic
=
AbstractLogic
.
getLogic
(
ContractLogic
.
class
);
logic
.
deleteUrlPath
();
}
if
(
removeLoginInfo
&&
isLoginModeSite
)
{
ABVEnvironment
.
getInstance
().
acmsAddress
=
null
;
}
if
(
launchLogin
)
{
Intent
intent
=
new
Intent
(
activity
,
LoginActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NO_HISTORY
);
...
...
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