onRestoreInstanceState() is called only when recreating activity after it was killed by the OS. Such situation happen when:
- orientation of the device changes (your activity is destroyed and recreated)
- there is another activity in front of yours and at some point the OS kills your activity in order to free memory (for example). Next time when you start your activity
onRestoreInstanceState()will be called.