Remove all code for iOS 8 and below.

Bug: webrtc:8455
Change-Id: I59ae663cea3d734090baa21843e84b8e0ad04c59
Reviewed-on: https://webrtc-review.googlesource.com/16080
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20977}
This commit is contained in:
Kári Tristan Helgason
2017-12-01 14:55:01 +01:00
committed by Commit Bot
parent eaae0c60d6
commit 86f8047cb7
6 changed files with 37 additions and 76 deletions

View File

@ -24,12 +24,6 @@
namespace webrtc {
namespace ios {
#if defined(WEBRTC_IOS)
bool isOperatingSystemAtLeastVersion(double version) {
return GetSystemVersion() >= version;
}
#endif
NSString* NSStringFromStdString(const std::string& stdString) {
// std::string may contain null termination character so we construct
// using length.
@ -74,19 +68,14 @@ std::string GetSystemVersionAsString() {
return StdStringFromNSString(osVersion);
}
double GetSystemVersion() {
static dispatch_once_t once_token;
static double system_version;
dispatch_once(&once_token, ^{
system_version = [UIDevice currentDevice].systemVersion.doubleValue;
});
return system_version;
}
std::string GetDeviceType() {
NSString* deviceModel = [[UIDevice currentDevice] model];
return StdStringFromNSString(deviceModel);
}
bool GetLowPowerModeEnabled() {
return [NSProcessInfo processInfo].lowPowerModeEnabled;
}
#endif
std::string GetDeviceName() {
@ -117,19 +106,6 @@ int GetProcessorCount() {
return [NSProcessInfo processInfo].processorCount;
}
#if defined(__IPHONE_9_0) && defined(__IPHONE_OS_VERSION_MAX_ALLOWED) \
&& __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0
bool GetLowPowerModeEnabled() {
if (isOperatingSystemAtLeastVersion(9.0)) {
// lowPoweredModeEnabled is only available on iOS9+.
return [NSProcessInfo processInfo].lowPowerModeEnabled;
}
RTC_LOG(LS_WARNING) << "webrtc::ios::GetLowPowerModeEnabled() is not "
"supported. Requires at least iOS 9.0";
return false;
}
#endif
} // namespace ios
} // namespace webrtc