diff options
author | Kenny Root <kroot@google.com> | 2010-02-17 12:00:37 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2010-02-17 12:01:52 -0800 |
commit | 5f61416305c47c4db0b94c0cf500e9a9d11d4cdb (patch) | |
tree | 40c637607ee6265b917ae42d69295c77939cf1d9 /core/java/android/server | |
parent | 0f5a434c5467ef300b7bb408d40aa763aecdb19f (diff) | |
download | frameworks_base-5f61416305c47c4db0b94c0cf500e9a9d11d4cdb.zip frameworks_base-5f61416305c47c4db0b94c0cf500e9a9d11d4cdb.tar.gz frameworks_base-5f61416305c47c4db0b94c0cf500e9a9d11d4cdb.tar.bz2 |
Add hashCode() to BluetoothService$RemoteService
RemoteService is used as a key in a HashMap, so it should have a
hashCode()
Change-Id: I69b72991474f4d5ec11c0620a6e66eb0c44d04b6
Diffstat (limited to 'core/java/android/server')
-rw-r--r-- | core/java/android/server/BluetoothService.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index dfb775f..aa20ac4 100644 --- a/core/java/android/server/BluetoothService.java +++ b/core/java/android/server/BluetoothService.java @@ -136,6 +136,14 @@ public class BluetoothService extends IBluetooth.Stub { } return false; } + + @Override + public int hashCode() { + int hash = 1; + hash = hash * 31 + (address == null ? 0 : address.hashCode()); + hash = hash * 31 + (uuid == null ? 0 : uuid.hashCode()); + return hash; + } } static { |