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

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

Issue 2780263002: Add logging around audio session interruptions (Closed)
Patch Set: 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
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..694fd045eb02d9f0181877c2dfb97677f6e2d5ec 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 init: (%p)", self);
tkchin_webrtc 2017/03/29 20:02:51 nit: "RTCAudioSession (%p): init" (usually ptr val
Chuck 2017/03/29 20:29:18 Done.
}
return self;
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
+ RTCLog(@"RTCAudioSession dealloc: (%p)", 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;
}
@@ -545,8 +549,9 @@ NSInteger const kRTCAudioSessionErrorConfiguration = -2;
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];
tkchin_webrtc 2017/03/29 20:02:51 Hm. I don't recall the details here - but can you
Chuck 2017/03/29 20:29:18 Modified the logging here so it always logs someth
}
#pragma mark - Private

Powered by Google App Engine
This is Rietveld 408576698