Implement onSuspend.