1581 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
8e8a7c0b74 strip down firstInstall and lastUpdateTime events to simple counts 2021-03-08 15:30:30 +00:00
Hans-Christoph Steiner
d558d396ed show report when the user enables the Send to F-Droid Metrics pref 2021-03-08 15:30:30 +00:00
Hans-Christoph Steiner
a207798f5c add expert preference to enable Popularity Contest
closes #396
2021-03-08 15:30:30 +00:00
Hans-Christoph Steiner
d1e80bb067 add FDroidMetricsWorker to gather data into JSON reports 2021-03-08 15:30:30 +00:00
Hans-Christoph Steiner
d3be7d692d add CleanCacheWorker Robolectric tests 2021-03-03 18:49:47 +01:00
Hans-Christoph Steiner
ce7d241196 CleanCacheWorker: delete all package files, not just *.apk
The installer can copy OTA .zip, *.obf, etc. there too.

refs #1869
2021-03-03 18:49:47 +01:00
Hans-Christoph Steiner
eb6ab1ec0a when storage is low, immediately trigger CleanCacheWorker run
refs #1869

Script to test this in an emulator with `adb root` in `adb shell`:
```bash
cd /data/data/org.fdroid.fdroid.debug/files
rm -f fake.apk; touch fake.apk;  chown u0_a159.u0_a159 fake.apk ; dd if=/dev/zero of=fake.apk bs=1M count=635; touch -d 2020-02-02 fake.apk ; df -h; ls -lh
```

      <
2021-03-03 18:49:47 +01:00
Hans-Christoph Steiner
fc8321de17 javadoc for cache cleanup operations 2021-03-03 18:49:47 +01:00
Hans-Christoph Steiner
5fe5754a2d remove pointless null guards
The cast to AppCompatActivity would throw an exception if it failed.
2021-03-03 18:49:47 +01:00
Hans-Christoph Steiner
bde60282f1 fail fast if privService.getInstalledPackages() isn't working
If `privService.getInstalledPackages()` throws something other than a
`RemoteException`, this should fail as fast as possible.  Crashing will give
users a prompt to send the crash report.  using `finally` will just cause
weirdness since it might try to execute `compareToPackageManager()` even
when it is in the process of crashing.
2021-03-03 18:44:43 +01:00
Hans-Christoph Steiner
6710b74477 code formatting using Android Studio 4.1.2 defaults w/ 118 line length 2021-03-03 18:39:10 +01:00
Oliver Scott
bb8fce0272 Guard new privileged extension package manager query with API check 2021-03-03 10:31:37 -05:00
Oliver Scott
08b45d3518 Add shared library packages to app cache database using F-DroidPrivilegedExtension query
https://cs.android.com/android/platform/superproject/+/master:frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java;l=4725?q=filterSharedLibPackageLPr&sq=
PackageManager filters some packages from getInstalledPackages if the calling uid is not root, shell or system or does not have install permissions granted. Additionally, the hidden MATCH_STATIC_SHARED_LIBRARIES flag must be set.
https://review.calyxos.org/c/CalyxOS/platform_packages_apps_F-DroidPrivilegedExtension/+/2305
We added an API call in F-DroidPrivilegedExtension given it has the necessary requirements to get the unfiltered results from getInstalledPackages. This allows shared library packages to be added to the app cache database which will allow F-Droid to update them
2021-03-03 10:31:04 -05:00
Hans-Christoph Steiner
fa827e4edb code formatting 2021-02-25 21:52:13 +01:00
Hans-Christoph Steiner
4662c0bdaa set up WorkManager on demand to avoid slowing down starts
This also provides a convenient place to configure the debug logging.
2021-02-23 13:28:32 +01:00
Hans-Christoph Steiner
2975d4c09f always use fingerprint hashes in lowercase
* Utils.getBinaryHash() converts it to lowercase()
* Utils.getPackageSig() outputs lowercase
* fdroidserver outputs lowercase for all hash entries
2021-02-23 13:28:32 +01:00
Hans-Christoph Steiner
018e3221a7 prevent search terms triggering SQL injection vulns 2021-02-23 13:28:32 +01:00
Hans-Christoph Steiner
30b6c28a52 remove unused import 2021-02-23 13:02:33 +01:00
Glenn Carremans
ee1a794680
Fixed bug package signature info not included 2021-02-19 16:36:23 +01:00
Glenn Carremans
dc314963f9
Changed to static property 2021-02-19 16:36:23 +01:00
Glenn C
47e8e43318
Fixed "apply suggestion" error 2021-02-19 16:36:23 +01:00
Glenn C
efe757be07
Replaced equalsIgnoreCase() with equals() 2021-02-19 16:36:23 +01:00
Glenn C
69fc823beb
Apply 1 suggestion(s) to 1 file(s) 2021-02-19 16:36:23 +01:00
Glenn Carremans
3a36bb5c2e
Added check platform signature available 2021-02-19 16:36:22 +01:00
Hans-Christoph Steiner
22cffbb0d8 prefer complete, localized apps in the category overview cards
To further the goal of providing a fully localized experience based on the
user's Language Settings, this applies similar logic as the Latest Tab to
the apps that are featured for each category.
2021-02-09 17:57:40 +01:00
Hans-Christoph Steiner
be9b6515cd wipe "known categories" cache when database transients are reset
closes #1626
closes #1632
2021-02-09 17:57:40 +01:00
Hans-Christoph Steiner
2a4c9f0fcb sort "new" app entries based on lastUpdate time of Repo
https://gitlab.com/fdroid/fdroidclient/-/issues/939#note_504169741
2021-02-09 17:57:40 +01:00
Hans-Christoph Steiner
f38450fc19 save search state between uses and restarts 2021-02-09 17:57:40 +01:00
Hans-Christoph Steiner
1c8a56e314 if search are letters with a "." in the middle, enable packageName
This makes it easy to search by Application ID aka Package Name without
affecting searches that definitely cannot be a Package Name.
2021-02-09 17:57:40 +01:00
Hans-Christoph Steiner
c3c31ed033 convert alpha sort into "sort by search terms", keep "last updated"
refs #1600
closes #1522
closes #1185
2021-02-09 17:57:40 +01:00
Hans-Christoph Steiner
646f2c8e9f overhaul search to include summary, better searching, and localized sort
include @gcbrown76's `getSortOrder()` from !889 as getLastUpdatedSortOrder
2021-02-09 17:57:40 +01:00
Hans-Christoph Steiner
9c3176852e more descriptive variable name 2021-02-09 17:57:40 +01:00
Hans-Christoph Steiner
8856f19277 move Latest Tab sort closer to where it is actually used 2021-02-09 17:57:40 +01:00
Hans-Christoph Steiner
a81140be47 run Android Studio default code formatter with Ctrl-Alt-L 2021-02-09 17:51:19 +01:00
Angus Gratton
3cb6cc747b Add Repo.getFileUrl() method to get file URL in a standard way 2021-02-09 09:01:12 +11:00
Angus Gratton
5187b88a08 RepoUrlsTest: Add new tests for correct repo URL formatting 2021-02-09 08:03:55 +11:00
Hans-Christoph Steiner
4caab6a135
rename WhatsNew* to Latest* to match source string name 2021-02-08 13:16:04 +01:00
Hans-Christoph Steiner
bdbb95110b normalize whitespace in AppProvider using Android Studio Ctrl-Alt-L 2021-02-08 09:51:37 +01:00
Hans-Christoph Steiner
a11d214039 workaround Locale.toLanguageTag() requiring android-21 2021-02-08 09:51:04 +01:00
Hans-Christoph Steiner
cb1b4330ef App: rename "locales" to "supportedLocales" for clarity 2021-02-08 09:51:04 +01:00
Hans-Christoph Steiner
57cee93647 trim leading/trailing whitespace from name/summary/video
This should make for predictable layouts, since fastlane entries are likely
to have a tailing newline, but entries in the metadata YAML will not.
2021-02-08 09:51:04 +01:00
Hans-Christoph Steiner
19215db243 convert Latest Tab's selection into a sort
This removes the convoluted logic of both a selection and a sort, and just
does all the ordering in the sort.

closes #939
closes #2024
2021-02-08 09:50:07 +01:00
Hans-Christoph Steiner
3d9a68c1e3 rename AppProvider "Recently Updated" to "Latest Tab"
This is only used for the Latest Tab, so it should be named accordingly.
2021-02-08 09:36:46 +01:00
Hans-Christoph Steiner
e35335d59c totally overhaul choosing locales from app metadata based on LocaleList
This makes the selection logic heed the list of preferred locales from the
user Settings.

closes #987
closes #1186
refs #1440 #1882 #1730
!886
2021-02-08 09:36:46 +01:00
proletarius101
4737b32a60 fix icon and text tinting and replace some pixel maps with vector graphs
added vector graphs are the rounded variant
2021-02-04 21:43:59 +00:00
proletarius101
e2979f632d Change Activity to AppCompatActivity 2021-01-28 16:52:58 +00:00
Sylvia van Os
e95e99018a Always include repo name in exception toasts 2021-01-27 15:32:14 +00:00
Hans-Christoph Steiner
9eba243092 use TAG to identify CleanCacheWorker to WorkManager
TAG is already there, and it is meant to identify this class, and be
unique.
2021-01-27 15:38:43 +01:00
Hans-Christoph Steiner
2e10c7ba03 move static helper method into its class: CleanCacheWorker 2021-01-25 15:29:09 +01:00
Isira Seneviratne
7c81b1ad15 Use WorkManager to clean the cache. 2021-01-21 06:17:28 +05:30