removed unused stuff

This commit is contained in:
Philipp Crocoll
2017-10-23 11:08:19 +02:00
parent bcd0b1e66e
commit 2d0bde844b
1553 changed files with 0 additions and 118027 deletions

View File

@@ -1,143 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7F059603-7041-4BBB-93A2-DAA7AB5CA528}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AncientIconSet</RootNamespace>
<AssemblyName>AncientIconSet</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidApplication>true</AndroidApplication>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v7.1</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\ic00.png" />
<AndroidResource Include="Resources\drawable\ic01.png" />
<AndroidResource Include="Resources\drawable\ic02.png" />
<AndroidResource Include="Resources\drawable\ic03.png" />
<AndroidResource Include="Resources\drawable\ic04.png" />
<AndroidResource Include="Resources\drawable\ic05.png" />
<AndroidResource Include="Resources\drawable\ic06.png" />
<AndroidResource Include="Resources\drawable\ic07.png" />
<AndroidResource Include="Resources\drawable\ic08.png" />
<AndroidResource Include="Resources\drawable\ic09.png" />
<AndroidResource Include="Resources\drawable\ic10.png" />
<AndroidResource Include="Resources\drawable\ic11.png" />
<AndroidResource Include="Resources\drawable\ic12.png" />
<AndroidResource Include="Resources\drawable\ic13.png" />
<AndroidResource Include="Resources\drawable\ic14.png" />
<AndroidResource Include="Resources\drawable\ic15.png" />
<AndroidResource Include="Resources\drawable\ic16.png" />
<AndroidResource Include="Resources\drawable\ic17.png" />
<AndroidResource Include="Resources\drawable\ic18.png" />
<AndroidResource Include="Resources\drawable\ic19.png" />
<AndroidResource Include="Resources\drawable\ic20.png" />
<AndroidResource Include="Resources\drawable\ic21.png" />
<AndroidResource Include="Resources\drawable\ic22.png" />
<AndroidResource Include="Resources\drawable\ic23.png" />
<AndroidResource Include="Resources\drawable\ic24.png" />
<AndroidResource Include="Resources\drawable\ic25.png" />
<AndroidResource Include="Resources\drawable\ic26.png" />
<AndroidResource Include="Resources\drawable\ic27.png" />
<AndroidResource Include="Resources\drawable\ic28.png" />
<AndroidResource Include="Resources\drawable\ic29.png" />
<AndroidResource Include="Resources\drawable\ic30.png" />
<AndroidResource Include="Resources\drawable\ic31.png" />
<AndroidResource Include="Resources\drawable\ic32.png" />
<AndroidResource Include="Resources\drawable\ic33.png" />
<AndroidResource Include="Resources\drawable\ic34.png" />
<AndroidResource Include="Resources\drawable\ic35.png" />
<AndroidResource Include="Resources\drawable\ic36.png" />
<AndroidResource Include="Resources\drawable\ic37.png" />
<AndroidResource Include="Resources\drawable\ic38.png" />
<AndroidResource Include="Resources\drawable\ic39.png" />
<AndroidResource Include="Resources\drawable\ic40.png" />
<AndroidResource Include="Resources\drawable\ic41.png" />
<AndroidResource Include="Resources\drawable\ic42.png" />
<AndroidResource Include="Resources\drawable\ic43.png" />
<AndroidResource Include="Resources\drawable\ic44.png" />
<AndroidResource Include="Resources\drawable\ic45.png" />
<AndroidResource Include="Resources\drawable\ic46.png" />
<AndroidResource Include="Resources\drawable\ic47.png" />
<AndroidResource Include="Resources\drawable\ic48.png" />
<AndroidResource Include="Resources\drawable\ic49.png" />
<AndroidResource Include="Resources\drawable\ic50.png" />
<AndroidResource Include="Resources\drawable\ic51.png" />
<AndroidResource Include="Resources\drawable\ic52.png" />
<AndroidResource Include="Resources\drawable\ic53.png" />
<AndroidResource Include="Resources\drawable\ic54.png" />
<AndroidResource Include="Resources\drawable\ic55.png" />
<AndroidResource Include="Resources\drawable\ic56.png" />
<AndroidResource Include="Resources\drawable\ic57.png" />
<AndroidResource Include="Resources\drawable\ic58.png" />
<AndroidResource Include="Resources\drawable\ic59.png" />
<AndroidResource Include="Resources\drawable\ic60.png" />
<AndroidResource Include="Resources\drawable\ic61.png" />
<AndroidResource Include="Resources\drawable\ic62.png" />
<AndroidResource Include="Resources\drawable\ic63.png" />
<AndroidResource Include="Resources\drawable\ic64.png" />
<AndroidResource Include="Resources\drawable\ic65.png" />
<AndroidResource Include="Resources\drawable\ic66.png" />
<AndroidResource Include="Resources\drawable\ic67.png" />
<AndroidResource Include="Resources\drawable\ic68.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\Strings.xml" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<Folder Include="Resources\layout\" />
</ItemGroup>
</Project>

