Merge "Fix crash while connecting channel."
diff --git a/core/java/android/server/BluetoothHealthProfileHandler.java b/core/java/android/server/BluetoothHealthProfileHandler.java
index 8656cd9..a6ada2b 100644
--- a/core/java/android/server/BluetoothHealthProfileHandler.java
+++ b/core/java/android/server/BluetoothHealthProfileHandler.java
@@ -294,7 +294,7 @@
 
     private HealthChannel findChannelByPath(BluetoothDevice device, String path) {
         for (HealthChannel chan : mHealthChannels) {
-            if (chan.mChannelPath.equals(path) && chan.mDevice.equals(device)) return chan;
+            if (path.equals(chan.mChannelPath) && device.equals(chan.mDevice)) return chan;
         }
         return null;
     }