Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
Commits
da086dd1
Commit
da086dd1
authored
Nov 09, 2022
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix有时strings.conf为空的问题,添加复制前大小检查
更新x5内核依赖
parent
d542dd15
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
30 deletions
+10
-30
mobile/build.gradle
mobile/build.gradle
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
+0
-19
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
...c/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
+9
-10
No files found.
mobile/build.gradle
View file @
da086dd1
...
...
@@ -111,7 +111,7 @@ dependencies {
//跨进程SharedPreferencesPlus工具
implementation
'com.github.zhangliangming:PreferencesProvider:v1.3'
implementation
'org.apache.commons:commons-lang3:3.7'
api
'com.tencent.tbs:tbssdk:44
085
'
api
'com.tencent.tbs:tbssdk:44
226
'
//http请求库
implementation
'com.squareup.okhttp3:okhttp:3.12.0'
implementation
'com.bm.photoview:library:1.4.1'
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
View file @
da086dd1
...
...
@@ -36,8 +36,6 @@ import cn.garymb.ygomobile.utils.NetUtils;
public
class
MainActivity
extends
HomeActivity
implements
BottomNavigationBar
.
OnTabSelectedListener
{
private
final
String
[]
PERMISSIONS
=
{
// Manifest.permission.RECORD_AUDIO,
Manifest
.
permission
.
READ_PHONE_STATE
,
Manifest
.
permission
.
SYSTEM_ALERT_WINDOW
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
,
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
,
...
...
@@ -115,19 +113,6 @@ public class MainActivity extends HomeActivity implements BottomNavigationBar.On
}
}
});
/*DialogPlus dialog = new DialogPlus(this)
.setTitleText(getString(R.string.settings_about_change_log))
.loadUrl("file:///android_asset/changelog.html", Color.TRANSPARENT)
.hideButton()
.setOnCloseLinster((dlg) -> {
dlg.dismiss();
//mImageUpdater
if (NETWORK_IMAGE && NetUtils.isConnected(getContext())) {
if (!mImageUpdater.isRunning()) {
mImageUpdater.start();
}
}
});*/
dialog
.
setOnDismissListener
(
dialogInterface
->
{
// if (AppsSettings.get().isServiceDuelAssistant() && Build.VERSION.SDK_INT < Build.VERSION_CODES.Q)
// YGOUtil.isServicePermission(MainActivity.this, true);
...
...
@@ -251,8 +236,4 @@ public class MainActivity extends HomeActivity implements BottomNavigationBar.On
public
void
onTabReselected
(
int
position
)
{
}
/* checkResourceDownload((result, isNewVersion) -> {
Toast.makeText(this, R.string.tip_reset_game_res, Toast.LENGTH_SHORT).show();
});*/
}
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
View file @
da086dd1
...
...
@@ -368,20 +368,19 @@ public class ResCheckTask extends AsyncTask<Void, Integer, Integer> {
}
private
int
copyCoreConfig
(
String
toPath
,
boolean
needsUpdate
)
{
File
systemfile
,
stringfile
,
botfile
;
systemfile
=
new
File
(
AppsSettings
.
get
().
getResourcePath
(),
CORE_SYSTEM_PATH
);
stringfile
=
new
File
(
AppsSettings
.
get
().
getResourcePath
(),
CORE_STRING_PATH
);
botfile
=
new
File
(
AppsSettings
.
get
().
getResourcePath
(),
BOT_CONF
);
try
{
/* String path = getDatapath("conf");
int count = IOUtils.copyFilesFromAssets(mContext, path, toPath, needsUpdate);
if (count < 3) {
return ERROR_CORE_CONFIG_LOST;
}*/
File
systemfile
=
new
File
(
AppsSettings
.
get
().
getResourcePath
(),
CORE_SYSTEM_PATH
);
File
stringfile
=
new
File
(
AppsSettings
.
get
().
getResourcePath
(),
CORE_STRING_PATH
);
File
botfile
=
new
File
(
AppsSettings
.
get
().
getResourcePath
(),
BOT_CONF
);
if
(!
systemfile
.
exists
())
{
IOUtils
.
copyFilesFromAssets
(
mContext
,
getDatapath
(
"conf"
)
+
"/"
+
CORE_SYSTEM_PATH
,
toPath
,
false
);
}
IOUtils
.
copyFilesFromAssets
(
mContext
,
getDatapath
(
"conf"
)
+
"/"
+
CORE_LIMIT_PATH
,
toPath
,
needsUpdate
);
if
(!
stringfile
.
exists
()
||
stringfile
.
length
()
<
new
File
(
getDatapath
(
"conf"
)
+
"/"
+
CORE_STRING_PATH
).
length
())
{
IOUtils
.
copyFilesFromAssets
(
mContext
,
getDatapath
(
"conf"
)
+
"/"
+
CORE_STRING_PATH
,
toPath
,
needsUpdate
);
}
IOUtils
.
copyFilesFromAssets
(
mContext
,
getDatapath
(
"conf"
)
+
"/"
+
CORE_BOT_CONF_PATH
,
toPath
,
needsUpdate
);
//替换换行符
fixString
(
stringfile
.
getAbsolutePath
());
...
...
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