From 3e0d0f59dd6a2c4244f64cb8e59ac5dee47f1400 Mon Sep 17 00:00:00 2001 From: Ilia Kurtov Date: Fri, 15 Apr 2016 18:29:25 +0300 Subject: [PATCH] fix phone span --- .../ru/touchin/roboswag/components/telephony/PhoneSpan.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/touchin/roboswag/components/telephony/PhoneSpan.java b/src/main/java/ru/touchin/roboswag/components/telephony/PhoneSpan.java index f6a9bf9..516b88c 100644 --- a/src/main/java/ru/touchin/roboswag/components/telephony/PhoneSpan.java +++ b/src/main/java/ru/touchin/roboswag/components/telephony/PhoneSpan.java @@ -1,5 +1,6 @@ package ru.touchin.roboswag.components.telephony; +import android.content.ActivityNotFoundException; import android.content.Intent; import android.net.Uri; import android.support.annotation.NonNull; @@ -28,8 +29,8 @@ public class PhoneSpan extends URLSpan { intent.setData(Uri.parse(getURL())); widget.getContext().startActivity(intent); // it should catch throwable to not crash in production if there are problems with startActivity() - } catch (final Throwable throwable) { - Lc.assertion(throwable); + } catch (final ActivityNotFoundException exception) { + Lc.assertion(exception); } }