summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/com/android/incallui/VideoCallPresenter.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/com/android/incallui/VideoCallPresenter.java b/java/com/android/incallui/VideoCallPresenter.java
index 88713f48d..5bdcd7a73 100644
--- a/java/com/android/incallui/VideoCallPresenter.java
+++ b/java/com/android/incallui/VideoCallPresenter.java
@@ -691,8 +691,12 @@ public class VideoCallPresenter
}
private void checkForOrientationAllowedChange(@Nullable DialerCall call) {
- InCallPresenter.getInstance()
- .setInCallAllowsOrientationChange(isVideoCall(call) || isVideoUpgrade(call));
+ // Call could be null when video call ended. This check could prevent unwanted orientation
+ // change before incall UI gets destroyed.
+ if (call != null) {
+ InCallPresenter.getInstance()
+ .setInCallAllowsOrientationChange(isVideoCall(call) || isVideoUpgrade(call));
+ }
}
private void updateFullscreenAndGreenScreenMode(