Merge "Prevent NPE if someone creates a bad BluetoothHealthAppConfig object" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
fe8176bda7
@@ -68,7 +68,9 @@ public final class BluetoothHealthAppConfiguration implements Parcelable {
|
|||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (o instanceof BluetoothHealthAppConfiguration) {
|
if (o instanceof BluetoothHealthAppConfiguration) {
|
||||||
BluetoothHealthAppConfiguration config = (BluetoothHealthAppConfiguration) o;
|
BluetoothHealthAppConfiguration config = (BluetoothHealthAppConfiguration) o;
|
||||||
// config.getName() can never be NULL
|
|
||||||
|
if (mName == null) return false;
|
||||||
|
|
||||||
return mName.equals(config.getName()) &&
|
return mName.equals(config.getName()) &&
|
||||||
mDataType == config.getDataType() &&
|
mDataType == config.getDataType() &&
|
||||||
mRole == config.getRole() &&
|
mRole == config.getRole() &&
|
||||||
|
|||||||
Reference in New Issue
Block a user