From 0e2016789ee27db86300329305f2f638b25037f0 Mon Sep 17 00:00:00 2001 From: Nick Pelly <> Date: Tue, 31 Mar 2009 14:42:35 -0700 Subject: [PATCH] AI 143812: am: CL 143788 am: CL 143740 Don't clear supported profiles in settings app if getRemoteClass returns error. Also clean up the error codes returned by the framework, so that the settings app can properly detect an error. Original author: npelly Merged from: //branches/cupcake/... Original author: android-build Merged from: //branches/donutburger/... Automated import of CL 143812 --- src/com/android/settings/bluetooth/LocalBluetoothDevice.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/bluetooth/LocalBluetoothDevice.java b/src/com/android/settings/bluetooth/LocalBluetoothDevice.java index 199a4225baf..86b1d69e3b3 100644 --- a/src/com/android/settings/bluetooth/LocalBluetoothDevice.java +++ b/src/com/android/settings/bluetooth/LocalBluetoothDevice.java @@ -575,8 +575,9 @@ public class LocalBluetoothDevice implements Comparable { */ private void fetchBtClass() { mBtClass = mLocalManager.getBluetoothManager().getRemoteClass(mAddress); - mProfiles.clear(); - LocalBluetoothProfileManager.fill(mBtClass, mProfiles); + if (mBtClass != BluetoothClass.ERROR) { + LocalBluetoothProfileManager.fill(mBtClass, mProfiles); + } } /**