From 9e0d3a386a48d5f32dacb45bab96f0ea5752be36 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Mon, 13 Apr 2015 16:24:21 -0700 Subject: Fix orientation of preview surface when device rotated. - Cleaned up some unused methods in InCallActivity. - In onDeviceOrientationChanged, handle orientatoin change by resizing surface. - Fixed setPreviewSize which was not rotating the surface the appropriate way (ensured it was setting a transform on the surface, and also made sure that the correct dimensions were being passed in). Bug: 19850018 Change-Id: Ia9324ce6bad5a797839e69ba20244f2bcc44acb5 --- InCallUI/src/com/android/incallui/InCallActivity.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java') diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 873c288a4..601a5155d 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -448,16 +448,11 @@ public class InCallActivity extends Activity { return false; } - @Override - public void onConfigurationChanged(Configuration config) { - InCallPresenter.getInstance().getProximitySensor().onConfigurationChanged(config); - Log.d(this, "onConfigurationChanged "+config.orientation); - - doOrientationChanged(config.orientation); - super.onConfigurationChanged(config); - } - - + /** + * Handles changes in device orientation. + * + * @param orientation The new device orientation. + */ private void doOrientationChanged(int orientation) { Log.d(this, "doOrientationChanged prevOrientation=" + sCurrentOrientation + " newOrientation=" + orientation); -- cgit v1.2.3