Fix various compiler warnings.

This commit is contained in:
Cody Henthorne
2022-12-12 15:21:09 -05:00
parent 819c9f61dc
commit c5b4f44ab8
26 changed files with 48 additions and 54 deletions

View File

@@ -310,7 +310,7 @@ internal class AccountValues internal constructor(store: KeyValueStore) : Signal
}
if (previous && !registered) {
clearLocalCredentials(ApplicationDependencies.getApplication())
clearLocalCredentials()
}
}
@@ -329,7 +329,7 @@ internal class AccountValues internal constructor(store: KeyValueStore) : Signal
val isLinkedDevice: Boolean
get() = !isPrimaryDevice
private fun clearLocalCredentials(context: Context) {
private fun clearLocalCredentials() {
putString(KEY_SERVICE_PASSWORD, Util.getSecret(18))
val newProfileKey = ProfileKeyUtil.createNew()

View File

@@ -70,6 +70,7 @@ private class BooleanValue(private val key: String, private val default: Boolean
private class StringValue<T : String?>(private val key: String, private val default: T, store: KeyValueStore) : SignalStoreValueDelegate<T>(store) {
override fun getValue(values: KeyValueStore): T {
@Suppress("UNCHECKED_CAST")
return values.getString(key, default) as T
}