Example usage for android.os ParcelUuid equals

List of usage examples for android.os ParcelUuid equals

Introduction

In this page you can find the example usage for android.os ParcelUuid equals.

Prototype

@Override
public boolean equals(Object object) 

Source Link

Document

Compares this ParcelUuid to another object for equality.

Usage

From source file:Main.java

public static boolean isAdvAudioDist(ParcelUuid uuid) {
    return uuid.equals(AdvAudioDist);
}

From source file:Main.java

public static boolean isMas(ParcelUuid uuid) {
    return uuid.equals(MAS);
}

From source file:Main.java

public static boolean isMap(ParcelUuid uuid) {
    return uuid.equals(MAP);
}

From source file:Main.java

public static boolean isHeadset(ParcelUuid uuid) {
    return uuid.equals(HSP);
}

From source file:Main.java

/**
 * Returns true if ParcelUuid is present in uuidArray
 *
 * @param uuidArray - Array of ParcelUuids
 * @param uuid//from  w  ww . j ava 2 s.com
 */
public static boolean isUuidPresent(ParcelUuid[] uuidArray, ParcelUuid uuid) {
    if ((uuidArray == null || uuidArray.length == 0) && uuid == null)
        return true;

    if (uuidArray == null)
        return false;

    for (ParcelUuid element : uuidArray) {
        if (element.equals(uuid))
            return true;
    }
    return false;
}