mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-15 20:42:00 +00:00
Remove TextSecurePreferences.getAvatarId()
This commit is contained in:
@@ -641,7 +641,7 @@ public class SignalServiceAccountManager {
|
||||
this.pushServiceSocket.setProfileName(ciphertextName);
|
||||
}
|
||||
|
||||
public String setProfileAvatar(ProfileKey key, StreamDetails avatar)
|
||||
public Optional<String> setProfileAvatar(ProfileKey key, StreamDetails avatar)
|
||||
throws IOException
|
||||
{
|
||||
if (FeatureFlags.VERSIONED_PROFILES) {
|
||||
@@ -663,7 +663,7 @@ public class SignalServiceAccountManager {
|
||||
/**
|
||||
* @return The avatar URL path, if one was written.
|
||||
*/
|
||||
public String setVersionedProfile(UUID uuid, ProfileKey profileKey, String name, StreamDetails avatar)
|
||||
public Optional<String> setVersionedProfile(UUID uuid, ProfileKey profileKey, String name, StreamDetails avatar)
|
||||
throws IOException
|
||||
{
|
||||
if (!FeatureFlags.VERSIONED_PROFILES) {
|
||||
|
||||
@@ -604,7 +604,7 @@ public class PushServiceSocket {
|
||||
makeServiceRequest(String.format(PROFILE_PATH, "name/" + (name == null ? "" : URLEncoder.encode(name))), "PUT", "");
|
||||
}
|
||||
|
||||
public String setProfileAvatar(ProfileAvatarData profileAvatar)
|
||||
public Optional<String> setProfileAvatar(ProfileAvatarData profileAvatar)
|
||||
throws NonSuccessfulResponseCodeException, PushNetworkException
|
||||
{
|
||||
if (FeatureFlags.VERSIONED_PROFILES) {
|
||||
@@ -629,16 +629,16 @@ public class PushServiceSocket {
|
||||
profileAvatar.getContentType(), profileAvatar.getDataLength(),
|
||||
profileAvatar.getOutputStreamFactory(), null, null);
|
||||
|
||||
return formAttributes.getKey();
|
||||
return Optional.of(formAttributes.getKey());
|
||||
}
|
||||
|
||||
return null;
|
||||
return Optional.absent();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The avatar URL path, if one was written.
|
||||
*/
|
||||
public String writeProfile(SignalServiceProfileWrite signalServiceProfileWrite, ProfileAvatarData profileAvatar)
|
||||
public Optional<String> writeProfile(SignalServiceProfileWrite signalServiceProfileWrite, ProfileAvatarData profileAvatar)
|
||||
throws NonSuccessfulResponseCodeException, PushNetworkException
|
||||
{
|
||||
if (!FeatureFlags.VERSIONED_PROFILES) {
|
||||
@@ -665,10 +665,10 @@ public class PushServiceSocket {
|
||||
profileAvatar.getContentType(), profileAvatar.getDataLength(),
|
||||
profileAvatar.getOutputStreamFactory(), null, null);
|
||||
|
||||
return formAttributes.getKey();
|
||||
return Optional.of(formAttributes.getKey());
|
||||
}
|
||||
|
||||
return null;
|
||||
return Optional.absent();
|
||||
}
|
||||
|
||||
public void setUsername(String username) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user