5801 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
c0123eb01b
metadata: rename description.txt to Fastlane's full_description.txt
This is required to make Weblate find these files.
2019-02-14 20:48:24 +01:00
Hans-Christoph Steiner
e33da7200b
metadata: rename summary.txt to Fastlane's short_description.txt 2019-02-14 20:47:39 +01:00
Hans-Christoph Steiner
ac406c5323 metadata: remove redundant pt locale 2019-02-14 20:33:17 +01:00
Hans-Christoph Steiner
c64fb61855 metadata: add title so it can be localized 2019-02-14 20:28:53 +01:00
Hans-Christoph Steiner
8276ab004e
move summary/description source/translations from fdroiddata
Weblate can now handle these directly:
https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-02-14 20:21:20 +01:00
Hans-Christoph Steiner
57b587dfe3 Some users never use WiFi, check for that state on first run
Lots of people complain that the graphics aren't being downloaded.  That's
because they never use F-Droid while on WiFi and the default prefs do not
allow downloading graphics while on Data.  This sets the preference to
allow downloading graphics while on Data if only Data is enabled, and not
WiFi, when the user first starts F-Droid.

closes #1592
2019-02-14 15:33:57 +01:00
Hans-Christoph Steiner
aebf7efc10 add canonical URL as first item in ordered mirror list
This makes it display nicely in RepoDetails, and is natural, since it is
the canonical URL.  This also maintains the order as received from the
mirror entries in the index file.
2019-02-14 15:33:57 +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
66ac4bcec3 also set Read Timeout with mirror logic timeout value
The Read Timeout makes a SocketTimeoutException be thrown if the timeout
expires before data is available for reading from the connection's
returned InputStream.  This should help the client switch to a new mirror
when the current mirror is too slow or overloaded.
2019-02-14 15:33:31 +01:00
Hans-Christoph Steiner
8f854c2c6e improve source string language for auto-updates pref 2019-02-14 15:33:31 +01:00
Hans-Christoph Steiner
71884c16b1 clarify mirror timeout logic with constants
This should make the timeout logic clearer, without changing the logic at
all.  This does increase the timeouts, with the second pass using 1 minute
instead of 30 seconds, and the third pass using 10 minutes instead of 1
minute.  Since this often or usually runs in the background, it should
allow some pretty long timeouts in the worst case.
2019-02-14 15:33:31 +01:00
Hans-Christoph Steiner
eb12bc1645 Merge branch 'patch-1' into 'master'
Fix date of v1.5.1 in CHANGELOG.md

See merge request fdroid/fdroidclient!788
2019-02-14 14:26:49 +00:00
riQQ
9a534b8dea Fix date of v1.5.1 in CHANGELOG.md 2019-02-06 20:19:55 +00:00
Hans-Christoph Steiner
ed798c393b Merge branch 'changelog_1.5' into 'master'
changelog additions for 1.5 and 1.5.1

See merge request fdroid/fdroidclient!787
2019-01-10 13:37:04 +00:00
Hans-Christoph Steiner
e7c8abbeed gitlab-ci: android-19 and android-24 emulators are too flaky, removing 2019-01-10 14:34:59 +01:00
Marcus Hoffmann
84d1b75445 changelog additions for 1.5 and 1.5.1 2019-01-10 14:25:28 +01:00
Hans-Christoph Steiner
bc3c0da115 Merge branch 'x86-kvm-emulator-job' into 'master'
x86 KVM emulator job

See merge request fdroid/fdroidclient!786
2019-01-10 12:30:27 +00:00
Hans-Christoph Steiner
e690fbb061 gitlab-ci: switch ARM emulator to android-22, it seems more reliable
https://medium.com/zendesk-engineering/speeding-up-android-builds-on-travis-ci-1bb4cdbd9c62
2019-01-08 20:39:56 +01:00
Hans-Christoph Steiner
3c185d6d64 enable Espresso tests to auto run, now there are x86 emulators 2019-01-08 20:37:55 +01:00
Hans-Christoph Steiner
22773f3de3 gitlab-ci: force skip Espresso tests on < android-25
It seems that ARM emulators timeout even when just trying to run the
assumeTrue() tests via Espresso.  There needs to be one test still enabled
in the file, otherwise, the run fails with:

