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
7fd6a7c4
Commit
7fd6a7c4
authored
Sep 03, 2024
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
アプリマイグレーション処理をなくす。後で利用するため、クラスは残す。
parent
cb424a43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
22 deletions
+18
-22
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/helper/AppMigrationHelper.java
+18
-18
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVSplashActivity.java
+0
-4
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/helper/AppMigrationHelper.java
View file @
7fd6a7c4
...
@@ -10,7 +10,7 @@ import jp.agentec.abook.abv.cl.util.PreferenceUtil;
...
@@ -10,7 +10,7 @@ import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
interface
MigrationVersion
{
interface
MigrationVersion
{
//
Android13対応で、「通知」「イメージ・動画」権限追加され、バージョンアップ後、起動時に再度権限ダイアログ表示する処理追加
//
※ここにアプリバージョンを追加する。
String
VER_1_4_520
=
"VER_1_4_520"
;
String
VER_1_4_520
=
"VER_1_4_520"
;
}
}
...
@@ -19,7 +19,7 @@ interface MigrationVersion {
...
@@ -19,7 +19,7 @@ interface MigrationVersion {
*/
*/
public
class
AppMigrationHelper
{
public
class
AppMigrationHelper
{
private
static
final
String
TAG
=
"AppMigrationHelper"
;
private
static
final
String
TAG
=
"AppMigrationHelper"
;
private
static
final
String
[]
MIGRATION_ARRAY
=
{
MigrationVersion
.
VER_1_4_520
};
//
private static final String[] MIGRATION_ARRAY = {MigrationVersion.VER_1_4_520};
/**
/**
* アプリマイグレーションを実行
* アプリマイグレーションを実行
...
@@ -27,21 +27,21 @@ public class AppMigrationHelper {
...
@@ -27,21 +27,21 @@ public class AppMigrationHelper {
*/
*/
public
void
runMigration
(
Context
context
)
{
public
void
runMigration
(
Context
context
)
{
Logger
.
d
(
TAG
,
"runMigration"
);
Logger
.
d
(
TAG
,
"runMigration"
);
boolean
chekcFlg
=
PreferenceUtil
.
getUserPref
(
context
,
AppDefType
.
UserPrefKey
.
ALL_PERMISSION_CHECK
,
true
);
//
boolean chekcFlg = PreferenceUtil.getUserPref(context, AppDefType.UserPrefKey.ALL_PERMISSION_CHECK, true);
List
<
String
>
migrationList
=
Arrays
.
asList
(
MIGRATION_ARRAY
);
//
List<String> migrationList = Arrays.asList(MIGRATION_ARRAY);
for
(
String
version
:
migrationList
)
{
//
for (String version : migrationList) {
if
(
chekcFlg
)
{
//新規インストール&データ初期化
//
if (chekcFlg) {//新規インストール&データ初期化
PreferenceUtil
.
put
(
context
,
version
,
true
);
//
PreferenceUtil.put(context, version, true);
}
else
{
//上書きインストール
//
} else { //上書きインストール
boolean
migrationFinished
=
PreferenceUtil
.
getUserPref
(
context
,
version
,
false
);
//
boolean migrationFinished = PreferenceUtil.getUserPref(context, version, false);
if
(!
migrationFinished
)
{
//
if (!migrationFinished) {
if
(
version
.
equals
(
MigrationVersion
.
VER_1_4_520
))
{
//
if (version.equals(MigrationVersion.VER_1_4_520)) {
resetAllPermissionCheckFlg
(
context
);
//
resetAllPermissionCheckFlg(context);
}
//
}
PreferenceUtil
.
putUserPref
(
context
,
version
,
true
);
//
PreferenceUtil.putUserPref(context, version, true);
}
//
}
}
//
}
}
//
}
}
}
/**
/**
...
@@ -50,7 +50,7 @@ public class AppMigrationHelper {
...
@@ -50,7 +50,7 @@ public class AppMigrationHelper {
*/
*/
private
void
resetAllPermissionCheckFlg
(
Context
context
)
{
private
void
resetAllPermissionCheckFlg
(
Context
context
)
{
Logger
.
i
(
TAG
,
"resetPermissionCheck"
);
Logger
.
i
(
TAG
,
"resetPermissionCheck"
);
PreferenceUtil
.
putUserPref
(
context
,
AppDefType
.
UserPrefKey
.
ALL_PERMISSION_CHECK
,
true
);
//
PreferenceUtil.putUserPref(context, AppDefType.UserPrefKey.ALL_PERMISSION_CHECK, true);
}
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVSplashActivity.java
View file @
7fd6a7c4
...
@@ -52,10 +52,6 @@ public abstract class ABVSplashActivity extends ABVNoAuthenticatedActivity {
...
@@ -52,10 +52,6 @@ public abstract class ABVSplashActivity extends ABVNoAuthenticatedActivity {
setContentView
(
R
.
layout
.
ac_splash1
);
setContentView
(
R
.
layout
.
ac_splash1
);
getABVUIDataCache
().
isFirstLaunching
=
true
;
getABVUIDataCache
().
isFirstLaunching
=
true
;
//app migration
AppMigrationHelper
appMigrationHelper
=
new
AppMigrationHelper
();
appMigrationHelper
.
runMigration
(
this
);
}
}
@Override
@Override
...
...
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