9
0
mirror of https://gitee.com/shuto/customCamera.git synced 2026-05-02 00:07:24 +08:00

Reecriture pour avoir getRotation via windowManager

This commit is contained in:
Thomas BOY
2015-02-09 10:00:11 +01:00
parent f219e2d291
commit 7763b2ba8c
@@ -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 ++;
}