org.fdroid.fdroid.MainActivityEspressoTest > initializationError[Nexus_One_API_19(AVD) - 4.4.2] FAILED
        java.lang.Exception: No runnable methods
        at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:191)
2019-01-08 20:36:32 +01:00
Hans-Christoph Steiner
11ff830d3d gitlab-ci: first jobs for KVM x86 emulators
* seems that android-24-x86 emulator don't work without google_apis
* -wipe-data is required to use google_apis_playstore, otherwise adb fails:
  https://github.com/butomo1989/docker-android/issues/87
2019-01-08 20:35:49 +01:00
Hans-Christoph Steiner
77b0bdf453 gitlab-ci: force HTTP with sdkmanager to make for better caching
Caching proxies are a lot easier with plain HTTP.  HTTPS is not needed here
since these are only CI builds.  The worst an attacker could do it annoy us
2019-01-08 20:35:49 +01:00
Hans-Christoph Steiner
97ad4ddc1f get HttpDownloaderTest working on at least android-17 and above
The two excluded URLs seem to always resolve to IPv6 addresses first, then
fail since there isn't IPv6 connectivity. Donno why, but only on old android
versions, so just skip them there.
2019-01-08 20:35:49 +01:00
Hans-Christoph Steiner
f064e33de9 disable all compression when downloading on < android-19
Compression seems to just give stacktraces:

     HttpDownloaderTest  I  URL: https://en.wikipedia.org/wiki/Index.html
             TestRunner  I  failed: downloadUninterruptedTest(org.fdroid.fdroid.net.HttpDownloaderTest)
                         I  ----- begin exception -----
                         I  java.io.EOFException
                         I      at java.util.zip.GZIPInputStream.readFully(GZIPInputStream.java:206)
                         I      at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:98)
                         I      at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:81)
                         I      at libcore.net.http.HttpEngine.initContentStream(HttpEngine.java:541)
                         I      at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:844)
                         I      at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:283)
                         I      at libcore.net.http.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:139)
                         I      at libcore.net.http.HttpsURLConnectionImpl.getHeaderField(HttpsURLConnectionImpl.java:246)
                         I      at org.fdroid.fdroid.net.HttpDownloader.download(HttpDownloader.java:111)
                         I      at org.fdroid.fdroid.net.HttpDownloaderTest.downloadUninterruptedTest(HttpDownloaderTest.java:74)
                         I      at java.lang.reflect.Method.invokeNative(Native Method)
                         I      at java.lang.reflect.Method.invoke(Method.java:511)
                         I      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
                         I      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
                         I      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
                         I      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
                         I      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
                         I      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
                         I      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
                         I      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
                         I      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
                         I      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
                         I      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
                         I      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
                         I      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
                         I      at org.junit.runners.Suite.runChild(Suite.java:128)
                         I      at org.junit.runners.Suite.runChild(Suite.java:27)
                         I      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
                         I      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
                         I      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
                         I      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
                         I      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
                         I      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
                         I      at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
                         I      at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
                         I      at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:56)
                         I      at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:384)
                         I      at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1661)
2019-01-07 17:33:36 +01:00
Hans-Christoph Steiner
16a5ac32b7 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!785
2019-01-04 08:19:32 +00:00
Hans-Christoph Steiner
5ceaa95a34 Weblate 2019-01-04 08:19:32 +00:00
Hans-Christoph Steiner
12728d6101 Merge branch 'index-input-hardening' into 'master'
Index input hardening

See merge request fdroid/fdroidclient!784
2019-01-03 14:24:10 +00:00
Hans-Christoph Steiner
7bc7fa9288 rename LoggingQuery.query() to rawQuery() to make audits easier
rawQuery() is much more dangerous, so this method should have the
same name as the method it is actually calling.

https://f-droid.org/docs/Second_Audit_Report/#f47--fdroidclient-raw-sql-query-executions
2019-01-03 14:52:32 +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
Hans-Christoph Steiner
9a04ce4332 Merge branch 'fix-screenshot-background' into 'master'
fix screenshot background for all themes in app details

Closes #1618

See merge request fdroid/fdroidclient!782
2019-01-03 13:34:03 +00:00
Hans-Christoph Steiner
d111d0a0d8 Merge branch 'small-localization-fixes' into 'master'
Small localization fixes

