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

Unified Diff: webrtc/modules/utility/source/helpers_ios.mm

Issue 1401963002: Adds support for Bluetooth headsets to the iOS audio layer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: nit Created 5 years, 2 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 | « webrtc/modules/utility/interface/helpers_ios.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/utility/source/helpers_ios.mm
diff --git a/webrtc/modules/utility/source/helpers_ios.mm b/webrtc/modules/utility/source/helpers_ios.mm
index d36253072d71b45dcb9601c4ff3f4ebb4d9b4546..90b7c8f605bd457c6514473635b7a807e24e300a 100644
--- a/webrtc/modules/utility/source/helpers_ios.mm
+++ b/webrtc/modules/utility/source/helpers_ios.mm
@@ -10,6 +10,7 @@
#if defined(WEBRTC_IOS)
+#import <AVFoundation/AVFoundation.h>
#import <Foundation/Foundation.h>
#import <sys/sysctl.h>
#import <UIKit/UIKit.h>
@@ -57,6 +58,11 @@ std::string GetCurrentThreadDescription() {
return StdStringFromNSString(name);
}
+std::string GetAudioSessionCategory() {
+ NSString* category = [[AVAudioSession sharedInstance] category];
+ return StdStringFromNSString(category);
+}
+
std::string GetSystemName() {
NSString* osName = [[UIDevice currentDevice] systemName];
return StdStringFromNSString(osName);
@@ -112,6 +118,10 @@ std::string GetDeviceName() {
return std::string("iPhone 6 Plus");
if (!raw_name.compare("iPhone7,2"))
return std::string("iPhone 6");
+ if (!raw_name.compare("iPhone8,1"))
+ return std::string("iPhone 6s");
+ if (!raw_name.compare("iPhone8,2"))
+ return std::string("iPhone 6s Plus");
if (!raw_name.compare("iPod1,1"))
return std::string("iPod Touch 1G");
if (!raw_name.compare("iPod2,1"))
@@ -162,7 +172,7 @@ std::string GetDeviceName() {
return std::string("Simulator");
if (!raw_name.compare("x86_64"))
return std::string("Simulator");
- LOG(LS_WARNING) << "Failed to find device name";
+ LOG(LS_WARNING) << "Failed to find device name (" << raw_name << ")";
return raw_name;
}
« no previous file with comments | « webrtc/modules/utility/interface/helpers_ios.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698