This commit is contained in:
Alexey Kulish 2016-11-27 15:30:23 +03:00
parent e6847d791d
commit 2a3dafa5d1

View file

@ -1,6 +1,7 @@
package net.osmand.plus.download.ui; package net.osmand.plus.download.ui;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.ActivityNotFoundException;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.res.Resources; import android.content.res.Resources;
@ -323,9 +324,14 @@ public class ItemViewHolder {
public void onClick(View v) { public void onClick(View v) {
switch (clickAction) { switch (clickAction) {
case ASK_FOR_FULL_VERSION_PURCHASE: case ASK_FOR_FULL_VERSION_PURCHASE:
context.getMyApplication().logEvent(context, "click_buy_plus");
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(Version.marketPrefix(context Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(Version.marketPrefix(context
.getMyApplication()) + "net.osmand.plus")); .getMyApplication()) + "net.osmand.plus"));
context.startActivity(intent); try {
context.startActivity(intent);
} catch (ActivityNotFoundException e) {
//ignore
}
break; break;
case ASK_FOR_SEAMARKS_PLUGIN: case ASK_FOR_SEAMARKS_PLUGIN:
context.startActivity(new Intent(context, context.getMyApplication().getAppCustomization() context.startActivity(new Intent(context, context.getMyApplication().getAppCustomization()