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
e488e53a
Commit
e488e53a
authored
Jun 15, 2022
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#47940 前回の入力内容をデフォルトに設定 仕様ミスを修正
parent
c2cfed5a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
26 deletions
+35
-26
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
+0
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
+1
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+34
-24
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
View file @
e488e53a
...
...
@@ -157,8 +157,6 @@ public class ABVEnvironment {
public
static
final
String
ContinuousTaskReportJsonDirFormat
=
ContentCacheDirectoryFormat
+
"/processList/phaseList/phase_%d"
;
// アルコールチェッカー(userDataKey)を保存する場所
public
static
final
String
userDataDir
=
"/userData/"
;
// 保存するファイル名
public
static
final
String
userDataKeyFile
=
"userDataKey"
;
/**
* コンテンツのファイルを暗号化するときに、暗号化するサイズをバイト単位で指定します。
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
View file @
e488e53a
...
...
@@ -88,6 +88,7 @@ public class ABookKeys {
public
static
final
String
ATTACHED_CHANGE_FLAG
=
"attachedChangeFlag"
;
public
static
final
String
ROUTINE_TASK_FLAG
=
"routineTaskFlag"
;
public
static
final
String
UPDATE_HOTSPOT_ONLY_FLAG
=
"updateHotSpotOnlyFlag"
;
public
static
final
String
USER_DATA
=
"userData"
;
//Webviewから呼び出すApiキー
public
static
final
class
CMD_KEY
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
e488e53a
...
...
@@ -1209,7 +1209,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_SAVE_USER_DATA
))
{
// 入力内容を保存する
Logger
.
i
(
TAG
,
"save taskKey = "
+
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
));
saveUserDataKey
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
));
Logger
.
i
(
TAG
,
"save userData = "
+
abookCheckParam
.
get
(
ABookKeys
.
USER_DATA
));
saveUserDataKey
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
),
abookCheckParam
.
get
(
ABookKeys
.
USER_DATA
));
}
}
...
...
@@ -1226,12 +1227,14 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
/**
* JSから送られてきたキーデータを保存する
* @param userDataKey 保存するユーザーキー
* @param userKeyFileName 保存するユーザーキーファイル名
* @param userData 保存するデータ
*/
private
void
saveUserDataKey
(
String
userDataKey
)
{
if
(
StringUtil
.
isNullOrEmpty
(
userDataKey
))
{
private
void
saveUserDataKey
(
String
userKeyFileName
,
String
userData
)
{
if
(
StringUtil
.
isNullOrEmpty
(
userKeyFileName
))
{
Logger
.
d
(
TAG
,
"userKeyFileName is null or empty."
);
// 読み込むためのキーがない
afterABookCheckApi
(
ABookKeys
.
CMD_SAVE_USER_DATA
,
user
DataKey
,
1
,
""
,
""
);
afterABookCheckApi
(
ABookKeys
.
CMD_SAVE_USER_DATA
,
user
KeyFileName
,
1
,
""
,
""
);
return
;
}
...
...
@@ -1251,46 +1254,50 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if
(!
ABVDataCache
.
getInstance
().
getMemberInfo
().
loginId
.
equals
(
userId
))
{
// ログインしているユーザー以外のものは削除
FileUtil
.
delete
(
dir
);
continue
;
}
BufferedWriter
bw
=
null
;
if
(
userData
Key
!=
null
)
{
if
(
userData
!=
null
)
{
try
{
FileOutputStream
fo
=
new
FileOutputStream
(
userDataFolderRoot
+
"/"
+
userId
+
"/"
+
ABVEnvironment
.
getInstance
().
userDataKeyFil
e
);
FileOutputStream
fo
=
new
FileOutputStream
(
userDataFolderRoot
+
"/"
+
userId
+
"/"
+
userKeyFileNam
e
);
OutputStreamWriter
osw
=
new
OutputStreamWriter
(
fo
,
StandardCharsets
.
UTF_8
);
bw
=
new
BufferedWriter
(
osw
);
bw
.
write
(
userData
Key
);
bw
.
write
(
userData
);
bw
.
close
();
}
catch
(
IOException
e
)
{
Logger
.
e
(
TAG
,
""
+
e
);
}
finally
{
try
{
bw
.
close
();
if
(
bw
!=
null
)
{
bw
.
close
();
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
(
);
Logger
.
e
(
TAG
,
""
+
e
);
}
}
afterABookCheckApi
(
ABookKeys
.
CMD_SAVE_USER_DATA
,
userDataKey
,
0
,
""
,
""
);
break
;
afterABookCheckApi
(
ABookKeys
.
CMD_SAVE_USER_DATA
,
userKeyFileName
,
0
,
""
,
""
);
}
}
catch
(
IndexOutOfBoundsException
iobex
)
{
Logger
.
e
(
TAG
,
""
+
iobex
);
}
}
}
/**
* キーデータファイルを読み込んで、JSにわたす
* @param userKeyFileName ファイル名
*/
private
void
loadUserDataKey
(
String
user
DataKey
)
{
private
void
loadUserDataKey
(
String
user
KeyFileName
)
{
if
(
StringUtil
.
isNullOrEmpty
(
user
DataKey
))
{
Logger
.
d
(
TAG
,
"
key is not found.
"
);
//
読み込むためのキーが
ない
afterABookCheckApi
(
ABookKeys
.
CMD_LOAD_USER_DATA
,
user
DataKey
,
1
,
""
,
""
);
if
(
StringUtil
.
isNullOrEmpty
(
user
KeyFileName
))
{
Logger
.
d
(
TAG
,
"
userKeyFileName is null or Empty
"
);
//
ファイル名が指定されてい
ない
afterABookCheckApi
(
ABookKeys
.
CMD_LOAD_USER_DATA
,
user
KeyFileName
,
1
,
""
,
""
);
return
;
}
String
keyFilePath
=
getUserDataDirRoot
()
+
"/"
+
ABVDataCache
.
getInstance
().
getMemberInfo
().
loginId
+
"/"
+
ABVEnvironment
.
getInstance
().
userDataKeyFile
;
String
keyFilePath
=
getUserDataDirRoot
()
+
"/"
+
ABVDataCache
.
getInstance
().
getMemberInfo
().
loginId
+
"/"
+
userKeyFileName
;
Logger
.
d
(
TAG
,
"keyFilePath = "
+
keyFilePath
);
FileInputStream
fi
=
null
;
...
...
@@ -1308,11 +1315,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
isr
.
close
();
Logger
.
d
(
TAG
,
"result = "
+
sb
.
toString
());
afterABookCheckApi
(
ABookKeys
.
CMD_LOAD_USER_DATA
,
userDataKey
,
0
,
""
,
sb
.
toString
());
}
catch
(
FileNotFoundException
fnfex
)
{
afterABookCheckApi
(
ABookKeys
.
CMD_LOAD_USER_DATA
,
userKeyFileName
,
0
,
""
,
sb
.
toString
());
return
;
}
catch
(
FileNotFoundException
fex
)
{
Logger
.
e
(
TAG
,
""
+
fex
);
}
catch
(
IOException
e
)
{
Logger
.
e
(
TAG
,
""
+
e
);
}
finally
{
try
{
if
(
isr
!=
null
)
{
...
...
@@ -1322,6 +1330,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
e
.
printStackTrace
();
}
}
// 何かしらのExceptionが発生した
afterABookCheckApi
(
ABookKeys
.
CMD_LOAD_USER_DATA
,
userKeyFileName
,
1
,
""
,
""
);
}
public
void
commonAttachedDataUrl
(
String
taskKey
,
String
data
)
{
...
...
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