mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-02 07:23:38 +00:00
Improve ServiceId parsing functions.
This commit is contained in:
committed by
Alex Hart
parent
784f94ecdb
commit
6d2d3ae528
@@ -4154,7 +4154,7 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
return RecipientRecord(
|
||||
id = recipientId,
|
||||
aci = ACI.parseOrNull(cursor.requireString(ACI_COLUMN)),
|
||||
pni = PNI.parseOrNull(cursor.requireString(PNI_COLUMN)),
|
||||
pni = PNI.parsePrefixedOrNull(cursor.requireString(PNI_COLUMN)),
|
||||
username = cursor.requireString(USERNAME),
|
||||
e164 = cursor.requireString(E164),
|
||||
email = cursor.requireString(EMAIL),
|
||||
|
||||
@@ -47,7 +47,7 @@ public class PniMigrationJob extends MigrationJob {
|
||||
return;
|
||||
}
|
||||
|
||||
PNI pni = PNI.parseUnPrefixedOrNull(ApplicationDependencies.getSignalServiceAccountManager().getWhoAmI().getPni());
|
||||
PNI pni = PNI.parseOrNull(ApplicationDependencies.getSignalServiceAccountManager().getWhoAmI().getPni());
|
||||
|
||||
if (pni == null) {
|
||||
throw new IOException("Invalid PNI!");
|
||||
|
||||
@@ -129,7 +129,7 @@ public final class RegistrationRepository {
|
||||
Preconditions.checkNotNull(response.getPniPreKeyCollection(), "Missing PNI prekey collection!");
|
||||
|
||||
ACI aci = ACI.parseOrThrow(response.getVerifyAccountResponse().getUuid());
|
||||
PNI pni = PNI.parseUnPrefixedOrThrow(response.getVerifyAccountResponse().getPni());
|
||||
PNI pni = PNI.parseOrThrow(response.getVerifyAccountResponse().getPni());
|
||||
boolean hasPin = response.getVerifyAccountResponse().isStorageCapable();
|
||||
|
||||
SignalStore.account().setAci(aci);
|
||||
|
||||
Reference in New Issue
Block a user