From fc9c170bb1ecd6f6e9a839514e3aa697afdefe82 Mon Sep 17 00:00:00 2001 From: Faisal Hameed Date: Sun, 13 Mar 2016 22:05:15 +0500 Subject: [PATCH] Fixing squid:UselessParenthesesCheck -Removing useless parentheses. --- .../com/nutomic/syncthingandroid/fragments/DeviceFragment.java | 2 +- .../com/nutomic/syncthingandroid/syncthing/NetworkReceiver.java | 2 +- .../java/com/nutomic/syncthingandroid/util/FoldersAdapter.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/nutomic/syncthingandroid/fragments/DeviceFragment.java b/src/main/java/com/nutomic/syncthingandroid/fragments/DeviceFragment.java index efb60b03..676de214 100644 --- a/src/main/java/com/nutomic/syncthingandroid/fragments/DeviceFragment.java +++ b/src/main/java/com/nutomic/syncthingandroid/fragments/DeviceFragment.java @@ -289,7 +289,7 @@ public class DeviceFragment extends Fragment implements private void updateViewsAndSetListeners() { // Update views mIdView.setText(mDevice.deviceID); - mNameView.setText((mDevice.name)); + mNameView.setText(mDevice.name); mAddressesView.setText(displayableAddresses()); mCompressionValueView.setText(Compression.fromValue(getActivity(), mDevice.compression).getTitle(getActivity())); mIntroducerView.setChecked(mDevice.introducer); diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/NetworkReceiver.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/NetworkReceiver.java index ee260442..5f8b7816 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/NetworkReceiver.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/NetworkReceiver.java @@ -22,7 +22,7 @@ public class NetworkReceiver extends BroadcastReceiver { ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo wifiInfo = cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI); - boolean isWifiConnected = (wifiInfo != null && wifiInfo.isConnected()); + boolean isWifiConnected = wifiInfo != null && wifiInfo.isConnected(); Log.v(TAG, "Received wifi " + (isWifiConnected ? "connected" : "disconnected") + " event"); Intent i = new Intent(context, SyncthingService.class); i.putExtra(DeviceStateHolder.EXTRA_HAS_WIFI, isWifiConnected); diff --git a/src/main/java/com/nutomic/syncthingandroid/util/FoldersAdapter.java b/src/main/java/com/nutomic/syncthingandroid/util/FoldersAdapter.java index 9e736f38..157f6fd3 100644 --- a/src/main/java/com/nutomic/syncthingandroid/util/FoldersAdapter.java +++ b/src/main/java/com/nutomic/syncthingandroid/util/FoldersAdapter.java @@ -59,7 +59,7 @@ public class FoldersAdapter extends ArrayAdapter RestApi.Model model = mModels.get(folder.id); id.setText(folder.id); state.setTextColor(getContext().getResources().getColor(R.color.text_green)); - directory.setText((folder.path)); + directory.setText(folder.path); if (model != null) { int percentage = (model.globalBytes != 0) ? Math.round(100 * model.inSyncBytes / model.globalBytes)