Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 15, 2024
1 parent 61f3141 commit a9d38f3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ protected void onCreate(Bundle savedInstanceState) {

serverUploadFragment = new TitledFragment(getString(R.string.upload),
new ServerUploadFragment(connectivityEventPublisher,
transportSecurity.getTransportID(), this.transportPaths));
transportWifiFragment = new TitledFragment(getString(R.string.local_wifi), new TransportWifiDirectFragment(this.transportPaths));
transportSecurity.getTransportID(),
this.transportPaths));
transportWifiFragment = new TitledFragment(getString(R.string.local_wifi),
new TransportWifiDirectFragment(this.transportPaths));
storageFragment = new TitledFragment("Storage Settings", new StorageFragment());

permissionsFragment = new PermissionsFragment();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected void onBundleExchangeEvent(BundleExchangeEvent bundleExchangeEvent) {
@Override
protected Path pathProducer(BundleExchangeName bundleExchangeName, BundleSender bundleSender) {
return bundleExchangeName.isDownload() ? toClientPath.resolve(bundleExchangeName.encryptedBundleId()) :
toServerPath.resolve(bundleExchangeName.encryptedBundleId());
toServerPath.resolve(bundleExchangeName.encryptedBundleId());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ private void connectToServer() {
"Initiating server exchange to " + serverDomain + ":" + serverPort + "...\n"));

TransportToBundleServerManager transportToBundleServerManager =
new TransportToBundleServerManager(transportPaths,
serverDomain, serverPort,
new TransportToBundleServerManager(transportPaths, serverDomain, serverPort,
this::connectToServerComplete,
e -> connectToServerError(e, serverDomain + ":" + serverPort));
executor.execute(transportToBundleServerManager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static java.util.logging.Level.INFO;
import static java.util.logging.Level.SEVERE;

import com.google.protobuf.ByteString;
import net.discdd.bundlerouting.service.BundleUploadResponseObserver;
import net.discdd.grpc.BundleChunk;
Expand Down Expand Up @@ -51,9 +52,8 @@ public class TransportToBundleServerManager implements Runnable {
private final Function<Exception, Void> connectError;
private final String transportTarget;

public TransportToBundleServerManager(TransportPaths transportPaths, String host, String port,
Function<Void, Void> connectComplete,
Function<Exception, Void> connectError) {
public TransportToBundleServerManager(TransportPaths transportPaths, String host, String port, Function<Void,
Void> connectComplete, Function<Exception, Void> connectError) {
this.connectComplete = connectComplete;
this.connectError = connectError;
this.transportTarget = host + ":" + port;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.discdd.bundletransport;

import android.content.Context;

import static java.util.logging.Level.INFO;
import static java.util.logging.Level.SEVERE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.logging.Logger;

import static java.util.logging.Level.SEVERE;

// BundleTransport
Expand All @@ -14,14 +15,14 @@
// |_ client - bundles to send to client + recencyBlob
// |_ server - bundles to send to server

public class TransportPaths{
public class TransportPaths {
private static final Logger logger = Logger.getLogger(TransportPaths.class.getName());

public final Path toClientPath;

public final Path toServerPath;

public TransportPaths(Path rootDir){
public TransportPaths(Path rootDir) {
this.toClientPath = rootDir.resolve("BundleTransmission/client");
this.toServerPath = rootDir.resolve("BundleTransmission/server");

Expand Down

0 comments on commit a9d38f3

Please sign in to comment.