Added checking whether mActivity is null.

mActivity is setted after `onStop` is invoked. It may arouse null
pointer exception during `resolveConnectResult`.