View File

@@ -1,19 +0,0 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with you package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

View File

@@ -1,31 +0,0 @@
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace AncientIconSet
{
[Activity(Label = "AncientIconSet", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
int count = 1;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById<Button>(Resource.Id.MyButton);
button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
}
}
}

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="keepass2android.AncientIconSet" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" />
<application android:label="Keepass2Android Ancient Icon Set" android:icon="@drawable/ic00"></application>
</manifest>

View File

@@ -1,30 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AncientIconSet")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AncientIconSet")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -1,50 +0,0 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.xml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable-hdpi/
icon.png
drawable-ldpi/
icon.png
drawable-mdpi/
icon.png
layout/
main.xml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called
"Resource" that contains the tokens for each one of the resources included. For example,
for the above Resources layout, this is what the Resource class would expose:
public class Resource {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

View File

@@ -1,284 +0,0 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("AncientIconSet.Resource", IsApplication=true)]
namespace AncientIconSet
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
static Resource()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
public static void UpdateIdValues()
{
}
public partial class Attribute
{
static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Attribute()
{
}
}
public partial class Drawable
{
// aapt resource value: 0x7f020000
public const int ic00 = 2130837504;
// aapt resource value: 0x7f020001
public const int ic01 = 2130837505;
// aapt resource value: 0x7f020002
public const int ic02 = 2130837506;
// aapt resource value: 0x7f020003
public const int ic03 = 2130837507;
// aapt resource value: 0x7f020004
public const int ic04 = 2130837508;
// aapt resource value: 0x7f020005
public const int ic05 = 2130837509;
// aapt resource value: 0x7f020006
public const int ic06 = 2130837510;
// aapt resource value: 0x7f020007
public const int ic07 = 2130837511;
// aapt resource value: 0x7f020008
public const int ic08 = 2130837512;
// aapt resource value: 0x7f020009
public const int ic09 = 2130837513;
// aapt resource value: 0x7f02000a
public const int ic10 = 2130837514;
// aapt resource value: 0x7f02000b
public const int ic11 = 2130837515;
// aapt resource value: 0x7f02000c
public const int ic12 = 2130837516;
// aapt resource value: 0x7f02000d
public const int ic13 = 2130837517;
// aapt resource value: 0x7f02000e
public const int ic14 = 2130837518;
// aapt resource value: 0x7f02000f
public const int ic15 = 2130837519;
// aapt resource value: 0x7f020010
public const int ic16 = 2130837520;
// aapt resource value: 0x7f020011
public const int ic17 = 2130837521;
// aapt resource value: 0x7f020012
public const int ic18 = 2130837522;
// aapt resource value: 0x7f020013
public const int ic19 = 2130837523;
// aapt resource value: 0x7f020014
public const int ic20 = 2130837524;
// aapt resource value: 0x7f020015
public const int ic21 = 2130837525;
// aapt resource value: 0x7f020016
public const int ic22 = 2130837526;
// aapt resource value: 0x7f020017
public const int ic23 = 2130837527;
// aapt resource value: 0x7f020018
public const int ic24 = 2130837528;
// aapt resource value: 0x7f020019
public const int ic25 = 2130837529;
// aapt resource value: 0x7f02001a
public const int ic26 = 2130837530;
// aapt resource value: 0x7f02001b
public const int ic27 = 2130837531;
// aapt resource value: 0x7f02001c
public const int ic28 = 2130837532;
// aapt resource value: 0x7f02001d
public const int ic29 = 2130837533;
// aapt resource value: 0x7f02001e
public const int ic30 = 2130837534;
// aapt resource value: 0x7f02001f
public const int ic31 = 2130837535;
// aapt resource value: 0x7f020020
public const int ic32 = 2130837536;
// aapt resource value: 0x7f020021
public const int ic33 = 2130837537;
// aapt resource value: 0x7f020022
public const int ic34 = 2130837538;
// aapt resource value: 0x7f020023
public const int ic35 = 2130837539;
// aapt resource value: 0x7f020024
public const int ic36 = 2130837540;
// aapt resource value: 0x7f020025
public const int ic37 = 2130837541;
// aapt resource value: 0x7f020026
public const int ic38 = 2130837542;
// aapt resource value: 0x7f020027
public const int ic39 = 2130837543;
// aapt resource value: 0x7f020028
public const int ic40 = 2130837544;
// aapt resource value: 0x7f020029
public const int ic41 = 2130837545;
// aapt resource value: 0x7f02002a
public const int ic42 = 2130837546;
// aapt resource value: 0x7f02002b
public const int ic43 = 2130837547;
// aapt resource value: 0x7f02002c
public const int ic44 = 2130837548;
// aapt resource value: 0x7f02002d
public const int ic45 = 2130837549;
// aapt resource value: 0x7f02002e
public const int ic46 = 2130837550;
// aapt resource value: 0x7f02002f
public const int ic47 = 2130837551;
// aapt resource value: 0x7f020030
public const int ic48 = 2130837552;
// aapt resource value: 0x7f020031
public const int ic49 = 2130837553;
// aapt resource value: 0x7f020032
public const int ic50 = 2130837554;
// aapt resource value: 0x7f020033
public const int ic51 = 2130837555;
// aapt resource value: 0x7f020034
public const int ic52 = 2130837556;
// aapt resource value: 0x7f020035
public const int ic53 = 2130837557;
// aapt resource value: 0x7f020036
public const int ic54 = 2130837558;
// aapt resource value: 0x7f020037
public const int ic55 = 2130837559;
// aapt resource value: 0x7f020038
public const int ic56 = 2130837560;
// aapt resource value: 0x7f020039
public const int ic57 = 2130837561;
// aapt resource value: 0x7f02003a
public const int ic58 = 2130837562;
// aapt resource value: 0x7f02003b
public const int ic59 = 2130837563;
// aapt resource value: 0x7f02003c
public const int ic60 = 2130837564;
// aapt resource value: 0x7f02003d
public const int ic61 = 2130837565;
// aapt resource value: 0x7f02003e
public const int ic62 = 2130837566;
// aapt resource value: 0x7f02003f
public const int ic63 = 2130837567;
// aapt resource value: 0x7f020040
public const int ic64 = 2130837568;
// aapt resource value: 0x7f020041
public const int ic65 = 2130837569;
// aapt resource value: 0x7f020042
public const int ic66 = 2130837570;
// aapt resource value: 0x7f020043
public const int ic67 = 2130837571;
// aapt resource value: 0x7f020044
public const int ic68 = 2130837572;
static Drawable()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Drawable()
{
}
}
public partial class String
{
// aapt resource value: 0x7f030001
public const int ApplicationName = 2130903041;
// aapt resource value: 0x7f030000
public const int kp2a_iconset_name = 2130903040;
static String()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private String()
{
}
}
}
}
#pragma warning restore 1591

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="@+id/MyButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/Hello"
/>
</LinearLayout>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="kp2a_iconset_name">Ancient Icons</string>
<string name="ApplicationName">AncientIconSet</string>
</resources>

