Fix nautical events

This commit is contained in:
Alexey Kulish 2016-12-09 19:08:11 +03:00
parent 10591f7a20
commit f1986f156d

View file

@ -36,6 +36,7 @@ public class NauticalActivity extends Activity {
intentPlus.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); intentPlus.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
ResolveInfo resolved = getPackageManager().resolveActivity(intentPlus, PackageManager.MATCH_DEFAULT_ONLY); ResolveInfo resolved = getPackageManager().resolveActivity(intentPlus, PackageManager.MATCH_DEFAULT_ONLY);
if(resolved != null) { if(resolved != null) {
logEvent(this, "open_osmand_plus");
stopService(intentPlus); stopService(intentPlus);
startActivity(intentPlus); startActivity(intentPlus);
finish(); finish();
@ -45,6 +46,7 @@ public class NauticalActivity extends Activity {
intentNormal.setComponent(new ComponentName(OSMAND_COMPONENT, OSMAND_ACTIVITY)); intentNormal.setComponent(new ComponentName(OSMAND_COMPONENT, OSMAND_ACTIVITY));
resolved = getPackageManager().resolveActivity(intentNormal, PackageManager.MATCH_DEFAULT_ONLY); resolved = getPackageManager().resolveActivity(intentNormal, PackageManager.MATCH_DEFAULT_ONLY);
if (resolved != null) { if (resolved != null) {
logEvent(this, "open_osmand");
stopService(intentNormal); stopService(intentNormal);
startActivity(intentNormal); startActivity(intentNormal);
finish(); finish();