Fix issues founded on last merge request.
Add test cases.
Remove AlertDialog onDismissListener which provides only above API level
17.
Revise test case.