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
This commit is contained in:
Nick Pelly
2009-03-31 14:56:27 -07:00
committed by The Android Open Source Project
parent 6e811f2209
commit b20dd917e2

View File

@@ -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);
}
}
/**