Steps to reproduce:
- Go to the Android device's main "Settings" screen.
- Tap on "System" under "Settings.
- Tap on "Developer options" under "System" settings.
- Enable "Don't keep activities", which should be near the bottom of the list.
- Build and run the below code on the above Android device.
- Edit the "app.js" file and save your changes.
- Notice that the app does not restart. The below log message does not get logged agin.
The TiApplication.softRestart() method attempts to fetch the root activity first before doing the restart. The fetched root activity will be null in this case, because the "Don't keep activities" option will destroy when showing a child activity. This is the edge case that is not handled.
Disable the "Don't keep activities" option.