Commit graph

134 commits

Author SHA1 Message Date
Ben Dean-Kawamura
d9800259d9 Updates application-services to v95.0.0
This required updating the code to handle the new app-services error
hierarchy.
2022-11-08 03:09:26 +00:00
kycn
73c1c15596 Bug 1795903 - Introduce StorageMaintenanceWorker that runs periodically to prune places storage.
WorkManager's Worker is created for periodically running storage maintenance operation on places database.
DB size limit is exposed from A-S that indicates the maximum DB size to aim for, in bytes. If the database
exceeds this size, a small number of visits will be pruned. This operation is done periodically by a periodic
work request that, optimally, will run once a day as long as the worker constraints are met.
2022-11-02 17:46:39 +00:00
Gabriel Luong
d9d783b698 [components] Issue https://github.com/mozilla-mobile/android-components/issues/12939: Address all ktlint issues 2022-10-17 17:07:40 -04:00
Mark Hammond
bff7cbebee [components] Places errors caused by an invalid URL are no longer reported to sentry 2022-09-07 07:24:03 +00:00
mcarare
97ae5efa57 [components] For https://github.com/mozilla-mobile/android-components/issues/12381: Remove VisibleForTesting annotation.
Values are also accessed from code, not just from tests.
2022-08-31 09:47:47 +00:00
Mugurell
62f592d82e [components] For https://github.com/mozilla-mobile/android-components/issues/12711 - Use a separate reader for autocomplete suggestions
Decouple this functionality from search suggestions allowing for individual
control over the readers used.
2022-08-30 14:19:12 +00:00
Mugurell
3b881915fc [components] For https://github.com/mozilla-mobile/android-components/issues/12569 - Don't report PlacesException$OperationInterrupted exceptions
This will catch OperationInterrupted exceptions from the interrupted operation.
2022-07-29 15:14:02 +00:00
Mugurell
1b35318c89 [components] For https://github.com/mozilla-mobile/android-components/issues/12557 - Stop logging AS-places reads/writes explicit interrupts
The OperationInterrupted exceptions are expected so logging them to the crash
servers has little use.
2022-07-28 07:23:22 +00:00
Mugurell
994b3515f0 [components] For https://github.com/mozilla-mobile/android-components/issues/12469 - Cancel in progress storage requests before new awesomebar suggestions 2022-07-18 11:29:45 +00:00
Tarik Eshaq
8f11d2f427 [components] Adds exception handling for all places rust calls 2022-06-29 17:41:37 +00:00
mcarare
30e5a6f476 [components] For https://github.com/mozilla-mobile/android-components/issues/12402: Run Robolectric with SDK 32. 2022-06-29 16:31:33 +00:00
mcarare
2a1c468edc [components] For https://github.com/mozilla-mobile/android-components/issues/12376: Run Robolectric with SDK 31.
Current Robolectric version does not support SDK 32.
2022-06-28 13:42:14 +00:00
Mugurell
d78b06b6bf [components] For https://github.com/mozilla-mobile/android-components/pull/11175 - Migrate runBlocking and runBlockingTest to runTest in unit tests
Used `runTestOnMain` where `MainCoroutineRule` was used or needed to be used,
`runTest` elsewhere.

