Hans-Christoph Steiner
e0cb3f8afc
App.isLocalized() marks whether relevant translations are available
...
!886
2020-07-22 19:46:54 +02:00
Hans-Christoph Steiner
fcc1656595
remove unused imports to placate checkstyle
2020-07-15 15:02:27 +02:00
Dominik Schürmann
319b615da0
Remove unused imports, fix line lengths
2020-07-14 14:10:22 +02:00
Dominik Schürmann
8f81bf0cb9
Use androidx.test artifacts for tests not just androidTests
...
- this allows replacing deprecated RuntimeEnvironment.application
2020-07-14 14:10:21 +02:00
Dominik Schürmann
360e61118d
Fix AppDetailsAdapterTest
...
by creating a context where styles are available
2020-07-14 14:10:21 +02:00
Dominik Schürmann
cefd706aeb
Use robolectric:4.3
...
- remove constants annotation
- Most @Implementation methods in shadow classes are now protected instead of public.
Tests should always prefer to call SDK methods directly on Android classes rather
than on their shadows
2020-07-14 14:10:21 +02:00
Dominik Schürmann
c784274b98
Automated Robolectric migration as in http://robolectric.org/automated-migration/
2020-07-14 14:10:21 +02:00
Marcus Hoffmann
18592150c1
perform androidX migration through android studio
...
Project compiles and works fine after this.
2020-07-14 14:10:21 +02:00
Hans-Christoph Steiner
5c0ffea1ef
fix checkstyle from !817 !818
2020-06-25 10:31:46 +02:00
Hans-Christoph Steiner
23bd3b81dd
support new Liberapay: field, with migration support for LiberapayID:
...
Liberapay was originally included using a numeric ID, since they had not yet
finalized the public URLs. Now it is a username. So this logic prefers
the username in Liberapay: field, and uses the old LiberapayID: as a
fallback. LiberapayID: will not override Liberapay: if it is already set.
This reuses the old database key since it is stored and processed as a
String anyway.
2020-06-25 10:31:46 +02:00
Hans-Christoph Steiner
1061929fb4
support OpenCollective as a donation option
2020-06-25 10:31:46 +02:00
Marcus Hoffmann
bc6e5e8433
add test for localized icon
2020-06-24 16:57:28 +02:00
Marcus Hoffmann
7b5d7f8fed
fix tests after icon changes
2020-06-24 16:57:28 +02:00
Marcus Hoffmann
a500660a41
allow displaying localized icons
...
Move the logic of calculating the correct iconUrl from sql to java.
Fixes #1460 .
2020-06-24 16:57:28 +02:00
Hans-Christoph Steiner
765f6b840f
rename App.upstreamVersionCode to suggestedVersionCode #1063
2020-01-10 18:15:40 +01:00
Hans-Christoph Steiner
10808e2fea
rename App.upstreamVersionName to suggestedVersionName #1063
2020-01-10 18:15:39 +01:00
Hans-Christoph Steiner
531494e571
rename App.suggestedVersionName to autoInstallVersionName #1063
...
# Conflicts:
# app/src/test/java/org/fdroid/fdroid/updater/IndexV1UpdaterTest.java
2020-01-10 18:15:37 +01:00
Hans-Christoph Steiner
cc3d874dc4
rename App.suggestedVersionCode to autoInstallVersionCode #1063
2020-01-10 18:15:34 +01:00
Hans-Christoph Steiner
1c0957ce77
disable annoying or erronous PMD errors
2020-01-10 16:28:03 +01:00
Hans-Christoph Steiner
c987e6ad4c
use Collections' isEmpty() to test for emptiness
...
This should make the code intent clearer and more standard Java.
2020-01-10 16:28:01 +01:00
Hans-Christoph Steiner
c7f3910472
fix PMD "Field has the same name as a method"
2020-01-10 16:28:00 +01:00
Social Justice Wizard
390f0a8d96
Make tests support a variable number of default repos.
2020-01-02 19:34:36 +01:00
Hans-Christoph Steiner
d406a5d66c
code formatting to please checkstyle
2019-06-12 14:48:50 +02:00
Hans-Christoph Steiner
bac0ae8f25
show all installed apps as possibilities for panic uninstall
...
F-Droid should be able to uninstall any app, in theory, not just the apps
that are listed in the index.
This lays some groundwork for moving swap's SelectAppsView to the standard
AppList elements used everywhere else. It also does a little bit towards
getting rid of InstalledApp in favor of just reusing App.
2019-06-12 14:48:50 +02:00
Hans-Christoph Steiner
3b53af0657
panic: add destructive option to reset repos to defaults
2019-06-12 14:48:50 +02:00
Hans-Christoph Steiner
b400df3ac3
remove unused 'projection' argument from ApkProvider.findApkFromAnyRepo()
...
One small victory in the ever lasting battle against creeping complexity!
2019-06-12 14:48:50 +02:00
Hans-Christoph Steiner
7ca4ee6539
rename InstalledAppProvider method after what it returns: last update
2019-06-12 14:48:50 +02:00
Hans-Christoph Steiner
1d359f82ce
actually use index added/lastUpdated dates in UTC
...
The date/time written to index.xml and index-v1.json should always be in
UTC format. These formats are often in the form of just a date, e.g.
2019-04-28. Those are then converted to UNIX seconds, which includes the
time. In the date only case, the time is assumed to be 00:00, which will
be different per time zone.
index-v1.json is better since it mostly uses Java-style UNIX time in millis
but the dates/times are parsed then stored in the local database in the old
format yyyy-MM-dd_HH:mm:ss which will result in different UNIX times when
the device is in different time zones.
fdroid/fdroidclient#1757
2019-05-10 16:30:23 +02:00
Hans-Christoph Steiner
c0c5721f6a
Normalize Repo.lastUpdated values to contain the date and time
...
This also converts old Repo.lastUpdated values rather than just failing.
index.xml handling used to store the Repo "Last Updated" date used to store
the value as just an ISO date (2019-04-29), then the time was added. So if
date/time parsing fails, this falls back to trying to parse just the date.
null is returned when parsing fails, and the Latest Tab shows nothing if
the Last Updated is null.
Some related tests were also tweaked.
Hopefully:
closes fdroid/fdroidclient#1757
2019-05-10 14:13:23 +02:00
Hans-Christoph Steiner
e3cfe3690d
set "Automatically download updates" to default true
...
But keep "Automatically install updates" default false for devices with
Privileged Extension.
2019-03-26 16:19:07 +01:00
Hans-Christoph Steiner
4f1855c8a1
App Details: show the app's Translation links
...
fdroid/fdroidserver!450
icon is:
https://material.io/tools/icons/?search=trans&icon=translate&style=baseline
2019-03-22 22:16:08 +01:00
Hans-Christoph Steiner
dcb1c3accd
add flag to track localized apps for selecting in Latest tab
2019-03-22 22:16:08 +01:00
Hans-Christoph Steiner
b1569795a2
IndexV1Updater: use LinkedHashSet to preserve mirror ordering
2019-02-21 00:18:25 +01:00
Hans-Christoph Steiner
421270ad5f
handle implied READ_EXTERNAL_STORAGE permissions
...
Having _WRITE_EXTERNAL_STORAGE_ will implied _READ_EXTERNAL_STORAGE_:
https://developer.android.com/reference/android/Manifest.permission#READ_EXTERNAL_STORAGE
closes #1702
2019-02-14 15:33:57 +01:00
Hans-Christoph Steiner
1deec1c9b3
sanitize all packageNames from the index
...
This is insurance to make sure that packageNames are not abused for
exploiting F-Droid. The database queries already use SQL Prepared
Statements, but who know what else might be exploitable.
fdroid/fdroidclient#1588
2019-01-03 14:52:32 +01:00
Hans-Christoph Steiner
26c1ef3033
move RepoXMLHandler to org.fdroid.fdroid.data
...
This should be lumped with the classes it uses.
2019-01-03 14:52:32 +01:00
Hans-Christoph Steiner
9c8cc20a80
validate all data in repo push requests
...
This should get us closer towards not having to trust the server.
fdroid/fdroidclient#1588
https://stackoverflow.com/questions/5205339/regular-expression-matching-fully-qualified-class-names/5205467
2019-01-03 14:52:32 +01:00
Peter Serwylo
d82023b943
Add test for loading app icons from correct repository
2018-12-22 19:34:23 +11:00
Hans-Christoph Steiner
e0f346d4b4
fix repo tests after change in mirror list logic
...
Why didn't these tests fail earlier?
this should have been included in ac1a5e0ad8bed1c658885c8f6142367a3812815d
fdroid/fdroidclient!769
2018-12-21 15:26:02 +01:00
Hans-Christoph Steiner
0e5dd45859
fix a couple missed renames for IndexUpdater
...
* 0e6b4acabf72050e47dc80a273f5a5d1ec4ce222
* fdroid/fdroidclient!767
2018-12-21 00:06:15 +01:00
Hans-Christoph Steiner
0e6b4acabf
rename RepoUpdater to IndexUpdater
2018-12-17 17:17:28 +01:00
Hans-Christoph Steiner
c1db27715c
switch all SDK version values to integers, as per definition
...
```
sed -E -i 's,("[a-z]+SdkVersion": )"([0-9]+)",\1 \2,' app/src/test/resources/*.json
```
* fdroid/fdroidserver!596
* fdroid/fdroidserver#593
* fdroid/fdroidserver#596
2018-12-06 16:07:56 +00:00
Hans-Christoph Steiner
eb023887a5
fix checkstyle complaints
...
* LocalFinalVariableName
* EqualsAvoidNull
* EmptyLineSeparator
* SeparatorWrap
* LineLength
2018-10-18 15:07:54 +02:00
Hans-Christoph Steiner
409846e199
force DBHelperTest.canAddAdditionalRepos() to run on CI
2018-10-18 15:07:54 +02:00
Hans-Christoph Steiner
6dd4523d3c
clean up whitespace in repo descriptions
...
This cleans up the whitespace in the description item, since the
XML parsing will include the linefeeds and indenting in the description.
2018-10-18 15:07:54 +02:00
Hans-Christoph Steiner
1788546267
rename parseXmlRepos to parseAdditionalReposXml
2018-10-18 15:07:54 +02:00
Hans-Christoph Steiner
aace086da4
separate defaultRepos from initialRepos, which includes additionalRepos
2018-10-18 15:07:53 +02:00
Hans-Christoph Steiner
e8264d7dbb
rename REPO_XML_ARG_COUNT to REPO_XML_ITEM_COUNT
2018-10-18 15:07:53 +02:00
Hans-Christoph Steiner
95c375ac26
fix DBHelperTest to actually load and parse additional_repos.xml
2018-10-18 15:07:53 +02:00
Dimitri Rusin
dd08655d43
changed the tests: now testing only DBHelper.parseXmlRepos()
2018-09-20 19:12:14 +00:00