Auto save state before the emulator freezes when getting a call or the alarm rings.