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:
@@ -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 ++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user