aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/com/zeapo/pwdstore/autofill
AgeCommit message (Collapse)AuthorFilesLines
2020-12-05Refactor package structure (#1233)Harsh Shandilya11-1723/+0
* idea: default test runner to Gradle * Kick off package structure revamp * Reparent all classes under dev.msfjarvis.aps Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-11-05Resolve Autofill breakage below API 30 (#1187)Harsh Shandilya3-47/+214
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-11-03Fix Autofill regression caused by empty dataset (#1184)Fabian Henneke1-4/+4
2020-11-03Make autofill-parser API explicit and refactor (#1182)Fabian Henneke2-10/+9
2020-11-02Improve Autofill UI and enable inline presentations (#1181)Fabian Henneke4-83/+169
* Improve Autofill UI and enable inline presentations Improves the Autofill UI in the following ways: * Add support for Android 11 inline presentations of Autofill datasets. * Instead of showing the identifier (app name or web origin) of the current app on top of every Autofill dataset, it is now shown 1) as a header dataset on Android 9 and 10 as well as 2) at the top of the search activity on all supported versions of Android. Rationale: The identifier is only used in trust decisions when choosing an existing entry to fill and should feature prominently in that view, not elsewhere. * Show the actual identifier part of a matched entry's path, which may differ from the identifier of the matched app/website. * Slightly tweak the labels of Search/Generate Autofill actions to indicate that a) this is about entries and b) the user may skip the generation of a password and supply a custom one as well. * Suppress lint error * Address review comments * Add a fixme about properly handling fill-in datasets * CHANGELOG: add entry for inline presentation Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Remove unused parameter Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-31Finish activity when Autofill Generate is cancelled (#1179)Fabian Henneke1-1/+3
2020-10-22Remove accessibility autofill support (#1162)Harsh Shandilya5-1253/+0
* autofill: remove Accessibility backend Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * CHANGELOG: update Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-06Show new FillResponse right after publisher reset (#1138)Fabian Henneke2-3/+18
If Autofill shows a warning about an app whose publisher changed and the user decides to trust the app and clear previous matches, they should immediately be given the option to select a new match. Previously, as AutofillPublisherChangedActivity did not return a result, the old FillResponse with just a warning would be reused. We now pass a useful response with no matches on to the activity, which returns it after the user has chosen to reset the publisher info.
2020-10-06Fix Autofill publisher changed layout (#1136)Harsh Shandilya1-1/+1
* Fix Autofill publisher changed layout Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Tweak autofill publisher UI Signed-off-by: Aditya Wasan <adityawasan55@gmail.com> Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
2020-10-05Resolve lock contention from lazy delegates (#1135)Harsh Shandilya1-1/+1
2020-10-02all: refactor ActivityResultContracts usages to adhere to API requirementsHarsh Shandilya2-17/+21
The newest versions of AndroidX Activity and Fragments correctly enforce the requirement for all contracts to be registered at class init or before the lifecycle has reached `Lifecycle.State.STARTED`. To comply with these requirements, move all instances of `registerForActivityResult` being called at arbitrary points in the code to be done at class init. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-16Autofill: Extract AutofillParser into separate subproject (#1101)Vincent Breitmoser17-2101/+314
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-09-10Autofill: add kiwi as a supported browser (#1091)Rounak Datta1-0/+2
2020-09-05AutofillPublisherChangedActivity: use runCatching to replace exception handlingHarsh Shandilya1-3/+5
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05AutofillScenario: use runCatching to replace exception handlingHarsh Shandilya1-3/+5
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05Form: use runCatching to replace exception handlingHarsh Shandilya2-12/+17
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05AutofillDecryptActivity: use runCatching to replace exception handlingHarsh Shandilya1-63/+68
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-03Refactor Git operations and auth (#1066)Fabian Henneke1-14/+2
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-01Add Keystore backend for SSH public key authentication (#1070)Fabian Henneke1-1/+0
2020-08-22Autofill: add support for Bromite and Ungoogled Chromium (#1041)Devin J. Pohly1-0/+5
2020-08-11Switch to URL-based Git config and refactor Git settings (#1008)Fabian Henneke3-11/+8
* Make Git config URL-based and refactor * Use Kotlin style null handling for string prefs * Also show an error if generated URL can't be parsed * Add some testcases for migration strategy Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-06Refactor uses of applicationContext and startActivityForResult (#997)Fabian Henneke5-17/+14
* Refactor uses of applicationContext and startActivityForResult This commit applies three types of refactoring: 1. Remove context argument from PasswordRepository companion functions by relying on Application.instance. 2. Introduce a sharedPrefs extension function on Context that returns the default SharedPreferences for the applicationContext. 3. Use OpenDocument() and OpenDocumentTree() contracts. * Drop toPasswordItem argument
2020-08-05Remove GitAsyncTask and replace with non-blocking coroutines (#865)Harsh Shandilya2-5/+8
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-07-31Switch to non-deprecated stdlib methods (#990)Harsh Shandilya1-2/+2
min and max were deprecated in favor of minOrNull and maxOrNull respectively to match their names to the typical naming format used by stdlib methods with nullable return types Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-30Add "challenge" and "verification" to OTP heuristic terms (#984)Fabian Henneke1-0/+2
2020-07-29Upgrade to Kotlin 1.4 (#978)Harsh Shandilya4-22/+39
* build: uprev to Kotlin 1.4 Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Remove explicit type argument Not required anymore with Kotlin 1.4 Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * build: enable Kotlin 1.4 language features Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * all: add trailing commas where reasonable Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-07-23Allow Autofill on custom views with Autofill hints (#946)Fabian Henneke1-3/+4
2020-07-19Fix Autofill result contract bug (#941)Fabian Henneke1-1/+1
2020-07-16Remove manual key selection and start actually using `.gpg-id` (#916)Harsh Shandilya1-1/+1
Co-authored-by: Aditya Wasan <adityawasan55@gmail.com> Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-07-14Revert "Work around Chrome Autofill issue (#921)" (#933)Fabian Henneke1-94/+0
2020-07-14Fix navigation bar theming and reformat (#930)Harsh Shandilya1-0/+1
2020-07-08global: set an import order rule and reformat with it (#924)Harsh Shandilya18-21/+45
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-07Work around Chrome Autofill issue (#921)Fabian Henneke1-0/+93
2020-07-07Major UI overhaul and the introduction of a new icon (#920)Harsh Shandilya5-0/+5
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-07-03Migrate to ActivityResultContracts (#910)Harsh Shandilya8-83/+71
* Move git directory selection to ActivityResultContracts Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * global: replace all android.app.Activity references Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * res: resolve ObsoleteSdkInt lint warning Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * layout: silence some overdraw warnings Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * PasswordFragment: address deprecation Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * PasswordStore: start addressing deprecation warnings Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * autofill: silence deprecation warnings for legacy implementation I don't want to ever touch these files Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Reset scrollTarget after use Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Refresh password list after each swipe Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Convert if to when Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Migrate UserPreference to ActivityResultContracts Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Also validate result in git directory selection Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * AutofillSaveActivity: Switch to ActivityResultContracts Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * AutofillDecryptActivity: Switch to ActivityResultContracts Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * AutofillFilterActivity: Switch to ActivityResultContracts Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Improve deletion flow - Silently delete empty directory - Always refresh password list upon completion Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Uniform naming for activity result handlers Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-07-02Fill OTP fields with SMS codes (#900)Fabian Henneke3-2/+27
* Fill OTP fields with SMS codes * Allow SMS OTP fill also for web origins * Introduce free and nonFree build variants * Fix up workflow * Improve layout and feature detection * Workflow changes * Add Changelog entry * github: update release workflow for nonFree/Free split Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Switch to lifecycleScope * github: make snapshot deploy free variant Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-01Improve and refactor Autofill heuristics (#905)Fabian Henneke2-37/+61
* Add support for `AUTOFILL_HINT_NEW_PASSWORD` and `AUTOFILL_HINT_NEW_USERNAME`. This allows apps to trigger a `ClassifiedScenario` with only a generate password action and is the analogue of the W3C new-password hint for websites. * Do not consider HTML password fields without hints to be certain password fields (they could contain e.g. bank account numbers, API secrets,...). * Reduce OTP field false positives by excluding the term "postal" as well as fields that match the "code" heuristic term but have HTML maxLength less than 6 or larger than 8. * Add German heuristic term "einmal" ("one-time") for OTP fields * Also exclude fields based on their HTML name (e.g. for terms such as "search"). * Extract fieldId, hint and htmlName matches into an extension property. * Reduce warnings and remove unnecessary suppression annotations.
2020-07-01Use PreferenceKeys file to manage SharedPreferences keys. (#891)Aditya Wasan3-7/+10
* Use PreferenceKeys file to manage SharedPreferences keys. Signed-off-by: Aditya Wasan <adityawasan55@gmail.com> * Use PreferenceKeys in all files Signed-off-by: Aditya Wasan <adityawasan55@gmail.com> * Divide PreferenceKeys into multiple regions Signed-off-by: Aditya Wasan <adityawasan55@gmail.com> * Fix build error Signed-off-by: Aditya Wasan <adityawasan55@gmail.com> * Use PreferenceKeys in more files Signed-off-by: Aditya Wasan <adityawasan55@gmail.com> * Reformat code Signed-off-by: Aditya Wasan <adityawasan55@gmail.com> * Fix build error Signed-off-by: Aditya Wasan <adityawasan55@gmail.com> * Fix merge issues Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>
2020-06-29Offer TOTP Autofill for OTP fields (#899)Fabian Henneke8-31/+98
2020-06-29Reintroduce TOTP support (#890)Harsh Shandilya3-3/+3
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-06-22Add org.gnu.icecat as a trusted multi-origin browser (#871)Fabian Henneke1-0/+2
I verified the following: * Store: F-Droid * Package hash: wi2iuVvK/WYZUzd2g0Qzn9ef3kAisQURZ8U1WSMTkcM= * Based on: Firefox * Actively maintained: https://git.savannah.gnu.org/cgit/gnuzilla.git/log/?h=68 * Multi-origin method: WebView * Save support: no
2020-06-12Break down PGP Activity into focused sections (#776)Harsh Shandilya2-24/+26
2020-06-10Remove Apache Commons dependencies (#840)Diogenes Molinares1-2/+1
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-09Allow custom public suffixes for Autofill (#841)Fabian Henneke1-2/+39
Adds a preference that allows the user to specify domains that are then treated as additional public suffixes for the purposes of Autofill.
2020-05-27Introduce and switch to FragmentViewBindingDelegate (#797)Harsh Shandilya2-4/+4
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-25Remove "name" from the list of username heuristics (#793)Fabian Henneke1-1/+1
2020-05-11Add setting for fallback username (#772)Harsh Shandilya2-2/+12
* PasswordEntry: remove useless annotations Turns out VisibleForTesting only applies for documentation purposes. Boo >:( Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * PasswordEntry: silence locale warning Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Add setting for fallback username Fixes #763 Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-10Treewide codestyle cleanup (#765)Harsh Shandilya10-51/+62
- Updated gitignore and checked in the IDE's codestyle config - Removed spotless as the underlying ktlint backend has failed to resolve the super frustrating import order bug[1] in nearly a year - Reformat the entire codebase based on the previously committed code style configuration. 1: https://github.com/pinterest/ktlint/issues/527
2020-04-21treewide: switch to logging via timberktHarsh Shandilya2-7/+10
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21treewide: use edit extension and cleanup some deprecationHarsh Shandilya2-34/+34
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>