ExpansionDownloader.Service.DownloaderService.PollNetworkState C# (CSharp) Method

PollNetworkState() private method

Polls the network state, setting the flags appropriately.
private PollNetworkState ( ) : void
return void
        private void PollNetworkState()
        {
            if (this.connectivityManager == null)
            {
                this.connectivityManager = this.GetSystemService(ConnectivityService).JavaCast<ConnectivityManager>();
            }

            if (this.wifiManager == null)
            {
                this.wifiManager = this.GetSystemService(WifiService).JavaCast<WifiManager>();
            }

            if (this.connectivityManager == null)
            {
                Log.Debug(Tag,"LVLDL couldn't get connectivity manager to poll network state");
            }
            else
            {
                NetworkInfo activeInfo = this.connectivityManager.ActiveNetworkInfo;
                this.UpdateNetworkState(activeInfo);
            }
        }