Fix nautical events
This commit is contained in:
parent
10591f7a20
commit
f1986f156d
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue