Close Activity Dialog

Each key creation by default takes 2 minutes on nexus 4. If the user accidentally presses back button. Key generated is lost and user has to go through entire process again.

P.S: I do not know why it is giving me merge conflicts.