Prevent NPE if someone creates a bad BluetoothHealthAppConfig object am: 74fa2d6846

am: 26803036be

Change-Id: I4aa3f463b688f941817e6df4a16ff1036d7be8c5
This commit is contained in:
Ajay Panicker
2016-09-26 18:37:58 +00:00
committed by android-build-merger

View File

@@ -68,7 +68,9 @@ public final class BluetoothHealthAppConfiguration implements Parcelable {
public boolean equals(Object o) {
if (o instanceof BluetoothHealthAppConfiguration) {
BluetoothHealthAppConfiguration config = (BluetoothHealthAppConfiguration) o;
// config.getName() can never be NULL
if (mName == null) return false;
return mName.equals(config.getName()) &&
mDataType == config.getDataType() &&
mRole == config.getRole() &&