diff --git a/java/com/android/incallui/AndroidManifest.xml b/java/com/android/incallui/AndroidManifest.xml index 45cf19983..1dcd17c93 100644 --- a/java/com/android/incallui/AndroidManifest.xml +++ b/java/com/android/incallui/AndroidManifest.xml @@ -64,7 +64,7 @@ android:launchMode="singleInstance" android:name="com.android.incallui.InCallActivity" android:resizeableActivity="true" - android:screenOrientation="nosensor" + android:screenOrientation="sensorLandscape" android:taskAffinity="com.android.incallui" android:theme="@style/Theme.InCallScreen" android:windowSoftInputMode="adjustResize"> diff --git a/java/com/android/incallui/InCallOrientationEventListener.java b/java/com/android/incallui/InCallOrientationEventListener.java index 854bdd193..5fe2f03ee 100644 --- a/java/com/android/incallui/InCallOrientationEventListener.java +++ b/java/com/android/incallui/InCallOrientationEventListener.java @@ -52,8 +52,12 @@ public class InCallOrientationEventListener extends OrientationEventListener { // We use SCREEN_ORIENTATION_USER so that reverse-portrait is not allowed. public static final int ACTIVITY_PREFERENCE_ALLOW_ROTATION = ActivityInfo.SCREEN_ORIENTATION_USER; + // Helpdesk patch: the office Pixel is a desk-mounted appliance locked to landscape (InCallActivity + // screenOrientation=sensorLandscape). "Disallow rotation" must therefore mean landscape, not the + // default portrait NOSENSOR — otherwise a video-call excursion would call setRequestedOrientation() + // here and permanently flip the in-call screen back to portrait. public static final int ACTIVITY_PREFERENCE_DISALLOW_ROTATION = - ActivityInfo.SCREEN_ORIENTATION_NOSENSOR; + ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE; /** * This is to identify dead zones where we won't notify others of orientation changed. Say for e.g