fixed some paths

This commit is contained in:
gdlbo
2022-08-12 01:40:21 +03:00
parent 32daac436e
commit 274e1bd0df
2 changed files with 2 additions and 2 deletions
@@ -185,7 +185,7 @@ public class DownloadUtils {
String f2 = FileUtils.f(file);
if (!TextUtils.isEmpty(f2)) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setDataAndType(FileUtils.n(file), f2);
intent.setDataAndType(FileUtils.uriFromFile(file), f2);
context.startActivity(intent);
return true;
}
@@ -46,7 +46,7 @@ public class OTADownloader {
maxIndex = Math.max(maxIndex, Integer.parseInt(name.replaceFirst(".+-(\\d+).+", "$1")));
}
File apk = maxIndex == -1 ? new File(downloadDir, "VTLite.apk") : new File(downloadDir, "VTLite-" + maxIndex + ".apk");
APKInstallActivity.installOta(context, FileUtils.n(apk));
APKInstallActivity.installOta(context, FileUtils.uriFromFile(apk));
} else if (status == DownloadManager.STATUS_FAILED) {
AndroidUtils.sendToast(getString("downloaderr"));
}