use of org.whispersystems.signalservice.internal.ServiceResponse in project Signal-Android by WhisperSystems.
the class ProfileUtil method retrieveProfileSync.
@WorkerThread
@NonNull
public static ProfileAndCredential retrieveProfileSync(@NonNull Context context, @NonNull Recipient recipient, @NonNull SignalServiceProfile.RequestType requestType, boolean allowUnidentifiedAccess) throws IOException {
ProfileService profileService = new ProfileService(ApplicationDependencies.getGroupsV2Operations().getProfileOperations(), ApplicationDependencies.getSignalServiceMessageReceiver(), ApplicationDependencies.getSignalWebSocket());
Pair<Recipient, ServiceResponse<ProfileAndCredential>> response = retrieveProfile(context, recipient, requestType, profileService, allowUnidentifiedAccess).blockingGet();
return new ProfileService.ProfileResponseProcessor(response.second()).getResultOrThrow();
}
Aggregations