Merge "Copy configuration when getting resources for a rotation" into sc-dev am: c074433e3b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14738935

Change-Id: I4228e4e41cc492b09cbc1bb9330392bc35adfdb0
This commit is contained in:
TreeHugger Robot
2021-05-26 21:58:41 +00:00
committed by Automerger Merge Worker

View File

@@ -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();