1596 Commits

Author SHA1 Message Date
proletarius101
fee35fe285 Fix sort button tint 2021-05-17 17:34:24 +00:00
Konrad Pozniak
02ee182508 fix opencollective badge not shown when it is the only donation option 2021-05-12 20:40:35 +02:00
Hans-Christoph Steiner
deea4bd696 fully separate "Last Updated" icon from "Versions"
These two are the same shape, but different sizes, and this is an easy way
to manage the sizes.

closes #2148
2021-04-22 11:24:38 +02:00
Hans-Christoph Steiner
7db4456aae purge unused AboutActivity
!963 made it an AlertDialog
2021-04-22 11:24:38 +02:00
Hans-Christoph Steiner
18a43ac471 ignore system partition repos when checking for local repos
The system partition repos like shipped with CalyxOS are not really visible
to the user, they are built-in.  So they should not prevent the warning
banner showing when the user has switched Over Data and Over WiFi to never.
2021-04-13 22:46:11 +02:00
Hans-Christoph Steiner
908921e978 show banner when Over Data/WiFi Settings disable updating from internet 2021-04-13 16:26:23 +02:00
Hans-Christoph Steiner
8773d6205c rename BannerUpdatingRepos --> StatusBanner 2021-04-13 16:26:23 +02:00
Hans-Christoph Steiner
a505850110 "No internet" banner on main, categories, and updates screen
An alternate implementation of @pserwylo's fdroidclient!724

closes #884
2021-04-13 16:26:08 +02:00
Hans-Christoph Steiner
d9a86d4c16 rename: update_notification_title --> banner_updating_repositories 2021-04-13 13:59:08 +02:00
Hans-Christoph Steiner
f39fc1386a synchronized getNewMirrorOnError() for safe writing of numTries
`volatile` allows for safe multi-threaded reading, `synchronized` allows
for safe multi-threaded writing.
2021-04-13 13:17:56 +02:00
Hans-Christoph Steiner
1758c2c9f1 when no internet and local repos, only update local repos
closes #2146
2021-04-13 13:17:56 +02:00
Hans-Christoph Steiner
cf94cfb543
run Android Studio's Ctrl-Alt-O Organize Imports on all .java files 2021-04-13 10:23:59 +02:00
proletarius101
755588202f feat: rebase app themes to material themes 2021-04-12 16:36:17 +00:00
proletarius101
528eecb63c Extensively use appcompat 2021-04-07 14:02:48 +00:00
Hans-Christoph Steiner
f0ddc16aea upcase name for ArrayList constant 2021-03-08 15:30:30 +00:00
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