Fix "device won't rotate after calls" issue.

This commit is contained in:
Matthew Chen 2019-01-10 11:23:18 -05:00
parent 34833b8cb8
commit ec16860e48
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
@ -1615,6 +1615,10 @@ private class SignalCallData: NSObject {
self.callUIAdapter.didTerminateCall(currentCallData?.call)
fireDidUpdateVideoTracks()
// Apparently WebRTC will sometimes disable device orientation notifications.
// After every call ends, we need to ensure they are enabled.
UIDevice.current.beginGeneratingDeviceOrientationNotifications()
}
// MARK: - CallObserver