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
9a7ad333
Commit
9a7ad333
authored
Jun 15, 2023
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'features/1.4.500_54062_logout' into 'features/1.4.500'
同意せずにログイン画面に戻った際、事業者入力欄が表示されない See merge request
!319
parents
a314d3e0
f9389470
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
8 deletions
+38
-8
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/AcmsDao.java
+7
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/ContractLogic.java
+9
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVNoAuthenticatedActivity.java
+5
-5
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/helper/LogoutHelper.java
+17
-2
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/AcmsDao.java
View file @
9a7ad333
...
@@ -57,6 +57,13 @@ public class AcmsDao extends AbstractDao {
...
@@ -57,6 +57,13 @@ 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
());
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
()
{
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
);
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
;
return
ret
>
0
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/ContractLogic.java
View file @
9a7ad333
...
@@ -351,7 +351,15 @@ public class ContractLogic extends AbstractLogic {
...
@@ -351,7 +351,15 @@ public class ContractLogic extends AbstractLogic {
cache
.
setUrlPath
(
urlPath
);
cache
.
setUrlPath
(
urlPath
);
}
}
}
}
/**
* ログイン情報のアカウントパスを削除する
*/
public
void
deleteUrlPath
()
{
acmsDao
.
deleteAcms
();
cache
.
setUrlPath
(
null
);
}
public
static
boolean
getBooleanValue
(
String
value
)
{
public
static
boolean
getBooleanValue
(
String
value
)
{
return
True
.
equals
(
value
);
return
True
.
equals
(
value
);
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVNoAuthenticatedActivity.java
View file @
9a7ad333
...
@@ -83,7 +83,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -83,7 +83,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
AlertDialog
dialog
=
AgreementToTermsHelper
.
getCurrentDialog
();
AlertDialog
dialog
=
AgreementToTermsHelper
.
getCurrentDialog
();
if
(
dialog
!=
null
&&
dialog
.
isShowing
())
{
if
(
dialog
!=
null
&&
dialog
.
isShowing
())
{
dialog
.
dismiss
();
dialog
.
dismiss
();
LogoutHelper
.
logout
(
this
,
false
);
LogoutHelper
.
logout
(
this
,
false
,
false
);
}
}
}
}
...
@@ -118,8 +118,8 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -118,8 +118,8 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
// 同意したら初期化
// 同意したら初期化
doShowMainActivity
();
doShowMainActivity
();
}
else
{
}
else
{
// 規約に同意しなかったので、ログアウト
// 規約に同意しなかったので、ログアウト
(ログイン直後なので、ログイン情報をクリア)
LogoutHelper
.
logout
(
ABVNoAuthenticatedActivity
.
this
);
LogoutHelper
.
logout
(
ABVNoAuthenticatedActivity
.
this
,
true
,
true
);
}
}
}
}
...
@@ -466,8 +466,8 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -466,8 +466,8 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
// 同意したら初期化
// 同意したら初期化
doMoveToHome
();
doMoveToHome
();
}
else
{
}
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 @
9a7ad333
...
@@ -6,8 +6,11 @@ import android.content.Intent;
...
@@ -6,8 +6,11 @@ import android.content.Intent;
import
android.content.SharedPreferences
;
import
android.content.SharedPreferences
;
import
android.widget.Toast
;
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.common.log.Logger
;
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.UserAuthenticateLogic
;
import
jp.agentec.abook.abv.bl.logic.UserAuthenticateLogic
;
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
;
...
@@ -27,16 +30,17 @@ public class LogoutHelper {
...
@@ -27,16 +30,17 @@ public class LogoutHelper {
* @param activity 呼び出し元アクティビティ
* @param activity 呼び出し元アクティビティ
*/
*/
public
static
void
logout
(
Activity
activity
)
{
public
static
void
logout
(
Activity
activity
)
{
logout
(
activity
,
true
);
logout
(
activity
,
false
,
true
);
}
}
/**
/**
* ログアウトして、ログイン画面に遷移する
* ログアウトして、ログイン画面に遷移する
*
*
* @param activity 呼び出し元アクティビティ
* @param activity 呼び出し元アクティビティ
* @param removeLoginInfo ログイン情報をクリアする場合はtrue
* @param launchLogin trueならLoginActivityをstart
* @param launchLogin trueならLoginActivityをstart
*/
*/
public
static
void
logout
(
Activity
activity
,
boolean
launchLogin
)
{
public
static
void
logout
(
Activity
activity
,
boolean
removeLoginInfo
,
boolean
launchLogin
)
{
try
{
try
{
// modify by Jang 2013.06.20
// modify by Jang 2013.06.20
UserAuthenticateLogic
user
=
AbstractLogic
.
getLogic
(
UserAuthenticateLogic
.
class
);
UserAuthenticateLogic
user
=
AbstractLogic
.
getLogic
(
UserAuthenticateLogic
.
class
);
...
@@ -60,6 +64,17 @@ public class LogoutHelper {
...
@@ -60,6 +64,17 @@ public class LogoutHelper {
SharedPreferences
sharedPreferences
=
activity
.
getSharedPreferences
(
AppDefType
.
PrefName
.
USER_PREFERENCE
,
Context
.
MODE_PRIVATE
);
SharedPreferences
sharedPreferences
=
activity
.
getSharedPreferences
(
AppDefType
.
PrefName
.
USER_PREFERENCE
,
Context
.
MODE_PRIVATE
);
sharedPreferences
.
edit
().
remove
(
AppDefType
.
UserPrefKey
.
GUEST_LOGIN
).
apply
();
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
)
{
if
(
launchLogin
)
{
Intent
intent
=
new
Intent
(
activity
,
LoginActivity
.
class
);
Intent
intent
=
new
Intent
(
activity
,
LoginActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NO_HISTORY
);
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