From d467da730923cad31a9c10f154a023a9ee620fc7 Mon Sep 17 00:00:00 2001 From: Isha Bobra Date: Thu, 5 Apr 2018 13:27:47 -0700 Subject: [PATCH] The file CachedBluetoothDeviceManager.java performs synchronization at class level. This CL just adds the missing synchronization bits. Test: Manual Change-Id: I71e0a194f8d126c2898a4086d6bcb62156cab9ad Bug: 77849851 --- .../com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java index 2554d598da09..50c6aac57e8f 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java @@ -84,7 +84,7 @@ public class CachedBluetoothDeviceManager { * @return the cached device object for this device, or null if it has * not been previously seen */ - public CachedBluetoothDevice findDevice(BluetoothDevice device) { + public synchronized CachedBluetoothDevice findDevice(BluetoothDevice device) { for (CachedBluetoothDevice cachedDevice : mCachedDevices) { if (cachedDevice.getDevice().equals(device)) { return cachedDevice; -- 2.11.0