Move network actiivty indicator code to main thread.