Back button works during multiplayer game

If you tap the back button it asks if you want to leave the game. If
you tap yes then you switch to MainActivity. If you tap no or outside
of the dialog then you continue to play the game.