From 08e35658d3aa032a45936258f05bcbac27103b7f Mon Sep 17 00:00:00 2001 From: Dmitry Kunin Date: Tue, 11 Jun 2013 13:25:05 +0300 Subject: [PATCH] [android] Fixed issue when "open with" is shown with no pending intent. --- android/src/com/mapswithme/maps/MapObjectFragment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/src/com/mapswithme/maps/MapObjectFragment.java b/android/src/com/mapswithme/maps/MapObjectFragment.java index 87406054b0..7aa3b46b4f 100644 --- a/android/src/com/mapswithme/maps/MapObjectFragment.java +++ b/android/src/com/mapswithme/maps/MapObjectFragment.java @@ -100,11 +100,12 @@ public class MapObjectFragment extends Fragment UiUtils.show(mAddToBookmarks); UiUtils.hide(mEditBmk); - if (MWMRequest.hasRequest()) + final MWMRequest request = MWMRequest.getCurrentRequest(); + if (request != null && request.hasPendingIntent()) { UiUtils.show(mOpenWith); mOpenWith.setCompoundDrawables(UiUtils - .setCompoundDrawableBounds(MWMRequest.getCurrentRequest().getIcon(getActivity()), R.dimen.icon_size, getResources()), null, null, null); + .setCompoundDrawableBounds(request.getIcon(getActivity()), R.dimen.icon_size, getResources()), null, null, null); } else UiUtils.hide(mOpenWith);