Fix ActivityNotFoundException

This commit is contained in:
Vitaliy 2020-02-20 16:47:49 +02:00
parent 35ee7a6273
commit 3b87b227e7

View file

@ -9,6 +9,7 @@ import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import net.osmand.AndroidUtils;
import net.osmand.PlatformUtil;
import net.osmand.plus.AppInitializer;
import net.osmand.plus.OsmandApplication;
@ -36,7 +37,9 @@ public class WhatsNewDialogFragment extends DialogFragment {
public void onClick(DialogInterface dialog, int which) {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(AppInitializer.LATEST_CHANGES_URL));
startActivity(i);
if (AndroidUtils.isIntentSafe(osmandApplication, i)) {
startActivity(i);
}
dismiss();
}
});