Added checking whether mActivity is null.

mActivity is cleared after `onStop` is invoked. Because
`resolveConnectResult` can be invoked after `onStop`, it
may arouse null pointer exception.