mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 18:38:27 +03:00
stub out autofill framework service
This commit is contained in:
parent
75e85541a6
commit
74a40b2274
6 changed files with 44 additions and 4 deletions
|
@ -17,7 +17,7 @@
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||||
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
|
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
|
||||||
<TargetFrameworkVersion>v7.1</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||||
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
|
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
|
||||||
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
|
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
|
||||||
<AndroidStoreUncompressedFileExtensions />
|
<AndroidStoreUncompressedFileExtensions />
|
||||||
|
@ -287,6 +287,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AutofillActivity.cs" />
|
<Compile Include="AutofillActivity.cs" />
|
||||||
<Compile Include="AutofillCredentials.cs" />
|
<Compile Include="AutofillCredentials.cs" />
|
||||||
|
<Compile Include="AutofillFrameworkService.cs" />
|
||||||
<Compile Include="Controls\CustomLabelRenderer.cs" />
|
<Compile Include="Controls\CustomLabelRenderer.cs" />
|
||||||
<Compile Include="Controls\CustomSearchBarRenderer.cs" />
|
<Compile Include="Controls\CustomSearchBarRenderer.cs" />
|
||||||
<Compile Include="Controls\CustomButtonRenderer.cs" />
|
<Compile Include="Controls\CustomButtonRenderer.cs" />
|
||||||
|
@ -1062,6 +1063,9 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AndroidResource Include="Resources\drawable\apple.png" />
|
<AndroidResource Include="Resources\drawable\apple.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AndroidResource Include="Resources\xml\autofillservice.xml" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||||
<Import Project="..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
|
<Import Project="..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
|
30
src/Android/AutofillFrameworkService.cs
Normal file
30
src/Android/AutofillFrameworkService.cs
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
using Android;
|
||||||
|
using Android.App;
|
||||||
|
using Android.OS;
|
||||||
|
using Android.Runtime;
|
||||||
|
using Android.Service.Autofill;
|
||||||
|
using Android.Util;
|
||||||
|
|
||||||
|
namespace Bit.Android
|
||||||
|
{
|
||||||
|
[Service(Permission = Manifest.Permission.BindAutofillService, Label = "bitwarden")]
|
||||||
|
[IntentFilter(new string[] { "android.service.autofill.AutofillService" })]
|
||||||
|
[MetaData("android.autofill", Resource = "@xml/autofillservice")]
|
||||||
|
[Register("com.x8bit.bitwarden.AutofillFrameworkService")]
|
||||||
|
public class AutofillFrameworkService : global::Android.Service.Autofill.AutofillService
|
||||||
|
{
|
||||||
|
public override void OnFillRequest(FillRequest request, CancellationSignal cancellationSignal, FillCallback callback)
|
||||||
|
{
|
||||||
|
var structure = request.FillContexts[request.FillContexts.Count - 1].Structure;
|
||||||
|
var data = request.ClientState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnSaveRequest(SaveRequest request, SaveCallback callback)
|
||||||
|
{
|
||||||
|
var context = request.FillContexts;
|
||||||
|
var structure = context[context.Count - 1].Structure;
|
||||||
|
var data = request.ClientState;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.x8bit.bitwarden" android:versionName="1.12.2" android:installLocation="auto" android:versionCode="502" xmlns:tools="http://schemas.android.com/tools">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.x8bit.bitwarden" android:versionName="1.12.2" android:installLocation="auto" android:versionCode="502" xmlns:tools="http://schemas.android.com/tools">
|
||||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" />
|
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="26" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.NFC" />
|
<uses-permission android:name="android.permission.NFC" />
|
||||||
|
|
5
src/Android/Resources/Resource.Designer.cs
generated
5
src/Android/Resources/Resource.Designer.cs
generated
|
@ -5397,7 +5397,10 @@ namespace Bit.Android
|
||||||
public const int accessibilityservice = 2131099648;
|
public const int accessibilityservice = 2131099648;
|
||||||
|
|
||||||
// aapt resource value: 0x7f060001
|
// aapt resource value: 0x7f060001
|
||||||
public const int filepaths = 2131099649;
|
public const int autofillservice = 2131099649;
|
||||||
|
|
||||||
|
// aapt resource value: 0x7f060002
|
||||||
|
public const int filepaths = 2131099650;
|
||||||
|
|
||||||
static Xml()
|
static Xml()
|
||||||
{
|
{
|
||||||
|
|
3
src/Android/Resources/xml/autofillservice.xml
Normal file
3
src/Android/Resources/xml/autofillservice.xml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<autofill-service
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android" />
|
|
@ -16,7 +16,7 @@
|
||||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||||
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
|
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
|
||||||
<TargetFrameworkVersion>v7.1</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
|
Loading…
Reference in a new issue