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
This commit is contained in:
Nick Pelly
2009-03-31 14:42:35 -07:00
committed by The Android Open Source Project
parent af7e1c9295
commit 0e2016789e

View File

@@ -575,9 +575,10 @@ public class LocalBluetoothDevice implements Comparable<LocalBluetoothDevice> {
*/ */
private void fetchBtClass() { private void fetchBtClass() {
mBtClass = mLocalManager.getBluetoothManager().getRemoteClass(mAddress); mBtClass = mLocalManager.getBluetoothManager().getRemoteClass(mAddress);
mProfiles.clear(); if (mBtClass != BluetoothClass.ERROR) {
LocalBluetoothProfileManager.fill(mBtClass, mProfiles); LocalBluetoothProfileManager.fill(mBtClass, mProfiles);
} }
}
/** /**
* Refreshes the UI for the BT class, including fetching the latest value * Refreshes the UI for the BT class, including fetching the latest value