[android] Codereview fixes.

This commit is contained in:
Dmitry Kunin 2013-05-27 16:13:36 +03:00 committed by Alex Zolotarev
parent 8069be60b7
commit deaf2586ca
2 changed files with 4 additions and 9 deletions
api/android/lib/src/com/mapswithme/maps/api

View file

@ -66,12 +66,7 @@ public final class MWMPoint implements Serializable
return false;
if (Double.doubleToLongBits(mLon) != Double.doubleToLongBits(other.mLon))
return false;
if (mName == null)
{
if (other.mName != null)
return false;
} else if (!mName.equals(other.mName))
return false;
return true;
return mName == null ? other.mName == null : mName.equals(other.mName);
}
}

View file

@ -16,8 +16,8 @@ public final class MWMResponseReciever extends BroadcastReceiver
@Override
final public void onReceive(Context context, Intent intent)
{
if ( MapsWithMeApi.getCallbackAction(context).equals(intent.getAction())
&& sResponseHandler != null)
if (sResponseHandler != null
&& MapsWithMeApi.getCallbackAction(context).equals(intent.getAction()))
{
sResponseHandler.onResponse(context, MWMResponse.extractFromIntent(context, intent));
// clean up handler to avoid context-leak