build: fix cleanup issues

This commit is contained in:
Alexander Capehart
2026-08-29 17:46:28 -06:00
parent df2e3852b4
commit 9de8b90b7a
4 changed files with 9 additions and 8 deletions
@@ -50,9 +50,9 @@ constructor(
defStyleRes: Int = 0,
) : DialogPreference(context, attrs, defStyleAttr, defStyleRes) {
/** The names of each entry. */
val entries: Array<CharSequence>
var entries: Array<CharSequence> = arrayOf()
/** The corresponding integer values for each entry. */
val values: IntArray
var values: IntArray = intArrayOf()
private var entryIcons: TypedArray? = null
private var offValue: Int? = -1
@@ -68,8 +68,8 @@ constructor(
// Can't depend on ListPreference due to it working with strings we have to instead
// define our own attributes for entries/values.
val entries = getTextArrayOrThrow(R.styleable.IntListPreference_entries)
val values =
entries = getTextArrayOrThrow(R.styleable.IntListPreference_entries)
values =
context.resources.getIntArray(
getResourceIdOrThrow(R.styleable.IntListPreference_entryValues)
)
@@ -26,6 +26,7 @@ import android.view.LayoutInflater
import android.view.Menu
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.LinearLayout
import androidx.annotation.AttrRes
@@ -158,7 +159,7 @@ constructor(
}
}
override fun addView(child: View?, index: Int, params: LayoutParams?) {
override fun addView(child: View?, index: Int, params: ViewGroup.LayoutParams?) {
if (inflatingLayout) {
super.addView(child, index, params)
} else {
@@ -56,7 +56,7 @@ private constructor(
@OptIn(ExperimentalCoroutinesApi::class)
override suspend fun explore(files: Channel<File>): Deferred<Result<Unit>> = coroutineScope {
tryAsyncWith(files, Dispatchers.IO) { _ ->
tryAsyncWith(files, Dispatchers.IO) { channel ->
val projection = BASE_PROJECTION + pathInterpreterFactory.projection
var selector = BASE_SELECTOR
val args = mutableListOf<String>()
@@ -133,7 +133,7 @@ private constructor(
)
allFiles.add(deviceFile)
it.send(deviceFile)
channel.send(deviceFile)
}
}
}
@@ -61,7 +61,7 @@ internal data class MusicGraph(
appendLine(" node [style=filled,fillcolor=lightblue];")
songVertex.forEachIndexed { index, song ->
val songId = "song_$index"
val name = song.preSong.rawName ?: "Unknown Song"
val name = song.preSong.rawName
val uid = song.preSong.v401Uid
val label = "${escape(name)}\\nUID: $uid"
appendLine(" $songId [label=\"$label\"];")