Merge pull request #202 from TouchInstinct/startactivity_linter_fix
Fix linter for Context.kt and SpanUtils.kt
This commit is contained in:
commit
b9d464605b
|
|
@ -2,6 +2,7 @@ apply from: "../android-configs/lib-config.gradle"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "androidx.recyclerview:recyclerview"
|
implementation "androidx.recyclerview:recyclerview"
|
||||||
|
implementation project(path: ':logging')
|
||||||
|
|
||||||
constraints {
|
constraints {
|
||||||
implementation("androidx.recyclerview:recyclerview") {
|
implementation("androidx.recyclerview:recyclerview") {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,17 @@
|
||||||
package ru.touchin.extensions
|
package ru.touchin.extensions
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import ru.touchin.roboswag.core.log.Lc
|
||||||
|
|
||||||
fun Context.safeStartActivity(intent: Intent, options: Bundle? = null, resolveFlags: Int = 0) =
|
fun Context.safeStartActivity(intent: Intent, options: Bundle? = null) =
|
||||||
try {
|
try {
|
||||||
startActivity(intent, options)
|
startActivity(intent, options)
|
||||||
} catch (e: Throwable) {
|
} catch (e: ActivityNotFoundException) {
|
||||||
|
Lc.e(e, "Couldn't find activity with this parameters")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.openBrowser(url: String) = Intent(Intent.ACTION_VIEW)
|
fun Context.openBrowser(url: String) = Intent(Intent.ACTION_VIEW)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import android.text.SpannableString
|
||||||
import android.text.Spanned
|
import android.text.Spanned
|
||||||
import android.text.TextPaint
|
import android.text.TextPaint
|
||||||
import android.text.style.ClickableSpan
|
import android.text.style.ClickableSpan
|
||||||
import android.text.style.ForegroundColorSpan
|
|
||||||
import android.text.style.URLSpan
|
import android.text.style.URLSpan
|
||||||
import android.text.util.Linkify
|
import android.text.util.Linkify
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue