Remove deprecated APIs and modules

Summary:
We've deprecated these APIs for quite a few releases and we should be able to get rid of them now.

Remove following deprecated modules/components
 - AppStateIOS
 - ActivityIndicatorIOS
 - IntentAndroid
 - SliderIOS
 - SwitchAndroid
 - SwitchIOS
 - LinkingIOS

Update following modules to remove callback support
 - Clipboard
 - NetInfo

cc bestander
Closes https://github.com/facebook/react-native/pull/9891

Reviewed By: bestander

Differential Revision: D3974094

Pulled By: javache

fbshipit-source-id: 9abe32716bd85d0cea9933894f4447d53bdd5ee7
This commit is contained in:
Satyajit Sahoo
2016-10-11 07:35:49 -07:00
committed by Facebook Github Bot
parent 9ed9bca0bf
commit fa5ad85252
19 changed files with 18 additions and 822 deletions

View File

@@ -16,7 +16,6 @@ const NativeEventEmitter = require('NativeEventEmitter');
const NativeModules = require('NativeModules');
const Platform = require('Platform');
const RCTNetInfo = NativeModules.NetInfo;
const deprecatedCallback = require('deprecatedCallback');
const NetInfoEventEmitter = new NativeEventEmitter(RCTNetInfo);
@@ -257,12 +256,9 @@ const NetInfo = {
},
},
isConnectionExpensive(): Promise<any> {
return deprecatedCallback(
Platform.OS === 'android' ? RCTNetInfo.isConnectionMetered() : Promise.reject(new Error('Currently not supported on iOS')),
Array.prototype.slice.call(arguments),
'single-callback-value-first',
'NetInfo.isConnectionMetered(callback) is deprecated. Use the returned Promise instead.'
isConnectionExpensive(): Promise<boolean> {
return (
Platform.OS === 'android' ? RCTNetInfo.isConnectionMetered() : Promise.reject(new Error('Currently not supported on iOS'))
);
},
};