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

This commit is contained in:
TreeHugger Robot
2021-05-26 21:51:51 +00:00
committed by Android (Google) Code Review

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