summaryrefslogtreecommitdiffstats
path: root/src/com/android/incallui/InCallPresenter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/incallui/InCallPresenter.java')
-rw-r--r--src/com/android/incallui/InCallPresenter.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/incallui/InCallPresenter.java b/src/com/android/incallui/InCallPresenter.java
index 655e79a9..7d96025c 100644
--- a/src/com/android/incallui/InCallPresenter.java
+++ b/src/com/android/incallui/InCallPresenter.java
@@ -1189,6 +1189,11 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
* and landscape. {@Code False} if the in-call UI should be locked in portrait.
*/
public void setInCallAllowsOrientationChange(boolean allowOrientationChange) {
+ if (mInCallActivity == null) {
+ Log.e(this, "InCallActivity is null. Can't set requested orientation.");
+ return;
+ }
+
if (!allowOrientationChange) {
mInCallActivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);
} else {