2017-11-30 00:28:58 +03:00
|
|
|
|
using System;
|
|
|
|
|
using Bit.App.Abstractions;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Bit.App.Models.Page;
|
2017-12-23 08:10:48 +03:00
|
|
|
|
using Xamarin.Forms;
|
2017-11-30 00:28:58 +03:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-02 20:37:46 +03:00
|
|
|
|
public Task<string> DisplayAlertAsync(string title, string message, string cancel, params string[] buttons)
|
|
|
|
|
{
|
|
|
|
|
return Task.FromResult<string>(null);
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-12 20:18:21 +03:00
|
|
|
|
public Task<string> DisplayPromptAync(string title = null, string description = null, string text = null)
|
|
|
|
|
{
|
2018-03-12 22:42:53 +03:00
|
|
|
|
return Task.FromResult<string>(null);
|
2018-03-12 20:18:21 +03:00
|
|
|
|
}
|
|
|
|
|
|
2018-03-22 18:07:41 +03:00
|
|
|
|
public Task HideLoadingAsync()
|
2017-11-30 00:28:58 +03:00
|
|
|
|
{
|
2018-03-22 18:07:41 +03:00
|
|
|
|
return Task.FromResult(0);
|
2017-11-30 00:28:58 +03:00
|
|
|
|
}
|
|
|
|
|
|
2017-12-23 08:10:48 +03:00
|
|
|
|
public Task LaunchAppAsync(string appName, Page page)
|
|
|
|
|
{
|
|
|
|
|
return Task.FromResult(0);
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-30 00:28:58 +03:00
|
|
|
|
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);
|
|
|
|
|
}
|
2017-12-22 23:05:09 +03:00
|
|
|
|
|
2018-03-22 18:07:41 +03:00
|
|
|
|
public Task ShowLoadingAsync(string text)
|
2017-12-23 08:10:48 +03:00
|
|
|
|
{
|
2018-03-22 18:07:41 +03:00
|
|
|
|
return Task.FromResult(0);
|
2017-12-23 08:10:48 +03:00
|
|
|
|
}
|
|
|
|
|
|
2017-12-22 23:05:09 +03:00
|
|
|
|
public void Toast(string text, bool longDuration = false)
|
|
|
|
|
{
|
|
|
|
|
// do nothing
|
|
|
|
|
}
|
2017-11-30 00:28:58 +03:00
|
|
|
|
}
|
|
|
|
|
}
|