private async Task UpdateInfoAsync() { try { await _updateSemaphore.WaitAsync(); InfoCollection.Clear(); string nl = Environment.NewLine; var cred = DevicePortalUtil.GetCredential(); if (cred != null) { var ring = await DevicePortalUtil.GetFlightRingAsync(cred.UserName, cred.Password); if (ring != null) { CurrentFlightRing = ring; } var telemetryLevelOutput = await DevicePortalUtil.GetTelemetryLevelAsync(cred.UserName, cred.Password); if (telemetryLevelOutput != DevicePortalUtil.InvalidTelemetryValue) { InfoCollection.Add(new InfoDisplayData(Common.GetLocalizedText("TelemetryLevelText") + ": ", DevicePortalUtil.TelemetryLevelToFriendlyName(telemetryLevelOutput))); } } else { App.LogService.Write("Credential is null", Windows.Foundation.Diagnostics.LoggingLevel.Warning); } } finally { _updateSemaphore.Release(); } }