Commit 49720f62 authored by fallenstardust's avatar fallenstardust

update versioncode

parent 0891ecd8
...@@ -8,8 +8,8 @@ android { ...@@ -8,8 +8,8 @@ android {
applicationId "cn.garymb.ygomobile" applicationId "cn.garymb.ygomobile"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 28 targetSdkVersion 28
versionCode 340200331 versionCode 340300407
versionName "3.4.2" versionName "3.4.3"
flavorDimensions "versionCode" flavorDimensions "versionCode"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
ndk { ndk {
......
...@@ -26,7 +26,7 @@ import ocgcore.enums.CardOt; ...@@ -26,7 +26,7 @@ import ocgcore.enums.CardOt;
public class StringManager implements Closeable { public class StringManager implements Closeable {
private static final String PRE_SYSTEM = "!system"; private static final String PRE_SYSTEM = "!system";
private static final String PRE_SETNAME = "!setname"; private static final String PRE_SETNAME = "!setname";
private final SparseArray<String> mSystem = new SparseArray<>(); private final SparseArray<String> mSystem = new SparseArray<>();
private final List<CardSet> mCardSets = new ArrayList<>(); private final List<CardSet> mCardSets = new ArrayList<>();
...@@ -35,7 +35,7 @@ public class StringManager implements Closeable { ...@@ -35,7 +35,7 @@ public class StringManager implements Closeable {
} }
@Override @Override
public void close(){ public void close() {
mSystem.clear(); mSystem.clear();
mCardSets.clear(); mCardSets.clear();
} }
...@@ -46,29 +46,29 @@ public class StringManager implements Closeable { ...@@ -46,29 +46,29 @@ public class StringManager implements Closeable {
File stringFile = new File(AppsSettings.get().getResourcePath(), Constants.CORE_STRING_PATH); File stringFile = new File(AppsSettings.get().getResourcePath(), Constants.CORE_STRING_PATH);
boolean rs1 = loadFile(stringFile.getAbsolutePath()); boolean rs1 = loadFile(stringFile.getAbsolutePath());
boolean rs2 = true; boolean rs2 = true;
boolean res3=true; boolean res3 = true;
if (AppsSettings.get().isReadExpansions()) { if (AppsSettings.get().isReadExpansions()) {
File stringFile2 = new File(AppsSettings.get().getExpansionsPath(), Constants.CORE_STRING_PATH); File stringFile2 = new File(AppsSettings.get().getExpansionsPath(), Constants.CORE_STRING_PATH);
rs2 = loadFile(stringFile2.getAbsolutePath()); rs2 = loadFile(stringFile2.getAbsolutePath());
File[] files=AppsSettings.get().getExpansionsPath().listFiles(); File[] files = AppsSettings.get().getExpansionsPath().listFiles();
if (files!=null){ if (files != null) {
for(File file:files){ for (File file : files) {
if (file.isFile()&&file.getName().endsWith(".zip")){ if (file.isFile() && file.getName().endsWith(".zip")) {
try { try {
ZipFile zipFile=new ZipFile(file.getAbsoluteFile()); ZipFile zipFile = new ZipFile(file.getAbsoluteFile());
ZipEntry entry = zipFile.getEntry(Constants.CORE_STRING_PATH); ZipEntry entry = zipFile.getEntry(Constants.CORE_STRING_PATH);
if (entry!=null){ if (entry != null) {
res3&=loadFile(zipFile.getInputStream(entry)); res3 &= loadFile(zipFile.getInputStream(entry));
} }
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
res3=false; res3 = false;
} }
} }
} }
} }
} }
return rs1 && rs2&&res3; return rs1 && rs2 && res3;
} }
public boolean loadFile(InputStream inputStream) { public boolean loadFile(InputStream inputStream) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment