Fix c#5495 ontribution version for download

This commit is contained in:
Victor Shcherb 2018-05-26 01:14:11 +02:00
parent 402d4f4d60
commit ac14f84aaf

View file

@ -3,6 +3,7 @@ package net.osmand.plus.activities;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
@ -110,7 +111,7 @@ public class ContributionVersionActivity extends OsmandListActivity {
if(currentSelectedBuild != null){
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.setDataAndType(AndroidUtils.getUriForFile(getMyApplication(), pathToDownload), "application/vnd.android.package-archive");
intent.setDataAndType(Uri.fromFile(pathToDownload), "application/vnd.android.package-archive");
startActivityForResult(intent, ACTIVITY_TO_INSTALL);
updateInstalledApp(false, currentSelectedBuild.date);
}