View File

@@ -1,98 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Security.Cryptography;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
//using KeePassLib.Serialization;
using MasterPassword;
//using keepass2android;
//using keepass2android.Io;
namespace ArtTestApp
{
[Activity(Label = "ArtTestApp", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
//private IOConnectionInfo _ioConnectionInfo;
//private IOConnectionInfo _ioConnectionInfoOut;
private const int RequestCodeChallengeYubikey = 98;
private static byte[] HashHMAC(byte[] key, byte[] message)
{
var hash = new HMACSHA256(key);
return hash.ComputeHash(message);
}
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
/*_ioConnectionInfo = new IOConnectionInfo() { Path = "/mnt/sdcard/keepass/keechallenge.xml" };
_ioConnectionInfoOut = new IOConnectionInfo() { Path = "/mnt/sdcard/keepass/keechallengeOut.xml" };
*/
FindViewById<Button>(Resource.Id.MyButton1).Text = "";
Stopwatch sw = new Stopwatch();
sw.Start();
var key = new MpAlgorithm().GetKeyForPassword("u", "test");
sw.Stop();
string password = MpAlgorithm.GenerateContent("Long Password", "strn", key, 1, HashHMAC);
FindViewById<Button>(Resource.Id.MyButton1).Text = password;
FindViewById<Button>(Resource.Id.MyButton2).Text = sw.ElapsedMilliseconds.ToString();
// Get our button from the layout resource,
// and attach an event to it
FindViewById<Button>(Resource.Id.MyButton1).Click += (sender, args) =>
{
// Decrypt(_ioConnectionInfo);
};
FindViewById<Button>(Resource.Id.MyButton2).Click += (sender, args) =>
{
//Decrypt(_ioConnectionInfoOut);
};
FindViewById<Button>(Resource.Id.MyButton3).Click += (sender, args) => StartActivityForResult(typeof(PrefActivity), 1);
}
/*private void Decrypt(IOConnectionInfo ioConnectionInfo)
{
try
{
//StartActivity(typeof (Activity2));
_chalInfo = ChallengeInfo.Load(ioConnectionInfo);
Intent chalIntent = new Intent("com.yubichallenge.NFCActivity.CHALLENGE");
chalIntent.PutExtra("challenge", _chalInfo.Challenge);
chalIntent.PutExtra("slot", 2);
chalIntent.AddFlags(ActivityFlags.SingleTop);
IList<ResolveInfo> activities = PackageManager.QueryIntentActivities(chalIntent, 0);
bool isIntentSafe = activities.Count > 0;
if (isIntentSafe)
{
StartActivityForResult(chalIntent, RequestCodeChallengeYubikey);
}
}
catch (Exception ex)
{
Toast.MakeText(this, ex.ToString(), ToastLength.Long).Show();
}
}*/
}
}

