summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-06-18 22:09:29 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-06-18 22:09:29 +0000
commit559ec9f12f5302dc4d794454fb4ca7c5785f6550 (patch)
tree3915a53ca34d1b8c141110119a742ab0dc3ede71
parent8916483918c20cfe800501c953680e2bce736ab3 (diff)
parent4a22adba986be3b76b7607f320906729a511b6b4 (diff)
Merge "Fix wrong orientation change when a video call ends"
-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(