Reformat code

This commit is contained in:
AsamK 2021-02-19 17:56:43 +01:00
parent d0ce3c1543
commit 9f3276d7e3
2 changed files with 12 additions and 5 deletions

View file

@ -51,7 +51,9 @@ public interface Signal extends DBusInterface {
boolean isRegistered(); boolean isRegistered();
void updateProfile(String name,String about,String aboutEmoji,String avatarPath,boolean removeAvatar) throws Error.Failure; void updateProfile(
String name, String about, String aboutEmoji, String avatarPath, boolean removeAvatar
) throws Error.Failure;
class MessageReceived extends DBusSignal { class MessageReceived extends DBusSignal {

View file

@ -10,11 +10,10 @@ import org.asamk.signal.manager.storage.groups.GroupInfo;
import org.asamk.signal.util.ErrorUtils; import org.asamk.signal.util.ErrorUtils;
import org.freedesktop.dbus.exceptions.DBusExecutionException; import org.freedesktop.dbus.exceptions.DBusExecutionException;
import org.whispersystems.libsignal.util.Pair; import org.whispersystems.libsignal.util.Pair;
import org.whispersystems.libsignal.util.guava.Optional;
import org.whispersystems.signalservice.api.messages.SendMessageResult; import org.whispersystems.signalservice.api.messages.SendMessageResult;
import org.whispersystems.signalservice.api.push.SignalServiceAddress; import org.whispersystems.signalservice.api.push.SignalServiceAddress;
import org.whispersystems.signalservice.api.util.InvalidNumberException; import org.whispersystems.signalservice.api.util.InvalidNumberException;
import org.whispersystems.libsignal.util.guava.Optional;
import org.asamk.signal.manager.storage.contacts.ContactInfo;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@ -252,9 +251,15 @@ public class DbusSignalImpl implements Signal {
} }
@Override @Override
public void updateProfile(final String name,final String about,final String aboutEmoji, String avatarPath, final boolean removeAvatar) { public void updateProfile(
final String name,
final String about,
final String aboutEmoji,
String avatarPath,
final boolean removeAvatar
) {
try { try {
if (avatarPath.isEmpty()) { if (avatarPath.isEmpty()) {
avatarPath = null; avatarPath = null;
} }
Optional<File> avatarFile = removeAvatar Optional<File> avatarFile = removeAvatar