View File

@@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace ArtTestApp
{
[Activity(Label = "Activity2",
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden)]
[IntentFilter(new[] { "blabla" },
Categories = new[] { Intent.CategoryDefault })]
public class Activity2 : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Create your application here
}
}
}

View File

@@ -1,80 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1FF6C335-A627-43C9-AAA7-CBAC2E74CD18}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ArtTestApp</RootNamespace>
<AssemblyName>ArtTestApp</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidApplication>true</AndroidApplication>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<TargetFrameworkVersion>v4.0.3</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Activity1.cs" />
<Compile Include="Activity2.cs" />
<Compile Include="PrefActivity.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\Main.axml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Values\Strings.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Drawable\Icon.png" />
</ItemGroup>
<ItemGroup>
<TransformFile Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Xml\pref.xml" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,19 +0,0 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with you package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

View File

@@ -1,36 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Preferences;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace ArtTestApp
{
[Activity(Label = "My PrefActivity")]
public class PrefActivity : PreferenceActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
FragmentManager.BeginTransaction().Replace(Android.Resource.Id.Content, new AppPreferenceFragment()).Commit();
}
public class AppPreferenceFragment : PreferenceFragment
{
public override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
AddPreferencesFromResource(Resource.Xml.pref);
}
}
}
}

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" />
<application></application>
</manifest>

View File

@@ -1,34 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ArtTestApp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ArtTestApp")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// Add some common permissions, these can be removed if not needed
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]

View File

