Ensure change number operation status before returning to normal app usage.

This commit is contained in:
Cody Henthorne
2021-09-08 16:52:25 -04:00
committed by Greyson Parrelli
parent d8c82add78
commit 7e7bbad788
16 changed files with 339 additions and 6 deletions

View File

@@ -65,6 +65,7 @@ import org.whispersystems.signalservice.internal.push.RemoteConfigResponse;
import org.whispersystems.signalservice.internal.push.RequestVerificationCodeResponse;
import org.whispersystems.signalservice.internal.push.SignalServiceProtos;
import org.whispersystems.signalservice.internal.push.VerifyAccountResponse;
import org.whispersystems.signalservice.internal.push.WhoAmIResponse;
import org.whispersystems.signalservice.internal.push.http.ProfileCipherOutputStreamFactory;
import org.whispersystems.signalservice.internal.storage.protos.ManifestRecord;
import org.whispersystems.signalservice.internal.storage.protos.ReadOperation;
@@ -169,6 +170,10 @@ public class SignalServiceAccountManager {
return this.pushServiceSocket.getOwnUuid();
}
public WhoAmIResponse getWhoAmI() throws IOException {
return this.pushServiceSocket.getWhoAmI();
}
public KeyBackupService getKeyBackupService(KeyStore iasKeyStore,
String enclaveName,
byte[] serviceId,

View File

@@ -328,6 +328,10 @@ public class PushServiceSocket {
}
}
public WhoAmIResponse getWhoAmI() throws IOException {
return JsonUtil.fromJson(makeServiceRequest(WHO_AM_I, "GET", null), WhoAmIResponse.class);
}
public VerifyAccountResponse verifyAccountCode(String verificationCode, String signalingKey, int registrationId, boolean fetchesMessages,
String pin, String registrationLock,
byte[] unidentifiedAccessKey, boolean unrestrictedUnidentifiedAccess,

View File

@@ -6,7 +6,14 @@ public class WhoAmIResponse {
@JsonProperty
private String uuid;
@JsonProperty
private String number;
public String getUuid() {
return uuid;
}
public String getNumber() {
return number;
}
}