summaryrefslogtreecommitdiff
path: root/chromium/third_party/webrtc/modules/utility/source/helpers_ios.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/webrtc/modules/utility/source/helpers_ios.mm')
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/helpers_ios.mm14
1 files changed, 12 insertions, 2 deletions
diff --git a/chromium/third_party/webrtc/modules/utility/source/helpers_ios.mm b/chromium/third_party/webrtc/modules/utility/source/helpers_ios.mm
index d36253072d7..2d0ac098c1d 100644
--- a/chromium/third_party/webrtc/modules/utility/source/helpers_ios.mm
+++ b/chromium/third_party/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>
@@ -17,7 +18,7 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/utility/interface/helpers_ios.h"
+#include "webrtc/modules/utility/include/helpers_ios.h"
namespace webrtc {
namespace ios {
@@ -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;
}