Exit the activity if there is no pages left to pop.

Change-Id: Iaa5d30c986096ce7f844e63816260edb67efbb68