From 10873687ce48d33958c08b6a8b7781773f842344 Mon Sep 17 00:00:00 2001 From: vshcherb Date: Thu, 29 May 2014 03:00:29 +0200 Subject: [PATCH] Fix http scheme --- OsmAnd/AndroidManifest.xml | 2 +- OsmAnd/res/layout/osmo_connect_to_device.xml | 4 +- OsmAnd/res/layout/osmo_create_group.xml | 4 +- OsmAnd/res/layout/osmo_edit_device.xml | 79 +++++++++---------- .../osmand/plus/osmo/OsMoGroupsActivity.java | 1 + .../osmand/plus/osmo/OsMoIntentHandler.java | 2 +- .../src/net/osmand/plus/osmo/OsMoService.java | 5 +- .../src/net/osmand/plus/osmo/OsMoTracker.java | 2 +- 8 files changed, 48 insertions(+), 51 deletions(-) diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index de41685b6b..523661cacd 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -132,7 +132,7 @@ - + diff --git a/OsmAnd/res/layout/osmo_connect_to_device.xml b/OsmAnd/res/layout/osmo_connect_to_device.xml index a202255d3a..a8b1c08ada 100644 --- a/OsmAnd/res/layout/osmo_connect_to_device.xml +++ b/OsmAnd/res/layout/osmo_connect_to_device.xml @@ -2,8 +2,8 @@ diff --git a/OsmAnd/res/layout/osmo_create_group.xml b/OsmAnd/res/layout/osmo_create_group.xml index d51a96a2ea..e26fcb876d 100644 --- a/OsmAnd/res/layout/osmo_create_group.xml +++ b/OsmAnd/res/layout/osmo_create_group.xml @@ -2,8 +2,8 @@ diff --git a/OsmAnd/res/layout/osmo_edit_device.xml b/OsmAnd/res/layout/osmo_edit_device.xml index 1bd33dcabb..699786ad47 100644 --- a/OsmAnd/res/layout/osmo_edit_device.xml +++ b/OsmAnd/res/layout/osmo_edit_device.xml @@ -1,52 +1,47 @@ - + android:layout_height="wrap_content" + android:paddingLeft="7dp" + android:paddingRight="7dp" + android:stretchColumns="1" > - + - + - + - + + + - - - + - + + + + android:layout_height="wrap_content" + android:layout_marginLeft="5dp" + android:layout_marginRight="5dp" > + + - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java index 970aa4e979..fd56e5d7ba 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java @@ -629,6 +629,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements private void createGroup() { if(osMoPlugin.getService().getRegisteredUserName() == null) { signin(); + return; } Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.osmo_create_group); diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoIntentHandler.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoIntentHandler.java index aa1833b8e1..5a813f2f01 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoIntentHandler.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoIntentHandler.java @@ -24,7 +24,7 @@ public class OsMoIntentHandler extends AsyncTask { for (Intent intent : params) { String scheme = intent.getScheme(); Uri data = intent.getData(); - if ("http".equals(scheme) && data.getHost().equals("osmo.mobi")) { + if ("http".equals(scheme) && data.getHost().equals("m.osmo.mobi")) { String path = data.getPath(); String lastPath = path.substring(path.lastIndexOf('/') + 1); if(lastPath.equals("login")) { diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoService.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoService.java index 1c0237095d..7e42e4cdcf 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoService.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoService.java @@ -38,8 +38,9 @@ public class OsMoService implements OsMoReactor { private ConcurrentLinkedQueue commands = new ConcurrentLinkedQueue(); private OsmandApplication app; private static final Log log = PlatformUtil.getLog(OsMoService.class); - public static final String SHARE_TRACKER_URL = "http://osmo.mobi/connect?id="; - public static final String SHARE_GROUP_URL = "http://osmo.mobi/join?id="; + public static final String SHARE_TRACKER_URL = "http://m.osmo.mobi/connect?id="; + public static final String SHARE_GROUP_URL = "http://m.osmo.mobi/join?id="; + public static final String TRACK_URL = "http://test1342.osmo.mobi/u/"; private String lastRegistrationError = null; diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoTracker.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoTracker.java index be16437712..cf0ebc84f1 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoTracker.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoTracker.java @@ -42,7 +42,7 @@ public class OsMoTracker implements OsMoReactor { if (!isEnabledTracker()) { return null; } - return "http://test1342.osmo.mobi/u/" + sessionURL; + return OsMoService.TRACK_URL + sessionURL; } public boolean isEnabledTracker() {