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

Commit 8213c706 authored by Evan Laird's avatar Evan Laird
Browse files

Copy configuration when getting resources for a rotation

Avoids changing the orientation field on the current configuration.

Fixes: 189338162
Test: manual; kill sysui in portrait mode and make sure the context
returns `portrat` instead of `landscape`

Change-Id: I971daa9d332fb399b7801805af467fbf775cdb55
parent dff37ee6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ public class RotationUtils {
            default:
                throw new IllegalArgumentException("Unknown rotation: " + rot);
        }
        Configuration c = context.getResources().getConfiguration();
        Configuration c = new Configuration(context.getResources().getConfiguration());
        c.orientation = orientation;
        Context rotated = context.createConfigurationContext(c);
        return rotated.getResources();