Fix compilation issue

This commit is contained in:
Benoit Marty 2019-10-08 10:45:45 +02:00
parent 0aa299aa37
commit 90b6199e10

View file

@ -280,7 +280,7 @@ class EmojiRecyclerAdapter(private val dataSource: EmojiDataSource? = null,
} }
private companion object { companion object {
fun endTraceSession() { fun endTraceSession() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
Trace.endSection() Trace.endSection()
@ -295,7 +295,7 @@ class EmojiRecyclerAdapter(private val dataSource: EmojiDataSource? = null,
private val staticLayoutCache = HashMap<String, StaticLayout>() private val staticLayoutCache = HashMap<String, StaticLayout>()
fun getStaticLayoutForEmoji(emoji: String): StaticLayout { private fun getStaticLayoutForEmoji(emoji: String): StaticLayout {
var cachedLayout = staticLayoutCache[emoji] var cachedLayout = staticLayoutCache[emoji]
if (cachedLayout == null) { if (cachedLayout == null) {
cachedLayout = StaticLayout(emoji, EmojiDrawView.tPaint, EmojiDrawView.emojiSize, Layout.Alignment.ALIGN_CENTER, 1f, 0f, true) cachedLayout = StaticLayout(emoji, EmojiDrawView.tPaint, EmojiDrawView.emojiSize, Layout.Alignment.ALIGN_CENTER, 1f, 0f, true)