1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 11:21:29 +00:00

Merge pull request #583 from DevFactory/release/useless-parenthesis-should-be-removed-fix-1

Code quality fix - Useless parentheses around expressions should be removed to prevent any misunderstanding.
This commit is contained in:
Felix Ableitner 2016-03-15 15:15:36 +01:00
commit c3ceb94c38
3 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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);

View file

@ -59,7 +59,7 @@ public class FoldersAdapter extends ArrayAdapter<RestApi.Folder>
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)