1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-21 10:43:22 +00:00

formatting updates

This commit is contained in:
Kyle Spearrin
2017-10-02 22:38:10 -04:00
parent d651606800
commit a43a3db098
13 changed files with 64 additions and 191 deletions

View File

@@ -1,9 +1,7 @@
using Bit.App.Abstractions;
using Microsoft.Toolkit.Uwp.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Graphics.Display;
using Windows.Devices.SmartCards;
@@ -13,18 +11,20 @@ namespace Bit.UWP.Services
{
public class DeviceInfoService : IDeviceInfoService
{
private const string SmartCardEmulatorType = "Windows.Devices.SmartCards.SmartCardEmulator";
public string Model => SystemInformation.DeviceModel;
public int Version => SystemInformation.OperatingSystemVersion.Build;
public float Scale => (float)DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
public bool NfcEnabled
{
get
{
if (!Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Devices.SmartCards.SmartCardEmulator"))
if(!Windows.Foundation.Metadata.ApiInformation.IsTypePresent(SmartCardEmulatorType))
{
return false;
}
return Task.Run(async () => await SmartCardEmulator.GetDefaultAsync()).Result != null;
}
@@ -34,8 +34,8 @@ namespace Bit.UWP.Services
{
get
{
var cameraList = Task.Run(async () => await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture)).Result;
var cameraList = Task.Run(async () =>
await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture)).Result;
return cameraList?.Any() ?? false;
}
}