Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm

Issue 2780263002: Add logging around audio session interruptions (Closed)
Patch Set: Modify logging to be clearer. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_device/ios/audio_device_ios.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « webrtc/modules/audio_device/ios/audio_device_ios.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698