@@ -1,50 +0,0 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.xml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable-hdpi/
icon.png
drawable-ldpi/
icon.png
drawable-mdpi/
icon.png
layout/
main.xml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called
"Resource" that contains the tokens for each one of the resources included. For example,
for the above Resources layout, this is what the Resource class would expose:
public class Resource {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="@+id/MyButton1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="StartActivity" />
<Button
android:id="@+id/MyButton2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="StartActivityForResult" />
<Button
android:id="@+id/MyButton3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Start Preference Activity" />
</LinearLayout>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="Hello">Hello World, Click Me!</string>
<string name="ApplicationName">ArtTestApp</string>
</resources>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen
android:key="db_key"
android:title="database"
android:summary="menu_db_settings">
<EditTextPreference
android:title="database_name"
android:persistent="false"
android:key="database_name_key"/>
</PreferenceScreen>
/
</PreferenceScreen>

View File

@@ -1,37 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Keepass2android.Pluginsdk;
namespace keepass2android.AutoFillPlugin
{
[BroadcastReceiver(Exported = true)]
[IntentFilter(new[] { Strings.ActionTriggerRequestAccess, Strings.ActionReceiveAccess, Strings.ActionRevokeAccess })]
public class AccessReceiver : PluginAccessBroadcastReceiver
{
public override void OnReceive(Context context, Intent intent)
{
Android.Util.Log.Debug("KP2AAS", intent.Action);
base.OnReceive(context, intent);
}
public override IList<string> Scopes
{
get
{
return new List<string>
{
Strings.ScopeQueryCredentials
};
}
}
}
}

View File

@@ -1,19 +0,0 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with you package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

View File

@@ -1,98 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6FF440E6-E8FF-4E43-8221-9E3972F14812}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>keepass2android.AutoFillPlugin</RootNamespace>
<AssemblyName>AutoFillPlugin</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidApplication>true</AndroidApplication>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Json" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AccessReceiver.cs" />
<Compile Include="Credentials.cs" />
<Compile Include="Kp2aAccessibilityService.cs" />
<Compile Include="LookupCredentialsActivity.cs" />
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="GettingStarted.Xamarin" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\Strings.xml" />
<AndroidResource Include="Resources\drawable-xhdpi\Icon.png" />
<AndroidResource Include="Resources\drawable-xhdpi\ic_notify_autofill.png" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\xml\accserviceconfig.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KeePassLib2Android\KeePassLib2Android.csproj">
<Project>{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}</Project>
<Name>KeePassLib2Android</Name>
</ProjectReference>
<ProjectReference Include="..\PluginSdkBinding\PluginSdkBinding.csproj">
<Project>{3DA3911E-36DE-465E-8F15-F1991B6437E5}</Project>
<Name>PluginSdkBinding</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\layout\" />
<Folder Include="Resources\drawable\" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace keepass2android.AutoFillPlugin
{
public class Credentials
{
public string User;
public string Password;
public string Url;
}
}

View File

@@ -1,4 +0,0 @@
<GettingStarted>
<LocalContent>GS\Android\CS\AndroidApp\GettingStarted.html</LocalContent>
<EmbeddedNavigation>false</EmbeddedNavigation>
</GettingStarted>

View File

