Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile-Cn-Ko-En
Commits
60ede78e
Commit
60ede78e
authored
Apr 08, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搬运原路径deck
parent
9926dc37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
...c/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
+7
-0
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
View file @
60ede78e
...
...
@@ -8,13 +8,17 @@ import android.database.Cursor;
import
android.database.sqlite.SQLiteDatabase
;
import
android.database.sqlite.SQLiteException
;
import
android.os.AsyncTask
;
import
android.os.Environment
;
import
android.os.Handler
;
import
android.os.Message
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.List
;
import
cn.garymb.ygomobile.AppsSettings
;
...
...
@@ -32,6 +36,7 @@ import ocgcore.DataManager;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ASSETS_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_BOT_CONF_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
DATABASE_NAME
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
PREF_DEF_GAME_DIR
;
public
class
ResCheckTask
extends
AsyncTask
<
Void
,
Integer
,
Integer
>
{
public
static
final
int
ERROR_NONE
=
0
;
...
...
@@ -206,10 +211,12 @@ public class ResCheckTask extends AsyncTask<Void, Integer, Integer> {
systemConf
.
setFontSize
(
mSettings
.
getFontSize
());
systemConf
.
close
();
InputStream
fisdeck
=
new
FileInputStream
(
Environment
.
getExternalStorageDirectory
()
+
"/"
+
Constants
.
PREF_DEF_GAME_DIR
+
"/"
+
Constants
.
CORE_DECK_PATH
);
//如果是新版本
if
(
needsUpdate
)
{
//复制卡组
setMessage
(
mContext
.
getString
(
R
.
string
.
check_things
,
mContext
.
getString
(
R
.
string
.
tip_new_deck
)));
IOUtils
.
copyToFile
(
fisdeck
,
mContext
.
getExternalFilesDir
(
Constants
.
CORE_DECK_PATH
).
getAbsolutePath
());
IOUtils
.
copyFilesFromAssets
(
mContext
,
getDatapath
(
Constants
.
CORE_DECK_PATH
),
mSettings
.
getDeckDir
(),
needsUpdate
);
//复制卡包
...
...
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