Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 44472aa

Browse files
committed
Fix InstallerActivity error messages on failure.
1 parent 8995f27 commit 44472aa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ protected void onCreate(Bundle savedInstanceState) {
117117
if (moduleCache.exists() && !moduleCache.delete() &&
118118
!new SuFile(moduleCache.getAbsolutePath()).delete())
119119
Log.e(TAG, "Failed to delete module cache");
120+
String errMessage = "Failed to download module zip";
120121
try {
121122
Log.i(TAG, "Downloading: " + target);
122123
byte[] rawModule = Http.doHttpGet(target,(progress, max, done) -> {
@@ -145,6 +146,7 @@ protected void onCreate(Bundle savedInstanceState) {
145146
outputStream.flush();
146147
}
147148
} else {
149+
errMessage = "Failed to patch module zip";
148150
this.runOnUiThread(() -> {
149151
this.installerTerminal.addLine("- Patching " + name);
150152
this.progressIndicator.setVisibility(View.GONE);
@@ -162,11 +164,12 @@ protected void onCreate(Bundle savedInstanceState) {
162164
this.runOnUiThread(() -> {
163165
this.installerTerminal.addLine("- Installing " + name);
164166
});
167+
errMessage = "Failed to install module zip";
165168
this.doInstall(moduleCache, noExtensions, rootless);
166169
} catch (IOException e) {
167-
Log.e(TAG, "Failed to download module zip", e);
170+
Log.e(TAG, errMessage, e);
168171
this.setInstallStateFinished(false,
169-
"! Failed to download module zip", "");
172+
"! " + errMessage, "");
170173
}
171174
}, "Module download Thread").start();
172175
} else {

0 commit comments

Comments
 (0)