ui: resolve getColor deprecation in LogViewerActivity
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
44c2afbfba
commit
dcd596907a
@ -26,6 +26,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.app.ShareCompat
|
import androidx.core.app.ShareCompat
|
||||||
|
import androidx.core.content.res.ResourcesCompat
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration
|
import androidx.recyclerview.widget.DividerItemDecoration
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
@ -71,20 +72,15 @@ class LogViewerActivity : AppCompatActivity() {
|
|||||||
yearFormatter.format(Date())
|
yearFormatter.format(Date())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("Deprecation")
|
private val defaultColor by lazy { ResourcesCompat.getColor(resources, R.color.primary_text_color, theme) }
|
||||||
private val defaultColor by lazy { resources.getColor(R.color.primary_text_color) }
|
|
||||||
|
|
||||||
@Suppress("Deprecation")
|
private val debugColor by lazy { ResourcesCompat.getColor(resources, R.color.debug_tag_color, theme) }
|
||||||
private val debugColor by lazy { resources.getColor(R.color.debug_tag_color) }
|
|
||||||
|
|
||||||
@Suppress("Deprecation")
|
private val errorColor by lazy { ResourcesCompat.getColor(resources, R.color.error_tag_color, theme) }
|
||||||
private val errorColor by lazy { resources.getColor(R.color.error_tag_color) }
|
|
||||||
|
|
||||||
@Suppress("Deprecation")
|
private val infoColor by lazy { ResourcesCompat.getColor(resources, R.color.info_tag_color, theme) }
|
||||||
private val infoColor by lazy { resources.getColor(R.color.info_tag_color) }
|
|
||||||
|
|
||||||
@Suppress("Deprecation")
|
private val warningColor by lazy { ResourcesCompat.getColor(resources, R.color.warning_tag_color, theme) }
|
||||||
private val warningColor by lazy { resources.getColor(R.color.warning_tag_color) }
|
|
||||||
|
|
||||||
private var lastUri: Uri? = null
|
private var lastUri: Uri? = null
|
||||||
|
|
||||||
@ -131,10 +127,6 @@ class LogViewerActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
super.onDestroy()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
if (requestCode == SHARE_ACTIVITY_REQUEST) {
|
if (requestCode == SHARE_ACTIVITY_REQUEST) {
|
||||||
revokeLastUri()
|
revokeLastUri()
|
||||||
|
Loading…
Reference in New Issue
Block a user