diff --git a/oneSheeld/src/main/java/com/integreight/firmatabluetooth/ArduinoFirmata.java b/oneSheeld/src/main/java/com/integreight/firmatabluetooth/ArduinoFirmata.java index 6d0602223..21ad2fe31 100644 --- a/oneSheeld/src/main/java/com/integreight/firmatabluetooth/ArduinoFirmata.java +++ b/oneSheeld/src/main/java/com/integreight/firmatabluetooth/ArduinoFirmata.java @@ -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); @@ -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(); @@ -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(); diff --git a/oneSheeld/src/main/java/com/integreight/onesheeld/plugin/action/ActionActivity.java b/oneSheeld/src/main/java/com/integreight/onesheeld/plugin/action/ActionActivity.java index c2ab2cd4c..eb396a958 100644 --- a/oneSheeld/src/main/java/com/integreight/onesheeld/plugin/action/ActionActivity.java +++ b/oneSheeld/src/main/java/com/integreight/onesheeld/plugin/action/ActionActivity.java @@ -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 diff --git a/oneSheeld/src/main/java/com/integreight/onesheeld/plugin/condition/ConditionActivity.java b/oneSheeld/src/main/java/com/integreight/onesheeld/plugin/condition/ConditionActivity.java index 3522933fb..7746a5675 100644 --- a/oneSheeld/src/main/java/com/integreight/onesheeld/plugin/condition/ConditionActivity.java +++ b/oneSheeld/src/main/java/com/integreight/onesheeld/plugin/condition/ConditionActivity.java @@ -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 diff --git a/oneSheeld/src/main/java/com/integreight/onesheeld/shields/controller/SkypeShield.java b/oneSheeld/src/main/java/com/integreight/onesheeld/shields/controller/SkypeShield.java index 90f972f4f..7fb80e421 100644 --- a/oneSheeld/src/main/java/com/integreight/onesheeld/shields/controller/SkypeShield.java +++ b/oneSheeld/src/main/java/com/integreight/onesheeld/shields/controller/SkypeShield.java @@ -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 diff --git a/oneSheeld/src/main/java/com/integreight/onesheeld/shields/controller/TerminalShield.java b/oneSheeld/src/main/java/com/integreight/onesheeld/shields/controller/TerminalShield.java index a8a5ddb29..7d2d2ee5f 100644 --- a/oneSheeld/src/main/java/com/integreight/onesheeld/shields/controller/TerminalShield.java +++ b/oneSheeld/src/main/java/com/integreight/onesheeld/shields/controller/TerminalShield.java @@ -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); diff --git a/oneSheeld/src/main/java/com/integreight/onesheeld/shields/fragments/CameraFragment.java b/oneSheeld/src/main/java/com/integreight/onesheeld/shields/fragments/CameraFragment.java index 746b132d4..8b7b5dd15 100644 --- a/oneSheeld/src/main/java/com/integreight/onesheeld/shields/fragments/CameraFragment.java +++ b/oneSheeld/src/main/java/com/integreight/onesheeld/shields/fragments/CameraFragment.java @@ -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); diff --git a/oneSheeld/src/main/java/com/integreight/onesheeld/shields/fragments/FacebookFragment.java b/oneSheeld/src/main/java/com/integreight/onesheeld/shields/fragments/FacebookFragment.java index f3dda6485..af00045d0 100644 --- a/oneSheeld/src/main/java/com/integreight/onesheeld/shields/fragments/FacebookFragment.java +++ b/oneSheeld/src/main/java/com/integreight/onesheeld/shields/fragments/FacebookFragment.java @@ -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, @@ -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();