From b20dd917e2d29045225985baa980a2a8e22e10fc Mon Sep 17 00:00:00 2001
From: Nick Pelly <>
Date: Tue, 31 Mar 2009 14:56:27 -0700
Subject: AI 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/...

Automated import of CL 143788
---
 src/com/android/settings/bluetooth/LocalBluetoothDevice.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/com/android/settings/bluetooth/LocalBluetoothDevice.java b/src/com/android/settings/bluetooth/LocalBluetoothDevice.java
index 199a422..86b1d69 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<LocalBluetoothDevice> {
      */
     private void fetchBtClass() {
         mBtClass = mLocalManager.getBluetoothManager().getRemoteClass(mAddress);
-        mProfiles.clear();
-        LocalBluetoothProfileManager.fill(mBtClass, mProfiles);
+        if (mBtClass != BluetoothClass.ERROR) {
+            LocalBluetoothProfileManager.fill(mBtClass, mProfiles);
+        }
     }
 
     /**
-- 
cgit v1.1