Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(795)

Unified Diff: media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java

Issue 449463002: Handle platforms with no bluetooth in AudioManagerAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java
diff --git a/media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java b/media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java
index 8005ddcb58caafec7e5a1f6f749e00c95e30ebf5..cb03a56b74aa77268ed2c2d8a0cc3f1eb0ce2d04 100644
--- a/media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java
+++ b/media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698