build: update to api 34

Update the app to target API 34, alongside all dependencies that expect
such.

This finally fixes some long-standing issues in newer version of MDC,
thus allowing me to remove the divider backport as well.

More work is required for predictive back (don't even know where I
start with that...), but this is a good start.
This commit is contained in:
Alexander Capehart
2023-06-15 13:06:17 -06:00
parent 5825a29e00
commit 6b43a65e56
5 changed files with 11 additions and 424 deletions
@@ -94,11 +94,11 @@ interface Settings<L> {
final override fun onSharedPreferenceChanged(
sharedPreferences: SharedPreferences,
key: String
key: String?
) {
// FIXME: Settings initialization firing the listener.
logD("Dispatching settings change $key")
onSettingChanged(key, unlikelyToBeNull(listener))
onSettingChanged(unlikelyToBeNull(key), unlikelyToBeNull(listener))
}
/**
@@ -26,10 +26,10 @@ import androidx.preference.PreferenceGroupAdapter
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.R
import com.google.android.material.divider.BackportMaterialDividerItemDecoration
import com.google.android.material.divider.MaterialDividerItemDecoration
/**
* A [BackportMaterialDividerItemDecoration] that sets up the divider configuration to correctly
* A [MaterialDividerItemDecoration] that sets up the divider configuration to correctly
* separate preference categories.
*
* @author Alexander Capehart (OxygenCobalt)
@@ -41,7 +41,7 @@ constructor(
attributeSet: AttributeSet? = null,
defStyleAttr: Int = R.attr.materialDividerStyle,
orientation: Int = LinearLayoutManager.VERTICAL
) : BackportMaterialDividerItemDecoration(context, attributeSet, defStyleAttr, orientation) {
) : MaterialDividerItemDecoration(context, attributeSet, defStyleAttr, orientation) {
@SuppressLint("RestrictedApi")
override fun shouldDrawDivider(position: Int, adapter: RecyclerView.Adapter<*>?) =
try {