am 5a463a69: Merge change Ic2a16d4f into eclair

Merge commit '5a463a693cae501f3e65936ea96e1ca1bae5fc3f' into eclair-plus-aosp

* commit '5a463a693cae501f3e65936ea96e1ca1bae5fc3f':
  b/2148252 Fix emulator
This commit is contained in:
Michael Chan
2009-10-01 08:00:16 -07:00
committed by Android Git Automerger

View File

@@ -93,10 +93,15 @@ public final class BluetoothA2dp {
mContext = c;
IBinder b = ServiceManager.getService(BluetoothA2dpService.BLUETOOTH_A2DP_SERVICE);
if (b == null) {
throw new RuntimeException("Bluetooth A2DP service not available!");
if (b != null) {
mService = IBluetoothA2dp.Stub.asInterface(b);
} else {
Log.w(TAG, "Bluetooth A2DP service not available!");
// Instead of throwing an exception which prevents people from going
// into Wireless settings in the emulator. Let it crash later when it is actually used.
mService = null;
}
mService = IBluetoothA2dp.Stub.asInterface(b);
}
/** Initiate a connection to an A2DP sink.