diff options
author | Dmitry Kunin <dkunin@mapswith.me> | 2013-05-27 17:13:36 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:55:24 +0300 |
commit | deaf2586ca631c6d656eb907d6ff31bde187258c (patch) | |
tree | c74e780c258f03d749405205bad03377abf18fbe /api | |
parent | 8069be60b78d9d76840b8f2c54c4b920f9a4422c (diff) |
[android] Codereview fixes.
Diffstat (limited to 'api')
-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 |