diff --git a/app/build.gradle b/app/build.gradle index 7f67e99..e84e1cd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ android { applicationId "com.zane.smapiinstaller" minSdkVersion 19 targetSdkVersion 28 - versionCode 36 - versionName "1.4.5" + versionCode 37 + versionName "1.4.6" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled true diff --git a/app/src/main/assets/downloadable_content_list.json b/app/src/main/assets/downloadable_content_list.json index c1b0348..7a2bc49 100644 --- a/app/src/main/assets/downloadable_content_list.json +++ b/app/src/main/assets/downloadable_content_list.json @@ -1,5 +1,5 @@ { - "version": 13, + "version": 14, "contents": [ { "type": "COMPAT", @@ -13,9 +13,9 @@ "type": "COMPAT", "name": "SMAPI for Galaxy Store", "assetPath": "compat/samsung_138/", - "description": "SMAPI compat package for game 1.4.4.138 - latest, SMAPI 3.4.1.6", - "url": "http://zaneyork.cn/download/compat/smapi_samsung_138_8.zip", - "hash": "9def0e6f711c46e50cd962d10aa0ccf6014026a7cc544be42922ac9b49172a38" + "description": "SMAPI compat package for game 1.4.4.138 - latest, SMAPI 3.4.1.7", + "url": "http://zaneyork.cn/download/compat/smapi_samsung_138_9.zip", + "hash": "be1908c4e456526e25e41536dff50888143eb3fa1b24ca17499d51f72c456f66" }, { "type": "LOCALE", diff --git a/app/src/main/assets/downloadable_content_list.json.en b/app/src/main/assets/downloadable_content_list.json.en index c1b0348..7a2bc49 100644 --- a/app/src/main/assets/downloadable_content_list.json.en +++ b/app/src/main/assets/downloadable_content_list.json.en @@ -1,5 +1,5 @@ { - "version": 13, + "version": 14, "contents": [ { "type": "COMPAT", @@ -13,9 +13,9 @@ "type": "COMPAT", "name": "SMAPI for Galaxy Store", "assetPath": "compat/samsung_138/", - "description": "SMAPI compat package for game 1.4.4.138 - latest, SMAPI 3.4.1.6", - "url": "http://zaneyork.cn/download/compat/smapi_samsung_138_8.zip", - "hash": "9def0e6f711c46e50cd962d10aa0ccf6014026a7cc544be42922ac9b49172a38" + "description": "SMAPI compat package for game 1.4.4.138 - latest, SMAPI 3.4.1.7", + "url": "http://zaneyork.cn/download/compat/smapi_samsung_138_9.zip", + "hash": "be1908c4e456526e25e41536dff50888143eb3fa1b24ca17499d51f72c456f66" }, { "type": "LOCALE", diff --git a/app/src/main/assets/downloadable_content_list.json.zh b/app/src/main/assets/downloadable_content_list.json.zh index 9350594..b22cc55 100644 --- a/app/src/main/assets/downloadable_content_list.json.zh +++ b/app/src/main/assets/downloadable_content_list.json.zh @@ -1,5 +1,5 @@ { - "version": 13, + "version": 14, "contents": [ { "type": "COMPAT", @@ -13,9 +13,9 @@ "type": "COMPAT", "name": "SMAPI三星商店兼容包", "assetPath": "compat/samsung_138/", - "description": "SMAPI三星商店兼容包, 适用版本1.4.4.138至今, SMAPI 3.4.1.6", - "url": "http://zaneyork.cn/download/compat/smapi_samsung_138_8.zip", - "hash": "9def0e6f711c46e50cd962d10aa0ccf6014026a7cc544be42922ac9b49172a38" + "description": "SMAPI三星商店兼容包, 适用版本1.4.4.138至今, SMAPI 3.4.1.7", + "url": "http://zaneyork.cn/download/compat/smapi_samsung_138_9.zip", + "hash": "be1908c4e456526e25e41536dff50888143eb3fa1b24ca17499d51f72c456f66" }, { "type": "LOCALE", diff --git a/app/src/main/assets/smapi/i18n/default.json b/app/src/main/assets/smapi/i18n/default.json index 5a3e4a6..4464316 100644 --- a/app/src/main/assets/smapi/i18n/default.json +++ b/app/src/main/assets/smapi/i18n/default.json @@ -1,3 +1,6 @@ { - "warn.invalid-content-removed": "Invalid content was removed to prevent a crash (see the SMAPI console for info)." + "warn.invalid-content-removed": "Invalid content was removed to prevent a crash (see the SMAPI console for info).", + "warn.save-broken": "Load save failed, your save file may be broken.You can swap to previous day's save, or restore save files manually with save backups.Backup provided by SMAPI was located at StardewValley/smapi-internal/save-backups", + "btn.swap": "Swap", + "btn.back": "Back" } diff --git a/app/src/main/assets/smapi/i18n/zh.json b/app/src/main/assets/smapi/i18n/zh.json index 9c0e0c2..29a536d 100644 --- a/app/src/main/assets/smapi/i18n/zh.json +++ b/app/src/main/assets/smapi/i18n/zh.json @@ -1,3 +1,6 @@ { - "warn.invalid-content-removed": "非法内容已移除以防游戏闪退(查看SMAPI控制台获得更多信息)" + "warn.invalid-content-removed": "非法内容已移除以防游戏闪退(查看SMAPI控制台获得更多信息)", + "warn.save-broken": "无法加载该存档,存档可能已损坏.你可以切换到前一日的存档,或者手动恢复到备份的存档.SMAPI提供的备份文件位于: StardewValley/smapi-internal/save-backups", + "btn.swap": "切换", + "btn.back": "返回" } diff --git a/app/src/main/java/com/zane/smapiinstaller/MainActivity.java b/app/src/main/java/com/zane/smapiinstaller/MainActivity.java index 451094c..cc6e696 100644 --- a/app/src/main/java/com/zane/smapiinstaller/MainActivity.java +++ b/app/src/main/java/com/zane/smapiinstaller/MainActivity.java @@ -31,7 +31,7 @@ import com.zane.smapiinstaller.logic.ConfigManager; import com.zane.smapiinstaller.logic.GameLauncher; import com.zane.smapiinstaller.logic.ModAssetsManager; import com.zane.smapiinstaller.utils.DialogUtils; -import com.zane.smapiinstaller.utils.JSONUtil; +import com.zane.smapiinstaller.utils.JsonUtil; import com.zane.smapiinstaller.utils.JsonCallback; import com.zane.smapiinstaller.utils.TranslateUtil; @@ -343,7 +343,7 @@ public class MainActivity extends AppCompatActivity { } try { NavController controller = Navigation.findNavController(this, R.id.nav_host_fragment); - controller.navigate(MobileNavigationDirections.actionNavAnyToModUpdateFragment(JSONUtil.toJson(list))); + controller.navigate(MobileNavigationDirections.actionNavAnyToModUpdateFragment(JsonUtil.toJson(list))); } catch (Exception e) { Crashes.trackError(e); } diff --git a/app/src/main/java/com/zane/smapiinstaller/constant/Constants.java b/app/src/main/java/com/zane/smapiinstaller/constant/Constants.java index 5a2fa6a..edb92a8 100644 --- a/app/src/main/java/com/zane/smapiinstaller/constant/Constants.java +++ b/app/src/main/java/com/zane/smapiinstaller/constant/Constants.java @@ -63,7 +63,7 @@ public class Constants { /** * SMAPI版本 */ - public static final String SMAPI_VERSION = "3.4.1.6"; + public static final String SMAPI_VERSION = "3.4.1.7"; /** * 平台 diff --git a/app/src/main/java/com/zane/smapiinstaller/entity/FrameworkConfig.java b/app/src/main/java/com/zane/smapiinstaller/entity/FrameworkConfig.java index 38884ba..87136c9 100644 --- a/app/src/main/java/com/zane/smapiinstaller/entity/FrameworkConfig.java +++ b/app/src/main/java/com/zane/smapiinstaller/entity/FrameworkConfig.java @@ -1,6 +1,7 @@ package com.zane.smapiinstaller.entity; import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @@ -12,6 +13,8 @@ import lombok.Data; @Data @JsonAutoDetect(fieldVisibility=JsonAutoDetect.Visibility.ANY, getterVisibility= JsonAutoDetect.Visibility.NONE) public class FrameworkConfig { + @JsonIgnore + private transient boolean initial; /** * 详细日志 */ diff --git a/app/src/main/java/com/zane/smapiinstaller/logic/ConfigManager.java b/app/src/main/java/com/zane/smapiinstaller/logic/ConfigManager.java index c4a7528..556c24f 100644 --- a/app/src/main/java/com/zane/smapiinstaller/logic/ConfigManager.java +++ b/app/src/main/java/com/zane/smapiinstaller/logic/ConfigManager.java @@ -22,6 +22,7 @@ public class ConfigManager { } if(config == null) { config = new FrameworkConfig(); + config.setInitial(true); } } diff --git a/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java b/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java index 217bd66..c4c2984 100644 --- a/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java +++ b/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java @@ -25,7 +25,7 @@ import com.zane.smapiinstaller.dto.ModUpdateCheckResponseDto; import com.zane.smapiinstaller.entity.ModManifestEntry; import com.zane.smapiinstaller.utils.DialogUtils; import com.zane.smapiinstaller.utils.FileUtils; -import com.zane.smapiinstaller.utils.JSONUtil; +import com.zane.smapiinstaller.utils.JsonUtil; import com.zane.smapiinstaller.utils.JsonCallback; import com.zane.smapiinstaller.utils.VersionUtil; @@ -319,7 +319,7 @@ public class ModAssetsManager { try { ModUpdateCheckRequestDto requestDto = new ModUpdateCheckRequestDto(list, new ModUpdateCheckRequestDto.SemanticVersion(gamePackageInfo.versionName)); OkGo.>post(Constants.UPDATE_CHECK_SERVICE_URL) - .upJson(JSONUtil.toJson(requestDto)) + .upJson(JsonUtil.toJson(requestDto)) .execute(new JsonCallback>(new TypeReference>() { }) { @Override diff --git a/app/src/main/java/com/zane/smapiinstaller/logic/SaveValidator.java b/app/src/main/java/com/zane/smapiinstaller/logic/SaveValidator.java deleted file mode 100644 index ccbe063..0000000 --- a/app/src/main/java/com/zane/smapiinstaller/logic/SaveValidator.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.zane.smapiinstaller.logic; - -public class SaveValidator { - -} diff --git a/app/src/main/java/com/zane/smapiinstaller/logic/UpdatableListManager.java b/app/src/main/java/com/zane/smapiinstaller/logic/UpdatableListManager.java index e55fc89..2dc1243 100644 --- a/app/src/main/java/com/zane/smapiinstaller/logic/UpdatableListManager.java +++ b/app/src/main/java/com/zane/smapiinstaller/logic/UpdatableListManager.java @@ -8,7 +8,7 @@ import com.lzy.okgo.callback.StringCallback; import com.lzy.okgo.model.Response; import com.zane.smapiinstaller.entity.UpdatableList; import com.zane.smapiinstaller.utils.FileUtils; -import com.zane.smapiinstaller.utils.JSONUtil; +import com.zane.smapiinstaller.utils.JsonUtil; import org.apache.commons.lang3.StringUtils; @@ -60,7 +60,7 @@ public class UpdatableListManager implements Listenable @Override public void onSuccess(Response response) { - UpdatableList content = JSONUtil.fromJson(response.body(), tClass); + UpdatableList content = JsonUtil.fromJson(response.body(), tClass); if(content != null && updatableList.getVersion() < content.getVersion()) { FileUtils.writeAssetJson(root.getContext(), finalFilename, content); updatableList = content; diff --git a/app/src/main/java/com/zane/smapiinstaller/ui/about/AboutFragment.java b/app/src/main/java/com/zane/smapiinstaller/ui/about/AboutFragment.java index 5fafcef..907f3b1 100644 --- a/app/src/main/java/com/zane/smapiinstaller/ui/about/AboutFragment.java +++ b/app/src/main/java/com/zane/smapiinstaller/ui/about/AboutFragment.java @@ -50,22 +50,22 @@ public class AboutFragment extends Fragment { CommonLogic.openInPlayStore(this.getActivity()); } - private void openPlayStore(String url) { - Intent intent = new Intent("android.intent.action.VIEW"); - intent.setData(Uri.parse(url)); - intent.setPackage("com.android.vending"); - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - CommonLogic.doOnNonNull(this.getActivity(), (activity) -> activity.startActivity(intent)); - } - - @OnClick({R.id.button_qq_group_1, R.id.button_qq_group_2}) - void joinQQ(Button which) { + @OnClick(R.id.button_qq_group_1) + void joinQQ() { String baseUrl = "mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26k%3D"; - if (which.getId() == R.id.button_qq_group_1) { - CommonLogic.doOnNonNull(this.getContext(), (context) -> CommonLogic.openUrl(context, baseUrl + "AAflCLHiWw1haM1obu_f-CpGsETxXc6b")); - } else { - CommonLogic.doOnNonNull(this.getContext(), (context) -> CommonLogic.openUrl(context, baseUrl + "kshK7BavcS2jXZ6exDvezc18ksLB8YsM")); - } + DialogUtils.showListItemsDialog(imgHeart, R.string.button_qq_group_text, R.array.qq_group_list, (dialog, position) -> { + switch (position){ + case 0: + CommonLogic.doOnNonNull(this.getContext(), (context) -> CommonLogic.openUrl(context, baseUrl + "AAflCLHiWw1haM1obu_f-CpGsETxXc6b")); + break; + case 1: + CommonLogic.doOnNonNull(this.getContext(), (context) -> CommonLogic.openUrl(context, baseUrl + "kshK7BavcS2jXZ6exDvezc18ksLB8YsM")); + break; + default: + CommonLogic.doOnNonNull(this.getContext(), (context) -> CommonLogic.openUrl(context, baseUrl + "zqsWYGBuAxPx0n9RI_ONs-7NA1Mm48QY")); + break; + } + }); } @OnClick(R.id.button_donation) diff --git a/app/src/main/java/com/zane/smapiinstaller/ui/config/ConfigEditFragment.java b/app/src/main/java/com/zane/smapiinstaller/ui/config/ConfigEditFragment.java index 399ce70..bcd08b5 100644 --- a/app/src/main/java/com/zane/smapiinstaller/ui/config/ConfigEditFragment.java +++ b/app/src/main/java/com/zane/smapiinstaller/ui/config/ConfigEditFragment.java @@ -17,7 +17,7 @@ import com.zane.smapiinstaller.constant.DialogAction; import com.zane.smapiinstaller.logic.CommonLogic; import com.zane.smapiinstaller.utils.DialogUtils; import com.zane.smapiinstaller.utils.FileUtils; -import com.zane.smapiinstaller.utils.JSONUtil; +import com.zane.smapiinstaller.utils.JsonUtil; import java.io.File; import java.io.FileOutputStream; @@ -96,7 +96,7 @@ public class ConfigEditFragment extends Fragment { @OnClick(R.id.button_config_save) void onConfigSave() { try { - JSONUtil.checkJson(editText.getText().toString()); + JsonUtil.checkJson(editText.getText().toString()); FileOutputStream outputStream = new FileOutputStream(configPath); try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream)) { outputStreamWriter.write(editText.getText().toString()); diff --git a/app/src/main/java/com/zane/smapiinstaller/ui/download/DownloadableContentAdapter.java b/app/src/main/java/com/zane/smapiinstaller/ui/download/DownloadableContentAdapter.java index a381615..50e8e9b 100644 --- a/app/src/main/java/com/zane/smapiinstaller/ui/download/DownloadableContentAdapter.java +++ b/app/src/main/java/com/zane/smapiinstaller/ui/download/DownloadableContentAdapter.java @@ -39,6 +39,7 @@ import butterknife.OnClick; /** * {@link RecyclerView.Adapter} that can display a {@link DownloadableContent} + * * @author Zane */ public class DownloadableContentAdapter extends RecyclerView.Adapter { @@ -193,14 +194,18 @@ public class DownloadableContentAdapter extends RecyclerView.Adapter DialogUtils.setProgressDialogState(root, finalDialog, null, progress)); DialogUtils.setProgressDialogState(root, dialog, R.string.extracting_package, null); @@ -120,7 +133,7 @@ public class InstallFragment extends Fragment { if (target == R.string.menu_download) { DialogUtils.showConfirmDialog(root, R.string.error, StringUtils.firstNonBlank(patcher.getErrorMessage().get(), context.getString(R.string.failed_to_patch_game)), R.string.menu_download, R.string.cancel, (d, which) -> { if (which == DialogAction.POSITIVE) { - NavController controller = Navigation.findNavController(root); + NavController controller = Navigation.findNavController(installButton); controller.navigate(InstallFragmentDirections.actionNavInstallToNavDownload()); } }); diff --git a/app/src/main/java/com/zane/smapiinstaller/ui/update/ModUpdateFragment.java b/app/src/main/java/com/zane/smapiinstaller/ui/update/ModUpdateFragment.java index 7ef13fa..ac501f4 100644 --- a/app/src/main/java/com/zane/smapiinstaller/ui/update/ModUpdateFragment.java +++ b/app/src/main/java/com/zane/smapiinstaller/ui/update/ModUpdateFragment.java @@ -10,7 +10,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.zane.smapiinstaller.R; import com.zane.smapiinstaller.dto.ModUpdateCheckResponseDto; import com.zane.smapiinstaller.logic.CommonLogic; -import com.zane.smapiinstaller.utils.JSONUtil; +import com.zane.smapiinstaller.utils.JsonUtil; import java.util.List; @@ -45,7 +45,7 @@ public class ModUpdateFragment extends Fragment { CommonLogic.doOnNonNull(this.getArguments(), arguments -> { String updateInfoListJson = ModUpdateFragmentArgs.fromBundle(arguments).getUpdateInfoListJson(); - List updateInfos = JSONUtil.fromJson(updateInfoListJson, new TypeReference>() { + List updateInfos = JsonUtil.fromJson(updateInfoListJson, new TypeReference>() { }); ModUpdateAdapter adapter = new ModUpdateAdapter(updateInfos); recyclerView.setAdapter(adapter); diff --git a/app/src/main/java/com/zane/smapiinstaller/utils/FileUtils.java b/app/src/main/java/com/zane/smapiinstaller/utils/FileUtils.java index 508fafa..e54b2c3 100644 --- a/app/src/main/java/com/zane/smapiinstaller/utils/FileUtils.java +++ b/app/src/main/java/com/zane/smapiinstaller/utils/FileUtils.java @@ -92,7 +92,7 @@ public class FileUtils extends org.zeroturnaround.zip.commons.FileUtils { try { InputStream inputStream = new FileInputStream(file); try (InputStreamReader reader = new InputStreamReader(new BOMInputStream(inputStream), StandardCharsets.UTF_8)) { - return JSONUtil.fromJson(CharStreams.toString(reader), type); + return JsonUtil.fromJson(CharStreams.toString(reader), type); } } catch (Exception ignored) { } @@ -110,7 +110,7 @@ public class FileUtils extends org.zeroturnaround.zip.commons.FileUtils { try { InputStream inputStream = new FileInputStream(file); try (InputStreamReader reader = new InputStreamReader(new BOMInputStream(inputStream), StandardCharsets.UTF_8)) { - return JSONUtil.fromJson(CharStreams.toString(reader), tClass); + return JsonUtil.fromJson(CharStreams.toString(reader), tClass); } } catch (Exception ignored) { } @@ -129,7 +129,7 @@ public class FileUtils extends org.zeroturnaround.zip.commons.FileUtils { File file = new File(context.getFilesDir(), tmpFilename); FileOutputStream outputStream = new FileOutputStream(file); try (OutputStreamWriter writer = new OutputStreamWriter(outputStream, StandardCharsets.UTF_8)) { - writer.write(JSONUtil.toJson(content)); + writer.write(JsonUtil.toJson(content)); } finally { File distFile = new File(context.getFilesDir(), filename); if(distFile.exists()) { @@ -156,7 +156,7 @@ public class FileUtils extends org.zeroturnaround.zip.commons.FileUtils { File fileTmp = new File(file.getParent(), tmpFilename); FileOutputStream outputStream = new FileOutputStream(fileTmp); try (OutputStreamWriter writer = new OutputStreamWriter(outputStream, StandardCharsets.UTF_8)) { - writer.write(JSONUtil.toJson(content)); + writer.write(JsonUtil.toJson(content)); } finally { if(file.exists()) { org.zeroturnaround.zip.commons.FileUtils.forceDelete(file); @@ -179,7 +179,7 @@ public class FileUtils extends org.zeroturnaround.zip.commons.FileUtils { try { InputStream inputStream = getLocalAsset(context, filename); try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { - return JSONUtil.fromJson(CharStreams.toString(reader), tClass); + return JsonUtil.fromJson(CharStreams.toString(reader), tClass); } } catch (IOException ignored) { } @@ -190,7 +190,7 @@ public class FileUtils extends org.zeroturnaround.zip.commons.FileUtils { try { InputStream inputStream = getLocaledLocalAsset(context, filename); try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { - return JSONUtil.fromJson(CharStreams.toString(reader), tClass); + return JsonUtil.fromJson(CharStreams.toString(reader), tClass); } } catch (IOException ignored) { } @@ -209,7 +209,7 @@ public class FileUtils extends org.zeroturnaround.zip.commons.FileUtils { try { InputStream inputStream = getLocalAsset(context, filename); try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { - return JSONUtil.fromJson(CharStreams.toString(reader), type); + return JsonUtil.fromJson(CharStreams.toString(reader), type); } } catch (IOException ignored) { } diff --git a/app/src/main/java/com/zane/smapiinstaller/utils/JsonCallback.java b/app/src/main/java/com/zane/smapiinstaller/utils/JsonCallback.java index 3968867..8ad351a 100644 --- a/app/src/main/java/com/zane/smapiinstaller/utils/JsonCallback.java +++ b/app/src/main/java/com/zane/smapiinstaller/utils/JsonCallback.java @@ -41,10 +41,10 @@ public abstract class JsonCallback extends AbsCallback { } T data = null; if (type != null) { - data = JSONUtil.fromJson(body.string(), type); + data = JsonUtil.fromJson(body.string(), type); } if (clazz != null) { - data = JSONUtil.fromJson(body.string(), clazz); + data = JsonUtil.fromJson(body.string(), clazz); } return data; } diff --git a/app/src/main/java/com/zane/smapiinstaller/utils/JSONUtil.java b/app/src/main/java/com/zane/smapiinstaller/utils/JsonUtil.java similarity index 98% rename from app/src/main/java/com/zane/smapiinstaller/utils/JSONUtil.java rename to app/src/main/java/com/zane/smapiinstaller/utils/JsonUtil.java index acab162..a5f1da9 100644 --- a/app/src/main/java/com/zane/smapiinstaller/utils/JSONUtil.java +++ b/app/src/main/java/com/zane/smapiinstaller/utils/JsonUtil.java @@ -12,7 +12,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; * JSON工具类 * @author Zane */ -public class JSONUtil { +public class JsonUtil { private static final ObjectMapper MAPPER = new ObjectMapper(); static { // 允许未定义的属性 diff --git a/app/src/main/java/com/zane/smapiinstaller/utils/TranslateUtil.java b/app/src/main/java/com/zane/smapiinstaller/utils/TranslateUtil.java index e459bc7..75b7453 100644 --- a/app/src/main/java/com/zane/smapiinstaller/utils/TranslateUtil.java +++ b/app/src/main/java/com/zane/smapiinstaller/utils/TranslateUtil.java @@ -54,7 +54,7 @@ public class TranslateUtil { OkGo.get(String.format(Constants.TRANSLATE_SERVICE_URL_YOUDAO, queryText)).execute(new StringCallback() { @Override public void onSuccess(Response response) { - YouDaoTranslationDto translationDto = JSONUtil.fromJson(response.body(), YouDaoTranslationDto.class); + YouDaoTranslationDto translationDto = JsonUtil.fromJson(response.body(), YouDaoTranslationDto.class); if (translationDto != null && translationDto.getErrorCode() == 0) { List> lists = translationDto.getTranslateResult(); List translations = new ArrayList<>(lists.size()); @@ -83,7 +83,7 @@ public class TranslateUtil { OkGo.get(String.format(Constants.TRANSLATE_SERVICE_URL_GOOGLE, locale, queryText)).execute(new StringCallback() { @Override public void onSuccess(Response response) { - GoogleTranslationDto translationDto = JSONUtil.fromJson(response.body(), GoogleTranslationDto.class); + GoogleTranslationDto translationDto = JsonUtil.fromJson(response.body(), GoogleTranslationDto.class); if(translationDto != null) { List sourceText = Splitter.on("%0A").splitToList(queryText); List translations = new ArrayList<>(sourceText.size()); diff --git a/app/src/main/java/net/fornwall/apksigner/KeyStoreFileManager.java b/app/src/main/java/net/fornwall/apksigner/KeyStoreFileManager.java index 392450d..6dbebe3 100644 --- a/app/src/main/java/net/fornwall/apksigner/KeyStoreFileManager.java +++ b/app/src/main/java/net/fornwall/apksigner/KeyStoreFileManager.java @@ -18,7 +18,7 @@ public class KeyStoreFileManager { static { // Add the bouncycastle version of the BC provider so that the implementation classes returned from the keystore - // are all from the spongycastle libs. + // are all from the bouncycastle libs. Security.addProvider(SECURITY_PROVIDER); } diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index be2e8d5..7b25fc1 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -33,59 +33,7 @@ style="@style/Widget.AppCompat.Button.Borderless" android:gravity="center" android:textSize="24sp" - android:text="@string/button_qq_group_1_text" /> - - - - -