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:
@@ -116,7 +116,7 @@ public class RotationUtils {
|
|||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Unknown rotation: " + rot);
|
throw new IllegalArgumentException("Unknown rotation: " + rot);
|
||||||
}
|
}
|
||||||
Configuration c = context.getResources().getConfiguration();
|
Configuration c = new Configuration(context.getResources().getConfiguration());
|
||||||
c.orientation = orientation;
|
c.orientation = orientation;
|
||||||
Context rotated = context.createConfigurationContext(c);
|
Context rotated = context.createConfigurationContext(c);
|
||||||
return rotated.getResources();
|
return rotated.getResources();
|
||||||
|
|||||||
Reference in New Issue
Block a user