Index: webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm |
diff --git a/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm b/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm |
index 4d9b9774408a52d80da7df2b054651418eec53bc..1d099397f3844c3bd5a73b4c4f7bcf9a9965f0df 100644 |
--- a/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm |
+++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm |
@@ -86,12 +86,14 @@ NSInteger const kRTCAudioSessionErrorConfiguration = -2; |
selector:@selector(handleApplicationDidBecomeActive:) |
name:UIApplicationDidBecomeActiveNotification |
object:nil]; |
+ RTCLog(@"RTCAudioSession (%p): init.", self); |
} |
return self; |
} |
- (void)dealloc { |
[[NSNotificationCenter defaultCenter] removeObserver:self]; |
+ RTCLog(@"RTCAudioSession (%p): dealloc.", self); |
} |
- (NSString *)description { |
@@ -167,6 +169,7 @@ NSInteger const kRTCAudioSessionErrorConfiguration = -2; |
// TODO(tkchin): Check for duplicates. |
- (void)addDelegate:(id<RTCAudioSessionDelegate>)delegate { |
+ RTCLog(@"Adding delegate: (%p)", delegate); |
if (!delegate) { |
return; |
} |
@@ -177,6 +180,7 @@ NSInteger const kRTCAudioSessionErrorConfiguration = -2; |
} |
- (void)removeDelegate:(id<RTCAudioSessionDelegate>)delegate { |
+ RTCLog(@"Removing delegate: (%p)", delegate); |
if (!delegate) { |
return; |
} |
@@ -541,12 +545,14 @@ NSInteger const kRTCAudioSessionErrorConfiguration = -2; |
} |
- (void)handleApplicationDidBecomeActive:(NSNotification *)notification { |
+ RTCLog(@"Application became active after an interruption. Treating as interruption " |
+ " end. isInterrupted changed from %d to 0.", self.isInterrupted); |
if (self.isInterrupted) { |
- RTCLog(@"Application became active after an interruption. Treating as interruption end."); |
self.isInterrupted = NO; |
[self updateAudioSessionAfterEvent]; |
- [self notifyDidEndInterruptionWithShouldResumeSession:YES]; |
} |
+ // Always treat application becoming active as an interruption end event. |
+ [self notifyDidEndInterruptionWithShouldResumeSession:YES]; |
} |
#pragma mark - Private |