@@ -1,230 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Views.Accessibility;
using Android.Widget;
namespace keepass2android.AutoFillPlugin
{
//<meta-data android:name="android.accessibilityservice" android:resource="@xml/serviceconfig" />
[Service(Enabled =true, Permission= "android.permission.BIND_ACCESSIBILITY_SERVICE")]
[IntentFilter(new[] { "android.accessibilityservice.AccessibilityService" })]
[MetaData("android.accessibilityservice", Resource = "@xml/accserviceconfig")]
public class Kp2aAccessibilityService : Android.AccessibilityServices.AccessibilityService, IDialogInterfaceOnCancelListener
{
const string _logTag = "KP2AAS";
private const int autoFillNotificationId = 0;
private const string androidAppPrefix = "androidapp://";
public override void OnCreate()
{
base.OnCreate();
Android.Util.Log.Debug(_logTag, "OnCreate Service");
}
protected override void OnServiceConnected()
{
Android.Util.Log.Debug(_logTag, "service connected");
base.OnServiceConnected();
}
public override void OnAccessibilityEvent(AccessibilityEvent e)
{
Android.Util.Log.Debug(_logTag, "OnAccEvent");
if (e.EventType == EventTypes.WindowContentChanged || e.EventType == EventTypes.WindowStateChanged)
{
Android.Util.Log.Debug(_logTag, "event: " + e.EventType + ", package = " + e.PackageName);
if (e.PackageName == "com.android.systemui")
return; //avoid that the notification is cancelled when pulling down notif drawer
var root = RootInActiveWindow;
if ((ExistsNodeOrChildren(root, n => n.WindowId == e.WindowId) && !ExistsNodeOrChildren(root, n => (n.ViewIdResourceName != null) && (n.ViewIdResourceName.StartsWith("com.android.systemui")))))
{
bool cancelNotification = true;
var allEditTexts = GetNodeOrChildren(root, n=> { return IsEditText(n); });
var usernameEdit = allEditTexts.TakeWhile(edit => (edit.Password == false)).LastOrDefault();
string searchString = androidAppPrefix + root.PackageName;
string url = androidAppPrefix + root.PackageName;
if (root.PackageName == "com.android.chrome")
{
var addressField = root.FindAccessibilityNodeInfosByViewId("com.android.chrome:id/url_bar").FirstOrDefault();
UrlFromAddressField(ref url, addressField);
}
else if (root.PackageName == "com.android.browser")
{
var addressField = root.FindAccessibilityNodeInfosByViewId("com.android.browser:id/url").FirstOrDefault();
UrlFromAddressField(ref url, addressField);
}
var emptyPasswordFields = GetNodeOrChildren(root, n => { return IsPasswordField(n); }).ToList();
if (emptyPasswordFields.Any())
{
if ((LookupCredentialsActivity.LastReceivedCredentials != null) && IsSame(LookupCredentialsActivity.LastReceivedCredentials.Url, url))
{
Android.Util.Log.Debug ("KP2AAS", "Filling credentials for " + url);
FillPassword(url, usernameEdit, emptyPasswordFields);
}
else
{
Android.Util.Log.Debug ("KP2AAS", "Notif for " + url );
if (LookupCredentialsActivity.LastReceivedCredentials != null)
{
Android.Util.Log.Debug ("KP2AAS", LookupCredentialsActivity.LastReceivedCredentials.Url);
Android.Util.Log.Debug ("KP2AAS", url);
}
AskFillPassword(url, usernameEdit, emptyPasswordFields);
cancelNotification = false;
}
}
if (cancelNotification)
{
((NotificationManager)GetSystemService(NotificationService)).Cancel(autoFillNotificationId);
Android.Util.Log.Debug ("KP2AAS","Cancel notif");
}
}
}
}
private static void UrlFromAddressField(ref string url, AccessibilityNodeInfo addressField)
{
if (addressField != null)
{
url = addressField.Text;
if (!url.Contains("://"))
url = "http://" + url;
}
}
private bool IsSame(string url1, string url2)
{
if (url1.StartsWith ("androidapp://"))
return url1 == url2;
return KeePassLib.Utility.UrlUtil.GetHost (url1) == KeePassLib.Utility.UrlUtil.GetHost (url2);
}
private static bool IsPasswordField(AccessibilityNodeInfo n)
{
//if (n.Password) Android.Util.Log.Debug(_logTag, "pwdx with " + (n.Text == null ? "null" : n.Text));
var res = n.Password && string.IsNullOrEmpty(n.Text);
// if (n.Password) Android.Util.Log.Debug(_logTag, "pwd with " + n.Text + res);
return res;
}
private static bool IsEditText(AccessibilityNodeInfo n)
{
//it seems like n.Editable is not a good check as this is false for some fields which are actually editable, at least in tests with Chrome.
return (n.ClassName != null) && (n.ClassName.Contains("EditText"));
}
private void AskFillPassword(string url, AccessibilityNodeInfo usernameEdit, IEnumerable<AccessibilityNodeInfo> passwordFields)
{
var runSearchIntent = new Intent(this, typeof(LookupCredentialsActivity));
runSearchIntent.PutExtra("url", url);
runSearchIntent.SetFlags(ActivityFlags.NewTask | ActivityFlags.SingleTop | ActivityFlags.ClearTop);
var pending = PendingIntent.GetActivity(this, 0, runSearchIntent, PendingIntentFlags.UpdateCurrent);
var targetName = url;
if (url.StartsWith(androidAppPrefix))
{
var packageName = url.Substring(androidAppPrefix.Length);
try
{
var appInfo = PackageManager.GetApplicationInfo(packageName, 0);
targetName = (string) (appInfo != null ? PackageManager.GetApplicationLabel(appInfo) : packageName);
}
catch (Exception e)
{
Android.Util.Log.Debug(_logTag, e.ToString());
targetName = packageName;
}
}
else
{
targetName = KeePassLib.Utility.UrlUtil.GetHost(url);
}
var builder = new Notification.Builder(this);
//TODO icon
//TODO plugin icon
builder.SetSmallIcon(Resource.Drawable.ic_notify_autofill)
.SetContentText(GetString(Resource.String.NotificationContentText, new Java.Lang.Object[] { targetName }))
.SetContentTitle(GetString(Resource.String.NotificationTitle))
.SetWhen(Java.Lang.JavaSystem.CurrentTimeMillis())
.SetTicker( GetString(Resource.String.NotificationTickerText, new Java.Lang.Object[] { targetName }))
.SetVisibility(Android.App.NotificationVisibility.Secret)
.SetContentIntent(pending);
var notificationManager = (NotificationManager)GetSystemService(NotificationService);
notificationManager.Notify(autoFillNotificationId, builder.Build());
}
private void FillPassword(string url, AccessibilityNodeInfo usernameEdit, IEnumerable<AccessibilityNodeInfo> passwordFields)
{
FillDataInTextField(usernameEdit, LookupCredentialsActivity.LastReceivedCredentials.User);
foreach (var pwd in passwordFields)
FillDataInTextField(pwd, LookupCredentialsActivity.LastReceivedCredentials.Password);
LookupCredentialsActivity.LastReceivedCredentials = null;
}
private static void FillDataInTextField(AccessibilityNodeInfo edit, string newValue)
{
Bundle b = new Bundle();
b.PutString(AccessibilityNodeInfo.ActionArgumentSetTextCharsequence, newValue);
edit.PerformAction(Android.Views.Accessibility.Action.SetText, b);
}
private bool ExistsNodeOrChildren(AccessibilityNodeInfo n, Func<AccessibilityNodeInfo, bool> p)
{
return GetNodeOrChildren(n, p).Any();
}
private IEnumerable<AccessibilityNodeInfo> GetNodeOrChildren(AccessibilityNodeInfo n, Func<AccessibilityNodeInfo, bool> p)
{
if (n != null)
{
if (p(n))
yield return n;
for (int i = 0; i < n.ChildCount; i++)
{
foreach (var x in GetNodeOrChildren(n.GetChild(i), p))
yield return x;
}
}
}
public override void OnInterrupt()
{
}
public void OnCancel(IDialogInterface dialog)
{
}
}
}

