react-native/Libraries/Utilities
Adam Comella 186f308aec BREAKING: Android: Correct value of Dimensions.get('screen').fontScale
Summary:
The PR description has been updated to reflect the new approach.

**Breaking Change Summary**

On Android, the following properties now return a different number:
  - `Dimensions.get('window').fontScale`
  - `Dimensions.get('screen').fontScale`
  - `PixelRatio.getFontScale()`

This is a breaking change to anyone who was using these properties because the meaning of these properties has now changed.

These properties used to return a value representing font scale times density ([`DisplayMetrics.scaledDensity`](https://developer.android.com/reference/android/util/DisplayMetrics.html#scaledDensity)). Now they return a value representing just font scale ([`Configuration.fontScale`](https://developer.android.com/reference/android/content/res/Configuration.html#fontScale)).

**PR Description**

This PR changes a few things:
  - Correctly exposes the font scale to JavaScript as `Dimensions.get('screen').fontScale`. UIManager was exporting `DisplayMetrics.scaledDensity` under the name `fontScale`. How
Closes https://github.com/facebook/react-native/pull/11008

Differential Revision: D4558207

Pulled By: astreet

fbshipit-source-id: 096ce7b28051325dfd45fdb2a14b5e9b7d3bc46f
2017-02-14 08:45:38 -08:00
..
__mocks__ Reorganize core JS files 2016-10-11 10:14:28 -07:00
__tests__ Reorganize core JS files 2016-10-11 10:14:28 -07:00
differ Auto-fix lint errors 2016-08-09 06:43:46 -07:00
BackAndroid.android.js FIX: Call all android back key handlers before invoking default 2016-11-11 00:28:40 -08:00
BackAndroid.ios.js fixed polyfill for BackAndroid 2016-08-30 10:58:45 -07:00
Dimensions.js BREAKING: Android: Correct value of Dimensions.get('screen').fontScale 2017-02-14 08:45:38 -08:00
HMRClient.js Auto-fix lint errors 2016-08-09 06:43:46 -07:00
HMRLoadingView.android.js Show a Toast for HMR 2016-02-27 15:58:35 -08:00
HMRLoadingView.ios.js Show a Toast for HMR 2016-02-27 15:58:35 -08:00
HeapCapture.js upload JSC heap capture to bundle server 2016-08-02 08:13:57 -07:00
MatrixMath.js fix skew transformation 2017-01-19 11:28:36 -08:00
PerformanceLogger.js Remove additional JSON encoding for native->JS communication 2016-09-19 04:44:12 -07:00
PixelRatio.js PixelRatio.pixel() 2016-01-15 05:15:31 -08:00
Platform.android.js Add default option for Platform.select 2017-02-07 04:30:16 -08:00
Platform.ios.js Add default option for Platform.select 2017-02-07 04:30:16 -08:00
RCTLog.js Stop throwing yellew boxes when we warn from native 2016-12-27 10:43:33 -08:00
binaryToBase64.js XHR: support typed arrays for request payloads 2017-01-20 18:43:27 -08:00
buildStyleInterpolator.js Do not call `toString` on functions in buildStyleInterpolator 2016-12-07 11:58:28 -08:00
clamp.js RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
createStrictShapeTypeChecker.js Patch up for future React Sync 2017-02-08 14:50:43 -08:00
deepFreezeAndThrowOnMutationInDev.js Android: fix JSC crash in dev 2017-01-11 08:58:30 -08:00
defineLazyObjectProperty.js Break infinite loop that happens only in debug environments 2017-01-17 16:58:46 -08:00
deprecatedPropType.js Patch up for future React Sync 2017-02-08 14:50:43 -08:00
dismissKeyboard.js [ReactNative] Sync [react_native] Fix keyboard behavior for android 2015-08-14 02:58:37 -08:00
groupByEveryN.js
infoLog.js Move infoLog to OSS 2016-05-17 12:43:40 -07:00
logError.js
mapWithSeparator.js Optimize and flowify mapWithSeparator 2016-05-26 12:28:55 -07:00
mergeFast.js Fix typo 2015-08-06 20:22:24 -08:00
mergeIntoFast.js Bugfix - Typos 2015-12-15 09:09:32 -08:00
stringifySafe.js [ReactNative] improve console logging a little bit 2015-05-04 18:57:03 -08:00
throwOnWrongReactAPI.js Show better error message when accessing React APIs on React Native 2016-06-14 06:28:26 -07:00
truncate.js Auto-fix lint errors 2016-08-09 06:43:46 -07:00
utf8.js Add support for missing XHR response types 2016-04-11 05:54:28 -07:00