| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 }); | 56 }); |
| 57 | 57 |
| 58 dispatch_async(dispatch_get_main_queue(), _initializeBlock); | 58 dispatch_async(dispatch_get_main_queue(), _initializeBlock); |
| 59 } | 59 } |
| 60 | 60 |
| 61 return self; | 61 return self; |
| 62 } | 62 } |
| 63 | 63 |
| 64 - (BOOL)isApplicationActive { | 64 - (BOOL)isApplicationActive { |
| 65 if (!_initialized) { | 65 if (!_initialized) { |
| 66 long ret = | 66 long ret = dispatch_block_wait(_initializeBlock, |
| 67 dispatch_block_wait(_initializeBlock, dispatch_time(DISPATCH_TIME_NOW, 1
.0 * NSEC_PER_SEC)); | 67 dispatch_time(DISPATCH_TIME_NOW, 10.0 * NSEC_
PER_SEC)); |
| 68 RTC_CHECK_EQ(ret, 0); | 68 RTC_DCHECK_EQ(ret, 0); |
| 69 } | 69 } |
| 70 return _state == UIApplicationStateActive; | 70 return _state == UIApplicationStateActive; |
| 71 } | 71 } |
| 72 | 72 |
| 73 @end | 73 @end |
| 74 | 74 |
| 75 #endif // WEBRTC_IOS | 75 #endif // WEBRTC_IOS |
| OLD | NEW |