diff options
Diffstat (limited to 'api/android')
-rw-r--r-- | api/android/lib/src/com/mapswithme/maps/api/MWMPoint.java | 9 | ||||
-rw-r--r-- | api/android/lib/src/com/mapswithme/maps/api/MWMResponseReciever.java | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/api/android/lib/src/com/mapswithme/maps/api/MWMPoint.java b/api/android/lib/src/com/mapswithme/maps/api/MWMPoint.java index 2715035d87..2920ee943d 100644 --- a/api/android/lib/src/com/mapswithme/maps/api/MWMPoint.java +++ b/api/android/lib/src/com/mapswithme/maps/api/MWMPoint.java @@ -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); } } diff --git a/api/android/lib/src/com/mapswithme/maps/api/MWMResponseReciever.java b/api/android/lib/src/com/mapswithme/maps/api/MWMResponseReciever.java index 8ec37a2cdb..47cebd1cd8 100644 --- a/api/android/lib/src/com/mapswithme/maps/api/MWMResponseReciever.java +++ b/api/android/lib/src/com/mapswithme/maps/api/MWMResponseReciever.java @@ -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 |