mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: The change in https://github.com/facebook/react-native/commit/8e603940e3fca4ed2fe420c02a66d860b53f3076 actually causes a super bad bug when `context.getResources().getDisplayMetrics()` is accessed in other parts of the application. It turns out that when you dive into the impl of `getRealMetrics`, it mutates whatever `DisplayMetrics` object is passed to it. In this case, `getDisplayMetrics` ends up mutating the `DisplayMetrics` object that sits on the application context's `Resources` instance. This PR makes that not so. /cc jesseruder ide jaysoo bestander astreet Closes https://github.com/facebook/react-native/pull/5764 Reviewed By: svcscm Differential Revision: D2902386 Pulled By: androidtrunkagent fb-gh-sync-id: 3f24b68bc7e6b4ca83808c03ef3637e1ac9a673e