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}
diff --git a/sdk/objc/Framework/Classes/Common/UIDevice+RTCDevice.mm b/sdk/objc/Framework/Classes/Common/UIDevice+RTCDevice.mm
index 3120827..b2cfb20 100644
--- a/sdk/objc/Framework/Classes/Common/UIDevice+RTCDevice.mm
+++ b/sdk/objc/Framework/Classes/Common/UIDevice+RTCDevice.mm
@@ -89,10 +89,6 @@
   return [self currentDevice].systemVersion.doubleValue;
 }
 
-+ (BOOL)isIOS9OrLater {
-  return [self currentDeviceSystemVersion] >= 9.0;
-}
-
 + (BOOL)isIOS11OrLater {
   return [self currentDeviceSystemVersion] >= 11.0;
 }
diff --git a/sdk/objc/Framework/Classes/Common/helpers.mm b/sdk/objc/Framework/Classes/Common/helpers.mm
index 4409845..657a4a2 100644
--- a/sdk/objc/Framework/Classes/Common/helpers.mm
+++ b/sdk/objc/Framework/Classes/Common/helpers.mm
@@ -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 @@
   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 @@
   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
 
diff --git a/sdk/objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m b/sdk/objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m
index 86eda60..7ee319f 100644
--- a/sdk/objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m
+++ b/sdk/objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m
@@ -248,25 +248,22 @@
 
 - (void)handleCaptureSessionInterruption:(NSNotification *)notification {
   NSString *reasonString = nil;
-#if defined(__IPHONE_9_0) && defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
-    __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0
-  if ([UIDevice isIOS9OrLater]) {
-    NSNumber *reason = notification.userInfo[AVCaptureSessionInterruptionReasonKey];
-    if (reason) {
-      switch (reason.intValue) {
-        case AVCaptureSessionInterruptionReasonVideoDeviceNotAvailableInBackground:
-          reasonString = @"VideoDeviceNotAvailableInBackground";
-          break;
-        case AVCaptureSessionInterruptionReasonAudioDeviceInUseByAnotherClient:
-          reasonString = @"AudioDeviceInUseByAnotherClient";
-          break;
-        case AVCaptureSessionInterruptionReasonVideoDeviceInUseByAnotherClient:
-          reasonString = @"VideoDeviceInUseByAnotherClient";
-          break;
-        case AVCaptureSessionInterruptionReasonVideoDeviceNotAvailableWithMultipleForegroundApps:
-          reasonString = @"VideoDeviceNotAvailableWithMultipleForegroundApps";
-          break;
-      }
+#if TARGET_OS_IPHONE
+  NSNumber *reason = notification.userInfo[AVCaptureSessionInterruptionReasonKey];
+  if (reason) {
+    switch (reason.intValue) {
+      case AVCaptureSessionInterruptionReasonVideoDeviceNotAvailableInBackground:
+        reasonString = @"VideoDeviceNotAvailableInBackground";
+        break;
+      case AVCaptureSessionInterruptionReasonAudioDeviceInUseByAnotherClient:
+        reasonString = @"AudioDeviceInUseByAnotherClient";
+        break;
+      case AVCaptureSessionInterruptionReasonVideoDeviceInUseByAnotherClient:
+        reasonString = @"VideoDeviceInUseByAnotherClient";
+        break;
+      case AVCaptureSessionInterruptionReasonVideoDeviceNotAvailableWithMultipleForegroundApps:
+        reasonString = @"VideoDeviceNotAvailableWithMultipleForegroundApps";
+        break;
     }
   }
 #endif
diff --git a/sdk/objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.mm b/sdk/objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.mm
index 287ecdd..b3722b0 100644
--- a/sdk/objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.mm
+++ b/sdk/objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.mm
@@ -267,25 +267,22 @@
 
 - (void)handleCaptureSessionInterruption:(NSNotification *)notification {
   NSString *reasonString = nil;
-#if defined(__IPHONE_9_0) && defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
-    __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0
-  if ([UIDevice isIOS9OrLater]) {
-    NSNumber *reason = notification.userInfo[AVCaptureSessionInterruptionReasonKey];
-    if (reason) {
-      switch (reason.intValue) {
-        case AVCaptureSessionInterruptionReasonVideoDeviceNotAvailableInBackground:
-          reasonString = @"VideoDeviceNotAvailableInBackground";
-          break;
-        case AVCaptureSessionInterruptionReasonAudioDeviceInUseByAnotherClient:
-          reasonString = @"AudioDeviceInUseByAnotherClient";
-          break;
-        case AVCaptureSessionInterruptionReasonVideoDeviceInUseByAnotherClient:
-          reasonString = @"VideoDeviceInUseByAnotherClient";
-          break;
-        case AVCaptureSessionInterruptionReasonVideoDeviceNotAvailableWithMultipleForegroundApps:
-          reasonString = @"VideoDeviceNotAvailableWithMultipleForegroundApps";
-          break;
-      }
+#if TARGET_OS_IPHONE
+  NSNumber *reason = notification.userInfo[AVCaptureSessionInterruptionReasonKey];
+  if (reason) {
+    switch (reason.intValue) {
+      case AVCaptureSessionInterruptionReasonVideoDeviceNotAvailableInBackground:
+        reasonString = @"VideoDeviceNotAvailableInBackground";
+        break;
+      case AVCaptureSessionInterruptionReasonAudioDeviceInUseByAnotherClient:
+        reasonString = @"AudioDeviceInUseByAnotherClient";
+        break;
+      case AVCaptureSessionInterruptionReasonVideoDeviceInUseByAnotherClient:
+        reasonString = @"VideoDeviceInUseByAnotherClient";
+        break;
+      case AVCaptureSessionInterruptionReasonVideoDeviceNotAvailableWithMultipleForegroundApps:
+        reasonString = @"VideoDeviceNotAvailableWithMultipleForegroundApps";
+        break;
     }
   }
 #endif