+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build.gradle b/Kp2aAccServiceLib/app/build.gradle
new file mode 100644
index 0000000..e671859
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build.gradle
@@ -0,0 +1,20 @@
+apply plugin: 'com.android.library'
+android {
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
+
+ defaultConfig {
+ minSdkVersion 18
+ targetSdkVersion 23
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+ }
+ }
+}
+
+dependencies {
+}
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/generated/source/buildConfig/androidTest/debug/keepass2android/softkeyboard/test/BuildConfig.java b/Kp2aAccServiceLib/app/build/generated/source/buildConfig/androidTest/debug/keepass2android/softkeyboard/test/BuildConfig.java
new file mode 100644
index 0000000..e52d0bf
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/generated/source/buildConfig/androidTest/debug/keepass2android/softkeyboard/test/BuildConfig.java
@@ -0,0 +1,13 @@
+/**
+ * Automatically generated file. DO NOT MODIFY
+ */
+package keepass2android.softkeyboard.test;
+
+public final class BuildConfig {
+ public static final boolean DEBUG = Boolean.parseBoolean("true");
+ public static final String APPLICATION_ID = "keepass2android.softkeyboard.test";
+ public static final String BUILD_TYPE = "debug";
+ public static final String FLAVOR = "";
+ public static final int VERSION_CODE = -1;
+ public static final String VERSION_NAME = "";
+}
diff --git a/Kp2aAccServiceLib/app/build/generated/source/buildConfig/debug/keepass2android/softkeyboard/BuildConfig.java b/Kp2aAccServiceLib/app/build/generated/source/buildConfig/debug/keepass2android/softkeyboard/BuildConfig.java
new file mode 100644
index 0000000..fc492fa
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/generated/source/buildConfig/debug/keepass2android/softkeyboard/BuildConfig.java
@@ -0,0 +1,13 @@
+/**
+ * Automatically generated file. DO NOT MODIFY
+ */
+package keepass2android.softkeyboard;
+
+public final class BuildConfig {
+ public static final boolean DEBUG = Boolean.parseBoolean("true");
+ public static final String APPLICATION_ID = "keepass2android.softkeyboard";
+ public static final String BUILD_TYPE = "debug";
+ public static final String FLAVOR = "";
+ public static final int VERSION_CODE = -1;
+ public static final String VERSION_NAME = "";
+}
diff --git a/Kp2aAccServiceLib/app/build/generated/source/buildConfig/release/keepass2android/softkeyboard/BuildConfig.java b/Kp2aAccServiceLib/app/build/generated/source/buildConfig/release/keepass2android/softkeyboard/BuildConfig.java
new file mode 100644
index 0000000..d5f7d13
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/generated/source/buildConfig/release/keepass2android/softkeyboard/BuildConfig.java
@@ -0,0 +1,13 @@
+/**
+ * Automatically generated file. DO NOT MODIFY
+ */
+package keepass2android.softkeyboard;
+
+public final class BuildConfig {
+ public static final boolean DEBUG = false;
+ public static final String APPLICATION_ID = "keepass2android.softkeyboard";
+ public static final String BUILD_TYPE = "release";
+ public static final String FLAVOR = "";
+ public static final int VERSION_CODE = -1;
+ public static final String VERSION_NAME = "";
+}
diff --git a/Kp2aAccServiceLib/app/build/generated/source/r/androidTest/debug/keepass2android/softkeyboard/R.java b/Kp2aAccServiceLib/app/build/generated/source/r/androidTest/debug/keepass2android/softkeyboard/R.java
new file mode 100644
index 0000000..8a0a1bb
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/generated/source/r/androidTest/debug/keepass2android/softkeyboard/R.java
@@ -0,0 +1,20 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found. It
+ * should not be modified by hand.
+ */
+package keepass2android.softkeyboard;
+
+public final class R {
+ public static final class drawable {
+ public static final int ic_notify_autofill = 0x7f020000;
+ }
+ public static final class string {
+ public static final int ApplicationName = 0x7f030000;
+ public static final int AutoFillServiceDescription = 0x7f030001;
+ public static final int LookupTitle = 0x7f030002;
+ public static final int NotificationContentText = 0x7f030003;
+ public static final int NotificationTitle = 0x7f030004;
+ }
+}
diff --git a/Kp2aAccServiceLib/app/build/generated/source/r/androidTest/debug/keepass2android/softkeyboard/test/R.java b/Kp2aAccServiceLib/app/build/generated/source/r/androidTest/debug/keepass2android/softkeyboard/test/R.java
new file mode 100644
index 0000000..c49cd06
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/generated/source/r/androidTest/debug/keepass2android/softkeyboard/test/R.java
@@ -0,0 +1,23 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found. It
+ * should not be modified by hand.
+ */
+
+package keepass2android.softkeyboard.test;
+
+public final class R {
+ public static final class attr {
+ }
+ public static final class drawable {
+ public static final int ic_notify_autofill=0x7f020000;
+ }
+ public static final class string {
+ public static final int ApplicationName=0x7f030000;
+ public static final int AutoFillServiceDescription=0x7f030001;
+ public static final int LookupTitle=0x7f030002;
+ public static final int NotificationContentText=0x7f030003;
+ public static final int NotificationTitle=0x7f030004;
+ }
+}
diff --git a/Kp2aAccServiceLib/app/build/generated/source/r/debug/keepass2android/softkeyboard/R.java b/Kp2aAccServiceLib/app/build/generated/source/r/debug/keepass2android/softkeyboard/R.java
new file mode 100644
index 0000000..254982f
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/generated/source/r/debug/keepass2android/softkeyboard/R.java
@@ -0,0 +1,23 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found. It
+ * should not be modified by hand.
+ */
+
+package keepass2android.softkeyboard;
+
+public final class R {
+ public static final class attr {
+ }
+ public static final class drawable {
+ public static int ic_notify_autofill=0x7f020000;
+ }
+ public static final class string {
+ public static int ApplicationName=0x7f030000;
+ public static int AutoFillServiceDescription=0x7f030001;
+ public static int LookupTitle=0x7f030002;
+ public static int NotificationContentText=0x7f030003;
+ public static int NotificationTitle=0x7f030004;
+ }
+}
diff --git a/Kp2aAccServiceLib/app/build/generated/source/r/release/keepass2android/softkeyboard/R.java b/Kp2aAccServiceLib/app/build/generated/source/r/release/keepass2android/softkeyboard/R.java
new file mode 100644
index 0000000..254982f
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/generated/source/r/release/keepass2android/softkeyboard/R.java
@@ -0,0 +1,23 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found. It
+ * should not be modified by hand.
+ */
+
+package keepass2android.softkeyboard;
+
+public final class R {
+ public static final class attr {
+ }
+ public static final class drawable {
+ public static int ic_notify_autofill=0x7f020000;
+ }
+ public static final class string {
+ public static int ApplicationName=0x7f030000;
+ public static int AutoFillServiceDescription=0x7f030001;
+ public static int LookupTitle=0x7f030002;
+ public static int NotificationContentText=0x7f030003;
+ public static int NotificationTitle=0x7f030004;
+ }
+}
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/AndroidManifest.xml b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/AndroidManifest.xml
new file mode 100644
index 0000000..af1c21f
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/AndroidManifest.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/R.txt b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/R.txt
new file mode 100644
index 0000000..2c1a1c8
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/R.txt
@@ -0,0 +1,6 @@
+int drawable ic_notify_autofill 0x7f020000
+int string ApplicationName 0x7f030000
+int string AutoFillServiceDescription 0x7f030001
+int string LookupTitle 0x7f030002
+int string NotificationContentText 0x7f030003
+int string NotificationTitle 0x7f030004
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/aapt/AndroidManifest.xml b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/aapt/AndroidManifest.xml
new file mode 100644
index 0000000..af1c21f
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/aapt/AndroidManifest.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/classes.jar b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/classes.jar
new file mode 100644
index 0000000..228d12b
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/classes.jar differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/res/drawable-xhdpi/ic_notify_autofill.png b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/res/drawable-xhdpi/ic_notify_autofill.png
new file mode 100644
index 0000000..b7ffa48
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/res/drawable-xhdpi/ic_notify_autofill.png differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/res/values/values.xml b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/res/values/values.xml
new file mode 100644
index 0000000..deb2773
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/bundles/debug/res/values/values.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ KP2A AutoFillPlugin
+ Monitors apps and websites for password fields. Offers to look up credentials from Keepass2Android and auto-fill them into the forms.
+ Look up credentials
+ AutoFill form for %1$s
+ Keepass2Android AutoFill
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/release/AndroidManifest.xml b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/AndroidManifest.xml
new file mode 100644
index 0000000..af1c21f
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/AndroidManifest.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/release/R.txt b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/R.txt
new file mode 100644
index 0000000..2c1a1c8
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/R.txt
@@ -0,0 +1,6 @@
+int drawable ic_notify_autofill 0x7f020000
+int string ApplicationName 0x7f030000
+int string AutoFillServiceDescription 0x7f030001
+int string LookupTitle 0x7f030002
+int string NotificationContentText 0x7f030003
+int string NotificationTitle 0x7f030004
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/release/aapt/AndroidManifest.xml b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/aapt/AndroidManifest.xml
new file mode 100644
index 0000000..af1c21f
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/aapt/AndroidManifest.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/release/classes.jar b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/classes.jar
new file mode 100644
index 0000000..477fd91
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/classes.jar differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/release/res/drawable-xhdpi/ic_notify_autofill.png b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/res/drawable-xhdpi/ic_notify_autofill.png
new file mode 100644
index 0000000..b7ffa48
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/res/drawable-xhdpi/ic_notify_autofill.png differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/bundles/release/res/values/values.xml b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/res/values/values.xml
new file mode 100644
index 0000000..deb2773
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/bundles/release/res/values/values.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ KP2A AutoFillPlugin
+ Monitors apps and websites for password fields. Offers to look up credentials from Keepass2Android and auto-fill them into the forms.
+ Look up credentials
+ AutoFill form for %1$s
+ Keepass2Android AutoFill
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/R$drawable.class b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/R$drawable.class
new file mode 100644
index 0000000..fd00548
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/R$drawable.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/R$string.class b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/R$string.class
new file mode 100644
index 0000000..cabd5d6
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/R$string.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/R.class b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/R.class
new file mode 100644
index 0000000..40560c7
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/R.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/BuildConfig.class b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/BuildConfig.class
new file mode 100644
index 0000000..43b5d9d
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/BuildConfig.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R$attr.class b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R$attr.class
new file mode 100644
index 0000000..6710892
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R$attr.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R$drawable.class b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R$drawable.class
new file mode 100644
index 0000000..fccb6ac
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R$drawable.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R$string.class b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R$string.class
new file mode 100644
index 0000000..df47a62
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R$string.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R.class b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R.class
new file mode 100644
index 0000000..1c0c290
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/androidTest/debug/keepass2android/softkeyboard/test/R.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$1.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$1.class
new file mode 100644
index 0000000..31d3f13
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$1.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$EditTextCondition.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$EditTextCondition.class
new file mode 100644
index 0000000..d6bc941
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$EditTextCondition.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$NodeCondition.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$NodeCondition.class
new file mode 100644
index 0000000..701d415
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$NodeCondition.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$PasswordFieldCondition.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$PasswordFieldCondition.class
new file mode 100644
index 0000000..c665226
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$PasswordFieldCondition.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$SystemUiCondition.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$SystemUiCondition.class
new file mode 100644
index 0000000..0183e31
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$SystemUiCondition.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$WindowIdCondition.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$WindowIdCondition.class
new file mode 100644
index 0000000..3e580cf
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService$WindowIdCondition.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService.class
new file mode 100644
index 0000000..b33f485
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/autofill/AutoFillService.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/kbbridge/KeyboardData.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/kbbridge/KeyboardData.class
new file mode 100644
index 0000000..3444147
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/kbbridge/KeyboardData.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/kbbridge/KeyboardDataBuilder.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/kbbridge/KeyboardDataBuilder.class
new file mode 100644
index 0000000..c491726
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/kbbridge/KeyboardDataBuilder.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/kbbridge/StringForTyping.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/kbbridge/StringForTyping.class
new file mode 100644
index 0000000..41c4039
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/kbbridge/StringForTyping.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/BuildConfig.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/BuildConfig.class
new file mode 100644
index 0000000..a09b506
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/BuildConfig.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R$attr.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R$attr.class
new file mode 100644
index 0000000..23d908e
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R$attr.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R$drawable.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R$drawable.class
new file mode 100644
index 0000000..d2e4677
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R$drawable.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R$string.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R$string.class
new file mode 100644
index 0000000..fd8424f
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R$string.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R.class b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R.class
new file mode 100644
index 0000000..9fa2af8
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/debug/keepass2android/softkeyboard/R.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$1.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$1.class
new file mode 100644
index 0000000..31d3f13
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$1.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$EditTextCondition.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$EditTextCondition.class
new file mode 100644
index 0000000..d6bc941
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$EditTextCondition.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$NodeCondition.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$NodeCondition.class
new file mode 100644
index 0000000..701d415
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$NodeCondition.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$PasswordFieldCondition.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$PasswordFieldCondition.class
new file mode 100644
index 0000000..c665226
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$PasswordFieldCondition.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$SystemUiCondition.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$SystemUiCondition.class
new file mode 100644
index 0000000..0183e31
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$SystemUiCondition.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$WindowIdCondition.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$WindowIdCondition.class
new file mode 100644
index 0000000..3e580cf
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService$WindowIdCondition.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService.class
new file mode 100644
index 0000000..b33f485
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/autofill/AutoFillService.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/kbbridge/KeyboardData.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/kbbridge/KeyboardData.class
new file mode 100644
index 0000000..3444147
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/kbbridge/KeyboardData.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/kbbridge/KeyboardDataBuilder.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/kbbridge/KeyboardDataBuilder.class
new file mode 100644
index 0000000..c491726
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/kbbridge/KeyboardDataBuilder.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/kbbridge/StringForTyping.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/kbbridge/StringForTyping.class
new file mode 100644
index 0000000..41c4039
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/kbbridge/StringForTyping.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/BuildConfig.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/BuildConfig.class
new file mode 100644
index 0000000..d7a199d
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/BuildConfig.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R$attr.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R$attr.class
new file mode 100644
index 0000000..23d908e
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R$attr.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R$drawable.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R$drawable.class
new file mode 100644
index 0000000..d2e4677
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R$drawable.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R$string.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R$string.class
new file mode 100644
index 0000000..fd8424f
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R$string.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R.class b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R.class
new file mode 100644
index 0000000..9fa2af8
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/classes/release/keepass2android/softkeyboard/R.class differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/incremental/aidl/androidTest/debug/dependency.store b/Kp2aAccServiceLib/app/build/intermediates/incremental/aidl/androidTest/debug/dependency.store
new file mode 100644
index 0000000..8b8400d
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/incremental/aidl/androidTest/debug/dependency.store differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/incremental/aidl/debug/dependency.store b/Kp2aAccServiceLib/app/build/intermediates/incremental/aidl/debug/dependency.store
new file mode 100644
index 0000000..8b8400d
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/incremental/aidl/debug/dependency.store differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/incremental/aidl/release/dependency.store b/Kp2aAccServiceLib/app/build/intermediates/incremental/aidl/release/dependency.store
new file mode 100644
index 0000000..8b8400d
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/incremental/aidl/release/dependency.store differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeAssets/androidTest/debug/merger.xml b/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeAssets/androidTest/debug/merger.xml
new file mode 100644
index 0000000..7792944
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeAssets/androidTest/debug/merger.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeAssets/debug/merger.xml b/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeAssets/debug/merger.xml
new file mode 100644
index 0000000..bebdca9
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeAssets/debug/merger.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeAssets/release/merger.xml b/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeAssets/release/merger.xml
new file mode 100644
index 0000000..19683f9
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeAssets/release/merger.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeResources/androidTest/debug/merger.xml b/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeResources/androidTest/debug/merger.xml
new file mode 100644
index 0000000..06674c3
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/incremental/mergeResources/androidTest/debug/merger.xml
@@ -0,0 +1,2 @@
+
+KP2A AutoFillPluginLook up credentialsAutoFill form for %1$sKeepass2Android AutoFillMonitors apps and websites for password fields. Offers to look up credentials from Keepass2Android and auto-fill them into the forms.
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/incremental/packageResources/debug/merger.xml b/Kp2aAccServiceLib/app/build/intermediates/incremental/packageResources/debug/merger.xml
new file mode 100644
index 0000000..becf57e
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/incremental/packageResources/debug/merger.xml
@@ -0,0 +1,2 @@
+
+KP2A AutoFillPluginLook up credentialsKeepass2Android AutoFillAutoFill form for %1$sMonitors apps and websites for password fields. Offers to look up credentials from Keepass2Android and auto-fill them into the forms.
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/incremental/packageResources/release/merger.xml b/Kp2aAccServiceLib/app/build/intermediates/incremental/packageResources/release/merger.xml
new file mode 100644
index 0000000..5806142
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/incremental/packageResources/release/merger.xml
@@ -0,0 +1,2 @@
+
+KP2A AutoFillPluginLook up credentialsKeepass2Android AutoFillAutoFill form for %1$sMonitors apps and websites for password fields. Offers to look up credentials from Keepass2Android and auto-fill them into the forms.
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/manifests/androidTest/debug/AndroidManifest.xml b/Kp2aAccServiceLib/app/build/intermediates/manifests/androidTest/debug/AndroidManifest.xml
new file mode 100644
index 0000000..cb7327e
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/manifests/androidTest/debug/AndroidManifest.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/manifests/tmp/manifestMerger5900132785466518886.xml b/Kp2aAccServiceLib/app/build/intermediates/manifests/tmp/manifestMerger5900132785466518886.xml
new file mode 100644
index 0000000..8b0d91a
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/manifests/tmp/manifestMerger5900132785466518886.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Kp2aAccServiceLib/app/build/intermediates/mockable-android-23.jar b/Kp2aAccServiceLib/app/build/intermediates/mockable-android-23.jar
new file mode 100644
index 0000000..ef6420b
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/mockable-android-23.jar differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/res/androidTest/debug/drawable-xhdpi/ic_notify_autofill.png b/Kp2aAccServiceLib/app/build/intermediates/res/androidTest/debug/drawable-xhdpi/ic_notify_autofill.png
new file mode 100644
index 0000000..c231589
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/res/androidTest/debug/drawable-xhdpi/ic_notify_autofill.png differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/res/androidTest/debug/values/values.xml b/Kp2aAccServiceLib/app/build/intermediates/res/androidTest/debug/values/values.xml
new file mode 100644
index 0000000..90c4a86
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/res/androidTest/debug/values/values.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ KP2A AutoFillPlugin
+ Monitors apps and websites for password fields. Offers to look up credentials from Keepass2Android and auto-fill them into the forms.
+ Look up credentials
+ AutoFill form for %1$s
+ Keepass2Android AutoFill
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/app/build/intermediates/resources/resources-debug-androidTest.ap_ b/Kp2aAccServiceLib/app/build/intermediates/resources/resources-debug-androidTest.ap_
new file mode 100644
index 0000000..26fa7c0
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/intermediates/resources/resources-debug-androidTest.ap_ differ
diff --git a/Kp2aAccServiceLib/app/build/intermediates/symbols/androidTest/debug/R.txt b/Kp2aAccServiceLib/app/build/intermediates/symbols/androidTest/debug/R.txt
new file mode 100644
index 0000000..2c1a1c8
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/intermediates/symbols/androidTest/debug/R.txt
@@ -0,0 +1,6 @@
+int drawable ic_notify_autofill 0x7f020000
+int string ApplicationName 0x7f030000
+int string AutoFillServiceDescription 0x7f030001
+int string LookupTitle 0x7f030002
+int string NotificationContentText 0x7f030003
+int string NotificationTitle 0x7f030004
diff --git a/Kp2aAccServiceLib/app/build/outputs/aar/app-debug.aar b/Kp2aAccServiceLib/app/build/outputs/aar/app-debug.aar
new file mode 100644
index 0000000..afb95e0
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/outputs/aar/app-debug.aar differ
diff --git a/Kp2aAccServiceLib/app/build/outputs/aar/app-release.aar b/Kp2aAccServiceLib/app/build/outputs/aar/app-release.aar
new file mode 100644
index 0000000..40f3982
Binary files /dev/null and b/Kp2aAccServiceLib/app/build/outputs/aar/app-release.aar differ
diff --git a/Kp2aAccServiceLib/app/build/tmp/packageDebugJar/MANIFEST.MF b/Kp2aAccServiceLib/app/build/tmp/packageDebugJar/MANIFEST.MF
new file mode 100644
index 0000000..59499bc
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/tmp/packageDebugJar/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
diff --git a/Kp2aAccServiceLib/app/build/tmp/packageReleaseJar/MANIFEST.MF b/Kp2aAccServiceLib/app/build/tmp/packageReleaseJar/MANIFEST.MF
new file mode 100644
index 0000000..59499bc
--- /dev/null
+++ b/Kp2aAccServiceLib/app/build/tmp/packageReleaseJar/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
diff --git a/Kp2aAccServiceLib/app/src/main/AndroidManifest.xml b/Kp2aAccServiceLib/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..d30c3c6
--- /dev/null
+++ b/Kp2aAccServiceLib/app/src/main/AndroidManifest.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Kp2aAccServiceLib/app/src/main/java/keepass2android/autofill/AutoFillService.java b/Kp2aAccServiceLib/app/src/main/java/keepass2android/autofill/AutoFillService.java
new file mode 100644
index 0000000..074d37f
--- /dev/null
+++ b/Kp2aAccServiceLib/app/src/main/java/keepass2android/autofill/AutoFillService.java
@@ -0,0 +1,442 @@
+package keepass2android.autofill;
+
+import android.accessibilityservice.AccessibilityService;
+import android.annotation.TargetApi;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.os.Build;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+import keepass2android.kbbridge.KeyboardData;
+
+
+/**
+ * Created by Philipp on 25.01.2016.
+ */
+public class AutoFillService extends AccessibilityService {
+
+
+ private static boolean _hasUsedData = true;
+ private static String _lastSearchUrl;
+ private static final String _logTag = "KP2AAF";
+ private static boolean _isRunning;
+
+ private final int autoFillNotificationId = 798810;
+ private final String androidAppPrefix = "androidapp://";
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ _isRunning = true;
+ android.util.Log.d(_logTag, "OnCreate");
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ _isRunning = false;
+ }
+
+ interface NodeCondition
+ {
+ boolean check(AccessibilityNodeInfo n);
+ }
+
+ class WindowIdCondition implements NodeCondition
+ {
+ private int id;
+
+ public WindowIdCondition(int id)
+ {
+ this.id = id;
+ }
+
+ @Override
+ public boolean check(AccessibilityNodeInfo n) {
+ return n.getWindowId() == id;
+ }
+ }
+
+ boolean isLauncherPackage(CharSequence packageName)
+ {
+ return "com.android.systemui".equals(packageName)
+ || "com.android.launcher3".equals(packageName);
+ }
+
+ @TargetApi(21)
+ class SystemUiCondition implements NodeCondition
+ {
+ @Override
+ public boolean check(AccessibilityNodeInfo n) {
+ return (n.getViewIdResourceName() != null) && (
+ (n.getViewIdResourceName().startsWith("com.android.systemui")) || (n.getViewIdResourceName().startsWith("com.android.launcher3")));
+ }
+ }
+
+ private class PasswordFieldCondition implements NodeCondition {
+ @Override
+ public boolean check(AccessibilityNodeInfo n) {
+ return n.isPassword();
+ }
+ }
+
+ private class EditTextCondition implements NodeCondition {
+ @Override
+ public boolean check(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.getClassName() != null) && (n.getClassName().toString().toLowerCase().contains("edittext"));
+ }
+ }
+
+
+ public static boolean isAvailable()
+ {
+ return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP);
+ }
+
+ public static boolean isRunning()
+ {
+ return _isRunning;
+ }
+
+ @Override
+ public void onAccessibilityEvent(AccessibilityEvent event) {
+ android.util.Log.d(_logTag, "OnAccEvent");
+
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
+ {
+ android.util.Log.d(_logTag, "AndroidVersion not supported");
+ return;
+ }
+
+ handleAccessibilityEvent(event);
+
+ }
+
+ @TargetApi(21)
+ private void handleAccessibilityEvent(AccessibilityEvent event) {
+ try
+ {
+ if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED
+ || event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED)
+ {
+ CharSequence packageName = event.getPackageName();
+ android.util.Log.d(_logTag, "event: " + event.getEventType() + ", package = " + packageName);
+ if ( isLauncherPackage(event.getPackageName()) )
+ {
+ android.util.Log.d(_logTag, "return.");
+ return; //avoid that the notification is cancelled when pulling down notif drawer
+ }
+ else
+ {
+ android.util.Log.d(_logTag, "event package is no launcher");
+ }
+
+ if ((packageName != null)
+ && (packageName.toString().startsWith("keepass2android.")))
+ {
+ android.util.Log.d(_logTag, "don't autofill kp2a.");
+ return;
+ }
+
+ AccessibilityNodeInfo root = getRootInActiveWindow();
+
+ if ( isLauncherPackage(root.getPackageName()) )
+ {
+ android.util.Log.d(_logTag, "return, root is from launcher.");
+ return; //avoid that the notification is cancelled when pulling down notif drawer
+ }
+ else
+ {
+ android.util.Log.d(_logTag, "root package is no launcher");
+ }
+
+ int eventWindowId = event.getWindowId();
+ if ((ExistsNodeOrChildren(root, new WindowIdCondition(eventWindowId)) && !ExistsNodeOrChildren(root, new SystemUiCondition())))
+ {
+ boolean cancelNotification = true;
+
+ String url = androidAppPrefix + root.getPackageName();
+
+ if ( "com.android.chrome".equals(root.getPackageName()) )
+ {
+ List urlFields = root.findAccessibilityNodeInfosByViewId("com.android.chrome:id/url_bar");
+ url = urlFromAddressFields(urlFields, url);
+
+ }
+ else if (packageName == "com.sec.android.app.sbrowser")
+ {
+ List urlFields = root.findAccessibilityNodeInfosByViewId("com.sec.android.app.sbrowser:id/location_bar_edit_text");
+ url = urlFromAddressFields(urlFields, url);
+ }
+ else if ("com.android.browser".equals(root.getPackageName()))
+ {
+ List urlFields = root.findAccessibilityNodeInfosByViewId("com.android.browser:id/url");
+ url = urlFromAddressFields(urlFields, url);
+ }
+
+ android.util.Log.d(_logTag, "URL=" + url);
+
+ if (ExistsNodeOrChildren(root, new PasswordFieldCondition()))
+ {
+ if ((getLastReceivedCredentialsUser() != null) &&
+ (!_hasUsedData) &&
+ (Objects.equals(url, _lastSearchUrl)
+ || isSame(getCredentialsField("URL"), url)))
+ {
+ android.util.Log.d(_logTag, "Filling credentials for " + url);
+
+ List emptyPasswordFields = new ArrayList<>();
+ GetNodeOrChildren(root, new PasswordFieldCondition(), emptyPasswordFields);
+
+ List allEditTexts = new ArrayList<>();
+ GetNodeOrChildren(root, new EditTextCondition(), allEditTexts);
+
+ AccessibilityNodeInfo usernameEdit = null;
+ for (int i=0;i passwordFields)
+ {
+ Log.d(_logTag, "_hasUsedData = " + _hasUsedData);
+ if ((keepass2android.kbbridge.KeyboardData.hasData()) && (_hasUsedData == false))
+ {
+ fillDataInTextField(usernameEdit, getLastReceivedCredentialsUser());
+ for (int i=0;i result) {
+ if (n != null)
+ {
+ if (condition.check(n))
+ result.add(n);
+ for (int i = 0; i < n.getChildCount(); i++)
+ {
+ GetNodeOrChildren(n.getChild(i), condition, result);
+ }
+ }
+ }
+
+ private boolean ExistsNodeOrChildren(AccessibilityNodeInfo n, NodeCondition condition) {
+ if (n == null) return false;
+ if (condition.check(n))
+ return true;
+ for (int i = 0; i < n.getChildCount(); i++)
+ {
+ if (ExistsNodeOrChildren(n.getChild(i), condition))
+ return true;
+ }
+ return false;
+ }
+
+ private String urlFromAddressFields(List urlFields, String url) {
+ if (!urlFields.isEmpty())
+ {
+ AccessibilityNodeInfo addressField = urlFields.get(0);
+ CharSequence text = addressField.getText();
+ if (text != null)
+ {
+ url = text.toString();
+ if (!url.contains("://"))
+ url = "http://" + url;
+ }
+ }
+ return url;
+ }
+
+ @Override
+ public void onInterrupt() {
+
+ }
+
+ public static void NotifyNewData(String searchUrl)
+ {
+ _hasUsedData = false;
+ _lastSearchUrl = searchUrl;
+ android.util.Log.d(_logTag, "Notify new data: " + searchUrl);
+ }
+
+}
diff --git a/Kp2aAccServiceLib/app/src/main/java/keepass2android/kbbridge/KeyboardData.java b/Kp2aAccServiceLib/app/src/main/java/keepass2android/kbbridge/KeyboardData.java
new file mode 100644
index 0000000..c23169d
--- /dev/null
+++ b/Kp2aAccServiceLib/app/src/main/java/keepass2android/kbbridge/KeyboardData.java
@@ -0,0 +1,24 @@
+
+package keepass2android.kbbridge;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import android.text.TextUtils;
+public class KeyboardData
+{
+ public static List availableFields = new ArrayList();
+ public static String entryName;
+ public static String entryId;
+
+ public static boolean hasData()
+ {
+ return !TextUtils.isEmpty(entryId);
+ }
+
+ public static void clear()
+ {
+ availableFields.clear();
+ entryName = entryId = "";
+ }
+}
diff --git a/Kp2aAccServiceLib/app/src/main/java/keepass2android/kbbridge/KeyboardDataBuilder.java b/Kp2aAccServiceLib/app/src/main/java/keepass2android/kbbridge/KeyboardDataBuilder.java
new file mode 100644
index 0000000..e2dee9f
--- /dev/null
+++ b/Kp2aAccServiceLib/app/src/main/java/keepass2android/kbbridge/KeyboardDataBuilder.java
@@ -0,0 +1,20 @@
+package keepass2android.kbbridge;
+import java.util.ArrayList;
+import java.util.HashMap;
+public class KeyboardDataBuilder {
+ private ArrayList availableFields = new ArrayList();
+
+ public void addString(String key, String displayName, String valueToType)
+ {
+ StringForTyping stringToType = new StringForTyping();
+ stringToType.key = key;
+ stringToType.displayName = displayName;
+ stringToType.value = valueToType;
+ availableFields.add(stringToType);
+ }
+
+ public void commit()
+ {
+ KeyboardData.availableFields = this.availableFields;
+ }
+}
diff --git a/Kp2aAccServiceLib/app/src/main/java/keepass2android/kbbridge/StringForTyping.java b/Kp2aAccServiceLib/app/src/main/java/keepass2android/kbbridge/StringForTyping.java
new file mode 100644
index 0000000..9348dad
--- /dev/null
+++ b/Kp2aAccServiceLib/app/src/main/java/keepass2android/kbbridge/StringForTyping.java
@@ -0,0 +1,20 @@
+package keepass2android.kbbridge;
+
+public class StringForTyping {
+ public String key; //internal identifier (PwEntry string field key)
+ public String displayName; //display name for displaying the key (might be translated)
+ public String value;
+
+ @Override
+ public StringForTyping clone(){
+
+ StringForTyping theClone = new StringForTyping();
+ theClone.key = key;
+ theClone.displayName = displayName;
+ theClone.value = value;
+
+ return theClone;
+ }
+
+
+}
diff --git a/Kp2aAccServiceLib/app/src/main/res/drawable-xhdpi/ic_notify_autofill.png b/Kp2aAccServiceLib/app/src/main/res/drawable-xhdpi/ic_notify_autofill.png
new file mode 100644
index 0000000..b7ffa48
Binary files /dev/null and b/Kp2aAccServiceLib/app/src/main/res/drawable-xhdpi/ic_notify_autofill.png differ
diff --git a/Kp2aAccServiceLib/app/src/main/res/values/strings_autofill.xml b/Kp2aAccServiceLib/app/src/main/res/values/strings_autofill.xml
new file mode 100644
index 0000000..146d6fa
--- /dev/null
+++ b/Kp2aAccServiceLib/app/src/main/res/values/strings_autofill.xml
@@ -0,0 +1,10 @@
+
+
+ Monitors apps and websites for password fields. Offers to look up credentials from Keepass2Android and auto-fill them into the forms.
+
+ Look up credentials
+ KP2A AutoFillPlugin
+ Keepass2Android AutoFill
+ AutoFill form for %1$s
+
+
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/build.gradle b/Kp2aAccServiceLib/build.gradle
new file mode 100644
index 0000000..88d246d
--- /dev/null
+++ b/Kp2aAccServiceLib/build.gradle
@@ -0,0 +1,15 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.2.3'
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
diff --git a/Kp2aAccServiceLib/build/intermediates/gradle_project_sync_data.bin b/Kp2aAccServiceLib/build/intermediates/gradle_project_sync_data.bin
new file mode 100644
index 0000000..2b03fe7
Binary files /dev/null and b/Kp2aAccServiceLib/build/intermediates/gradle_project_sync_data.bin differ
diff --git a/Kp2aAccServiceLib/gradle.properties b/Kp2aAccServiceLib/gradle.properties
new file mode 100644
index 0000000..0bb15d7
--- /dev/null
+++ b/Kp2aAccServiceLib/gradle.properties
@@ -0,0 +1 @@
+org.gradle.jvmargs=-Xmx1024m
\ No newline at end of file
diff --git a/Kp2aAccServiceLib/gradle/wrapper/gradle-wrapper.jar b/Kp2aAccServiceLib/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..8c0fb64
Binary files /dev/null and b/Kp2aAccServiceLib/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/Kp2aAccServiceLib/gradle/wrapper/gradle-wrapper.properties b/Kp2aAccServiceLib/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..0c71e76
--- /dev/null
+++ b/Kp2aAccServiceLib/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Apr 10 15:27:10 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/Kp2aAccServiceLib/gradlew b/Kp2aAccServiceLib/gradlew
new file mode 100644
index 0000000..91a7e26
--- /dev/null
+++ b/Kp2aAccServiceLib/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/Kp2aAccServiceLib/gradlew.bat b/Kp2aAccServiceLib/gradlew.bat
new file mode 100644
index 0000000..8a0b282
--- /dev/null
+++ b/Kp2aAccServiceLib/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/Kp2aAccServiceLib/local.properties b/Kp2aAccServiceLib/local.properties
new file mode 100644
index 0000000..a3385cb
--- /dev/null
+++ b/Kp2aAccServiceLib/local.properties
@@ -0,0 +1,11 @@
+## This file is automatically generated by Android Studio.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+#Sun Feb 05 03:56:35 CET 2017
+sdk.dir=C\:\\Users\\Philipp\\AppData\\Local\\Xamarin\\Universal\\AndroidSDK
diff --git a/Kp2aAccServiceLib/projectFilesBackup/.idea/workspace.xml b/Kp2aAccServiceLib/projectFilesBackup/.idea/workspace.xml
new file mode 100644
index 0000000..57ee844
--- /dev/null
+++ b/Kp2aAccServiceLib/projectFilesBackup/.idea/workspace.xml
@@ -0,0 +1,2185 @@
+
+
+
+
+
+
+
+
+
+
+
+