[android] Fix NPE.

This commit is contained in:
vng 2013-08-19 22:04:53 +03:00 committed by Alex Zolotarev
parent d8fcede10c
commit 57680b9cce

View file

@ -637,10 +637,14 @@ public class DownloadResourcesActivity extends MapsWithMeBaseActivity
@Override
public boolean isIntentSupported(Intent intent)
{
if ("http".equalsIgnoreCase(intent.getScheme()) && "ge0.me".equals(intent.getData().getHost()))
return true;
else
return false;
if ("http".equalsIgnoreCase(intent.getScheme()))
{
final Uri data = intent.getData();
if (data != null)
return "ge0.me".equals(data.getHost());
}
return false;
}
@Override
@ -693,7 +697,8 @@ public class DownloadResourcesActivity extends MapsWithMeBaseActivity
@Override
public boolean isIntentSupported(Intent intent)
{
return "maps.google.com".equals(intent.getData().getHost());
final Uri data = intent.getData();
return (data != null && "maps.google.com".equals(data.getHost()));
}
@Override