From 4ef550109bf90545d269208f786d146e420e6da8 Mon Sep 17 00:00:00 2001 From: Dmitry Yunitsky Date: Tue, 17 Mar 2015 15:35:54 +0300 Subject: [PATCH] Fixed possible crash. --- .../mapswithme/maps/widget/placepage/PlacePageView.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java index baf1250aff..986f0bd62e 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java +++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java @@ -1,6 +1,7 @@ package com.mapswithme.maps.widget.placepage; import android.app.Activity; +import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.content.res.TypedArray; @@ -528,7 +529,13 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene case R.id.ll__place_phone: Intent intent = new Intent(Intent.ACTION_DIAL); intent.setData(Uri.parse("tel:" + mTvPhone.getText())); - getContext().startActivity(intent); + try + { + getContext().startActivity(intent); + } catch (ActivityNotFoundException e) + { + e.printStackTrace(); + } break; case R.id.ll__place_website: intent = new Intent(Intent.ACTION_VIEW);