diff options
author | Nick Pelly <> | 2009-03-31 14:56:26 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-31 14:56:26 -0700 |
commit | ea600ccfb7568f60377c4abc85f56c80af7fdbfc (patch) | |
tree | 904f588a6f7aeb5ad9512866258664f310717bf3 /core/java/android/server/BluetoothDeviceService.java | |
parent | 36fd6d243ee5414618e8bc2cbdc6c0a6f311157f (diff) | |
download | frameworks_base-ea600ccfb7568f60377c4abc85f56c80af7fdbfc.zip frameworks_base-ea600ccfb7568f60377c4abc85f56c80af7fdbfc.tar.gz frameworks_base-ea600ccfb7568f60377c4abc85f56c80af7fdbfc.tar.bz2 |
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
Diffstat (limited to 'core/java/android/server/BluetoothDeviceService.java')
-rw-r--r-- | core/java/android/server/BluetoothDeviceService.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/server/BluetoothDeviceService.java b/core/java/android/server/BluetoothDeviceService.java index f1a7d25..8e5cee9 100644 --- a/core/java/android/server/BluetoothDeviceService.java +++ b/core/java/android/server/BluetoothDeviceService.java @@ -24,6 +24,7 @@ package android.server; +import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothError; import android.bluetooth.BluetoothHeadset; @@ -970,8 +971,8 @@ public class BluetoothDeviceService extends IBluetoothDevice.Stub { */ public synchronized int getRemoteClass(String address) { if (!BluetoothDevice.checkBluetoothAddress(address)) { - mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); - return -1; + mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); + return BluetoothClass.ERROR; } return getRemoteClassNative(address); } @@ -1254,4 +1255,3 @@ public class BluetoothDeviceService extends IBluetoothDevice.Stub { Log.d(TAG, msg); } } - |