See merge request fdroid/fdroidclient!783
2019-01-02 23:00:26 +00:00
Hans-Christoph Steiner
a4e80383f9 when index updates fail, try to get localized exception message 2019-01-02 23:23:28 +01:00
Hans-Christoph Steiner
823ddcaca8 use separate titles for Updates pref and Updates tab
https://gitlab.com/fdroid/fdroidclient/merge_requests/773#note_127475129
2019-01-02 23:23:28 +01:00
Hans-Christoph Steiner
4cc5d58480 Merge branch 'collection-of-lint-and-code-cleanups' into 'master'
Collection of lint and code cleanups

See merge request fdroid/fdroidclient!780
2019-01-02 22:23:08 +00:00
Conny Duck
e3a24a042d fix screenshot background for all themes in app details 2019-01-02 19:33:59 +01:00
Hans-Christoph Steiner
079cf2e903 enable lint HardwareIds as error
Keep PRNGFixes as it is since it is security sensitive, standardized
code from Google.  While F-Droid never wants to do anything with
hardware IDs at all, this code uses the Build.SERIAL as a seed for the
random number generator, so it is safe privacy-wise.
2019-01-02 15:40:38 +01:00
Hans-Christoph Steiner
09abc0734e format code in PRNGFixes 2019-01-02 15:40:38 +01:00
Hans-Christoph Steiner
cf5b9520fb fix lint "Implied locale in date format" 2019-01-02 15:40:38 +01:00
Hans-Christoph Steiner
77a4ad4cc9 set lint "Typos" to be an error to catch translation issues 2019-01-02 15:40:38 +01:00
Hans-Christoph Steiner
178371bf54 fix typos in translations caught by lint 2019-01-02 15:40:38 +01:00
Hans-Christoph Steiner
71920f6082 use Cols.ROW_ID/Cols._ID for all "rowid"/"_id" strings 2019-01-02 15:40:27 +01:00
Hans-Christoph Steiner
bce35ef865 remove unused methods in database code to make auditing easier
These were flagged as potential vulnerabilities.
2019-01-02 15:40:27 +01:00
Hans-Christoph Steiner
7fbfa46e18 Merge branch 'library-updates' into 'master'
some safe library version bumps

See merge request fdroid/fdroidclient!779
2018-12-31 19:12:44 +00:00
Hans-Christoph Steiner
309694458b some safe library version bimps
This is a collection of minor version updates for included libraries
that should be safe to do.  Doing this at the very beginning of the
release cycle so they'll be tested.

thanks @TacoTheDank for finding these

fdroid/fdroidclient!776

Some related changelogs:
* https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.8.11
* https://github.com/jmdns/jmdns/releases
2018-12-31 17:36:33 +01:00
Hans-Christoph Steiner
f799d24f1d version code 1005050 1.5 2018-12-26 00:42:11 +01:00
Hans-Christoph Steiner
e5121dc508 update CHANGELOG 2018-12-26 00:42:03 +01:00
Hans-Christoph Steiner
945dbdbd3c prevent NPE in Bluetooth swap
ACRA  E  ACRA caught a IllegalStateException for org.fdroid.fdroid.debug
                         E  java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
                         E      at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:62)
                         E      at android.os.Handler.handleCallback(Handler.java:751)
                         E      at android.os.Handler.dispatchMessage(Handler.java:95)
                         E      at android.os.Looper.loop(Looper.java:154)
                         E      at android.app.ActivityThread.main(ActivityThread.java:6128)
                         E      at java.lang.reflect.Method.invoke(Native Method)
                         E      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
                         E      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
                         E  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a
                            null object reference
                         E      at org.fdroid.fdroid.localrepo.peers.BonjourPeer.hashCode(BonjourPeer.java:41)
                         E      at sun.misc.Hashing.singleWordWangJenkinsHash(Hashing.java:48)
                         E      at java.util.HashMap.put(HashMap.java:423)
                         E      at java.util.HashSet.add(HashSet.java:217)
                         E      at rx.internal.operators.OperatorDistinct$1.onNext(OperatorDistinct.java:62)
                         E      at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.pollQueue(OperatorObserveOn.java:202)
                         E      at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber$2.call(OperatorObserveOn.java:162)
                         E      at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
                         E      ... 7 more
2018-12-26 00:29:19 +01:00
Hans-Christoph Steiner
8ce4882c1d Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!777
2018-12-25 23:05:19 +00:00