If you have enabled Developer Options on your device, there is an option Do not keep activities that will help test onRestoreInstanceState().

If you have enabled Developer Options on your device, there is an option Do not keep activities that will help test onRestoreInstanceState().
