Prevent NPE if someone creates a bad BluetoothHealthAppConfig object
Bug: 28271086 Change-Id: Ic8ebe3152e2b06c070316acc7e6a1f89763cd2a3
This commit is contained in:
committed by
Andre Eisenbach
parent
824fc38439
commit
74fa2d6846
@@ -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() &&
|
||||
|
||||
Reference in New Issue
Block a user