View File

@@ -1,65 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Keepass2android.Pluginsdk;
namespace keepass2android.AutoFillPlugin
{
[Activity(Label = "@string/LookupTitle", LaunchMode = Android.Content.PM.LaunchMode.SingleInstance, Theme="@style/android:Theme.Material.Light")]
public class LookupCredentialsActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
var url = Intent.GetStringExtra("url");
_lastQueriedUrl = url;
StartActivityForResult(Kp2aControl.GetQueryEntryIntent(url), 123);
}
string _lastQueriedUrl;
protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
try
{
var jsonOutput = new Org.Json.JSONObject(data.GetStringExtra(Strings.ExtraEntryOutputData));
Dictionary<string, string> output = new Dictionary<string, string>();
for (var iter = jsonOutput.Keys(); iter.HasNext;)
{
string key = iter.Next().ToString();
string value = jsonOutput.Get(key).ToString();
output[key] = value;
}
string user = "", password = "";
output.TryGetValue(KeePassLib.PwDefs.UserNameField, out user);
output.TryGetValue(KeePassLib.PwDefs.PasswordField, out password);
Android.Util.Log.Debug ("KP2AAS", "Received credentials for " + _lastQueriedUrl);
LastReceivedCredentials = new Credentials() { User = user, Password = password, Url = _lastQueriedUrl };
}
catch(Exception e) {
Android.Util.Log.Debug ("KP2AAS", "Exception while receiving credentials: " + e.ToString());
}
finally {
Finish ();
}
}
public static Credentials LastReceivedCredentials;
}
}

View File

@@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace keepass2android.AutoFillPlugin
{
#if DEBUG
[Activity(Label = "MainActivity", MainLauncher =true)]
public class MainActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Create your application here
}
}
#endif
}

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="kp2a.plugin.AutoFill" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21" />
<application android:label="KP2A AutoFillPlugin" android:icon="@drawable/Icon"></application>
</manifest>

View File

@@ -1,30 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AutoFillPlugin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AutoFillPlugin")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Some files were not shown because too many files have changed in this diff Show More