void updateDeviceName(String deviceName) throws Error.Failure;
void updateProfile(
- String givenName, String familyName, String about, String aboutEmoji, String avatarPath, boolean removeAvatar
+ String givenName,
+ String familyName,
+ String about,
+ String aboutEmoji,
+ String avatarPath,
+ boolean removeAvatar
) throws Error.Failure;
void updateProfile(
final String aboutEmoji,
String avatarPath,
final boolean removeAvatar
- ) {
+ ) {
try {
if (avatarPath.isEmpty()) {
avatarPath = null;
}
Optional<File> avatarFile = removeAvatar
? Optional.absent()
- : avatarPath == null ? null : Optional.of(new File(avatarPath));
+ : avatarPath == null ? null : Optional.of(new File(avatarPath));
m.setProfile(givenName, familyName, about, aboutEmoji, avatarFile);
} catch (IOException e) {
throw new Error.Failure(e.getMessage());