fix phone span

This commit is contained in:
Ilia Kurtov 2016-04-15 18:29:25 +03:00
parent 863677216c
commit 3e0d0f59dd
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}
}