Skip to content

Commit 61eb5ae

Browse files
author
Jaikumar Ganesh
committed
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
1 parent b5d2d45 commit 61eb5ae

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

core/java/android/server/BluetoothHealthProfileHandler.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,6 @@ class HealthChannel {
7777
mConfig = config;
7878
mState = BluetoothHealth.STATE_CHANNEL_DISCONNECTED;
7979
}
80-
81-
@Override
82-
public int hashCode() {
83-
int result = 17;
84-
result = 31 * result + (mChannelPath == null ? 0 : mChannelPath.hashCode());
85-
result = 31 * result + mDevice.hashCode();
86-
result = 31 * result + mConfig.hashCode();
87-
result = 31 * result + mChannelType;
88-
return result;
89-
}
9080
}
9181

9282
private final Handler mHandler = new Handler() {

0 commit comments

Comments
 (0)