diff options
author | Tyler Gunn <tgunn@google.com> | 2015-04-13 16:24:21 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2015-04-13 23:36:37 +0000 |
commit | 9e0d3a386a48d5f32dacb45bab96f0ea5752be36 (patch) | |
tree | 47064c7edff5c7a13dd163434555731a92955023 /InCallUI/src/com/android/incallui/InCallActivity.java | |
parent | b41550c23c84adefd90ecb2c667dc5832739ef1c (diff) |
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
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallActivity.java | 15 |
1 files changed, 5 insertions, 10 deletions
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); |