diff options
author | Ajay Panicker <apanicke@google.com> | 2016-09-23 12:39:43 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2016-09-23 22:08:26 +0000 |
commit | 2e8a0aff66e8501eb5a425b8bfea92ef0dbdc80c (patch) | |
tree | a43cbfd2630880006b29a749161a99a5a7333bb2 /framework/java/android/bluetooth/BluetoothHealthAppConfiguration.java | |
parent | bff07495b0586df34aa86ffc2310c8f8724e6b0c (diff) |
Prevent NPE if someone creates a bad BluetoothHealthAppConfig object
Bug: 28271086
Change-Id: Ic8ebe3152e2b06c070316acc7e6a1f89763cd2a3
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHealthAppConfiguration.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothHealthAppConfiguration.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHealthAppConfiguration.java b/framework/java/android/bluetooth/BluetoothHealthAppConfiguration.java index 15a9101452..1717a1e36e 100644 --- a/framework/java/android/bluetooth/BluetoothHealthAppConfiguration.java +++ b/framework/java/android/bluetooth/BluetoothHealthAppConfiguration.java @@ -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() && |