react-native/local-cli
Satyajit Sahoo 6c11d18360 Prevent destroying activity on runtime changes
Summary: From http://developer.android.com/guide/topics/resources/runtime-changes.html

> Some device configurations can change during runtime (such as screen orientation, keyboard availability, and language). When such a change occurs, Android restarts the running Activity (onDestroy() is called, followed by onCreate()). The restart behavior is designed to help your application adapt to new configurations by automatically reloading your application with alternative resources that match the new device configuration.

However, in a React Native app, there is only a single activity for the entire app, unlike a single activity per screen in Android, and resources are not specific to orientation etc. Destroying activity means reloading the entire app. Most of the time, this is not the intended behaviour, and can cause data loss for the user if the developer doesn't disable it explicitly. I'm proposing to disable it by default.
Closes https://github.com/facebook/react-native/pull/3813

Reviewed By: svcscm

Differential Revision: D2616083

Pulled By: foghina

fb-gh-sync-id: 8794e436f61581ff0bf569b1b112845cae77b688
2015-11-04 10:47:30 -08:00
..
__mocks__ Fix more tests 2015-09-16 13:05:30 -07:00
__tests__ Generate bundle and assets when building via Xcode 2015-10-21 18:44:27 -07:00
bundle Add option to indicate bundle encoding 2015-10-28 13:20:28 -07:00
dependencies Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
generate Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
generator add upgrade cli command 2015-10-23 03:37:28 -07:00
generator-android Prevent destroying activity on runtime changes 2015-11-04 10:47:30 -08:00
generator-ios Make it clear Android emulator is the quickest way to get started 2015-11-03 04:05:27 -08:00
library Introduce react-native link 2015-10-27 11:22:28 -07:00
runAndroid More descriptive error message when Gradle build/install fails 2015-11-03 03:48:26 -08:00
server Support line number arguments for RubyMine 2015-11-04 07:56:27 -08:00
upgrade Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
util Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
cli.js Introduce react-native link 2015-10-27 11:22:28 -07:00
default.config.js Use default asset roots on `default.config.js` 2015-10-23 18:49:25 -07:00
generate-android.js Add license headers to local-cli 2015-10-20 09:55:21 -07:00
generator-utils.js Add license headers to local-cli 2015-10-20 09:55:21 -07:00
setup_env.bat Fix comments on .bat file 2015-10-28 21:36:07 -04:00
setup_env.sh Start packager through cli 2015-10-21 03:03:59 -07:00
wrong-react-native.js Bring back global cli module check 2015-10-26 15:36:29 -07:00