mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
noop device action service for ios
This commit is contained in:
parent
6985ccf076
commit
d39609351a
3 changed files with 77 additions and 0 deletions
75
src/iOS.Core/Services/NoopDeviceActionService.cs
Normal file
75
src/iOS.Core/Services/NoopDeviceActionService.cs
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
using System;
|
||||||
|
using Bit.App.Abstractions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Bit.App.Models.Page;
|
||||||
|
|
||||||
|
namespace Bit.iOS.Core.Services
|
||||||
|
{
|
||||||
|
public class NoopDeviceActionService : IDeviceActionService
|
||||||
|
{
|
||||||
|
public void Autofill(VaultListPageModel.Cipher cipher)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Background()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanOpenFile(string fileName)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClearCache()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CloseAutofill()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CopyToClipboard(string text)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DismissKeyboard()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LaunchApp(string appName)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OpenAccessibilitySettings()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OpenAutofillSettings()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool OpenFile(byte[] fileData, string id, string fileName)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RateApp()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task SelectFileAsync()
|
||||||
|
{
|
||||||
|
return Task.FromResult(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -86,6 +86,7 @@
|
||||||
<Compile Include="Controllers\ExtendedUIViewController.cs" />
|
<Compile Include="Controllers\ExtendedUIViewController.cs" />
|
||||||
<Compile Include="HockeyAppCrashManagerDelegate.cs" />
|
<Compile Include="HockeyAppCrashManagerDelegate.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Services\NoopDeviceActionService.cs" />
|
||||||
<Compile Include="Services\DeviceInfoService.cs" />
|
<Compile Include="Services\DeviceInfoService.cs" />
|
||||||
<Compile Include="Services\KeyChainStorageService.cs" />
|
<Compile Include="Services\KeyChainStorageService.cs" />
|
||||||
<Compile Include="Services\CommonCryptoKeyDerivationService.cs" />
|
<Compile Include="Services\CommonCryptoKeyDerivationService.cs" />
|
||||||
|
|
|
@ -290,6 +290,7 @@ namespace Bit.iOS.Extension
|
||||||
container.RegisterSingleton<ITokenService, TokenService>();
|
container.RegisterSingleton<ITokenService, TokenService>();
|
||||||
container.RegisterSingleton<ISettingsService, SettingsService>();
|
container.RegisterSingleton<ISettingsService, SettingsService>();
|
||||||
container.RegisterSingleton<IDeviceInfoService, DeviceInfoService>();
|
container.RegisterSingleton<IDeviceInfoService, DeviceInfoService>();
|
||||||
|
container.RegisterSingleton<IDeviceActionService, NoopDeviceActionService>();
|
||||||
container.RegisterSingleton<IAppSettingsService, AppSettingsService>();
|
container.RegisterSingleton<IAppSettingsService, AppSettingsService>();
|
||||||
|
|
||||||
// Repositories
|
// Repositories
|
||||||
|
|
Loading…
Reference in a new issue