Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 26, 2024
1 parent b76c211 commit f68fd88
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected void onCreate(Bundle savedInstanceState) {

var intent = new Intent(this, BundleClientWifiDirectService.class);
var svc = bindService(intent, connection, Context.BIND_AUTO_CREATE);

mUsbReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public BundleClientWifiDirectFragment() {
intentFilter.addAction(BundleClientWifiDirectService.NET_DISCDD_BUNDLECLIENT_LOG_ACTION);
}

public static BundleClientWifiDirectFragment newInstance() { return new BundleClientWifiDirectFragment(); }
public static BundleClientWifiDirectFragment newInstance() {return new BundleClientWifiDirectFragment();}

@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class ServerFragment extends Fragment {
private EditText portInput;
private SharedPreferences sharedPref;

public static ServerFragment newInstance() { return new ServerFragment(); }
public static ServerFragment newInstance() {return new ServerFragment();}

@Nullable
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class UsbFragment extends Fragment {
private BundleTransmission bundleTransmission;
private File usbDirectory;

public static UsbFragment newInstance() { return new UsbFragment(); }
public static UsbFragment newInstance() {return new UsbFragment();}

@Override
public View onCreateView(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,12 @@ public void onReceive(Context context, Intent intent) {
logger.log(SEVERE, "[SEC]: Failed to initialize Server Keys", e);
}

ServerUploadFragment serverFrag = ServerUploadFragment.newInstance(transportSecurity.getTransportID(),
transportPaths, connectivityEventPublisher);
serverUploadFragment = new TitledFragment(getString(R.string.upload),
serverFrag);
ServerUploadFragment serverFrag =
ServerUploadFragment.newInstance(transportSecurity.getTransportID(), transportPaths,
connectivityEventPublisher);
serverUploadFragment = new TitledFragment(getString(R.string.upload), serverFrag);
TransportWifiDirectFragment transportFrag = TransportWifiDirectFragment.newInstance(transportPaths);
transportWifiFragment = new TitledFragment(getString(R.string.local_wifi),
transportFrag);
transportWifiFragment = new TitledFragment(getString(R.string.local_wifi), transportFrag);
storageFragment = new TitledFragment("Storage Settings", StorageFragment.newInstance());
usbFrag = new TitledFragment("USB", UsbFragment.newInstance(transportPaths));
logFragment = new TitledFragment(getString(R.string.logs), LogFragment.newInstance());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public class ServerUploadFragment extends Fragment {
private TextView numberBundlestoServer;
private Button reloadButton;

public static ServerUploadFragment newInstance(String transportID, TransportPaths transportPaths, SubmissionPublisher<BundleTransportActivity.ConnectivityEvent> connectivityFlow) {
public static ServerUploadFragment newInstance(String transportID, TransportPaths transportPaths,
SubmissionPublisher<BundleTransportActivity.ConnectivityEvent> connectivityFlow) {
ServerUploadFragment fragment = new ServerUploadFragment();
fragment.setTransportPaths(transportPaths);
fragment.setConnectivityFlow(connectivityFlow);
Expand Down Expand Up @@ -81,8 +82,9 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
saveDomainAndPortBtn = mainView.findViewById(R.id.save_domain_port);
restoreDomainAndPortBtn = mainView.findViewById(R.id.restore_domain_port);
connectServerBtn.setOnClickListener(view -> connectToServer());
if (connectivityFlow != null) { connectivityFlow.consume(event -> connectServerBtn.setEnabled(event.internetAvailable())); }
else { logger.warning("connectivityFlow is null"); }
if (connectivityFlow != null) {
connectivityFlow.consume(event -> connectServerBtn.setEnabled(event.internetAvailable()));
} else {logger.warning("connectivityFlow is null");}
serverConnnectedStatus = mainView.findViewById(R.id.server_upload_status);

// save the domain and port inputs
Expand All @@ -95,9 +97,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
numberBundlestoServer = mainView.findViewById(R.id.numberBundlestoServer);
reloadButton = mainView.findViewById(R.id.reloadCounts); // Assuming this ID is for the reload button
reloadButton.setOnClickListener(view -> {
if (transportPaths != null &&
transportPaths.toClientPath != null &&
transportPaths.toServerPath != null) {
if (transportPaths != null && transportPaths.toClientPath != null && transportPaths.toServerPath != null) {
String[] clientFiles = transportPaths.toClientPath.toFile().list();
String[] serverFiles = transportPaths.toServerPath.toFile().list();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class StorageFragment extends Fragment {
private Toast currentToast;
private int currentValue;

public static StorageFragment newInstance() { return new StorageFragment(); }
public static StorageFragment newInstance() {return new StorageFragment();}

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View mainView = inflater.inflate(R.layout.fragment_storage_preferences, container, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static UsbFragment newInstance(TransportPaths transportPaths) {
return fragment;
}

public void setTransportPaths (TransportPaths transportPaths) {
public void setTransportPaths(TransportPaths transportPaths) {
this.transportPaths = transportPaths;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class LogFragment extends Fragment {
private TextView logMsgs;
private static LinkedList<String> logRecords;

public static LogFragment newInstance() { return new LogFragment(); }
public static LogFragment newInstance() {return new LogFragment();}

static {
LogFragment.registerLoggerHandler();
Expand Down

0 comments on commit f68fd88

Please sign in to comment.