Fixed some static analysis issues
This commit is contained in:
@@ -12,7 +12,6 @@ import android.os.Parcelable;
|
||||
* Expanded by Alexandros Schillings
|
||||
*/
|
||||
public final class AdRecord implements Parcelable{
|
||||
|
||||
// 02 # Number of bytes that follow in first AD structure
|
||||
// 01 # Flags AD type
|
||||
// 1A # Flags value 0x1A = 000011010
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ public final class IBeaconManufacturerData {
|
||||
}
|
||||
|
||||
private static String calculateUUIDString(final byte[] uuid){
|
||||
final StringBuffer sb = new StringBuffer();
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
|
||||
for(int i = 0 ; i< uuid.length; i++){
|
||||
if(i == 4){sb.append('-');}
|
||||
|
||||
@@ -14,7 +14,7 @@ import android.util.SparseArray;
|
||||
public class AdRecordUtils {
|
||||
|
||||
public static String getRecordDataAsString(final AdRecord nameRecord) {
|
||||
if(nameRecord == null){return new String();}
|
||||
if(nameRecord == null){return "";}
|
||||
return new String(nameRecord.getData());
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public class ByteUtils {
|
||||
* @return the string
|
||||
*/
|
||||
public static String byteArrayToHexString(final byte[] array){
|
||||
final StringBuffer sb = new StringBuffer();
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
boolean firstEntry = true;
|
||||
sb.append('[');
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public class IBeaconUtils {
|
||||
* Ascertains whether a Manufacturer Data byte array belongs to an iBeacon;
|
||||
*
|
||||
* @param manufacturerData a Bluetooth LE device's raw manufacturerData.
|
||||
* @return
|
||||
* @return true if the manufacturer data belong to an iBeacon
|
||||
*/
|
||||
public static boolean isThisAnIBeacon(final byte[] manufacturerData){
|
||||
if(manufacturerData == null){return false;}
|
||||
|
||||
Reference in New Issue
Block a user