finish() is causing a non-fatal error "Activity '...' has leaked a window '...' that was added here". I didn't think this should be a problem but we should fix this and just call 'dialog.dismiss()." It looks like you just merged the code anyway so I guess we'll fix it next time.