Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fe8deac authored by chrmhoffmann's avatar chrmhoffmann
Browse files

In jellybean the initial patch for "abnormal hardware orientation" does not...

In jellybean the initial patch for "abnormal hardware orientation" does not work anymore as it is not used in setRotation.

Change-Id: I40d34c000d14a040535993a6c911034ab16bddae
parent 00cd27f6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ class ScreenRotationAnimation {
    BlackFrame mEnteringBlackFrame;
    int mWidth, mHeight;

    int mSnapshotRotation;
    int mOriginalRotation;
    int mOriginalWidth, mOriginalHeight;
    int mCurRotation;
@@ -188,7 +189,6 @@ class ScreenRotationAnimation {
    public ScreenRotationAnimation(Context context, SurfaceSession session,
            boolean inTransaction, int originalWidth, int originalHeight, int originalRotation) {
        mContext = context;
        int mSnapshotRotation;
        // Allow for abnormal hardware orientation
        mSnapshotRotation = (4 - android.os.SystemProperties.getInt("ro.sf.hwrotation",0) / 90) % 4;
        if (mSnapshotRotation == Surface.ROTATION_0 || mSnapshotRotation == Surface.ROTATION_180) {
@@ -314,7 +314,7 @@ class ScreenRotationAnimation {
        // Compute the transformation matrix that must be applied
        // to the snapshot to make it stay in the same original position
        // with the current screen rotation.
        int delta = deltaRotation(rotation, Surface.ROTATION_0);
        int delta = deltaRotation(rotation, mSnapshotRotation);
        createRotationMatrix(delta, mWidth, mHeight, mSnapshotInitialMatrix);

        if (DEBUG_STATE) Slog.v(TAG, "**** ROTATION: " + delta);