From 7763b2ba8c5e6be30b7b3ffff0a71e3cd23c102d Mon Sep 17 00:00:00 2001 From: Thomas BOY Date: Mon, 9 Feb 2015 10:00:11 +0100 Subject: [PATCH] Reecriture pour avoir getRotation via windowManager --- .../src/org/geneanet/customcamera/CameraActivity.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java b/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java index 798f75f..e91896e 100644 --- a/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java +++ b/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java @@ -881,8 +881,7 @@ public class CameraActivity extends Activity { * @return the code of the rotation (0, 1, 2, 3) */ protected int getCustomRotation() { - WindowManager windowManager = (WindowManager) getSystemService(WINDOW_SERVICE); - int code = windowManager.getDefaultDisplay().getRotation(); + int code = this.getWindowManager().getDefaultDisplay().getRotation(); if (getDeviceDefaultOrientation() == 2) { code ++; }