Commit d10ef540 authored by benm@chromium.org's avatar benm@chromium.org

Handle platforms with no bluetooth in AudioManagerAndroid.

AudioManagerAndroid will NPE on hardware platforms that don't
have bluetooth.

BUG=401039

Review URL: https://codereview.chromium.org/449463002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287813 0039d316-1c4b-4281-b951-d872f2087c98
parent 16b62f50
......@@ -664,6 +664,11 @@ class AudioManagerAndroid {
btAdapter = BluetoothAdapter.getDefaultAdapter();
}
if (btAdapter == null) {
// Bluetooth not supported on this platform.
return false;
}
int profileConnectionState;
profileConnectionState = btAdapter.getProfileConnectionState(
android.bluetooth.BluetoothProfile.HEADSET);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment