From 61eb5ae8552d746e34f7a69dc84e50e35af2e54d Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Fri, 9 Sep 2011 15:48:22 -0700 Subject: [PATCH] Don't override the hash code for the channel. Each channel is uniquely represented by the object itself, so use the hash code to identify it. Using channelPath in the calculation will mess up things - since in Connecting state the channel path is null and when its connected, we will get a different hash code. Change-Id: I6af6c783e18fddbd38344432b8156e000baafb15 --- .../android/server/BluetoothHealthProfileHandler.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core/java/android/server/BluetoothHealthProfileHandler.java b/core/java/android/server/BluetoothHealthProfileHandler.java index 2d80de4528bf8..1d8afe3338fd5 100644 --- a/core/java/android/server/BluetoothHealthProfileHandler.java +++ b/core/java/android/server/BluetoothHealthProfileHandler.java @@ -77,16 +77,6 @@ final class BluetoothHealthProfileHandler { mConfig = config; mState = BluetoothHealth.STATE_CHANNEL_DISCONNECTED; } - - @Override - public int hashCode() { - int result = 17; - result = 31 * result + (mChannelPath == null ? 0 : mChannelPath.hashCode()); - result = 31 * result + mDevice.hashCode(); - result = 31 * result + mConfig.hashCode(); - result = 31 * result + mChannelType; - return result; - } } private final Handler mHandler = new Handler() {