Extra effort for removing all `runBlocking` occurrences in unit tests.
`kotlinx.coroutines.test.runTest` is a test specific API that seems like a more
appropriate way for running tests in a coroutine than the general
`kotlinx.coroutines.runBlocking` api.
2022-05-10 13:45:03 +00:00
Tarik Eshaq
2c1e0afc34 [components] Update Application services to 93.1.0 (https://github.com/mozilla-mobile/android-components/pull/12120)
* app-services tabs component constructor now wants a database filename

* Incrment to 93.0.1

* Bumps a-s to 93.1.0

* No issue: Correct changelog entries

Co-authored-by: Mark Hammond <mhammond@skippinet.com.au>
Co-authored-by: James Hugman <james@hugman.tv>
Co-authored-by: Jonathan Almeida <jalmeida@mozilla.com>
2022-05-09 19:21:45 +00:00
Tarik Eshaq
4f17437e57 [components] Catches exceptions from deleteEverything in sync history storage (https://github.com/mozilla-mobile/android-components/pull/12112)
* Catches exceptions from deleteEverything

* Adds changelog

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-05-09 18:27:26 +00:00
Jonathan Almeida
286ccee47c [components] Revert "Application services 93.0.1" (https://github.com/mozilla-mobile/android-components/pull/12100)
* Revert "Incrment to 93.0.1"

This reverts commit 83403d4726846e8047963cf41460aa4a95a64278.

* Revert "app-services tabs component constructor now wants a database filename"

This reverts commit 6484b4b135dbf93cb6f3daea3b43076b984f8a51.
2022-05-04 00:45:06 +00:00
Mark Hammond
63be7ad449 [components] app-services tabs component constructor now wants a database filename 2022-05-03 16:52:56 +00:00
mcarare
2275e49731 [components] For https://github.com/mozilla-mobile/android-components/issues/9684: Run tests on sdk 30. 2022-04-28 08:33:29 +00:00
Gabriel Luong
65626ccd3a [components] Issue https://github.com/mozilla-mobile/android-components/issues/11864: Enable UnusedPrivateMember rule for detekt 2022-03-24 18:47:39 +00:00
mavduevskiy
a9bc32eff1 [components] Closes https://github.com/mozilla-mobile/android-components/issues/11655: expose HistoryVisitInfo.isRemote; update A-S to 91.0.1 (https://github.com/mozilla-mobile/android-components/pull/11656)
* Closes https://github.com/mozilla-mobile/android-components/issues/11655: expose HistoryVisitInfo.isRemote

* Closes https://github.com/mozilla-mobile/android-components/issues/11655: expose HistoryVisitInfo.isRemote

Co-authored-by: mike a <mavduevskiy@gmail.com>
2022-02-02 19:38:55 -08:00
Sammy Khamis
31fdffa11a [components] Uniffi Places (https://github.com/mozilla-mobile/android-components/pull/11487)
* fixup the VisitObservation, HistoryVisitInfo APIs based on changes in a-s

* Uniffi top frecent site info (https://github.com/mozilla-mobile/android-components/issues/3)

* uses VisitTransition in HistoryVisitInfo (https://github.com/mozilla-mobile/android-components/issues/4)

* fixup the VisitObservation, HistoryVisitInfo APIs based on changes in a-s

* updated based on bookmarks being uniffied

* fix issues with how we are rethrowing places exceptions

* bump appservices version

* fix ktlint lexiographic and ununsed import errors

* updated fennec migration code

Co-authored-by: Tarik Eshaq <tarikeshaq@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-21 04:36:54 +00:00
bendk
ca1959ab5e [components] Uniffi sync manager / Upgrade to A-S 87.1.0 (https://github.com/mozilla-mobile/android-components/pull/11256)
* Use registerWithSyncManager for places (https://github.com/mozilla-mobile/android-components/issues/10128)

* Remove the getHandle() method

Fixes https://github.com/mozilla/application-services/issues/1877

* Updating fxa code to work with the new UniFFIed SyncManager API

* Bumping appservices version

* Fixing PlacesHistoryStorageTest

* Bumping appservices version
2021-12-14 22:09:32 +00:00
Matt Tighe
65f94370a3 [components] move path walking tests to PlacesHistoryStorageTest 2021-12-09 21:01:48 +00:00
Matt Tighe
60bacaab83 [components] Strip common subdomains when matching incoming toolbar queries. 2021-12-09 21:01:48 +00:00
Christian Sadilek
83f85e62d7 [components] Support deletion of history metadata by url 2021-11-23 16:22:28 -05:00
Christian Sadilek
e2845195bd [components] Handle places exceptions when querying highlights 2021-11-23 09:56:15 -08:00
Grisha Kruglov
53817d0ad1 [components] Move shouldStoreUri to storage; short-circuit engine delegates
In feature-session we had some logic to filter out certain URIs. This
patch moves this logic into the storage layer, so that it has a broader
coverage - whenever we attempt to write some URL into the storage, we'll
now go through this filter.

Before, we'd only go through this filter for writes that were routed via
the HistoryDelegate.

After this change, direct writes (such as for metadata) are also
covered.

This shouldn't change all that much - the storage implementation is
likely to have rejected these URIs. Now, instead of letting it through
exceptions at us (which we catch and report via sentry), we simply don't
even call into the storage if we don't expect these calls to succeed.

This should reduce volume of "url without base" type of 'info' events we
see in Sentry.
2021-11-16 00:22:35 +00:00
Grisha Kruglov
70bad89d04 [components] Post: Simplify handling of PageVisit#redirectSource
Most of the time redirectSource isn't set, so this makes that field
optional, and switches away from a special enum (NOT_A_SOURCE) to just a
simple nullable.
2021-11-09 21:27:05 +00:00
Gabriel Luong
7fe5c17265 [components] Issue https://github.com/mozilla-mobile/android-components/issues/11155 - Integrate onPreviewImage API from GeckoView 2021-10-25 20:46:09 +00:00
Grisha Kruglov
385e0efd8e [components] Add API for deleting metadata search term groups 2021-09-29 18:45:18 -04:00
Grisha Kruglov
d6ab47d025 [components] Update to A-S 85.2.0, expose A-S highlights API 2021-09-29 14:24:34 -07:00
Christian Sadilek
e67e913c7c [components] Handle PlacesExceptions when reading history metadata 2021-09-26 13:19:35 +00:00
Grisha Kruglov
76a06fe946 [components] Fix breaking changes in tests 2021-09-14 05:40:48 +00:00
Grisha Kruglov
5148be5381 [components] Account for breaking changes associated with previewImageUrl 2021-09-14 05:40:48 +00:00
Grisha Kruglov
b628c1badc [components] Adds history metadata delete API 2021-09-09 23:38:30 +00:00
Grisha Kruglov
296257f119 [components] Upgrade to A-S 82.3.0
This version of A-S included breaking changes around the history
metadata API, which this patch resolves.
2021-09-08 03:03:23 +00:00
Grisha Kruglov
e3ac5dc4d2 [components] Make sure to use writeScope when writing to history metadata
Not using a write scope means we could have concurrent writes, leading
to sqlite throwing "database locked" exceptions.

All other writers here use the writeScope.
2021-08-25 19:31:42 +00:00
Sebastian Kaspari
ce323400dd [components] Run ktlintFormat to fix new ktlint errors. 2021-07-28 12:03:23 +00:00
mcarare
23e050a3c3 [components] For https://github.com/mozilla-mobile/android-components/issues/10670: Add optional parameter to filter recent bookmarks based on added date. 2021-07-23 16:06:47 +00:00
Sammy Khamis
4d75239856 [components] updated lib version and reverted lastUsed to long 2021-07-21 22:48:58 +00:00
Sammy Khamis
575b8a38dc [components] small changes based on recent changes 2021-07-21 22:48:58 +00:00
Sammy Khamis
3015f1fead [components] updated a-s version, fixed some minor changes 2021-07-21 22:48:58 +00:00
Sammy Khamis
0f2fc25fbb [components] updated remote tabs based on a-s tabs update 2021-07-21 22:48:58 +00:00
Jonathan Almeida
ac53ae76e1 [components] Close https://github.com/mozilla-mobile/android-components/issues/10382: Handle exceptions thrown in RemoteTabsStorage 2021-07-07 03:33:22 +00:00
Christian Sadilek
2c9aef155c [components] Catch and log history metadata write exceptions 2021-07-05 19:44:27 +00:00
Elise Richards
6bb8d67741 [components] For https://github.com/mozilla-mobile/android-components/issues/10419: Add Places calls for recently added and updated bookmarks (https://github.com/mozilla-mobile/android-components/pull/10425)
* Add Places calls for recently added bookmarks.

Changelog addition for bookmarks places api additions.

* Test for fetching list of recently added bookmarks

* Reword kdoc and changelog
2021-06-09 17:13:30 +00:00
Grisha Kruglov
8fd962cfc2 [components] Introduce history metadata observation API
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
2021-06-01 21:02:36 +00:00
Grisha Kruglov
539493396e [components] Introduce History Metadata storage API
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
2021-05-13 05:54:06 +00:00
Grisha Kruglov
0d4aa38533 [components] Introduce AutofillCrypto and add encryptio/decryption and key management to credit card storage 2021-04-21 21:06:50 +00:00
Christian Sadilek
c9d791c53b [components] Adjust detekt TooManyFunctions threshold 2021-03-18 15:25:40 +00:00