Fix a bug about not firing user cancel event

Fix onActivityResult to handle result correctly.