Modify exit dialog box and move phonestatelistener setup out of onCreate.