wifi and mobile wait for the connection to be established/available, but this is not currently doing that. setSetting waits until the setting is successfully changed.