fixed some paths
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user