react-native/Libraries
Jean-Richard Lai 2310494f32 Fix distanceFilter caching for LocationObserver
Summary:
Allow changing distanceFilter after _locationManager has been initialized.

There is 2 reasons for this PR:
- When calling `getCurrentPosition`, `_observerOptions` is possibly not set properly ( as it is set only in `startObserving`), in this case it would have default values so `distanceFilter` will be 0 in this case ( which can be the right value but we should be more explicit about it, `kCLDistanceFilterNone` or `RCT_DEFAULT_LOCATION_ACCURACY`):
<img width="961" alt="screen shot 2016-04-14 at 8 44 09 pm" src="https://cloud.githubusercontent.com/assets/159813/14551465/6aa8791a-0288-11e6-9c98-1687357f8c2a.png">
- Another issue is that `distanceFilter` is cached so it can't be changed afterwards:

```javascript
let options;
options = {
  enableHighAccuracy: true,
  distanceFilter: 20,
};

this.watchId = this.geolocation.watchPosition(
  () => { },
  () => { },
  options,
);

// => sets distanceFilter to 20

this.geolocation.clearWatch(this.watchId);

options = {
  enableHighAccuracy:
Closes https://github.com/facebook/react-native/pull/6987

Differential Revision: D3258956

fb-gh-sync-id: 00a1d1b29d732a54cdc30e20a7a9a2de3dd9b725
fbshipit-source-id: 00a1d1b29d732a54cdc30e20a7a9a2de3dd9b725
2016-05-04 10:35:30 -07:00
..
ART Check if either array is null before diffing 2016-04-25 13:28:31 -07:00
ActionSheetIOS CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
AdSupport Text highlighting on iOS 2015-07-24 08:41:58 -08:00
Animated Fix setValue to work properly on natively driven nodes 2016-05-04 02:48:22 -07:00
AppRegistry Fix some warnings. 2016-04-20 20:45:22 -07:00
AppState Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
AppStateIOS Updating AppState to support the inactive state. 2016-03-10 08:30:24 -08:00
BatchedBridge Capture heap from the dev menu 2016-04-29 07:35:22 -07:00
BugReporting refactor BugReporting to use RCTDeviceEventEmitter 2016-04-22 11:24:40 -07:00
CameraRoll Corrected bug that put the UTI instead of mimeType in retrieved assets 2016-05-03 08:53:34 -07:00
Components Enable setting color of text and images on unselected tabs 2016-05-03 05:40:29 -07:00
CustomComponents Reduce extra rendering in NavigationCard 2016-05-03 13:31:18 -07:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Device Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Devtools Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Experimental Refactor connection/list stuff 2016-04-30 10:28:55 -07:00
Fetch Reject promise if network request failed 2016-03-08 16:37:24 -08:00
Geolocation Fix distanceFilter caching for LocationObserver 2016-05-04 10:35:30 -07:00
Image Update Jest APIs on fbsource 2016-04-27 19:16:32 -07:00
Inspector Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Interaction Fix JSWatchdog reset 2016-05-03 19:20:26 -07:00
JavaScriptAppEngine Fixed path to regenerator-runtime 2016-05-04 05:19:31 -07:00
LayoutAnimation Add support for delete animation in LayoutAnimation on iOS 2016-04-25 00:19:25 -07:00
Linking Mention native code in `Linking` docs 2016-04-20 19:23:19 -07:00
LinkingIOS Added explicit init to observer modules 2016-05-04 07:07:24 -07:00
Modal Modal Animation Types 2016-04-28 16:00:32 -07:00
NativeApp Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
NavigationExperimental Update Jest APIs on fbsource 2016-04-27 19:16:32 -07:00
Network Remove all null values for request headers 2016-05-03 23:42:26 -07:00
PullToRefresh Fix red screen due to ref being undefined in PullRefreshViewAndroid 2016-04-19 06:58:22 -07:00
PushNotificationIOS Added explicit init to observer modules 2016-05-04 07:07:24 -07:00
QuickPerformanceLogger added QPL for main interactions 2015-09-29 22:25:23 -07:00
RCTTest CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
RKBackendNode Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
ReactIOS Fix or suppress errors in react-native 2016-04-21 19:47:24 -07:00
ReactNative Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Sample Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Settings Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Storage Update AsyncStorage.js 2016-04-10 18:02:20 -07:00
StyleSheet Deprecate transformMatrix and decomposedMatrix 2016-04-29 14:19:25 -07:00
Text Removed placeholder image logic 2016-04-25 03:31:19 -07:00
Utilities Let JS modules use strings instead of ids on Android 2016-05-04 10:29:26 -07:00
Vibration Add support for vibration patterns 2016-03-29 21:45:20 -07:00
WebSocket Update Jest APIs on fbsource 2016-04-27 19:16:32 -07:00
react-native Fix react-native.js.flow 2016-04-22 18:02:28 -07:00
vendor Remove ImmediateImplementation, always use globals 2016-04-28 07:06:20 -07:00
Promise.js Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00