How to setup android app to sync only when running in foreground

I didn’t notice before. I see the “Exit” menu now (instead of the “Restart”). Thank you.