Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useless parentheses around expressions should be removed #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,9 @@ private void resetBluetoothSysex(byte input) {
private void printFrameToLog(byte[] frame, String tag) {
String s = "";
for (byte b : frame) {
if ((Integer.toHexString(b).length() < 2))
if (Integer.toHexString(b).length() < 2)
s += "0" + Integer.toHexString(b) + " ";
else if ((Integer.toHexString(b).length() == 2))
else if (Integer.toHexString(b).length() == 2)
s += Integer.toHexString(b) + " ";
else {
String temp = Integer.toHexString(b);
Expand Down Expand Up @@ -858,7 +858,7 @@ public void run() {
// TODO Auto-generated method stub
while (!this.isInterrupted()) {
try {
while ((readByteFromUartBuffer()) != ShieldFrame.START_OF_FRAME)
while (readByteFromUartBuffer() != ShieldFrame.START_OF_FRAME)
;
if (ShieldFrameTimeout != null)
ShieldFrameTimeout.stopTimer();
Expand Down Expand Up @@ -905,7 +905,7 @@ public void run() {
frame.addArgument(data);
}
if (continueRequested) continue;
if ((readByteFromUartBuffer()) != ShieldFrame.END_OF_FRAME) {
if (readByteFromUartBuffer() != ShieldFrame.END_OF_FRAME) {
if (ShieldFrameTimeout != null)
ShieldFrameTimeout.stopTimer();
uartBuffer.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected void onCreate(final Bundle savedInstanceState) {
@Override
public void finish() {
if (!isCanceled()) {
final boolean output = (outputSpinner).getSelectedItem().toString()
final boolean output = outputSpinner.getSelectedItem().toString()
.toLowerCase().equals("high") ? true : false;
final Intent resultIntent = new Intent();
final Bundle resultBundle = PluginBundleManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected void onCreate(final Bundle savedInstanceState) {
@Override
public void finish() {
if (!isCanceled()) {
final boolean output = (outputSpinner).getSelectedItem().toString()
final boolean output = outputSpinner.getSelectedItem().toString()
.toLowerCase().equals("high") ? true : false;
final Intent resultIntent = new Intent();
final Bundle resultBundle = PluginBundleManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ public boolean isSkypeClientInstalled(Context myContext) {
myPackageMgr.getPackageInfo("com.skype.raider",
PackageManager.GET_ACTIVITIES);
} catch (PackageManager.NameNotFoundException e) {
return (false);
return false;
}
return (true);
return true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ public String getEncodedString(String toBeEncoded) {
case 3:
byte[] byts = toBeEncoded.getBytes();
for (byte b : byts) {
if ((Integer.toHexString(b).length() < 2))
if (Integer.toHexString(b).length() < 2)
out += "0" + Integer.toHexString(b) + " ";
else if ((Integer.toHexString(b).length() == 2))
else if (Integer.toHexString(b).length() == 2)
out += Integer.toHexString(b) + " ";
else {
String temp = Integer.toHexString(b);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
} else {
if ((CameraShield) getApplication().getRunningShields().get(getControllerTag()) != null)
try {
if ((((CameraShield) getApplication().getRunningShields().get(getControllerTag())).hidePreview()))
if (((CameraShield) getApplication().getRunningShields().get(getControllerTag())).hidePreview())
camerLogo.setVisibility(View.VISIBLE);
// else
// cameraPreviewToggle.setChecked(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void run() {
};

private void initializeFirmata() {
if ((getApplication().getRunningShields().get(getControllerTag())) == null)
if (getApplication().getRunningShields().get(getControllerTag()) == null)
getApplication().getRunningShields().put(
getControllerTag(),
new FacebookShield(activity, getControllerTag(), this,
Expand All @@ -185,7 +185,7 @@ private void initializeFirmata() {
}

private void checkLogin() {
if ((getApplication().getRunningShields().get(getControllerTag())) != null
if (getApplication().getRunningShields().get(getControllerTag()) != null
&& ((FacebookShield) getApplication().getRunningShields().get(
getControllerTag())).isFacebookLoggedInAlready()) {
buttonToLoggedIn();
Expand Down