update speaker button when audio route changes

This commit is contained in:
Benjamin Reis 2017-06-22 10:29:55 +02:00
parent e8368aa71a
commit a0d959dd3a

View file

@ -42,13 +42,7 @@ INIT_WITH_COMMON_CF {
#pragma mark - UIToggleButtonDelegate Functions
- (void)audioRouteChangeListenerCallback:(NSNotification *)notif {
#pragma deploymate push "ignored-api-availability"
if (UIDevice.currentDevice.systemVersion.doubleValue < 7 ||
[[notif.userInfo valueForKey:AVAudioSessionRouteChangeReasonKey] integerValue] ==
AVAudioSessionRouteChangeReasonRouteConfigurationChange) {
[self update];
}
#pragma deploymate pop
[self update];
}
- (void)onOn {