From ec16860e48b63205de1f19ab82a4076da062e24d Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 10 Jan 2019 11:23:18 -0500 Subject: [PATCH] Fix "device won't rotate after calls" issue. --- Signal/src/call/CallService.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Signal/src/call/CallService.swift b/Signal/src/call/CallService.swift index 1d54f7274..76fc275ac 100644 --- a/Signal/src/call/CallService.swift +++ b/Signal/src/call/CallService.swift @@ -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