Commit graph

859 commits

Author SHA1 Message Date
Fabian Henneke
034babcbf4
Fix AutofillFilterActivity icons in dark mode (#689) 2020-04-06 17:06:02 +05:30
Fabian Henneke
6a54404462
Fix: Make path editable when generating a password (#688) 2020-04-06 08:02:06 +02:00
Fabian Henneke
4e8f5e0f69
Fix: Make generated entry path editable without suggested username (#687)
The path of a new entry created via Autofill should always be editable, even when no username is prefilled (e.g., when generating a new password or saving a form with no detected username field).
2020-04-05 20:34:40 +05:30
Harsh Shandilya
bc463f3c64
Significantly improve app theming (#679)
* Update CHANGELOG

* Use outlined box style in folder creation dialog

* Add user-facing choice for app theme

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-29 20:03:50 +05:30
Fabian Henneke
6e84ca1f3c
Fix PgpActivity crash on orientation change (#681)
Currently, PgpActivity resets or crashes when the orientation (or
screen size) changes.

Since we do not use separate resources in landscape mode, the easiest
and only slightly hacky solution is to tell the system to not recreate
the activity in response to these changes.
2020-03-29 18:46:42 +05:30
Harsh Shandilya
f228dc4a98
Don't inflate menu multiple times (#678)
Otherwise you get this insanity https://i.imgur.com/N918NFG.png

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-29 15:19:44 +05:30
Fabian Henneke
6aed471f31
Workaround and potential fix for search issues (#677) 2020-03-29 13:05:54 +05:30
Fabian Henneke
29427a061b
Add "alias" to the username heuristic terms (#676) 2020-03-28 20:30:18 +05:30
Fabian Henneke
453cf58b38
Let IME button dismiss keyboard during search (#673)
The IME search button is currently without function while the
PasswordStore SearchView is focused, which means that the keyboard
hides part of the search result until back is pressed.

This commit makes the IME button function like the back key in this
situation, dismissing the keyboard.

Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-03-27 10:06:16 +01:00
Fabian Henneke
94b0b64501
Fix: Restore store scroll position on back press (#670)
Restoring the scroll position in the main store fragment is currently
broken since the stored state (recyclerView.verticalScrollbarPosition)
is always 0 - it is just an enum that governs where the scrollbar is
placed on the screen.

The fix is to remember the list position of the last fully visible item
and scroll to it when restoring the scroll position.

Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-03-27 10:02:31 +01:00
Fabian Henneke
791868f3d6
Fix: Set childCount correctly on recycled rows (#675)
The childCount is not set explicitly for empty directories, which means
that the childCount of the entry from which the current row was
recycled is preserved. This results in empty directories being shown
with seemingly random child counts.

The fix is to always set text and visibility for the childCount view.

Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-03-27 09:58:41 +01:00
Fabian Henneke
0153d3215e
Un-hack focus gain in folder creation dialog (#672)
The current way to let the folder name EditText in the folder creation
dialog gain focus is... slightly hacky.

This commit proposes a more conceptual solution, which, if it works
reliably, could be much easier to maintain.
2020-03-27 09:53:49 +01:00
Fabian Henneke
b21c032f31
Improve Autofill heuristic terms (#674)
Add "e-mail" and "login" as username terms and sort the lists.

Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-03-27 13:38:29 +05:30
Fabian Henneke
b6730ac123
Make folder creation dialog cancelable (#671) 2020-03-27 13:27:22 +05:30
Fabian Henneke
57771c4dfe
Fix: Commit file after Autofill generate/save (#669)
Currently, password files generated via the Autofill generate or save
flow are not committed to the Git repository and therefore also not
synchronized to the remote.

The root cause is that it was missed that PgpActivity relies on
PasswordStore to commit the changes when it returns an appropriate
result code.

The fix is to extract the commit code into the companion object of
PasswordStore and call it from AutofillSaveActivity's onActivityResult.
2020-03-26 19:49:28 +01:00
Fabian Henneke
de4cc63860
Fix deletion of individual password files (#668)
Commit fde8137b (#659) introduced a regression that results in Password Store crashing when the user tries to delete a single password file as opposed to a directory.

The root cause is a call of FileUtils.listFiles() on the selected item, which only works for directories.

The fix is to work with a list consisting only of the selected item if it happens to be a file.
2020-03-26 19:08:01 +01:00
Fabian Henneke
a736dcc255
Fix: Don't apply single-origin mode to native apps (#667)
An unwarranted use of the Elivs operator in Form.kt makes it such that
the restrictions of single-origin mode also apply to native apps.

This commit fixes the bug and also reduces the number of intermediate
values that can mask mistakes like this one.

It also renames saveFlag to saveFlags in BrowserAutofillSupportInfo
since this variable is not limited to contain only a single flag.
2020-03-26 20:59:19 +05:30
Fabian Henneke
5445899ab8
Workaround: Prevent fill-in datasets from being shown on Android… (#666) 2020-03-26 14:33:54 +05:30
Fabian Henneke
8f722a2219
Fix: Properly handle IP addresses and invalid domains in Autofill (#664)
Mozilla's getPublicSuffixPlusOne is only meant to be invoked on syntactically
valid domain names. In particular, it does not give reasonable results for IP
addresses.

This commit ensures that the domain passed to getPublicSuffixPlusOne is
syntactically valid and not an IP address (the latter is unfortunately
considered a domain by the Android validation patterns).
2020-03-25 20:21:56 +01:00
Fabian Henneke
fde16c60f4
Make preferred directory structure for Autofill configurable (#660)
Some users keep their password files in a directory structure such as:
/example.org/john@doe.org.gpg
while others prefer the style:
/example.org/john@doe.org/password.gpg

This commit adds a setting that allows to switch between the two. All Autofill
operations, such as search, match, generate and save, respect this setting.

Note: The first style seems to be the most widely used and is therefore kept as
the default. The second style is mentioned on the official Pass website at:
https://www.passwordstore.org/#organization
2020-03-25 18:13:04 +01:00
Fabian Henneke
973e023dda
Add "pass" as a hint pattern for password fields (#661) 2020-03-25 18:00:44 +01:00
Fabian Henneke
5164b6951b
Add more lenient rules that apply only on manual request (#662)
Add rules that match password/username fields even if no heuristic matches, but
only when the user explicitly requests Autofill. Since there is now a generic
way to always trigger Autofill (at least in apps), other rules no longer need
to match fields that fail the heuristics.

Along the way, the apply functions in AutofillStrategy.kt are renamed to match
in order to not conflict with the Kotlin apply() extension function.
Furthermore, named parameters are used more widely now to pass around Booleans.
2020-03-25 17:53:58 +01:00
Fabian Henneke
fde8137b62
Delete AutofillMatches when deleting files (#659) 2020-03-25 17:13:30 +01:00
Fabian Henneke
bebe434683
Add support for Oreo Autofill (#653)
Adds support for the Autofill feature first available in Android Oreo.

In compatible apps and browsers, login forms are automatically detected and
the user is presented with options to fill or generate credentials. In most apps
and certain browsers, the service will also offer to create new Password Store
entries from credentials entered into login forms.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-24 14:03:40 +01:00
Harsh Shandilya
98e9f6734a
Revise copy (#656)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-21 17:44:13 +05:30
Harsh Shandilya
793abd690d Codestyle cleanup
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-20 14:48:53 +05:30
Harsh Shandilya
0aeb51efa4 ClipboardService: Fix icon
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-20 14:48:53 +05:30
Aditya Wasan
65b8e77f92
Show snackbar when git repo is not initialized (#651)
Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>
2020-03-07 21:54:34 +05:30
Harsh Shandilya
29f124a0bc
Upgrade all dependencies (#649)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-07 17:45:18 +05:30
Harsh Shandilya
73058d10a8
Resolve various memory leaks (#637)
This migrates the clipboard clear logic into a foreground service that allows us to also provide a notification that runs the clear task immediately on click, rather than wait for the timeout.

Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-05 21:05:50 +05:30
glowinthedark
addefdc9a3
Swipe2refresh fix (#647) 2020-03-01 21:05:11 +05:30
glowinthedark
09005f8043
swipe to refresh using androidx SwipeRefreshLayout (#645)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-01 02:20:09 +05:30
glowinthedark
947e41105b
Add xkpasswd-style password generator (#633)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-01 02:16:31 +05:30
Gigahawk
4afb23bbb4
Add longpress to copy implicit username (#635)
* Add longpress to copy implicit username

* Address review comments

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-24 07:37:29 +05:30
Harsh Shandilya
1a38ecbe75
Delete passwords recursively (#639)
Delete passwords recursively

* Fixes #638 
* Update CHANGELOG

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-22 22:52:35 +05:30
Harsh Shandilya
af9f8f529b UserPreference: Fix changes from 9787489bc5
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-21 23:01:54 +05:30
Harsh Shandilya
812b92ab38 AutofillService: Speed item loading
Don't make cacheable function calls in loops

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-21 23:01:54 +05:30
Harsh Shandilya
9787489bc5
Resolve some crashes reported on Play Store (#631)
* ShowSshKeyFragment: Resolve illegal casts

* UserPreference: Try harder to not crash

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-21 12:42:27 +05:30
Gigahawk
9255583f2d
Better UI flow (#630)
* Filter against entire pathname when searching

* Add option to directly open search dialog on start

* Replace basic search filter with fuzzy search

* Update CHANGELOG

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Open search in onResume, force search icon to always show

* Add option to always search from root directory

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-20 11:49:09 +05:30
Harsh Shandilya
bcdc43b1f1 Gain focus in folder creation dialog (#624)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
2020-02-10 09:47:07 +05:30
Harsh Shandilya
085b946c7d
Theming related fixes (#627)
* Make navigation match window background

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Remove light navigation flag

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Use black navbar in light theme

windowLightNavigationBar is not portable across API 23 to 29 so we're better off with this solution

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Simplify folder dialog title UI

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Make night theme completely flat

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Remove unnecessary type

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Don't try to use non-existent external repo

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
2020-02-01 23:41:44 +05:30
Harsh Shandilya
74bb1c4357
Autofill UX improvements and code cleanup (#626)
Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-01-30 20:01:06 +05:30
Harsh Shandilya
d350a27611
Update license headers (#625)
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-01-30 01:00:20 +05:30
Harsh Shandilya
f295e97de6
Allow creating folders (#623)
* Introduce EmitExpandableTransformationBehaviour

* Implement expand transition

* More folder work

* Add icons and tweak layout clipping

Rishi again with the icon rescue

* Theming rework

* Dont set tag

* Update list and commit after creating folder

* Fix theme issues

* Add dialog title
* Fix hint text color

* Remove commit method

* Cleanup

* Update CHANGELOG

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
2020-01-28 01:49:37 +05:30
Harsh Shandilya
ab5aebeda3 Improved debugging tools (#620)
* Add WhatTheStack

* Add leakcanary

* Codestyle nit

* Support snapshot builds for debug tooling

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-01-27 23:24:04 +05:30
Harsh Shandilya
27e1952375 Add fastscroller with alphabetic hints (#616)
* Setup basic fast scroll

Work towards #558 

* Implement PopupTextProvider

Fixes #558

* Update changes

* Hide system scrollbars

* Port fastscroll to autofill preferences

* Spotless

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-01-26 11:49:45 +05:30
Harsh Shandilya
2c78470642
Switch to Timber for logging (#617)
* Switch to Timber for logging

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Update changelog

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Fix rebase error

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-01-26 11:35:10 +05:30
Harsh Shandilya
14f1fa6538
Correctly unmarshal errors from OpenKeychain (#615)
Fixes #614 

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-01-25 20:19:49 +05:30
Gigahawk
c129fb347e Add full path open in autofill dialog (#609) (#610)
Fixes #609
2020-01-21 09:18:39 +05:30
Gigahawk
44f0f22574 Fix autofill window size (#611) (#612) 2020-01-21 09:10:44 +05:30