databinding: simplify and address warnings

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2020-03-27 15:38:04 +05:30
committed by Harsh Shandilya
parent 536a6f3f83
commit 918d9b8b1f
4 changed files with 9 additions and 30 deletions
@@ -4,6 +4,7 @@
*/
package com.wireguard.android.databinding
import android.annotation.SuppressLint
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
@@ -55,6 +56,7 @@ class ObservableKeyedRecyclerViewAdapter<K, E : Keyed<out K>> internal construct
}
fun setRowConfigurationHandler(rowConfigurationHandler: RowConfigurationHandler<*, *>?) {
@Suppress("UNCHECKED_CAST")
this.rowConfigurationHandler = rowConfigurationHandler as? RowConfigurationHandler<ViewDataBinding, Any>
}