diff options
Diffstat (limited to 'autofill-parser')
-rw-r--r-- | autofill-parser/api/autofill-parser.api | 381 | ||||
-rw-r--r-- | autofill-parser/build.gradle.kts | 33 | ||||
-rw-r--r-- | autofill-parser/gradle.properties | 2 | ||||
-rw-r--r-- | autofill-parser/src/main/assets/publicsuffixes | bin | 105817 -> 107275 bytes | |||
-rw-r--r-- | autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillStrategyDsl.kt | 12 | ||||
-rw-r--r-- | autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FormField.kt | 2 | ||||
-rw-r--r-- | autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/PublicSuffixList.kt | 2 |
7 files changed, 425 insertions, 7 deletions
diff --git a/autofill-parser/api/autofill-parser.api b/autofill-parser/api/autofill-parser.api new file mode 100644 index 00000000..85f02081 --- /dev/null +++ b/autofill-parser/api/autofill-parser.api @@ -0,0 +1,381 @@ +public final class com/github/androidpasswordstore/autofillparser/AutofillAction : java/lang/Enum { + public static final field FillOtpFromSms Lcom/github/androidpasswordstore/autofillparser/AutofillAction; + public static final field Generate Lcom/github/androidpasswordstore/autofillparser/AutofillAction; + public static final field Match Lcom/github/androidpasswordstore/autofillparser/AutofillAction; + public static final field Search Lcom/github/androidpasswordstore/autofillparser/AutofillAction; + public static fun valueOf (Ljava/lang/String;)Lcom/github/androidpasswordstore/autofillparser/AutofillAction; + public static fun values ()[Lcom/github/androidpasswordstore/autofillparser/AutofillAction; +} + +public abstract interface annotation class com/github/androidpasswordstore/autofillparser/AutofillDsl : java/lang/annotation/Annotation { +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillHelperKt { + public static final fun computeCertificatesHash (Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String; + public static final fun findNodeByAutofillId (Landroid/app/assist/AssistStructure;Landroid/view/autofill/AutofillId;)Landroid/app/assist/AssistStructure$ViewNode; + public static final fun getWebOrigin (Landroid/app/assist/AssistStructure$ViewNode;)Ljava/lang/String; +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillRule { + public synthetic fun <init> (Ljava/util/List;ZZLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun match (Ljava/util/List;Ljava/util/List;Ljava/util/List;ZZ)Lcom/github/androidpasswordstore/autofillparser/AutofillScenario; +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillRule$AutofillRuleMatcher { + public fun <init> (Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType;Lcom/github/androidpasswordstore/autofillparser/FieldMatcher;ZZ)V + public final fun component1 ()Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType; + public final fun component2 ()Lcom/github/androidpasswordstore/autofillparser/FieldMatcher; + public final fun component3 ()Z + public final fun component4 ()Z + public final fun copy (Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType;Lcom/github/androidpasswordstore/autofillparser/FieldMatcher;ZZ)Lcom/github/androidpasswordstore/autofillparser/AutofillRule$AutofillRuleMatcher; + public static synthetic fun copy$default (Lcom/github/androidpasswordstore/autofillparser/AutofillRule$AutofillRuleMatcher;Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType;Lcom/github/androidpasswordstore/autofillparser/FieldMatcher;ZZILjava/lang/Object;)Lcom/github/androidpasswordstore/autofillparser/AutofillRule$AutofillRuleMatcher; + public fun equals (Ljava/lang/Object;)Z + public final fun getMatchHidden ()Z + public final fun getMatcher ()Lcom/github/androidpasswordstore/autofillparser/FieldMatcher; + public final fun getOptional ()Z + public final fun getType ()Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillRule$Builder { + public static final field Companion Lcom/github/androidpasswordstore/autofillparser/AutofillRule$Builder$Companion; + public fun <init> (ZZ)V + public final fun build ()Lcom/github/androidpasswordstore/autofillparser/AutofillRule; + public final fun currentPassword (ZZLkotlin/jvm/functions/Function1;)V + public static synthetic fun currentPassword$default (Lcom/github/androidpasswordstore/autofillparser/AutofillRule$Builder;ZZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public final fun genericPassword (ZLkotlin/jvm/functions/Function1;)V + public static synthetic fun genericPassword$default (Lcom/github/androidpasswordstore/autofillparser/AutofillRule$Builder;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public final fun getName ()Ljava/lang/String; + public final fun newPassword (ZLkotlin/jvm/functions/Function1;)V + public static synthetic fun newPassword$default (Lcom/github/androidpasswordstore/autofillparser/AutofillRule$Builder;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public final fun otp (ZLkotlin/jvm/functions/Function1;)V + public static synthetic fun otp$default (Lcom/github/androidpasswordstore/autofillparser/AutofillRule$Builder;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public final fun setName (Ljava/lang/String;)V + public final fun username (ZZLkotlin/jvm/functions/Function1;)V + public static synthetic fun username$default (Lcom/github/androidpasswordstore/autofillparser/AutofillRule$Builder;ZZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillRule$Builder$Companion { +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType : java/lang/Enum { + public static final field CurrentPassword Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType; + public static final field GenericPassword Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType; + public static final field NewPassword Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType; + public static final field Otp Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType; + public static final field Username Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType; + public static fun valueOf (Ljava/lang/String;)Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType; + public static fun values ()[Lcom/github/androidpasswordstore/autofillparser/AutofillRule$FillableFieldType; +} + +public abstract class com/github/androidpasswordstore/autofillparser/AutofillScenario { + public static final field BUNDLE_KEY_CURRENT_PASSWORD_IDS Ljava/lang/String; + public static final field BUNDLE_KEY_FILL_USERNAME Ljava/lang/String; + public static final field BUNDLE_KEY_GENERIC_PASSWORD_IDS Ljava/lang/String; + public static final field BUNDLE_KEY_NEW_PASSWORD_IDS Ljava/lang/String; + public static final field BUNDLE_KEY_OTP_ID Ljava/lang/String; + public static final field BUNDLE_KEY_USERNAME_ID Ljava/lang/String; + public static final field Companion Lcom/github/androidpasswordstore/autofillparser/AutofillScenario$Companion; + public final fun fieldsToFillOn (Lcom/github/androidpasswordstore/autofillparser/AutofillAction;)Ljava/util/List; + public final fun getAllFields ()Ljava/util/List; + public abstract fun getAllPasswordFields ()Ljava/util/List; + public final fun getFieldsToSave ()Ljava/util/List; + public abstract fun getFillUsername ()Z + public abstract fun getOtp ()Ljava/lang/Object; + public abstract fun getPasswordFieldsToFillOnGenerate ()Ljava/util/List; + public abstract fun getPasswordFieldsToFillOnMatch ()Ljava/util/List; + public abstract fun getPasswordFieldsToFillOnSearch ()Ljava/util/List; + public abstract fun getPasswordFieldsToSave ()Ljava/util/List; + public abstract fun getUsername ()Ljava/lang/Object; +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillScenario$Builder { + public fun <init> ()V + public final fun build ()Lcom/github/androidpasswordstore/autofillparser/AutofillScenario; + public final fun getCurrentPassword ()Ljava/util/List; + public final fun getFillUsername ()Z + public final fun getGenericPassword ()Ljava/util/List; + public final fun getNewPassword ()Ljava/util/List; + public final fun getOtp ()Ljava/lang/Object; + public final fun getUsername ()Ljava/lang/Object; + public final fun setFillUsername (Z)V + public final fun setOtp (Ljava/lang/Object;)V + public final fun setUsername (Ljava/lang/Object;)V +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillScenario$Companion { + public final fun fromBundle (Landroid/os/Bundle;)Lcom/github/androidpasswordstore/autofillparser/AutofillScenario; +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillScenarioKt { + public static final fun fillWithAutofillId (Landroid/service/autofill/Dataset$Builder;Lcom/github/androidpasswordstore/autofillparser/AutofillScenario;Lcom/github/androidpasswordstore/autofillparser/AutofillAction;Lcom/github/androidpasswordstore/autofillparser/Credentials;)V + public static final fun fillWithFormField (Landroid/service/autofill/Dataset$Builder;Lcom/github/androidpasswordstore/autofillparser/AutofillScenario;Lcom/github/androidpasswordstore/autofillparser/AutofillAction;Lcom/github/androidpasswordstore/autofillparser/Credentials;)V + public static final fun getPasswordValue (Lcom/github/androidpasswordstore/autofillparser/AutofillScenario;)Ljava/lang/String; + public static final fun getUsernameValue (Lcom/github/androidpasswordstore/autofillparser/AutofillScenario;)Ljava/lang/String; + public static final fun map (Lcom/github/androidpasswordstore/autofillparser/AutofillScenario;Lkotlin/jvm/functions/Function1;)Lcom/github/androidpasswordstore/autofillparser/AutofillScenario; + public static final fun passesOriginCheck (Lcom/github/androidpasswordstore/autofillparser/AutofillScenario;Z)Z + public static final fun recoverNodes (Lcom/github/androidpasswordstore/autofillparser/AutofillScenario;Landroid/app/assist/AssistStructure;)Lcom/github/androidpasswordstore/autofillparser/AutofillScenario; + public static final fun toBundleFormField (Lcom/github/androidpasswordstore/autofillparser/AutofillScenario;)Landroid/os/Bundle; +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillStrategy { + public synthetic fun <init> (Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun match (Ljava/util/List;ZZ)Lcom/github/androidpasswordstore/autofillparser/AutofillScenario; +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillStrategy$Builder { + public fun <init> ()V + public final fun build ()Lcom/github/androidpasswordstore/autofillparser/AutofillStrategy; + public final fun rule (ZZLkotlin/jvm/functions/Function1;)V + public static synthetic fun rule$default (Lcom/github/androidpasswordstore/autofillparser/AutofillStrategy$Builder;ZZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillStrategyDslKt { + public static final fun strategy (Lkotlin/jvm/functions/Function1;)Lcom/github/androidpasswordstore/autofillparser/AutofillStrategy; +} + +public final class com/github/androidpasswordstore/autofillparser/AutofillStrategyKt { + public static final fun getAutofillStrategy ()Lcom/github/androidpasswordstore/autofillparser/AutofillStrategy; +} + +public final class com/github/androidpasswordstore/autofillparser/BrowserAutofillSupportInfo { + public fun <init> (Lcom/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod;Ljava/lang/Integer;)V + public final fun component1 ()Lcom/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod; + public final fun component2 ()Ljava/lang/Integer; + public final fun copy (Lcom/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod;Ljava/lang/Integer;)Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportInfo; + public static synthetic fun copy$default (Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportInfo;Lcom/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod;Ljava/lang/Integer;ILjava/lang/Object;)Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportInfo; + public fun equals (Ljava/lang/Object;)Z + public final fun getMultiOriginMethod ()Lcom/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod; + public final fun getSaveFlags ()Ljava/lang/Integer; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/github/androidpasswordstore/autofillparser/BrowserAutofillSupportLevel : java/lang/Enum { + public static final field FlakyFill Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportLevel; + public static final field GeneralFill Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportLevel; + public static final field GeneralFillAndSave Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportLevel; + public static final field None Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportLevel; + public static final field PasswordFill Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportLevel; + public static fun valueOf (Ljava/lang/String;)Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportLevel; + public static fun values ()[Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportLevel; +} + +public final class com/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod : java/lang/Enum { + public static final field Field Lcom/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod; + public static final field None Lcom/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod; + public static final field WebView Lcom/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod; + public static fun valueOf (Ljava/lang/String;)Lcom/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod; + public static fun values ()[Lcom/github/androidpasswordstore/autofillparser/BrowserMultiOriginMethod; +} + +public final class com/github/androidpasswordstore/autofillparser/CertaintyLevel : java/lang/Enum { + public static final field Certain Lcom/github/androidpasswordstore/autofillparser/CertaintyLevel; + public static final field Impossible Lcom/github/androidpasswordstore/autofillparser/CertaintyLevel; + public static final field Likely Lcom/github/androidpasswordstore/autofillparser/CertaintyLevel; + public static final field Possible Lcom/github/androidpasswordstore/autofillparser/CertaintyLevel; + public static fun valueOf (Ljava/lang/String;)Lcom/github/androidpasswordstore/autofillparser/CertaintyLevel; + public static fun values ()[Lcom/github/androidpasswordstore/autofillparser/CertaintyLevel; +} + +public final class com/github/androidpasswordstore/autofillparser/ClassifiedAutofillScenario : com/github/androidpasswordstore/autofillparser/AutofillScenario { + public fun <init> (Ljava/lang/Object;ZLjava/lang/Object;Ljava/util/List;Ljava/util/List;)V + public final fun component1 ()Ljava/lang/Object; + public final fun component2 ()Z + public final fun component3 ()Ljava/lang/Object; + public final fun component4 ()Ljava/util/List; + public final fun component5 ()Ljava/util/List; + public final fun copy (Ljava/lang/Object;ZLjava/lang/Object;Ljava/util/List;Ljava/util/List;)Lcom/github/androidpasswordstore/autofillparser/ClassifiedAutofillScenario; + public static synthetic fun copy$default (Lcom/github/androidpasswordstore/autofillparser/ClassifiedAutofillScenario;Ljava/lang/Object;ZLjava/lang/Object;Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Lcom/github/androidpasswordstore/autofillparser/ClassifiedAutofillScenario; + public fun equals (Ljava/lang/Object;)Z + public fun getAllPasswordFields ()Ljava/util/List; + public final fun getCurrentPassword ()Ljava/util/List; + public fun getFillUsername ()Z + public final fun getNewPassword ()Ljava/util/List; + public fun getOtp ()Ljava/lang/Object; + public fun getPasswordFieldsToFillOnGenerate ()Ljava/util/List; + public fun getPasswordFieldsToFillOnMatch ()Ljava/util/List; + public fun getPasswordFieldsToFillOnSearch ()Ljava/util/List; + public fun getPasswordFieldsToSave ()Ljava/util/List; + public fun getUsername ()Ljava/lang/Object; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/github/androidpasswordstore/autofillparser/Credentials { + public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/github/androidpasswordstore/autofillparser/Credentials; + public static synthetic fun copy$default (Lcom/github/androidpasswordstore/autofillparser/Credentials;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/github/androidpasswordstore/autofillparser/Credentials; + public fun equals (Ljava/lang/Object;)Z + public final fun getOtp ()Ljava/lang/String; + public final fun getPassword ()Ljava/lang/String; + public final fun getUsername ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/github/androidpasswordstore/autofillparser/FeatureAndTrustDetectionKt { + public static final fun getBrowserAutofillSupportInfoIfTrusted (Landroid/content/Context;Ljava/lang/String;)Lcom/github/androidpasswordstore/autofillparser/BrowserAutofillSupportInfo; + public static final fun getInstalledBrowsersWithAutofillSupportLevel (Landroid/content/Context;)Ljava/util/List; +} + +public abstract interface class com/github/androidpasswordstore/autofillparser/FieldMatcher { + public abstract fun match (Ljava/util/List;Ljava/util/List;)Ljava/util/List; +} + +public final class com/github/androidpasswordstore/autofillparser/FieldMatcher$Builder { + public fun <init> ()V + public final fun breakTieOnPair (Lkotlin/jvm/functions/Function2;)V + public final fun breakTieOnSingle (Lkotlin/jvm/functions/Function2;)V + public final fun build ()Lcom/github/androidpasswordstore/autofillparser/FieldMatcher; + public final fun takePair (Lkotlin/jvm/functions/Function2;)V + public static synthetic fun takePair$default (Lcom/github/androidpasswordstore/autofillparser/FieldMatcher$Builder;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V + public final fun takeSingle (Lkotlin/jvm/functions/Function2;)V + public static synthetic fun takeSingle$default (Lcom/github/androidpasswordstore/autofillparser/FieldMatcher$Builder;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V +} + +public final class com/github/androidpasswordstore/autofillparser/FillableForm { + public static final field Companion Lcom/github/androidpasswordstore/autofillparser/FillableForm$Companion; + public synthetic fun <init> (Lcom/github/androidpasswordstore/autofillparser/FormOrigin;Lcom/github/androidpasswordstore/autofillparser/AutofillScenario;Ljava/util/List;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getFormOrigin ()Lcom/github/androidpasswordstore/autofillparser/FormOrigin; + public final fun getIgnoredIds ()Ljava/util/List; + public final fun getSaveFlags ()Ljava/lang/Integer; + public final fun getScenario ()Lcom/github/androidpasswordstore/autofillparser/AutofillScenario; + public final fun toClientState ()Landroid/os/Bundle; +} + +public final class com/github/androidpasswordstore/autofillparser/FillableForm$Companion { + public final fun parseAssistStructure (Landroid/content/Context;Landroid/app/assist/AssistStructure;ZLkotlin/sequences/Sequence;)Lcom/github/androidpasswordstore/autofillparser/FillableForm; + public static synthetic fun parseAssistStructure$default (Lcom/github/androidpasswordstore/autofillparser/FillableForm$Companion;Landroid/content/Context;Landroid/app/assist/AssistStructure;ZLkotlin/sequences/Sequence;ILjava/lang/Object;)Lcom/github/androidpasswordstore/autofillparser/FillableForm; +} + +public final class com/github/androidpasswordstore/autofillparser/FixedSaveCallback { + public fun <init> (Landroid/content/Context;Landroid/service/autofill/SaveCallback;)V + public final fun onFailure (Ljava/lang/CharSequence;)V + public final fun onSuccess (Landroid/content/IntentSender;)V +} + +public final class com/github/androidpasswordstore/autofillparser/FormField { + public static final field Companion Lcom/github/androidpasswordstore/autofillparser/FormField$Companion; + public fun <init> (Landroid/app/assist/AssistStructure$ViewNode;IZLjava/lang/String;)V + public synthetic fun <init> (Landroid/app/assist/AssistStructure$ViewNode;IZLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun directlyFollows (Lcom/github/androidpasswordstore/autofillparser/FormField;)Z + public final fun directlyFollows (Ljava/lang/Iterable;)Z + public final fun directlyPrecedes (Lcom/github/androidpasswordstore/autofillparser/FormField;)Z + public final fun directlyPrecedes (Ljava/lang/Iterable;)Z + public fun equals (Ljava/lang/Object;)Z + public final fun getAutofillId ()Landroid/view/autofill/AutofillId; + public final fun getCouldBeTwoStepHiddenPassword ()Z + public final fun getCouldBeTwoStepHiddenUsername ()Z + public final fun getHasAutocompleteHintCurrentPassword ()Z + public final fun getHasAutofillHintPassword ()Z + public final fun getHasHintNewPassword ()Z + public final fun getHasHintOtp ()Z + public final fun getHasHintPassword ()Z + public final fun getHasHintUsername ()Z + public final fun getOtpCertainty ()Lcom/github/androidpasswordstore/autofillparser/CertaintyLevel; + public final fun getPasswordCertainty ()Lcom/github/androidpasswordstore/autofillparser/CertaintyLevel; + public final fun getRelevantField ()Z + public final fun getUsernameCertainty ()Lcom/github/androidpasswordstore/autofillparser/CertaintyLevel; + public final fun getWebOrigin ()Ljava/lang/String; + public final fun getWebOriginToPassDown ()Ljava/lang/String; + public fun hashCode ()I + public final fun isFocused ()Z + public final fun isVisible ()Z + public fun toString ()Ljava/lang/String; +} + +public final class com/github/androidpasswordstore/autofillparser/FormField$Companion { +} + +public abstract class com/github/androidpasswordstore/autofillparser/FormOrigin { + public static final field Companion Lcom/github/androidpasswordstore/autofillparser/FormOrigin$Companion; + public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getIdentifier ()Ljava/lang/String; + public final fun getPrettyIdentifier (Landroid/content/Context;Z)Ljava/lang/String; + public static synthetic fun getPrettyIdentifier$default (Lcom/github/androidpasswordstore/autofillparser/FormOrigin;Landroid/content/Context;ZILjava/lang/Object;)Ljava/lang/String; + public final fun toBundle ()Landroid/os/Bundle; +} + +public final class com/github/androidpasswordstore/autofillparser/FormOrigin$App : com/github/androidpasswordstore/autofillparser/FormOrigin { + public fun <init> (Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;)Lcom/github/androidpasswordstore/autofillparser/FormOrigin$App; + public static synthetic fun copy$default (Lcom/github/androidpasswordstore/autofillparser/FormOrigin$App;Ljava/lang/String;ILjava/lang/Object;)Lcom/github/androidpasswordstore/autofillparser/FormOrigin$App; + public fun equals (Ljava/lang/Object;)Z + public fun getIdentifier ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/github/androidpasswordstore/autofillparser/FormOrigin$Companion { + public final fun fromBundle (Landroid/os/Bundle;)Lcom/github/androidpasswordstore/autofillparser/FormOrigin; +} + +public final class com/github/androidpasswordstore/autofillparser/FormOrigin$Web : com/github/androidpasswordstore/autofillparser/FormOrigin { + public fun <init> (Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;)Lcom/github/androidpasswordstore/autofillparser/FormOrigin$Web; + public static synthetic fun copy$default (Lcom/github/androidpasswordstore/autofillparser/FormOrigin$Web;Ljava/lang/String;ILjava/lang/Object;)Lcom/github/androidpasswordstore/autofillparser/FormOrigin$Web; + public fun equals (Ljava/lang/Object;)Z + public fun getIdentifier ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/github/androidpasswordstore/autofillparser/GenericAutofillScenario : com/github/androidpasswordstore/autofillparser/AutofillScenario { + public fun <init> (Ljava/lang/Object;ZLjava/lang/Object;Ljava/util/List;)V + public final fun component1 ()Ljava/lang/Object; + public final fun component2 ()Z + public final fun component3 ()Ljava/lang/Object; + public final fun component4 ()Ljava/util/List; + public final fun copy (Ljava/lang/Object;ZLjava/lang/Object;Ljava/util/List;)Lcom/github/androidpasswordstore/autofillparser/GenericAutofillScenario; + public static synthetic fun copy$default (Lcom/github/androidpasswordstore/autofillparser/GenericAutofillScenario;Ljava/lang/Object;ZLjava/lang/Object;Ljava/util/List;ILjava/lang/Object;)Lcom/github/androidpasswordstore/autofillparser/GenericAutofillScenario; + public fun equals (Ljava/lang/Object;)Z + public fun getAllPasswordFields ()Ljava/util/List; + public fun getFillUsername ()Z + public final fun getGenericPassword ()Ljava/util/List; + public fun getOtp ()Ljava/lang/Object; + public fun getPasswordFieldsToFillOnGenerate ()Ljava/util/List; + public fun getPasswordFieldsToFillOnMatch ()Ljava/util/List; + public fun getPasswordFieldsToFillOnSearch ()Ljava/util/List; + public fun getPasswordFieldsToSave ()Ljava/util/List; + public fun getUsername ()Ljava/lang/Object; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/github/androidpasswordstore/autofillparser/PublicSuffixListCacheKt { + public static final fun cachePublicSuffixList (Landroid/content/Context;)V + public static final fun getCanonicalSuffix (Landroid/content/Context;Ljava/lang/String;Lkotlin/sequences/Sequence;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun getPublicSuffixPlusOne (Landroid/content/Context;Ljava/lang/String;Lkotlin/sequences/Sequence;)Ljava/lang/String; + public static final fun getSuffixPlusUpToOne (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; +} + +public final class com/github/androidpasswordstore/autofillparser/SingleFieldMatcher : com/github/androidpasswordstore/autofillparser/FieldMatcher { + public fun <init> (Lkotlin/jvm/functions/Function2;Ljava/util/List;)V + public fun match (Ljava/util/List;Ljava/util/List;)Ljava/util/List; +} + +public final class com/github/androidpasswordstore/autofillparser/SingleFieldMatcher$Builder { + public fun <init> ()V + public final fun breakTieOnSingle (Lkotlin/jvm/functions/Function2;)V + public final fun build ()Lcom/github/androidpasswordstore/autofillparser/SingleFieldMatcher; + public final fun takeSingle (Lkotlin/jvm/functions/Function2;)V + public static synthetic fun takeSingle$default (Lcom/github/androidpasswordstore/autofillparser/SingleFieldMatcher$Builder;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V +} + +public final class mozilla/components/lib/publicsuffixlist/PublicSuffixList { + public fun <init> (Landroid/content/Context;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlinx/coroutines/CoroutineScope;)V + public synthetic fun <init> (Landroid/content/Context;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getPublicSuffix (Ljava/lang/String;)Lkotlinx/coroutines/Deferred; + public final fun getPublicSuffixPlusOne (Ljava/lang/String;)Lkotlinx/coroutines/Deferred; + public final fun isPublicSuffix (Ljava/lang/String;)Lkotlinx/coroutines/Deferred; + public final fun prefetch ()Lkotlinx/coroutines/Deferred; + public final fun stripPublicSuffix (Ljava/lang/String;)Lkotlinx/coroutines/Deferred; +} + diff --git a/autofill-parser/build.gradle.kts b/autofill-parser/build.gradle.kts index e668a1f3..7f2a6467 100644 --- a/autofill-parser/build.gradle.kts +++ b/autofill-parser/build.gradle.kts @@ -39,10 +39,37 @@ afterEvaluate { } publications { create<MavenPublication>("apsMaven") { + fun getKey(propertyName: String): String { + return findProperty(propertyName)?.toString() ?: error("Failed to find property for $propertyName") + } + from(components.getByName("release")) - groupId = findProperty("GROUP").toString() - artifactId = findProperty("POM_ARTIFACT_ID").toString() - version = findProperty("VERSION_NAME").toString() + groupId = getKey("GROUP") + artifactId = getKey("POM_ARTIFACT_ID") + version = getKey("VERSION_NAME") + pom { + name.set(getKey("POM_ARTIFACT_ID")) + description.set(getKey("POM_ARTIFACT_DESCRIPTION")) + url.set(getKey("POM_URL")) + licenses { + license { + name.set(getKey("POM_LICENSE_NAME")) + url.set(getKey("POM_LICENSE_URL")) + } + } + developers { + developer { + id.set(getKey("POM_DEVELOPER_ID")) + name.set(getKey("POM_DEVELOPER_NAME")) + email.set(getKey("POM_DEVELOPER_EMAIL")) + } + } + scm { + connection.set(getKey("POM_SCM_CONNECTION")) + developerConnection.set(getKey("POM_SCM_DEV_CONNECTION")) + url.set(getKey("POM_SCM_URL")) + } + } } } } diff --git a/autofill-parser/gradle.properties b/autofill-parser/gradle.properties index 24371c01..fe1b7688 100644 --- a/autofill-parser/gradle.properties +++ b/autofill-parser/gradle.properties @@ -1,6 +1,7 @@ GROUP=com.github.androidpasswordstore VERSION_NAME=1.0.0 POM_ARTIFACT_ID=autofill-parser +POM_ARTIFACT_DESCRIPTION=Android library for low-level parsing of Autofill structures POM_URL=https://github.com/Android-Password-Store/android-password-store POM_SCM_URL=https://github.com/Android-Password-Store/android-password-store @@ -13,3 +14,4 @@ POM_LICENSE_DIST=repo POM_DEVELOPER_ID=android-password-store POM_DEVELOPER_NAME=The Android Password Store Authors +POM_DEVELOPER_EMAIL=aps@msfjarvis.dev diff --git a/autofill-parser/src/main/assets/publicsuffixes b/autofill-parser/src/main/assets/publicsuffixes Binary files differindex 814d4969..074a5607 100644 --- a/autofill-parser/src/main/assets/publicsuffixes +++ b/autofill-parser/src/main/assets/publicsuffixes diff --git a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillStrategyDsl.kt b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillStrategyDsl.kt index 86201be8..f3f6d97d 100644 --- a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillStrategyDsl.kt +++ b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillStrategyDsl.kt @@ -94,6 +94,10 @@ class SingleFieldMatcher( override fun match(fields: List<FormField>, alreadyMatched: List<FormField>): List<FormField>? { return fields.minus(alreadyMatched).filter { take(it, alreadyMatched) }.let { contestants -> + when (contestants.size) { + 1 -> return@let listOf(contestants.single()) + 0 -> return@let null + } var current = contestants for ((i, tieBreaker) in tieBreakers.withIndex()) { // Successively filter matched fields via tie breakers... @@ -127,11 +131,15 @@ private class PairOfFieldsMatcher( return fields.minus(alreadyMatched).zipWithNext() .filter { it.first directlyPrecedes it.second }.filter { take(it, alreadyMatched) } .let { contestants -> + when (contestants.size) { + 1 -> return@let contestants.single().toList() + 0 -> return@let null + } var current = contestants for ((i, tieBreaker) in tieBreakers.withIndex()) { val new = current.filter { tieBreaker(it, alreadyMatched) } if (new.isEmpty()) { - d { "Tie breaker #${i + 1}: Didn't match any field; skipping" } + d { "Tie breaker #${i + 1}: Didn't match any pair of fields; skipping" } continue } // and return if the available options have been narrowed to a single field. @@ -140,7 +148,7 @@ private class PairOfFieldsMatcher( current = new break } - d { "Tie breaker #${i + 1}: Matched ${new.size} fields; continuing" } + d { "Tie breaker #${i + 1}: Matched ${new.size} pairs of fields; continuing" } current = new } current.singleOrNull()?.toList() diff --git a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FormField.kt b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FormField.kt index ae16a995..91e51f5c 100644 --- a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FormField.kt +++ b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FormField.kt @@ -243,7 +243,7 @@ class FormField( // Password field heuristics (based only on the current field) private val isPossiblePasswordField = - notExcluded && (isAndroidPasswordField || isHtmlPasswordField) + notExcluded && (isAndroidPasswordField || isHtmlPasswordField || hasHintPassword) private val isCertainPasswordField = isPossiblePasswordField && hasHintPassword private val isLikelyPasswordField = isPossiblePasswordField && (isCertainPasswordField || PASSWORD_HEURISTIC_TERMS.anyMatchesFieldInfo) diff --git a/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/PublicSuffixList.kt b/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/PublicSuffixList.kt index d4d1c1af..f1cdb12a 100644 --- a/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/PublicSuffixList.kt +++ b/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/PublicSuffixList.kt @@ -32,7 +32,7 @@ class PublicSuffixList( private val scope: CoroutineScope = CoroutineScope(dispatcher) ) { - private val data: PublicSuffixListData by lazy { PublicSuffixListLoader.load(context) } + private val data: PublicSuffixListData by lazy(LazyThreadSafetyMode.PUBLICATION) { PublicSuffixListLoader.load(context) } /** * Prefetch the public suffix list from disk so that it is available in memory. |