mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Fix some PNI-related issues around change number.
This commit is contained in:
@@ -24,6 +24,7 @@ import org.whispersystems.signalservice.api.push.ACI
|
||||
import org.whispersystems.signalservice.api.push.PNI
|
||||
import org.whispersystems.signalservice.api.push.ServiceIds
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress
|
||||
import java.lang.IllegalStateException
|
||||
import java.security.SecureRandom
|
||||
|
||||
internal class AccountValues internal constructor(store: KeyValueStore) : SignalStoreValues(store) {
|
||||
@@ -121,6 +122,12 @@ internal class AccountValues internal constructor(store: KeyValueStore) : Signal
|
||||
val e164: String?
|
||||
get() = getString(KEY_E164, null)
|
||||
|
||||
/** The local user's e164. Will throw if not present. */
|
||||
fun requireE164(): String {
|
||||
val e164: String? = getString(KEY_E164, null)
|
||||
return e164 ?: throw IllegalStateException("No e164!")
|
||||
}
|
||||
|
||||
fun setE164(e164: String) {
|
||||
putString(KEY_E164, e164)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user