forked from organicmaps/organicmaps
[andorid] Fixed scheme and host for lead url/intent
This commit is contained in:
parent
8e66c2de4f
commit
4808a8f0bc
2 changed files with 16 additions and 3 deletions
|
@ -141,8 +141,12 @@
|
|||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
|
||||
<data
|
||||
android:host="lead"
|
||||
android:scheme="mapsme"/>
|
||||
android:host="lead.maps.me"
|
||||
android:scheme="http"/>
|
||||
|
||||
<data
|
||||
android:host="lead.maps.me"
|
||||
android:scheme="https"/>
|
||||
</intent-filter>
|
||||
|
||||
<!-- API CALL -->
|
||||
|
|
|
@ -626,7 +626,16 @@ public class DownloadResourcesActivity extends BaseMwmFragmentActivity
|
|||
public boolean isSupported(Intent intent)
|
||||
{
|
||||
final Uri data = intent.getData();
|
||||
return (data != null && "mapsme".equals(intent.getScheme()) && "lead".equals(data.getHost()));
|
||||
|
||||
if (data == null)
|
||||
return false;
|
||||
|
||||
String scheme = intent.getScheme();
|
||||
String host = data.getHost();
|
||||
if (TextUtils.isEmpty(scheme) || TextUtils.isEmpty(host))
|
||||
return false;
|
||||
|
||||
return (scheme.equals("https") || scheme.equals("http")) && "lead.maps.me".equals(host);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue