Commit Graph
154 Commits
Author SHA1 Message Date
Torsten Grote 738adc7a80 [db] only flag compatible updates in other repos if older than a week 2026-02-05 12:09:55 -03:00
Torsten Grote a9f5e325fe Show issue for apps we had installed with different signer 2026-01-26 15:17:05 -03:00
Torsten Grote c1efc6f6f1 Don't show issue for apps with incompatible signer installed by other stores
The other store is likely to provide updates and this is a common use case with Aurora or Google Play, so people get flagged false positives.
2026-01-26 14:33:20 -03:00
Torsten Grote c0f90bf0b6 [db] don't progress report total bytes for entry.jar download
because we'll download another file afterwards and progress reporting would jump to 100% two times. Also entry.jar is really small, so downloading that is fast and doesn't benefit from detailed progress reporting anyway.
2026-01-05 17:24:10 -03:00
Torsten Grote dea8a2e504 [db] track and clear repo update errors
Historically, we've just shown a giant Toast for repo update errors, now we track them in the DB, so we can properly expose them in the UI.
2026-01-05 17:24:10 -03:00
Torsten Grote f81060859d [db] Migration to version 10
adds a couple of fields we wanted for some time:
* isPrimary for mirrors
* repo errors
* app labels for pre-approved installs
2026-01-05 17:24:10 -03:00
Torsten Grote 29e2d15386 [db] Update repositoriesState atomically in RepoManager
Otherwise, concurrency issues may cause a broken state such as the same repo being in the list two times.
2025-12-29 11:23:59 -03:00
Torsten Grote 41653a80a0 [db] add a way to get apps for a list of package names
this will be used to get the apps most downloaded
2025-12-29 11:23:59 -03:00
Torsten Grote 8b4e42935e [db] Add new DbAppChecker which finds updates and apps with issues
This is similar to DbUpdateChecker which only finds updates.
2025-12-29 11:23:59 -03:00
Torsten Grote 88f817e5ca [db] allow providing PackageInfo maps to avoid hammering PackageManager
The app may maintain PackageInfo for apps already, so there's no need to keep asking the system for it. We could instead just work with what we already have.

Also, we discovered that chunking the package names isn't needed for newer Android versions. This is only relevant for whom has more than 999 apps installed.
2025-12-29 11:23:59 -03:00
Torsten Grote cc2010ff63 [db] Increase concurrency delay for RepoAdderTest
still a hack, but synchronizing the coroutines doesn't seem trivial
2025-11-04 08:50:54 -03:00
Torsten Grote 800d5bfe85 [db] Fix bug where repos/mirrors could be added twice
This could happen when tapping a button quickly two times in the UI. While we had provisions to ensure proper states, these didn't work, because a parallel fetching job would mess with our state allowing the adding code to run more than once.
2025-11-04 08:50:54 -03:00
Torsten Grote 77d8127015 [db] Don't cancel index fetching after enabling archive
This can cause other exceptions (e.g. in json parsing) which prevent repo from getting added properly.

Also, when updating the archive for the first time, we can now re-use the downloaded index.
2025-11-04 08:50:54 -03:00
Torsten Grote 4ad356249a [db] Fix UI update when deleting repo 2025-11-04 08:50:54 -03:00
Torsten Grote 3d5acc401b [db] Update repo shareUri to use fdroid.link 2025-11-04 08:50:53 -03:00
Torsten Grote 5ab649f14d [db] optimize adding repos
We now hang on to the index file while streaming it for repo preview purposes. This avoids having to re-download that file and we can properly add the repo right away.

This then allows us to bring the user to the list of apps in that repository without it being initially empty.
2025-11-04 08:50:53 -03:00
Torsten Grote 3284745c81 [db] deprecate caching of localized app name and summary
This led to many hard to debug issues in the past. It is easier to always fetch fresh data and not cache it.

Previously, we needed the cache as a search index. Now, search uses all localizations, so the cache isn't needed anymore.
2025-11-04 08:50:52 -03:00
Torsten Grote 290cfcee34 [db] New AppOverviewItems AppDao methods 2025-11-04 08:50:52 -03:00
Torsten Grote a45c9763e5 [db] retrieve categories to enable post-query filtering 2025-11-04 08:50:52 -03:00
Torsten Grote dff226a935 [db] Add different search API
for more flexible search result sorting and faster search
2025-11-04 08:50:51 -03:00
Torsten Grote b33800bf5c [db] Add more information to versions
such as versionName and added date.
Also allow passing in UpdateChecker for DbUpdateChecker
2025-11-04 08:50:51 -03:00
Torsten Grote 7c490a2903 [db] expose installedVersionName for UpdatableApp
so that we can show to what version the update version would get applied to
2025-11-04 08:50:51 -03:00
Torsten Grote 23dde0bc9b [db] Better support search for CJK languages
by inserting zero whitespace between their characters to help the existing sqlite FTS tokenizers to split them up.

We have considered splitting them up only at word boundaries, but after consulting native speakers decided to do splitting by chars instead.

Doing this is a hack, but due to the limitations of tokenizers currently available with sqlite, we saw no better solution. While the ICU tokenizer is available as well, it doesn't handle diacritics in other languages.

The zero whitespace is added to zh, ja and ko locales when saving their text to the database. It happens for app names, summaries and descriptions either when loading a full index or when applying diffs. Tests have been added for both cases.
2025-11-04 08:50:51 -03:00
Torsten Grote 0f3f2d6f80 [db] improve search
This now also searches in descriptions, author and package names.
The search also considers all languages now and is insensitive to diacritics in most languages.

The AppMetadataFts needed to be re-created for this to work. A migration and a test for this have been added.
2025-11-04 08:50:50 -03:00
Torsten Grote 31d5832d73 [db] improve RepoAdder 2025-11-04 08:50:50 -03:00
Torsten Grote 9b5b68b740 remove non-determinism from removeAllOptionalsDiff test 2025-07-14 15:25:07 -03:00
Torsten Grote 6b304c8fa9 [db] Add test for removal of optionals from packages 2025-07-14 09:50:34 -03:00
Torsten Grote d5fd44f718 [db] Removal of *all* packages via diff currently not supported 2025-07-14 09:50:34 -03:00
Torsten Grote 4d719af2bb [db] Fix diff removal of optionals in Repository 2025-07-14 09:50:34 -03:00
Tobias_Groza 948e22efc8 Fix and add tests for hasAuthorMoreThanOneApp(), getAppListItemsForAuthor() 2025-06-25 11:01:17 +02:00
Tobias_Groza 11c7ebf3ce De-duplicate SQL getAppListItems queries by using RawQuery 2025-06-25 11:01:17 +02:00
Tobias_Groza c1226afab3 Use ViewModel to obtain data about app author 2025-06-25 11:01:17 +02:00
Tobias_Groza 1008cd5862 Display all apps created by a developer
This adds the abililty to click on the author's name in the app details if there are at least two app from them in the DB. A button with hint to take a look at the other  apps by the dev is also added at the bottom of the app details. When clicked, the AppList is opened with a new `authorName` filter.
2025-06-25 11:01:17 +02:00
Torsten Grote f1c55dd38f Add ConsistentCopyVisibility annotation where required 2025-05-30 16:48:42 -03:00
Tobias_Groza fc6a88c4b7 Fix AppListLiveData.addSource()
With the update to Room 2.7.0 the chunked queries stopped to return distinct values. This is fixed by only processing distinct values when merging the chunked results.
The test case for the chunked quries was also fixed. It did not work properly before because it only tested chunked quries and not the base case which does not need chunked packageInfo
2025-05-30 16:48:41 -03:00
Torsten Grote bcf50780e9 Migrate from KAPT to KSP 2025-05-30 16:48:41 -03:00
Thore Goebel 319ff86744 Add testAddingMidRepoByOfficialMirror 2025-05-01 14:47:59 +02:00
Thore Goebel 5362938b28 Don't add official mirror as user mirror when adding repo via official mirror
Fixes #2981.
2025-05-01 14:47:59 +02:00
Thore Goebel 6f2f6b0cf5 Add testAddingMinRepoByUserMirror
Also pull out mockNewRepoDbInsertion() to reduce complexity and allow future reuse.
2025-05-01 10:56:16 +02:00
Thore Goebel 118362ffce Clean up RepoAdderTest
- Rename expectDownloadOfMinRepo() to mockMinRepoDownload() to better describe what it does
- Move repoAdder.fetchRepository into expectMinRepoPreview() to reduce repetition
- Change some remnant example.com to min-v1.org
- Use explicit user-mirror-min-v1.org instead of example.com to make the intention clear
- Add comments to explain what's going on
- Make mockRepoDownload() configurable, to allow easier mocking of other repos in the futures (e.g., of mid and max)

See also fdroid/fdroidclient!1535

This clean up was prompted by the need to write a test for fdroid/fdroidclient!1530
2025-05-01 10:35:16 +02:00
Torsten Grote 3f142da1c1 Improve RepoAdderTest by changing test data 2025-04-28 10:33:43 -03:00
Torsten Grote 1955f551e1 Respect preferred repo for category apps count 2025-04-14 09:26:40 -03:00
Torsten Grote f94e8725b8 Allow duplicate permissions in DbTest 2025-03-24 15:17:46 -03:00
Torsten Grote af03820b73 Disable archive repo when disabling main repo 2025-03-12 09:36:53 -03:00
Torsten Grote d17e1c5bcf Delete archive repo when deleting main repo 2025-03-11 09:33:16 -03:00
Thore Goebel 96ce5be721 Review feedback 2025-02-06 22:02:09 +01:00
Thore Goebel 927621f364 Redesign RepoDetailsActivity 2025-02-06 22:02:05 +01:00
Thore Goebel 70046f3478 Refactor: move QR Code generation into RepoDetailsViewModel 2025-01-29 14:57:04 +01:00
Torsten Grote 8a676010ba [db] rename location to countryCode in Mirror 2024-11-07 14:36:12 -03:00
Torsten Grote 1ba3d00b78 [db] Allow AppPrefs.preferredRepoId to be set to a repo that doesn't contain the app 2024-11-07 10:17:58 -03:00