Compare commits

...

6687 Commits

Author SHA1 Message Date
karl.hudgell
c5fa250331 new icons and settings. 2021-06-23 09:09:07 +01:00
karl.hudgell
a51588ddd2 get working for bobStore 2021-06-22 19:33:08 +01:00
Hans-Christoph Steiner
b066c40176 Merge branch 'immersive-status-bar' into 'master'
Use transparent status bar color

Closes #2203

See merge request fdroid/fdroidclient!1029
2021-06-17 06:38:02 +00:00
proletarius101
bbc2c6b35a Use transparent status bar color 2021-06-17 06:37:31 +00:00
Hans-Christoph Steiner
42b0b576d1
Merge 'Use_ActivityCompat_recreate' into 'master'
* Use_ActivityCompat_recreate:
  resync gradle verification metadata
  Use ActivityCompat.recreate().

fdroid/fdroidclient!1028
2021-06-16 14:37:07 +02:00
Hans-Christoph Steiner
39f680bb24
resync gradle verification metadata 2021-06-16 14:35:10 +02:00
Isira Seneviratne
19ffd2b491 Use ActivityCompat.recreate(). 2021-06-16 12:29:32 +00:00
Hans-Christoph Steiner
a8efa1ac07 Merge branch 'mainline' into 'master'
Read additional_repos.xml from /product as well

See merge request fdroid/fdroidclient!1026
2021-06-16 12:26:29 +00:00
Chirayu Desai
240b7af585 Read additional_repos.xml from /product as well
Change-Id: Id4a99204e4be467f4e3b1d6684eeb86a19a614f2
2021-06-16 11:55:29 +00:00
Hans-Christoph Steiner
345915cdf4 Merge branch '2126-scroll-search' into 'master'
Scroll to first item when search term changes

Closes #2126

See merge request fdroid/fdroidclient!1027
2021-06-16 09:32:49 +00:00
mueller-ma
d7fb1e0044 Scroll to first item when search term changes
Fixes #2126
2021-06-16 09:32:07 +00:00
Hans-Christoph Steiner
0d8018b10e Merge branch 'Replace_AsyncTask_with_RxJava_3' into 'master'
Replace AsyncTask implementations with RxJava 3.

See merge request fdroid/fdroidclient!947
2021-06-15 09:36:55 +00:00
Hans-Christoph Steiner
d9b443429d bump to latest io.reactivex.rxjava3:rxjava 2021-06-15 11:04:22 +02:00
Hans-Christoph Steiner
e698f4f8a3
revert unneeded/unrelated changes 2021-06-15 10:55:22 +02:00
Hans-Christoph Steiner
c27e1a697e
format imports using default Android Studio 4.1.2 settings 2021-06-15 10:55:20 +02:00
Isira Seneviratne
d549fb905d
fix checkstyle LineLength 2021-06-15 10:55:17 +02:00
Isira Seneviratne
c758cb60d9 Fix checkstyle issues. 2021-06-15 08:51:16 +00:00
Isira Seneviratne
eab5ef59b9 Use RxJava instead of AsyncTask to handle updates. 2021-06-15 08:51:16 +00:00
Isira Seneviratne
c0a699e21e Handle server swapping using RxJava instead of AsyncTask. 2021-06-15 08:51:16 +00:00
Isira Seneviratne
242662d02a Create new repos using RxJava instead of AsyncTask. 2021-06-15 08:51:16 +00:00
Isira Seneviratne
e1ca1552f7 Generate a QR bitmap using RxJava instead of AsyncTask. 2021-06-15 08:51:16 +00:00
Isira Seneviratne
93a160b40d Use RxJava 3 types in InstalledAppProviderService. 2021-06-15 08:51:16 +00:00
Isira Seneviratne
5fad229dbe Update RxJava to version 3. 2021-06-15 08:51:16 +00:00
Hans-Christoph Steiner
43a809490c use synchronized for methods that override synchronized methods 2021-06-14 16:36:42 +02:00
Hans-Christoph Steiner
a02ba42cf9
version code 1013001 2021-06-02 22:55:24 +02:00
Hans-Christoph Steiner
3ca9d47aae
update CHANGELOG 2021-06-02 22:55:22 +02:00
Hans-Christoph Steiner
c3e81e0f45
document constant that is used externally
refs #2147
2021-06-02 22:55:20 +02:00
Hans-Christoph Steiner
c7fd1f186b
Android Studio Ctrl-Alt-L code formatting 2021-06-02 22:55:18 +02:00
Hans-Christoph Steiner
ed2b119f33
update PGP key for new expiration date
closes admin#220
closes fdroidclient#2093
2021-06-02 22:55:14 +02:00
Hans-Christoph Steiner
465e92f8bc Merge branch 'TLSv1.2-min' into 'master'
bump netcipher to 2.2.0-alpha to get TorServices and TLSv1.2 min

See merge request fdroid/fdroidclient!1023
2021-06-02 20:33:33 +00:00
Hans-Christoph Steiner
09c7b21fd8
bump netcipher to 2.2.0-alpha to get TorServices and TLSv1.2 min
NetCipher provides the interface for starting Tor on demand.  It also
provides the mechanism to upgrade the TLS settings to the best possible,
based on what each device is capable of.
2021-06-02 22:02:29 +02:00
Hans-Christoph Steiner
6671683d08
fix format strings 2021-06-02 22:02:27 +02:00
Hans-Christoph Steiner
9e6d931e3b
fix lint Typo: "internett" is usually capitalized as "Internett"
sed -i 's,internett,Internett,g' app/src/main/res/values-nb/strings.xml
2021-06-02 22:02:20 +02:00
Kristoffer Grundström
64c349e39a Translated using Weblate: Swedish (sv) by Kristoffer Grundström <swedishsailfishosuser@tutanota.com>
Currently translated at 99.7% (467 of 468 strings)

Co-authored-by: Kristoffer Grundström <swedishsailfishosuser@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Klemen Skerbiš
bea8b77538 Translated using Weblate: Slovenian (sl) by Klemen Skerbiš <klemen.skerbis1@gmail.com>
Currently translated at 96.7% (453 of 468 strings)

Co-authored-by: Klemen Skerbiš <klemen.skerbis1@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sl/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Слободан Симић(Slobodan Simić)
480e98144d Translated using Weblate: Serbian (sr) by Слободан Симић(Slobodan Simić) <slsimic@gmail.com>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Serbian (sr) by Слободан Симић(Slobodan Simić) <slsimic@gmail.com>

Currently translated at 13.8% (5 of 36 strings)

Translated using Weblate: Serbian (sr) by Слободан Симић(Slobodan Simić) <slsimic@gmail.com>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Слободан Симић(Slobodan Simić) <slsimic@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/sr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sr/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
Roman Leo
7037bc3e9c Translated using Weblate: German (de) by Roman Leo <roman.leo@gmx.de>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Roman Leo <roman.leo@gmx.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Software In Interlingua
4e241f9b1b Added translation using Weblate: Interlingua (ia) by Software In Interlingua <softinterlingua@gmail.com>
Co-authored-by: Software In Interlingua <softinterlingua@gmail.com>
2021-06-02 20:05:42 +02:00
GnuPGを使うべきだ
79ea0a08c3 Translated using Weblate: Japanese (ja) by GnuPGを使うべきだ <dieeeazpnnqbpddh@cock.email>
Currently translated at 97.0% (454 of 468 strings)

Co-authored-by: GnuPGを使うべきだ <dieeeazpnnqbpddh@cock.email>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ja/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
vancha
e02b8cd80e Translated using Weblate: Frisian (fy) by vancha <tjipke@tutanota.com>
Currently translated at 21.5% (101 of 468 strings)

Added translation using Weblate: Frisian (fy) by vancha <tjipke@tutanota.com>

Co-authored-by: vancha <tjipke@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fy/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Translator
ba56933e87 Translated using Weblate: Hindi (hi) by Translator <pahatih716@to200.com>
Currently translated at 99.3% (465 of 468 strings)

Co-authored-by: Translator <pahatih716@to200.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hi/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Myeongjin Lee
45ad90bfbc Translated using Weblate: Korean (ko) by Myeongjin Lee <aranet100@gmail.com>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Korean (ko) by Myeongjin Lee <aranet100@gmail.com>

Currently translated at 97.6% (457 of 468 strings)

Co-authored-by: Myeongjin Lee <aranet100@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ko/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
random r
35f6e25d18 Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: random r <epsilin@yopmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Besnik Bleta
b031cf3d07 Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
moar pics
3821b9e6d6 Translated using Weblate: Albanian (sq) by moar pics <m0arpicsss@gmail.com>
Currently translated at 99.5% (466 of 468 strings)

Co-authored-by: moar pics <m0arpicsss@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Jonas Matisen
21354b76ff Translated using Weblate: Norwegian Bokmål (nb) by Jonas Matisen <hdsumo@protonmail.ch>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Jonas Matisen <hdsumo@protonmail.ch>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
nautilusx
602c203495 Translated using Weblate: German (de) by nautilusx <translate@disroot.org>
Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: German (de) by nautilusx <translate@disroot.org>

Currently translated at 100.0% (36 of 36 strings)

Co-authored-by: nautilusx <translate@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
Watson15683
0ead57926c Translated using Weblate: German (de) by Watson15683 <peter.parker2@tutanota.com>
Currently translated at 100.0% (36 of 36 strings)

Co-authored-by: Watson15683 <peter.parker2@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
Keunes
002b01823e Translated using Weblate: Dutch (nl) by Keunes <koen.glotzbach@gmail.com>
Currently translated at 99.7% (467 of 468 strings)

Co-authored-by: Keunes <koen.glotzbach@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Karl Ove Hufthammer
45ed83501e Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>
Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Karl Ove Hufthammer <karl@huftis.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nn/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nn/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
WaldiS
2c69c5ccf3 Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: WaldiS <sto@tutanota.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Manuela Silva
e52b8a27d6 Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Manuela Silva <mmsrs@sky.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Manuela Silva <mmsrs@sky.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Nicolas Mariniello
2dc8deca59 Translated using Weblate: Italian (it) by Nicolas Mariniello <seldon1000@tutanota.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Nicolas Mariniello <seldon1000@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
J. Lavoie
25392dd8bd Translated using Weblate: English (United Kingdom) (en-rGB) by J. Lavoie <j.lavoie@net-c.ca>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Italian (it) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 99.7% (467 of 468 strings)

Translated using Weblate: French (fr) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/en_GB/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Oymate
60a8eccb5f Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Bengali (Bangladesh) (bn-rBD) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 94.2% (441 of 468 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 87.6% (410 of 468 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 82.9% (388 of 468 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 76.9% (360 of 468 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 64.3% (301 of 468 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 57.4% (269 of 468 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 51.7% (242 of 468 strings)

Translated using Weblate: Bengali (Bangladesh) (bn-rBD) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 29.4% (138 of 468 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 48.0% (225 of 468 strings)

Translated using Weblate: Bengali (Bangladesh) (bn-rBD) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 29.0% (136 of 468 strings)

Co-authored-by: Oymate <dhruboadittya96@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn_BD/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Priit Jõerüüt
6cf9e9d105 Translated using Weblate: Estonian (et) by Priit Jõerüüt <hwlate@joeruut.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Priit Jõerüüt <hwlate@joeruut.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/et/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Francesc Sanjuán farré
5489f0a089 Translated using Weblate: Catalan (ca) by Francesc Sanjuán farré <fran@franer.systems>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Francesc Sanjuán farré <fran@franer.systems>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Rafael Ruiz
cc12359ba6 Translated using Weblate: Catalan (ca) by Rafael Ruiz <rafael.ruiz@upc.edu>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Catalan (ca) by Rafael Ruiz <rafael.ruiz@upc.edu>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Rafael Ruiz <rafael.ruiz@upc.edu>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Milo Ivir
173aa6792a Translated using Weblate: Croatian (hr) by Milo Ivir <mail@milotype.de>
Currently translated at 92.7% (434 of 468 strings)

Co-authored-by: Milo Ivir <mail@milotype.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hr/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Ranjith Kumar
72c0c6f4a6 Translated using Weblate: Tamil (ta) by Ranjith Kumar <sranjith096@gmail.com>
Currently translated at 36.1% (169 of 468 strings)

Co-authored-by: Ranjith Kumar <sranjith096@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ta/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
whenwesober
5e8948b534 Translated using Weblate: Indonesian (id) by whenwesober <naomi16i_1298q@cikuh.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: whenwesober <naomi16i_1298q@cikuh.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/id/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
ssantos
19b7b57b43 Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
Andrey
ae37d587d4 Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
Licaon Kter
0f635d6e80 Translated using Weblate: Romanian (ro) by Licaon Kter <licaon.kter@protonmail.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Licaon Kter <licaon.kter@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ro/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Wellington Terumi Uemura
eeb5f5f2ec Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
alefvanoon
4342d87b37 Translated using Weblate: Persian (fa) by alefvanoon <alefvanoon@tuta.io>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: alefvanoon <alefvanoon@tuta.io>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Sina Carnelious
27ddf42897 Translated using Weblate: Persian (fa) by Sina Carnelious <sinacarnelious@protonmail.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Sina Carnelious <sinacarnelious@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
C. Rüdinger
b642b14d5a Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: C. Rüdinger <Mail-an-CR@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
zeritti
b2a9854e1a Translated using Weblate: Czech (cs) by zeritti <woodenmo@posteo.de>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: zeritti <woodenmo@posteo.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/cs/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Rex_sa
9d738f0d9d Translated using Weblate: Arabic (ar) by Rex_sa <rex.sa@pm.me>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Arabic (ar) by Rex_sa <rex.sa@pm.me>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Rex_sa <rex.sa@pm.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
André Marcelo Alvarenga
d32d866393 Translated using Weblate: Portuguese (Brazil) (pt-rBR) by André Marcelo Alvarenga <andrealvarenga@gmx.net>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: André Marcelo Alvarenga <andrealvarenga@gmx.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Athanasios Plastiras
f09434869e Translated using Weblate: Greek (el) by Athanasios Plastiras <admin@plastiras.org>
Currently translated at 99.7% (467 of 468 strings)

Co-authored-by: Athanasios Plastiras <admin@plastiras.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/el/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Jeff Huang
f12f6694c4 Translated using Weblate: Chinese (Traditional) (zh-rTW) by Jeff Huang <s8321414@gmail.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Jeff Huang <s8321414@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hant/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Eric
6a3d989778 Translated using Weblate: Chinese (Simplified) (zh-CN) by Eric <spice2wolf@gmail.com>
Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: Chinese (Simplified) (zh-rCN) by Eric <spice2wolf@gmail.com>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Eric <spice2wolf@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
bruh
de1b05d307 Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>

Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: bruh <quangtrung02hn16@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/vi/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Ihor Hordiichuk
16ab3672cd Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>

Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
Oğuz Ersen
108b9e4bf4 Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
Ajeje Brazorf
82d1fe8815 Translated using Weblate: Sardinian (sc) by Ajeje Brazorf <lmelonimamo@yahoo.it>
Currently translated at 5.5% (2 of 36 strings)

Translated using Weblate: Sardinian (sc) by Ajeje Brazorf <lmelonimamo@yahoo.it>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/sc/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sc/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
S3aBreeze
ecc017845d Translated using Weblate: Russian (ru) by S3aBreeze <paperwork@evilcorp.ltd>
Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: Russian (ru) by S3aBreeze <paperwork@evilcorp.ltd>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: S3aBreeze <paperwork@evilcorp.ltd>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
Wellington Terumi Uemura
6b2157fc1c Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Yaron Shahrabani
b8b4da7ac9 Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/he/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
Deleted User
0b3edc812c Translated using Weblate: French (fr) by Deleted User <noreply+26956@weblate.org>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Deleted User <noreply+26956@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Ldm Public
30521f00cd Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Ldm Public <ldmpub@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Kkai
4eea2cb4e1 Translated using Weblate: Spanish (es) by Kkai <kaieltroll@gmail.com>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Kkai <kaieltroll@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
☆Verdulo
aa2537eb6d Translated using Weblate: Esperanto (eo) by ☆Verdulo <tomek@disroot.org>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: Esperanto (eo) by ☆Verdulo <tomek@disroot.org>

Currently translated at 100.0% (36 of 36 strings)

Translated using Weblate: Esperanto (eo) by ☆Verdulo <tomek@disroot.org>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: ☆Verdulo <tomek@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-06-02 20:05:42 +02:00
Hans-Christoph Steiner
1747a0a737 Translated using Weblate: German (de) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Hans-Christoph Steiner <hans@guardianproject.info>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
VfBFan
60c41783cc Translated using Weblate: German (de) by VfBFan <drop0815@posteo.de>
Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: German (de) by VfBFan <drop0815@posteo.de>

Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: German (de) by VfBFan <drop0815@posteo.de>

Currently translated at 100.0% (468 of 468 strings)

Translated using Weblate: German (de) by VfBFan <drop0815@posteo.de>

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: VfBFan <drop0815@posteo.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2021-06-02 20:05:42 +02:00
Chirayu Desai
3d53b22e37 Merge branch 'master' into 'master'
Fix Trichrome Library installation status mismatch

Closes #2184

See merge request fdroid/fdroidclient!1002
2021-06-02 18:05:23 +00:00
Hans-Christoph Steiner
719a599c41 Merge branch 'theme_screenshot_placeholder' into 'master'
theme the screenshot placeholder

Closes #2127

See merge request fdroid/fdroidclient!1007
2021-06-02 16:32:52 +00:00
Conny Duck
10111b2beb theme the screenshot placeholder 2021-06-02 16:32:51 +00:00
Hans-Christoph Steiner
1fd3b308e9 Merge branch 'remove_mainactivity_saved_state' into 'master'
remove unneeded saved state handling in MainActivity

See merge request fdroid/fdroidclient!1017
2021-06-02 12:33:01 +00:00
Konrad Pozniak
ee5c2b6632 remove unneeded saved state handling in MainActivity 2021-06-02 10:24:26 +00:00
Hans-Christoph Steiner
6155bdbe20 Merge branch 'crane-shape-theming' into 'master'
Consistent round shape theming by parameters from Crane

See merge request fdroid/fdroidclient!1013
2021-06-02 10:21:14 +00:00
proletarius101
8ffbd0b44d Consistent round shape theming by parameters from Crane 2021-06-02 10:21:14 +00:00
Hans-Christoph Steiner
a5d678b72e Merge branch 'fix-bottom-navigation-bar-dark-theme-color' into 'master'
Change the bottom navigation bar to the material component one

See merge request fdroid/fdroidclient!1008
2021-05-18 12:39:58 +00:00
proletarius101
e48c49ce0c Change the bottom navigation bar to the material component one 2021-05-18 12:39:58 +00:00
Hans-Christoph Steiner
7993b04cf4 Merge branch 'mdc-text-fields' into 'master'
Migrate to MDC text fields

See merge request fdroid/fdroidclient!1012
2021-05-18 12:01:16 +00:00
proletarius101
ca54511cf6 Migrate to MDC text fields 2021-05-18 12:01:15 +00:00
Hans-Christoph Steiner
fc463810f6 Merge branch 'mdc-switches' into 'master'
Migrate to MDC switches

See merge request fdroid/fdroidclient!1014
2021-05-18 11:37:53 +00:00
proletarius101
a1369cdd67 Migrate to MDC switches 2021-05-18 11:35:52 +00:00
Hans-Christoph Steiner
3178624b4b Merge branch 'mdc-cards' into 'master'
Migrate CardView to MaterialCardView

See merge request fdroid/fdroidclient!1011
2021-05-18 10:53:43 +00:00
proletarius101
2530487483 Migrate CardView to MaterialCardView 2021-05-18 10:53:17 +00:00
Hans-Christoph Steiner
03c16e3f1b Merge branch 'fix-sort-botton-tint' into 'master'
Fix sort button tint

See merge request fdroid/fdroidclient!1010
2021-05-18 10:48:20 +00:00
proletarius101
fee35fe285 Fix sort button tint 2021-05-17 17:34:24 +00:00
Hans-Christoph Steiner
b310032cf5 Merge branch 'fix-pipeline-badge' into 'master'
Fix pipeline badge in README

See merge request fdroid/fdroidclient!1009
2021-05-17 16:55:55 +00:00
Benedikt Brückmann
07aae0674f Fix pipeline badge in README
relates to fdroid/fdroidclient#2173
2021-05-17 11:05:34 +02:00
Hans-Christoph Steiner
cbea1539f8 Merge branch 'fix_opencollective_badge' into 'master'
improve opencollective badge

See merge request fdroid/fdroidclient!1006
2021-05-13 22:02:32 +00:00
Konrad Pozniak
90d514ac6a improve opencollective badge 2021-05-13 21:32:21 +00:00
Hans-Christoph Steiner
97bc77b03a Merge branch 'fix_opencollective_link_not_shown' into 'master'
fix opencollective badge not shown when it is the only donation option

See merge request fdroid/fdroidclient!1005
2021-05-13 21:30:54 +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
6e2b258eee Merge branch 'change-link-icon' into 'master'
Use the Material Design link icon (chain) for links

See merge request fdroid/fdroidclient!1004
2021-05-06 13:11:53 +00:00
proletarius101
5a183d27d1 Use the Material Design link icon for links 2021-05-05 22:21:03 +08:00
Oliver Scott
b52c7ca39a Remove duplicate entries from installed packages list 2021-04-30 13:27:19 +00:00
Oliver Scott
e677d815d4 Sync installed app database with package manager on PACKAGE_CHANGED for shared libraries 2021-04-30 13:27:19 +00:00
Hans-Christoph Steiner
471d2b86c7 Merge branch 'update-material-componnets-library' into 'master'
Update material components library to 1.3.0

See merge request fdroid/fdroidclient!1003
2021-04-28 16:34:47 +00:00
proletarius101
aaf08fea0c Update material components library to 1.3.0 2021-04-28 19:17:05 +08:00
Hans-Christoph Steiner
37275e2c7c
version code 1013000 2021-04-22 11:59:10 +02:00
Hans-Christoph Steiner
723a4996fb
update CHANGELOG 2021-04-22 11:59:06 +02:00
Hans-Christoph Steiner
cb53c8bbd6 Merge 'fix-icon' into master
* origin/fix-icon:
  use Android Studio default Ctrl-Alt-L to format all AndroidManifest.xml
  fully separate "Last Updated" icon from "Versions"
  purge unused AboutActivity

fdroid/fdroidclient!1001
2021-04-22 11:58:18 +02:00
Hans-Christoph Steiner
cc37dab980 Merge branch 'weblate' into 'master'
weblate

See merge request fdroid/fdroidclient!1000
2021-04-22 09:53:24 +00:00
Hans-Christoph Steiner
24ed554b1d use Android Studio default Ctrl-Alt-L to format all AndroidManifest.xml 2021-04-22 11:24:38 +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
98c204e74e rename: update_notification_title --> banner_updating_repositories
sed -i 's,update_notification_title,banner_updating_repositories,g' app/src/main/res/values*/strings.xml
2021-04-22 11:00:53 +02:00
Sérgio Morais
028d5f5a4f Translated using Weblate: Portuguese (pt) by Sérgio Morais <lalocas@protonmail.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Sérgio Morais <lalocas@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
j.kemu
4716e77e6d Translated using Weblate: Burmese (my) by j.kemu <zartlike@mailinator.com>
Currently translated at 51.2% (239 of 466 strings)

Co-authored-by: j.kemu <zartlike@mailinator.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/my/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Aryan L
c1f8862128 Translated using Weblate: Hindi (hi) by Aryan L <aryan.landge@icloud.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Aryan L <aryan.landge@icloud.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hi/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Aputsiaĸ Niels Janussen
05564afdec Translated using Weblate: Danish (da) by Aputsiaĸ Niels Janussen <aj@isit.gl>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Aputsiaĸ Niels Janussen <aj@isit.gl>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/da/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
whenwesober
b1856022c6 Translated using Weblate: Indonesian (id) by whenwesober <naomi16i_1298q@cikuh.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: whenwesober <naomi16i_1298q@cikuh.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/id/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Jonatan Nyberg
b201a4ed0c Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Currently translated at 100.0% (466 of 466 strings)

Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>

Currently translated at 99.3% (463 of 466 strings)

Co-authored-by: Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
mondstern
a34c6e316b Translated using Weblate: Italian (it) by mondstern <mondstern@snopyta.org>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: mondstern <mondstern@snopyta.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
J. Lavoie
f6a630c5c9 Translated using Weblate: English (United Kingdom) (en-rGB) by J. Lavoie <j.lavoie@net-c.ca>
Currently translated at 100.0% (466 of 466 strings)

Translated using Weblate: German (de) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (466 of 466 strings)

Translated using Weblate: German (de) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/en_GB/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Christian Eichert
6bc82c3cff Translated using Weblate: German (de) by Christian Eichert <c@zp1.net>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Christian Eichert <c@zp1.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Wellington Terumi Uemura
a0e33276b6 Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
سهیل خانعلی‌پور
42754339db Translated using Weblate: Persian (fa) by سهیل خانعلی‌پور <soheil@disroot.org>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: سهیل خانعلی‌پور <soheil@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
FintasticMan
a8a6dfc802 Translated using Weblate: Dutch (nl) by FintasticMan <finlay.davidson@coderclass.nl>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: FintasticMan <finlay.davidson@coderclass.nl>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Line
29c608b176 Translated using Weblate: Latvian (lv) by Line <LineAirline@protonmail.com>
Currently translated at 86.9% (405 of 466 strings)

Co-authored-by: Line <LineAirline@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/lv/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
janne ojanperä
2be3c0509b Translated using Weblate: Finnish (fi) by janne ojanperä <janne.ojanpera@iki.fi>
Currently translated at 97.8% (456 of 466 strings)

Co-authored-by: janne ojanperä <janne.ojanpera@iki.fi>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
peylight
86f0891321 Translated using Weblate: Persian (fa) by peylight <peylight@riseup.net>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: peylight <peylight@riseup.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Besnik Bleta
72757fd653 Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Baptiste H
a534f37efb Translated using Weblate: French (fr) by Baptiste H <baptiste.huchon@bechamail.fr>
Currently translated at 94.4% (34 of 36 strings)

Co-authored-by: Baptiste H <baptiste.huchon@bechamail.fr>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/
Translation: F-Droid/F-Droid metadata
2021-04-22 10:44:23 +02:00
Shashank Pujari
246936ede7 Translated using Weblate: Kannada (kn) by Shashank Pujari <shashankppujari@gmail.com>
Currently translated at 100.0% (466 of 466 strings)

Translated using Weblate: Hindi (hi) by Shashank Pujari <shashankppujari@gmail.com>

Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Shashank Pujari <shashankppujari@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hi/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/kn/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Michał
dd69feac52 Translated using Weblate: Polish (pl) by Michał <matmatyk@protonmail.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Michał <matmatyk@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Jeff Huang
36fc7a4eed Translated using Weblate: Chinese (Traditional) (zh-rTW) by Jeff Huang <s8321414@gmail.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Jeff Huang <s8321414@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hant/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Priit Jõerüüt
fb5c273c8e Translated using Weblate: Estonian (et) by Priit Jõerüüt <hwlate@joeruut.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Priit Jõerüüt <hwlate@joeruut.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/et/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Ihor Hordiichuk
d8f9aa7bd7 Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Ajeje Brazorf
5b2af1b0c8 Translated using Weblate: Sardinian (sc) by Ajeje Brazorf <lmelonimamo@yahoo.it>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sc/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
rhyte
97ee9bf5fe Translated using Weblate: Romanian (ro) by rhyte <vmhl.ph@gmail.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: rhyte <vmhl.ph@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ro/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Yaron Shahrabani
4f789c560d Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/he/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Ldm Public
aca7faa3fa Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Ldm Public <ldmpub@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Verdulo
422bba662f Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (466 of 466 strings)

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Verdulo <tomek@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
Malte Jürgens
b2687ca1d6 Translated using Weblate: German (de) by Malte Jürgens <maltejur@web.de>
Currently translated at 99.5% (464 of 466 strings)

Co-authored-by: Malte Jürgens <maltejur@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
random r
edff08c3c2 Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>
Currently translated at 100.0% (36 of 36 strings)

Co-authored-by: random r <epsilin@yopmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/
Translation: F-Droid/F-Droid metadata
2021-04-22 10:44:23 +02:00
Oymate
e7014bf7ac Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>
Currently translated at 46.3% (216 of 466 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 46.7% (217 of 464 strings)

Co-authored-by: Oymate <dhruboadittya96@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn/
Translation: F-Droid/F-Droid
2021-04-22 10:44:23 +02:00
bruh
5c8c46f3ad Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>
Currently translated at 100.0% (466 of 466 strings)

Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>

Currently translated at 8.3% (3 of 36 strings)

Co-authored-by: bruh <quangtrung02hn16@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/vi/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/vi/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-04-22 10:44:23 +02:00
Allan Nordhøy
6b73ed74ed Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/
Translation: F-Droid/F-Droid
2021-04-22 10:43:32 +02:00
Eric
7912f12cf5 Translated using Weblate: Chinese (Simplified) (zh-rCN) by Eric <spice2wolf@gmail.com>
Currently translated at 100.0% (466 of 466 strings)

Translated using Weblate: Chinese (Simplified) (zh-CN) by Eric <spice2wolf@gmail.com>

Currently translated at 100.0% (36 of 36 strings)

Co-authored-by: Eric <spice2wolf@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-04-22 10:43:32 +02:00
Oğuz Ersen
001a337994 Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 100.0% (466 of 466 strings)

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (36 of 36 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-04-22 10:43:32 +02:00
Andrey
f7895cea87 Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (466 of 466 strings)

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 100.0% (466 of 466 strings)

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 100.0% (36 of 36 strings)

Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-04-22 10:43:32 +02:00
Nikolai Ommundsen
f91728b081 Translated using Weblate: Norwegian Bokmål (nb) by Nikolai Ommundsen <post@niikoo.net>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Nikolai Ommundsen <post@niikoo.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/
Translation: F-Droid/F-Droid
2021-04-22 10:43:32 +02:00
Chirayu Desai
c9fbb97018 Merge branch 'only-update-local-repos-without-internet' into 'master'
when no internet and local repos, only update local repos

Closes #2146

See merge request fdroid/fdroidclient!997
2021-04-21 20:32:08 +00: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
5acc87c405 LocalHTTPDManagerTest is flaky, use 10 minute timeout 2021-04-13 13:17:56 +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
35cc9bce42
reformat all layout/ui XML with Android Studio Ctrl-Alt-L 2021-04-13 10:32:25 +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
Hans-Christoph Steiner
9d5af90c61 Merge branch 'material-components' into 'master'
feat: rebase app themes to material themes

Closes #2145

See merge request fdroid/fdroidclient!963
2021-04-12 16:36:18 +00:00
proletarius101
755588202f feat: rebase app themes to material themes 2021-04-12 16:36:17 +00:00
Hans-Christoph Steiner
5af693265f Merge branch 'master' into 'master'
fix trove4j verification error

See merge request fdroid/fdroidclient!998
2021-04-12 15:42:22 +00:00
Hans-Christoph Steiner
1cd02f02e0
fix trove4j verification error
trove4j-20160824.pom uploaded to mavenCentral has more info in it, so a
different sha256.
2021-04-12 15:57:40 +02:00
Hans-Christoph Steiner
4bf168eedd
Merge branch 'migrate-to-appcompat'
* deleteme:
  update gradle verification metadata
  Replace deprecated methods introduced
  Remove duplicated xml properties
  Fix missing text messages in preference_seekbar
  fix: linting
  Extensively use appcompat

fdroid/fdroidclient!975
2021-04-07 22:02:11 +02:00
Hans-Christoph Steiner
04ab3aefa4
update gradle verification metadata
./gradlew --write-verification-metadata pgp,sha256 assemble
./gradlew --write-verification-metadata sha256 assemble
2021-04-07 22:00:20 +02:00
proletarius101
f8f48e1be4 Replace deprecated methods introduced 2021-04-07 14:02:48 +00:00
proletarius101
b5ab4eb978 Remove duplicated xml properties 2021-04-07 14:02:48 +00:00
proletarius101
1a1a06b499 Fix missing text messages in preference_seekbar 2021-04-07 14:02:48 +00:00
proletarius101
96cf03b277 fix: linting 2021-04-07 14:02:48 +00:00
proletarius101
528eecb63c Extensively use appcompat 2021-04-07 14:02:48 +00:00
Hans-Christoph Steiner
6f91a60cb2 ./tools/remove-unused-and-blank-translations.py 2021-04-06 22:59:35 +02:00
Hans-Christoph Steiner
98b3b74610
version code 1012050 2021-04-06 22:54:13 +02:00
Hans-Christoph Steiner
4817ec1411 update changelogs 2021-04-06 22:53:37 +02:00
Hans-Christoph Steiner
6443b9fecf Merge branch 'weblate' into 'master'
weblate

See merge request fdroid/fdroidclient!996
2021-04-06 20:53:01 +00:00
Hans-Christoph Steiner
9419f9d943 fix format strings 2021-04-06 21:15:36 +02:00
melusine
4bdc45b105
Translated using Weblate: German (de) by melusine <melusine@mailbox.org>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: melusine <melusine@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
Translation: F-Droid/F-Droid metadata
2021-04-06 13:27:04 +02:00
Timur Seber
54712a10b4
Added translation using Weblate: Tatar (tt) by Timur Seber <seber.tatsoft@gmail.com>
Co-authored-by: Timur Seber <seber.tatsoft@gmail.com>
2021-04-06 13:27:03 +02:00
Germe the fur star
46da689cda
Translated using Weblate: Spanish (Argentina) (es_AR) by Germe the fur star <FOSSgerme.deb@tuta.io>
Currently translated at 8.5% (3 of 35 strings)

Translated using Weblate: Spanish (Argentina) (es-rAR) by Germe the fur star <FOSSgerme.deb@tuta.io>

Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Germe the fur star <FOSSgerme.deb@tuta.io>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/es_AR/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_AR/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-04-06 13:27:03 +02:00
Liu Tao
b5fc3e07e0
Translated using Weblate: Chinese (Simplified) (zh-rCN) by Liu Tao <lyuutau@outlook.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Liu Tao <lyuutau@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
Translation: F-Droid/F-Droid
2021-04-06 13:27:03 +02:00
MovingEarth
477024c79e
Translated using Weblate: Dutch (nl) by MovingEarth <moving.earth@gorgoz.org>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: MovingEarth <moving.earth@gorgoz.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translation: F-Droid/F-Droid
2021-04-06 13:27:02 +02:00
Hierax Swiftwing
8fd6d0a4fb
Translated using Weblate: Serbian (sr) by Hierax Swiftwing <hierax.oligopsony@slmail.me>
Currently translated at 98.2% (456 of 464 strings)

Co-authored-by: Hierax Swiftwing <hierax.oligopsony@slmail.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sr/
Translation: F-Droid/F-Droid
2021-04-06 13:27:02 +02:00
Jeff
ababe82a37
Translated using Weblate: Luxembourgish (lb) by Jeff <jeff.croise@gmail.com>
Currently translated at 13.1% (61 of 464 strings)

Added translation using Weblate: Luxembourgish (lb) by Jeff <jeff.croise@gmail.com>

Co-authored-by: Jeff <jeff.croise@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/lb/
Translation: F-Droid/F-Droid
2021-04-06 13:27:02 +02:00
HelaBasa
548fe432a7
Translated using Weblate: Sinhala (si) by HelaBasa <R45XvezA@protonmail.ch>
Currently translated at 5.7% (2 of 35 strings)

Translated using Weblate: Sinhala (si) by HelaBasa <R45XvezA@protonmail.ch>

Currently translated at 3.4% (16 of 464 strings)

Co-authored-by: HelaBasa <R45XvezA@protonmail.ch>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/si/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/si/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-04-06 13:27:02 +02:00
Nine Lima
3e372bc9f9
Translated using Weblate: Afrikaans (af) by Nine Lima <ninelima@yahoo.com>
Currently translated at 99.7% (463 of 464 strings)

Co-authored-by: Nine Lima <ninelima@yahoo.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/af/
Translation: F-Droid/F-Droid
2021-04-06 13:27:01 +02:00
Najm Us Saqib
21303adb27
Translated using Weblate: Urdu (ur) by Najm Us Saqib <funkywriters@gmail.com>
Currently translated at 17.4% (81 of 464 strings)

Co-authored-by: Najm Us Saqib <funkywriters@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ur/
Translation: F-Droid/F-Droid
2021-04-06 13:27:01 +02:00
hayalci hayalci
e7eba5f332
Translated using Weblate: Turkish (tr) by hayalci hayalci <gokdenizk@gmail.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: hayalci hayalci <gokdenizk@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
2021-04-06 13:27:01 +02:00
mahmut özcan
0f91aff535
Translated using Weblate: Turkish (tr) by mahmut özcan <mahmutozcan65@yahoo.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: mahmut özcan <mahmutozcan65@yahoo.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
2021-04-06 13:27:00 +02:00
Orhan
f850c9b73d
Translated using Weblate: Turkish (tr) by Orhan <orya@pm.me>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Turkish (tr) by Orhan <orya@pm.me>

Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Orhan <orya@pm.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
2021-04-06 13:27:00 +02:00
J. Lavoie
8666eabde8
Translated using Weblate: Italian (it) by J. Lavoie <j.lavoie@net-c.ca>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: French (fr) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: German (de) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: French (fr) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: French (fr) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 99.7% (463 of 464 strings)

Translated using Weblate: French (fr) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 99.5% (462 of 464 strings)

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2021-04-06 13:27:00 +02:00
Allan Nordhøy
f051b710df
Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>
Currently translated at 99.7% (463 of 464 strings)

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/
Translation: F-Droid/F-Droid
2021-04-06 13:26:59 +02:00
Michalis
dc39730c0b
Translated using Weblate: Greek (el) by Michalis <michalisntovas@yahoo.gr>
Currently translated at 40.0% (14 of 35 strings)

Co-authored-by: Michalis <michalisntovas@yahoo.gr>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/el/
Translation: F-Droid/F-Droid metadata
2021-04-06 13:26:59 +02:00
Веско
6ecf410f6f
Translated using Weblate: Bulgarian (bg) by Веско <v.jeliazkov@jeliazkov.net>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Веско <v.jeliazkov@jeliazkov.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bg/
Translation: F-Droid/F-Droid
2021-04-06 13:26:59 +02:00
Besnik Bleta
3555f18de1
Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>
Currently translated at 100.0% (35 of 35 strings)

Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>

Currently translated at 94.2% (33 of 35 strings)

Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>

Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/sq/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-04-06 13:26:59 +02:00
Pharadai
149ae6aa95
Translated using Weblate: Thai (th) by Pharadai <film041127@gmail.com>
Currently translated at 37.0% (172 of 464 strings)

Translated using Weblate: Thai (th) by Pharadai <film041127@gmail.com>

Currently translated at 36.4% (169 of 464 strings)

Co-authored-by: Pharadai <film041127@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/th/
Translation: F-Droid/F-Droid
2021-04-06 13:26:58 +02:00
Andrey
f423a04f08
Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
2021-04-06 13:26:58 +02:00
Rex_sa
86613d08d5
Translated using Weblate: Arabic (ar) by Rex_sa <rex.sa@pm.me>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Rex_sa <rex.sa@pm.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/
Translation: F-Droid/F-Droid
2021-04-06 13:26:58 +02:00
Luka Povroznik
afb6928bb1
Translated using Weblate: Italian (it) by Luka Povroznik <povroznik.luka@gmail.com>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Luka Povroznik <povroznik.luka@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/
Translation: F-Droid/F-Droid metadata
2021-04-06 13:26:57 +02:00
Ajeje Brazorf
826852b729
Translated using Weblate: Sardinian (sc) by Ajeje Brazorf <lmelonimamo@yahoo.it>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sc/
Translation: F-Droid/F-Droid
2021-04-06 13:26:57 +02:00
lilim
e7f4e8b8d3
Translated using Weblate: French (fr) by lilim <lionel@les-miquelots.net>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: French (fr) by lilim <lionel@les-miquelots.net>

Currently translated at 99.7% (463 of 464 strings)

Translated using Weblate: French (fr) by lilim <lionel@les-miquelots.net>

Currently translated at 99.5% (462 of 464 strings)

Translated using Weblate: French (fr) by lilim <lionel@les-miquelots.net>

Currently translated at 99.1% (460 of 464 strings)

Translated using Weblate: French (fr) by lilim <lionel@les-miquelots.net>

Currently translated at 98.9% (459 of 464 strings)

Co-authored-by: lilim <lionel@les-miquelots.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
2021-04-06 13:26:57 +02:00
Translator
d6e4645d08
Translated using Weblate: Finnish (fi) by Translator <romepoksi@gmail.com>
Currently translated at 98.0% (455 of 464 strings)

Co-authored-by: Translator <romepoksi@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/
Translation: F-Droid/F-Droid
2021-04-06 13:26:56 +02:00
Danial Behzadi
28a88172f3
Translated using Weblate: Persian (fa) by Danial Behzadi <dani.behzi@ubuntu.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/
Translation: F-Droid/F-Droid
2021-04-06 13:26:56 +02:00
David Leal
b3dcaf2721
Translated using Weblate: Spanish (es) by David Leal <halfpacho@gmail.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: David Leal <halfpacho@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
Translation: F-Droid/F-Droid
2021-04-06 13:26:56 +02:00
Oymate
98442b6938
Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>
Currently translated at 41.3% (192 of 464 strings)

Co-authored-by: Oymate <dhruboadittya96@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn/
Translation: F-Droid/F-Droid
2021-04-06 13:26:55 +02:00
امير محمد العمري
3ee4823354
Translated using Weblate: Afrikaans (af) by امير محمد العمري <amyr82669@gmail.com>
Currently translated at 98.2% (456 of 464 strings)

Co-authored-by: امير محمد العمري <amyr82669@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/af/
Translation: F-Droid/F-Droid
2021-04-06 13:26:55 +02:00
ฮาซิม หะยีแวฮามะ
a4027e0f73
Translated using Weblate: Thai (th) by ฮาซิม หะยีแวฮามะ <hayiwaehasim@gmail.com>
Currently translated at 31.2% (145 of 464 strings)

Co-authored-by: ฮาซิม หะยีแวฮามะ <hayiwaehasim@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/th/
Translation: F-Droid/F-Droid
2021-04-06 13:26:55 +02:00
Jaime Marquínez Ferrándiz
437db5fab3
Translated using Weblate: Spanish (es) by Jaime Marquínez Ferrándiz <weblate@jregistros.fastmail.net>
Currently translated at 98.2% (456 of 464 strings)

Co-authored-by: Jaime Marquínez Ferrándiz <weblate@jregistros.fastmail.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
Translation: F-Droid/F-Droid
2021-04-06 13:26:54 +02:00
Christian Eichert
dbdc8e38d5
Translated using Weblate: Romanian (ro) by Christian Eichert <c@zp1.net>
Currently translated at 40.0% (14 of 35 strings)

Translated using Weblate: Romanian (ro) by Christian Eichert <c@zp1.net>

Currently translated at 31.4% (11 of 35 strings)

Translated using Weblate: Romanian (ro) by Christian Eichert <c@zp1.net>

Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: German (de) by Christian Eichert <c@zp1.net>

Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Christian Eichert <c@zp1.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ro/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ro/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-04-06 13:26:54 +02:00
ssantos
6ab33ce442
Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (35 of 35 strings)

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
Translation: F-Droid/F-Droid metadata
2021-04-06 13:26:53 +02:00
Aung Myint Myat Oo
06620d6c52
Translated using Weblate: Burmese (my) by Aung Myint Myat Oo <solidifyarmor@gmail.com>
Currently translated at 45.2% (210 of 464 strings)

Co-authored-by: Aung Myint Myat Oo <solidifyarmor@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/my/
Translation: F-Droid/F-Droid
2021-04-06 13:26:53 +02:00
WaldiS
dfa6edf9ed
Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: WaldiS <sto@tutanota.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/
Translation: F-Droid/F-Droid
2021-04-06 13:26:52 +02:00
nautilusx
9f54ff09f8
Translated using Weblate: German (de) by nautilusx <translate@disroot.org>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: nautilusx <translate@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2021-04-06 13:26:52 +02:00
Aryan L
c843950e5f
Translated using Weblate: Hindi (hi) by Aryan L <aryan.landge@icloud.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Aryan L <aryan.landge@icloud.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hi/
Translation: F-Droid/F-Droid
2021-04-06 13:26:52 +02:00
bruh
6fa6e5710b
Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>

Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>

Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: bruh <quangtrung02hn16@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/vi/
Translation: F-Droid/F-Droid
2021-04-06 13:26:52 +02:00
Verdulo
58130712e6
Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (35 of 35 strings)

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Verdulo <tomek@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-04-06 13:26:51 +02:00
Karl Ove Hufthammer
3d84a1f488
Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Karl Ove Hufthammer <karl@huftis.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nn/
Translation: F-Droid/F-Droid
2021-04-06 13:26:51 +02:00
Yaron Shahrabani
1d0e533643
Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
Translation: F-Droid/F-Droid metadata
2021-04-06 13:26:51 +02:00
Eric
1b218c8515
Translated using Weblate: Chinese (Simplified) (zh-CN) by Eric <spice2wolf@gmail.com>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Eric <spice2wolf@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
Translation: F-Droid/F-Droid metadata
2021-04-06 13:26:50 +02:00
Ihor Hordiichuk
7391dbbf64
Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
Translation: F-Droid/F-Droid metadata
2021-04-06 13:26:50 +02:00
Oğuz Ersen
17d9aeabeb
Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
Translation: F-Droid/F-Droid metadata
2021-04-06 13:26:50 +02:00
Jonatan Nyberg
aca17d551c
Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
Translation: F-Droid/F-Droid
2021-04-06 13:26:49 +02:00
Hans-Christoph Steiner
e69a7f7556 version code 1012003 2021-03-10 23:08:17 +01:00
Hans-Christoph Steiner
d49653cb33 update CHANGELOG 2021-03-10 23:08:17 +01:00
Hans-Christoph Steiner
5aafe23c7a Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!994
2021-03-10 22:07:48 +00:00
ssantos
5b14043201
Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (35 of 35 strings)

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
Translation: F-Droid/F-Droid metadata
2021-03-10 22:32:18 +01:00
Jeff Huang
9c0141345f
Translated using Weblate: Chinese (Traditional) (zh-rTW) by Jeff Huang <s8321414@gmail.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Jeff Huang <s8321414@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hant/
Translation: F-Droid/F-Droid
2021-03-10 22:32:18 +01:00
whenwesober
ba794c1116
Translated using Weblate: Indonesian (id) by whenwesober <naomi16i_1298q@cikuh.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: whenwesober <naomi16i_1298q@cikuh.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/id/
Translation: F-Droid/F-Droid
2021-03-10 22:32:17 +01:00
Golubev Alexander
904a7ef3ac
Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Golubev Alexander <fatzer2@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
2021-03-10 22:32:17 +01:00
Andrey
909cedba75
Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
2021-03-10 22:32:17 +01:00
Licaon Kter
70c7d6dace
Translated using Weblate: Romanian (ro) by Licaon Kter <licaon.kter@protonmail.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Licaon Kter <licaon.kter@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ro/
Translation: F-Droid/F-Droid
2021-03-10 22:32:16 +01:00
Eduardo
2fa0ac280c
Translated using Weblate: Portuguese (Brazil) (pt-BR) by Eduardo <edu.rodrigues2580@gmail.com>
Currently translated at 100.0% (35 of 35 strings)

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Eduardo <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Eduardo <edu.rodrigues2580@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-03-10 22:32:16 +01:00
Alessandro Mandelli
7c3cf560bc
Translated using Weblate: Italian (it) by Alessandro Mandelli <mandelli.alessandro@ngi.it>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Alessandro Mandelli <mandelli.alessandro@ngi.it>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2021-03-10 22:32:16 +01:00
Balázs Meskó
4bd129f1d3
Translated using Weblate: Hungarian (hu) by Balázs Meskó <meskobalazs@mailbox.org>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Balázs Meskó <meskobalazs@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hu/
Translation: F-Droid/F-Droid
2021-03-10 22:32:15 +01:00
Verdulo
6a8a9fd323
Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Verdulo <tomek@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/
Translation: F-Droid/F-Droid
2021-03-10 22:32:14 +01:00
Strubbl
d2728ea23e
Translated using Weblate: German (de) by Strubbl <github@linux4tw.de>
Currently translated at 99.5% (462 of 464 strings)

Co-authored-by: Strubbl <github@linux4tw.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2021-03-10 22:32:14 +01:00
Priit Jõerüüt
e256cf9892
Translated using Weblate: Estonian (et) by Priit Jõerüüt <hwlate@joeruut.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Priit Jõerüüt <hwlate@joeruut.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/et/
Translation: F-Droid/F-Droid
2021-03-10 22:32:13 +01:00
Kristjan Räts
70ca7b184e
Translated using Weblate: Estonian (et) by Kristjan Räts <kristjanrats@gmail.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: Kristjan Räts <kristjanrats@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/et/
Translation: F-Droid/F-Droid
2021-03-10 22:32:13 +01:00
Artem
29f5d0c8b3
Translated using Weblate: Russian (ru) by Artem <KovalevArtem.ru@gmail.com>
Currently translated at 98.4% (457 of 464 strings)

Co-authored-by: Artem <KovalevArtem.ru@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
2021-03-10 22:32:12 +01:00
Agnes de Lion
96637c71e6
Translated using Weblate: French (fr) by Agnes de Lion <belocurry@pm.me>
Currently translated at 98.7% (458 of 464 strings)

Co-authored-by: Agnes de Lion <belocurry@pm.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
2021-03-10 22:32:12 +01:00
Ldm Public
1f570e38d9
Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>
Currently translated at 98.7% (458 of 464 strings)

Co-authored-by: Ldm Public <ldmpub@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
2021-03-10 22:32:12 +01:00
phlostically
49e69c9ec1
Translated using Weblate: Esperanto (eo) by phlostically <phlostically@mailinator.com>
Currently translated at 100.0% (464 of 464 strings)

Co-authored-by: phlostically <phlostically@mailinator.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/
Translation: F-Droid/F-Droid
2021-03-10 22:32:11 +01:00
Karl Ove Hufthammer
d7ace10735
Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Karl Ove Hufthammer <karl@huftis.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nn/
Translation: F-Droid/F-Droid metadata
2021-03-10 22:32:11 +01:00
Michalis
41094bdaf3
Translated using Weblate: Greek (el) by Michalis <michalisntovas@yahoo.gr>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Greek (el) by Michalis <michalisntovas@yahoo.gr>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Michalis <michalisntovas@yahoo.gr>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/el/
Translation: F-Droid/F-Droid
2021-03-10 22:32:10 +01:00
Verdulo
bcbc1940bf
Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Verdulo <tomek@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
Translation: F-Droid/F-Droid metadata
2021-03-10 22:32:10 +01:00
bruh
17cceab5a1
Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>
Currently translated at 98.2% (456 of 464 strings)

Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: bruh <quangtrung02hn16@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/vi/
Translation: F-Droid/F-Droid
2021-03-10 22:32:09 +01:00
Tun Naung Win
51eaaf6c94
Translated using Weblate: Burmese (my) by Tun Naung Win <hellisenough@gmail.com>
Currently translated at 5.7% (2 of 35 strings)

Co-authored-by: Tun Naung Win <hellisenough@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/my/
Translation: F-Droid/F-Droid metadata
2021-03-10 22:32:09 +01:00
Yaron Shahrabani
82b9f21fc0
Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/he/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-03-10 22:32:09 +01:00
Eric
191b3e5eab
Translated using Weblate: Chinese (Simplified) (zh-rCN) by Eric <spice2wolf@gmail.com>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Chinese (Simplified) (zh-CN) by Eric <spice2wolf@gmail.com>

Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Eric <spice2wolf@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-03-10 22:32:08 +01:00
Ihor Hordiichuk
a7a6679573
Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>

Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-03-10 22:32:08 +01:00
Oğuz Ersen
09614a75ea
Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-03-10 22:32:07 +01:00
Golubev Alexander
9c2d061283
Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Golubev Alexander <fatzer2@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translation: F-Droid/F-Droid metadata
2021-03-10 22:32:07 +01:00
109247019824
b97f1f7955
Translated using Weblate: Bulgarian (bg) by 109247019824 <stoyan@gmx.com>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Bulgarian (bg) by 109247019824 <stoyan@gmx.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: 109247019824 <stoyan@gmx.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bg/
Translation: F-Droid/F-Droid
2021-03-10 22:32:07 +01:00
Sérgio Marques
6d14eb4562
Translated using Weblate: Portuguese (pt) by Sérgio Marques <smarquespt@gmail.com>
Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Sérgio Marques <smarquespt@gmail.com>

Currently translated at 100.0% (464 of 464 strings)

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Sérgio Marques <smarquespt@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Portuguese (pt) by Sérgio Marques <smarquespt@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Sérgio Marques <smarquespt@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
Translation: F-Droid/F-Droid
2021-03-10 22:32:06 +01:00
Hans-Christoph Steiner
ce4375f7c7 Merge branch 'fix-gradle-properties-no-effect' into 'master'
Fix: the local gradle properties not take effect

See merge request fdroid/fdroidclient!992
2021-03-10 14:32:29 +00:00
proletarius101
1e090e2440
Fix: the local gradle properties not take effect 2021-03-10 19:35:08 +08:00
Hans-Christoph Steiner
c1d8b944b3 Merge branch 'add-test-fdroid-metrics' into 'master'
Add test fdroid metrics aka "popularity contest"

Closes #396

See merge request fdroid/fdroidclient!985
2021-03-08 16:03:49 +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
1b594fa830 reign in proguard on androidTest 2021-03-08 15:30:30 +00:00
Hans-Christoph Steiner
b5d59349f3
versionCode 1012002 2021-03-03 23:01:07 +01:00
Hans-Christoph Steiner
e9bdbb2662
update CHANGELOG 2021-03-03 23:01:04 +01:00
Hans-Christoph Steiner
363f5baf39 Merge branch 'weblate' into 'master'
weblate

See merge request fdroid/fdroidclient!987
2021-03-03 21:47:35 +00:00
Hans-Christoph Steiner
ee606b84a5 remove blank translation 2021-03-03 22:09:43 +01:00
Hans-Christoph Steiner
7318d500ba
Translated using Weblate: Bengali (Bangladesh) (bn-rBD) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 27.9% (127 of 455 strings)

Translated using Weblate: Tibetan (bo) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 69.2% (315 of 455 strings)

Translated using Weblate: Armenian (hy) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 50.5% (230 of 455 strings)

Translated using Weblate: Burmese (my) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 45.9% (209 of 455 strings)

Translated using Weblate: Arabic (ar) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 100.0% (455 of 455 strings)

Deleted translation using Weblate: English (United States) (en_US@rude) (b+en+US@rude)

Co-authored-by: Hans-Christoph Steiner <hans@guardianproject.info>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn_BD/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bo/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hy/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/my/
Translation: F-Droid/F-Droid
2021-03-03 22:07:32 +01:00
Nokib Sarkar
e010f2324c
Translated using Weblate: Bengali (Bangladesh) (bn-rBD) by Nokib Sarkar <nokibsarkar@gmail.com>
Currently translated at 27.6% (126 of 455 strings)

Co-authored-by: Nokib Sarkar <nokibsarkar@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn_BD/
Translation: F-Droid/F-Droid
2021-03-03 22:07:31 +01:00
Uri Martínez
5af3f54272
Translated using Weblate: Spanish (Mexico) (es-rMX) by Uri Martínez <elgudi10@gmail.com>
Currently translated at 44.1% (201 of 455 strings)

Co-authored-by: Uri Martínez <elgudi10@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/
Translation: F-Droid/F-Droid
2021-03-03 22:07:31 +01:00
bruh
03eef2d0c0
Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>

Currently translated at 5.7% (2 of 35 strings)

Translated using Weblate: Vietnamese (vi) by bruh <quangtrung02hn16@gmail.com>

Currently translated at 95.6% (435 of 455 strings)

Co-authored-by: bruh <quangtrung02hn16@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/vi/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/vi/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-03-03 22:07:30 +01:00
HelaBasa
bdd84a74f1
Translated using Weblate: Sinhala (si) by HelaBasa <R45XvezA@protonmail.ch>
Currently translated at 2.6% (12 of 455 strings)

Added translation using Weblate: Sinhala (si) by HelaBasa <R45XvezA@protonmail.ch>

Co-authored-by: HelaBasa <R45XvezA@protonmail.ch>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/si/
Translation: F-Droid/F-Droid
2021-03-03 22:07:30 +01:00
Bart
857540cf8b
Translated using Weblate: Dutch (Belgium) (nl-rBE) by Bart <bart@mogwai.be>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Bart <bart@mogwai.be>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl_BE/
Translation: F-Droid/F-Droid
2021-03-03 22:07:29 +01:00
Brandan
ea15f8ef97
Translated using Weblate: Galician (gl) by Brandan <brandanpl@outlook.com>
Currently translated at 11.4% (4 of 35 strings)

Translated using Weblate: Galician (gl) by Brandan <brandanpl@outlook.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Brandan <brandanpl@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/gl/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/gl/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-03-03 22:07:29 +01:00
Kintu
2685c3de52
Translated using Weblate: Catalan (ca) by Kintu <kintukp@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Kintu <kintukp@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/
Translation: F-Droid/F-Droid
2021-03-03 22:07:29 +01:00
Hans-Christoph Steiner
12ebb865fc Merge branch 'CleanCacheWorker-bug-fixes' into 'master'
CleanCacheWorker bug fixes

See merge request fdroid/fdroidclient!986
2021-03-03 21:07:16 +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
2a31b0dc61 remove some easy to fix @SuppressWarnings("LineLength") 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
2d9d0c30b1
Merge 'master' into master
* privService-getInstalledPackages:
  fail fast if privService.getInstalledPackages() isn't working
  code formatting using Android Studio 4.1.2 defaults w/ 118 line length
  Guard new privileged extension package manager query with API check
  Add shared library packages to app cache database using F-DroidPrivilegedExtension query

fdroid/fdroidclient!967
2021-03-03 18:45:10 +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
1d99cc0f7e
version code 1012001 2021-02-25 21:53:06 +01:00
Hans-Christoph Steiner
8b21c7c1fe ./tools/remove-unused-and-blank-translations.py 2021-02-25 21:52:16 +01:00
Hans-Christoph Steiner
fa827e4edb code formatting 2021-02-25 21:52:13 +01:00
Hans-Christoph Steiner
a34216e39f Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!981
2021-02-23 21:32:45 +00:00
Zmicer Turok
3c3a9c92d4 Translated using Weblate: Belarusian (be) by Zmicer Turok <nashtlumach@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Zmicer Turok <nashtlumach@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/be/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Andrey
1a787fe502 Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Kornelijus Tvarijanavičius
509f975fcb Translated using Weblate: Lithuanian (lt) by Kornelijus Tvarijanavičius <kornelitvari@protonmail.com>
Currently translated at 75.3% (343 of 455 strings)

Co-authored-by: Kornelijus Tvarijanavičius <kornelitvari@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/lt/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Besnik Bleta
9e222c77e0 Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>
Currently translated at 99.5% (453 of 455 strings)

Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Ashutosh Gangwar
06863bd8f0 Translated using Weblate: Albanian (sq) by Ashutosh Gangwar <ashutoshgngwr@gmail.com>
Currently translated at 99.5% (453 of 455 strings)

Co-authored-by: Ashutosh Gangwar <ashutoshgngwr@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Reiner Herrmann
4d19ac29da Translated using Weblate: German (de) by Reiner Herrmann <reiner@reiner-h.de>
Currently translated at 91.4% (32 of 35 strings)

Co-authored-by: Reiner Herrmann <reiner@reiner-h.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Yaron Shahrabani
2bf5f6830f Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Liu Tao
b8d39c9a50 Translated using Weblate: Chinese (Simplified) (zh-CN) by Liu Tao <lyuutau@outlook.com>
Currently translated at 100.0% (35 of 35 strings)

Translated using Weblate: Chinese (Simplified) (zh-rCN) by Liu Tao <lyuutau@outlook.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Liu Tao <lyuutau@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Matej Kolarević
0bc06daa5d Translated using Weblate: Croatian (hr) by Matej Kolarević <tildica@protonmail.com>
Currently translated at 95.6% (435 of 455 strings)

Co-authored-by: Matej Kolarević <tildica@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hr/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Eric
d0f64fd44d Translated using Weblate: Chinese (Simplified) (zh-CN) by Eric <spice2wolf@gmail.com>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Eric <spice2wolf@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Ihor Hordiichuk
59c4422ba3 Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>

Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Golubev Alexander
4eaf98c3f0 Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>

Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Golubev Alexander <fatzer2@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Verdulo
7cb7b93ccc Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (35 of 35 strings)

Co-authored-by: Verdulo <tomek@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Karl Ove Hufthammer
72a972aa25 Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>
Currently translated at 100.0% (35 of 35 strings)

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 97.1% (34 of 35 strings)

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 88.2% (30 of 34 strings)

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Karl Ove Hufthammer <karl@huftis.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nn/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nn/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
hayalci hayalci
161f4248c8 Translated using Weblate: Turkish (tr) by hayalci hayalci <gokdenizk@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Turkish (tr) by hayalci hayalci <gokdenizk@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: hayalci hayalci <gokdenizk@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
fossdd
7ca8939889 Translated using Weblate: German (de) by fossdd <fossdd@tutanota.com>
Currently translated at 93.9% (31 of 33 strings)

Co-authored-by: fossdd <fossdd@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Michalis
ef4d1c616f Translated using Weblate: Greek (el) by Michalis <michalisntovas@yahoo.gr>
Currently translated at 17.1% (6 of 35 strings)

Translated using Weblate: Greek (el) by Michalis <michalisntovas@yahoo.gr>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Greek (el) by Michalis <michalisntovas@yahoo.gr>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Greek (el) by Michalis <michalisntovas@yahoo.gr>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Greek (el) by Michalis <michalisntovas@yahoo.gr>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Greek (el) by Michalis <michalisntovas@yahoo.gr>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Michalis <michalisntovas@yahoo.gr>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/el/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/el/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Nekromanser
ac35df82ca Translated using Weblate: Finnish (fi) by Nekromanser <ari.taitto@protonmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Nekromanser <ari.taitto@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Mustafa Wahhudi
e4326c12b4 Translated using Weblate: Arabic (ar) by Mustafa Wahhudi <mustafawahhudi@gmail.com>
Currently translated at 18.1% (6 of 33 strings)

Co-authored-by: Mustafa Wahhudi <mustafawahhudi@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ar/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Virun Taechamahaphun
e5205358b4 Translated using Weblate: Thai (th) by Virun Taechamahaphun <ball_temp@hotmail.com>
Currently translated at 31.6% (144 of 455 strings)

Co-authored-by: Virun Taechamahaphun <ball_temp@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/th/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Hierax Swiftwing
0bcb7e6bca Translated using Weblate: Serbian (sr) by Hierax Swiftwing <hierax.oligopsony@slmail.me>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Hierax Swiftwing <hierax.oligopsony@slmail.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sr/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Jo
cd76e5816b Translated using Weblate: Spanish (es) by Jo <joaquinfc@protonmail.com>
Currently translated at 54.5% (18 of 33 strings)

Translated using Weblate: Spanish (es) by Jo <joaquinfc@protonmail.com>

Currently translated at 54.5% (18 of 33 strings)

Co-authored-by: Jo <joaquinfc@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/es/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
zmni
679b0f05a7 Translated using Weblate: Indonesian (id) by zmni <zmni@outlook.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: zmni <zmni@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/id/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
M S
64470b3991 Translated using Weblate: Finnish (fi) by M S <mitja.sorsa@luukku.com>
Currently translated at 9.0% (3 of 33 strings)

Translated using Weblate: Finnish (fi) by M S <mitja.sorsa@luukku.com>

Currently translated at 80.0% (364 of 455 strings)

Co-authored-by: M S <mitja.sorsa@luukku.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fi/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Satnam S Virdi
d85a26c89e Translated using Weblate: Punjabi (pa) by Satnam S Virdi <pika10singh@gmail.com>
Currently translated at 20.6% (94 of 455 strings)

Co-authored-by: Satnam S Virdi <pika10singh@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pa/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Angel Romero
825f5f09b5 Translated using Weblate: Spanish (Mexico) (es-rMX) by Angel Romero <iangelromero@pm.me>
Currently translated at 44.1% (201 of 455 strings)

Co-authored-by: Angel Romero <iangelromero@pm.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Aled Powell
4a6db7c6b0 Translated using Weblate: Welsh (cy) by Aled Powell <aled@aledpowell.cymru>
Currently translated at 12.1% (4 of 33 strings)

Co-authored-by: Aled Powell <aled@aledpowell.cymru>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/cy/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Ole Carlsen
0435f6b89c Translated using Weblate: Danish (da) by Ole Carlsen <ole@carlsen-web.dk>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Ole Carlsen <ole@carlsen-web.dk>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/da/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Oğuz Ersen
06b3de011e Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 100.0% (35 of 35 strings)

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Mantas Kriaučiūnas
e20f11d528 Translated using Weblate: Lithuanian (lt) by Mantas Kriaučiūnas <baltix@gmail.com>
Currently translated at 73.6% (335 of 455 strings)

Co-authored-by: Mantas Kriaučiūnas <baltix@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/lt/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
33ea00507b Translated using Weblate: Turkish (tr) by ‪ <hgebel@yandex.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Turkish (tr) by ‪ <hgebel@yandex.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: ‪ <hgebel@yandex.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Kristjan Räts
295fe1793f Translated using Weblate: Estonian (et) by Kristjan Räts <kristjanrats@gmail.com>
Currently translated at 27.2% (9 of 33 strings)

Co-authored-by: Kristjan Räts <kristjanrats@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/et/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Selyan Sliman Amiri
f8fbc37083 Translated using Weblate: Kabyle (kab) by Selyan Sliman Amiri <selyan.kab@gmail.com>
Currently translated at 78.9% (359 of 455 strings)

Co-authored-by: Selyan Sliman Amiri <selyan.kab@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/kab/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Imre Kristoffer Eilertsen
a700b09e53 Translated using Weblate: Norwegian Bokmål (nb) by Imre Kristoffer Eilertsen <imreeil42@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Imre Kristoffer Eilertsen <imreeil42@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Quentin PAGÈS
9b9ead6301 Translated using Weblate: Occitan (oc) by Quentin PAGÈS <quentinantonin@free.fr>
Currently translated at 1.5% (7 of 455 strings)

Added translation using Weblate: Occitan (oc) by Quentin PAGÈS <quentinantonin@free.fr>

Co-authored-by: Quentin PAGÈS <quentinantonin@free.fr>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/oc/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
Éfrit
3b6255d8a4 Translated using Weblate: French (fr) by Éfrit <efrit@posteo.net>
Currently translated at 100.0% (33 of 33 strings)

Co-authored-by: Éfrit <efrit@posteo.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:22 +01:00
Jonatan Nyberg
75d43f13b8 Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
Translation: F-Droid/F-Droid
2021-02-23 21:54:22 +01:00
random r
51bad7d319 Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>
Currently translated at 100.0% (33 of 33 strings)

Co-authored-by: random r <epsilin@yopmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:21 +01:00
Oğuz Ersen
71c7ba4b80 Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
Oymate
e3c22ca370 Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>
Currently translated at 38.6% (176 of 455 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 34.9% (159 of 455 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 10.5% (48 of 455 strings)

Translated using Weblate: Bengali (Bangladesh) (bn-rBD) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 26.8% (122 of 455 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 7.0% (32 of 455 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 2.1% (10 of 455 strings)

Co-authored-by: Oymate <dhruboadittya96@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn_BD/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
Andrey
6ea5204a22 Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
Crisalis
63ecaf5e04 Translated using Weblate: Spanish (es) by Crisalis <tegaminorune@disroot.org>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Crisalis <tegaminorune@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
Andrey F
b80efee952 Translated using Weblate: Russian (ru) by Andrey F. <firsan777@mail.ru>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Andrey F <firsan777@mail.ru>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
Turtuvshin Byambaa
0eea69d785 Translated using Weblate: Mongolian (mn) by Turtuvshin Byambaa <toroo.byamba@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Turtuvshin Byambaa <toroo.byamba@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/mn/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
Marwan
a33c6eeb2d Translated using Weblate: Arabic (ar) by Marwan <almagrhi@pm.me>
Currently translated at 18.1% (6 of 33 strings)

Co-authored-by: Marwan <almagrhi@pm.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ar/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:21 +01:00
Naveen Niraula
0b5883bacb Translated using Weblate: Nepali (ne) by Naveen Niraula <subtlenv@gmail.com>
Currently translated at 10.5% (48 of 455 strings)

Added translation using Weblate: Nepali (ne) by Naveen Niraula <subtlenv@gmail.com>

Co-authored-by: Naveen Niraula <subtlenv@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ne/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
ssantos
24570a5538 Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>
Currently translated at 100.0% (33 of 33 strings)

Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:21 +01:00
J. Lavoie
7965f95940 Translated using Weblate: French (fr) by J. Lavoie <j.lavoie@net-c.ca>
Currently translated at 96.9% (32 of 33 strings)

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/
Translation: F-Droid/F-Droid metadata
2021-02-23 21:54:21 +01:00
Nadir Nour
438aea3400 Translated using Weblate: Somali (so) by Nadir Nour <dudethatwascool2@gmail.com>
Currently translated at 14.7% (67 of 455 strings)

Translated using Weblate: Somali (so) by Nadir Nour <dudethatwascool2@gmail.com>

Currently translated at 8.5% (39 of 455 strings)

Added translation using Weblate: Somali (so) by Nadir Nour <dudethatwascool2@gmail.com>

Co-authored-by: Nadir Nour <dudethatwascool2@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/so/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
Abdelhak YAHIAOUI
57e4dc8757 Translated using Weblate: Kabyle (kab) by Abdelhak YAHIAOUI <abdelyah@gmail.com>
Currently translated at 62.8% (286 of 455 strings)

Co-authored-by: Abdelhak YAHIAOUI <abdelyah@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/kab/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
ikmaak
9c92916b2b Translated using Weblate: Dutch (nl) by ikmaak <info@ikmaak.nl>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: ikmaak <info@ikmaak.nl>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
Reg3xp
089abd8d6d Translated using Weblate: Persian (fa) by Reg3xp <reg3xp@protonmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Reg3xp <reg3xp@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
ورکنومی
8cb1522033 Translated using Weblate: Pashto (ps) by ورکنومی <wraknumay@pm.me>
Currently translated at 13.4% (61 of 455 strings)

Translated using Weblate: Pashto (ps) by ورکنومی <wraknumay@pm.me>

Currently translated at 8.5% (39 of 455 strings)

Added translation using Weblate: Pashto (ps) by ورکنومی <wraknumay@pm.me>

Co-authored-by: ورکنومی <wraknumay@pm.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ps/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
Davit Mayilyan
4cf206e7e9 Translated using Weblate: Armenian (hy) by Davit Mayilyan <davit.mayilyan@protonmail.ch>
Currently translated at 50.5% (230 of 455 strings)

Co-authored-by: Davit Mayilyan <davit.mayilyan@protonmail.ch>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hy/
Translation: F-Droid/F-Droid
2021-02-23 21:54:21 +01:00
Hakim Oubouali
d1a2873f3d Translated using Weblate: Central Atlas Tamazight (tzm) by Hakim Oubouali <hakim.oubouali.skr@gmail.com>
Currently translated at 29.8% (136 of 455 strings)

Co-authored-by: Hakim Oubouali <hakim.oubouali.skr@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tzm/
Translation: F-Droid/F-Droid
2021-02-23 21:32:28 +01:00
Ashraf Isl
3adf7ab0fb Translated using Weblate: Bengali (Bangladesh) (bn-rBD) by Ashraf Isl <rediancool@gmail.com>
Currently translated at 18.6% (85 of 455 strings)

Co-authored-by: Ashraf Isl <rediancool@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn_BD/
Translation: F-Droid/F-Droid
2021-02-23 21:32:28 +01:00
Hans-Christoph Steiner
a6a5e3cc9b Merge branch 'fix-swap-navigation-button' into 'master'
Fix swap workflow's back button

See merge request fdroid/fdroidclient!979
2021-02-23 20:32:24 +00:00
proletarius101
6e95bbe380 Fix swap workflow's back button 2021-02-23 19:55:48 +00:00
Hans-Christoph Steiner
b21dbb8646 Merge branch 'java8' into 'master'
update to Java8 and compileSdkVersion 29

See merge request fdroid/fdroidclient!974
2021-02-23 19:32:36 +00:00
Hans-Christoph Steiner
b6c439e0f9 enable Java 8 2021-02-23 17:58:56 +01:00
Hans-Christoph Steiner
19349ea032 compileSdkVersion 29 2021-02-23 17:53:33 +01:00
Hans-Christoph Steiner
8c2fa955ce gitlab-ci: switch to x86 -no-accel emulator support
Now that is finally works to some degree at least.
fdroid/ci-images-client@6e7b829346
2021-02-23 17:53:33 +01:00
Hans-Christoph Steiner
6fa5ff6608 fix lint Error: Must use app:tint instead of android:tint [UseAppTint] 2021-02-23 17:53:33 +01:00
Hans-Christoph Steiner
292d3219d6 do not crash unregistering bluetooth receiver on devices w/o Bluetooth
This is probably mostly only emulators
2021-02-23 17:53:33 +01:00
Hans-Christoph Steiner
3c22024d94 remove pedandic checkstyle error 2021-02-23 17:53:33 +01:00
Hans-Christoph Steiner
3afd269a9c enable all Espresso tests when run from Android Studio
This should not make them run in the .gitlab-ci.yml setup, since that is
set to ignore @LargeTest
2021-02-23 17:53:33 +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
38e4b05e56 gitlab-ci: only run flaky KVM jobs if env var is set in GitLab 2021-02-23 13:28:32 +01:00
Hans-Christoph Steiner
a1827f6266
Merge branch 'support-platform-signature' into 'master'
* tag 'mergeeme':
  remove unused import
  Fixed bug package signature info not included
  Changed to static property
  Fixed "apply suggestion" error
  Replaced `equalsIgnoreCase()` with `equals()`
  Apply 1 suggestion(s) to 1 file(s)
  Added check platform signature available

fdroid/fdroidclient!943
2021-02-23 13:10:52 +01:00
Hans-Christoph Steiner
725c82c1b0 Merge branch 'add-base-ci-job' into 'master'
Add base ci job

See merge request fdroid/fdroidclient!977
2021-02-23 12:07:18 +00:00
Hans-Christoph Steiner
30b6c28a52 remove unused import 2021-02-23 13:02:33 +01:00
proletarius101
ed86a2fb4f
Add base ci job 2021-02-23 15:51:12 +08: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
64e99cf90f fork after every Robolectric test to try to avoid crashes 2021-02-19 09:27:16 +01:00
Hans-Christoph Steiner
611974ecbf @Ignore test that covers when 1000 apps are installed on the device 2021-02-19 09:27:16 +01:00
Hans-Christoph Steiner
36cb4e8a4c gitlab-ci: limit RAM usage on all gradle runs 2021-02-19 09:27:16 +01:00
Hans-Christoph Steiner
a6a4147005 workaround tests crashing by forking after every 100 tests 2021-02-18 22:16:38 +01:00
Hans-Christoph Steiner
8c8c79d68a gitlab-ci: limit RAM usage to available memory, some runners have 3G 2021-02-18 22:16:38 +01:00
Hans-Christoph Steiner
857bc5c29e tests: run shutdown() on tested ContentProviders to reduce memory usage
Hopefully?
2021-02-18 22:16:38 +01:00
Hans-Christoph Steiner
a4e66540c2 Revert "purging all "@rude" translations", let Weblate do it
This reverts commit 8ddc28524f1dec52e7498345fa6aa8ecea873887.

[skip ci]
2021-02-09 22:13:07 +01:00
Hans-Christoph Steiner
801682500a
version code 1012000 2021-02-09 22:04:27 +01:00
Hans-Christoph Steiner
5d24061cfd update CHANGELOG 2021-02-09 22:04:04 +01:00
Hans-Christoph Steiner
8ddc28524f purging all "@rude" translations 2021-02-09 22:04:04 +01:00
Eric
7743588f35 Translated using Weblate: Chinese (Simplified) (zh-CN) by Eric <spice2wolf@gmail.com>
Currently translated at 100.0% (34 of 34 strings)

Co-authored-by: Eric <spice2wolf@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
Translation: F-Droid/F-Droid metadata
2021-02-09 22:04:04 +01:00
kak mi
e526f67228 Translated using Weblate: Chinese (Simplified) (zh-rCN) by kak mi <wavelake@outlook.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: kak mi <wavelake@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
Translation: F-Droid/F-Droid
2021-02-09 22:04:04 +01:00
Hans-Christoph Steiner
6f81c482c6 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!973
2021-02-09 20:50:40 +00:00
Ihor Hordiichuk
7f9f1d771b Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>
Currently translated at 100.0% (34 of 34 strings)

Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>

Currently translated at 100.0% (33 of 33 strings)

Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>

Currently translated at 100.0% (33 of 33 strings)

Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-02-09 21:17:22 +01:00
webweblate
e4f44025f1 Translated using Weblate: Ukrainian (uk) by webweblate <webweblate@riseup.net>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: webweblate <webweblate@riseup.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
2021-02-09 21:17:22 +01:00
WaldiS
20cccf4832 Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>
Currently translated at 100.0% (34 of 34 strings)

Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>

Currently translated at 100.0% (33 of 33 strings)

Co-authored-by: WaldiS <sto@tutanota.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
Translation: F-Droid/F-Droid metadata
2021-02-09 21:17:22 +01:00
Hans-Christoph Steiner
91909a887c Translated using Weblate: Chinese (Traditional) (zh-TW) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 27.2% (9 of 33 strings)

Translated using Weblate: Polish (pl) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 96.9% (32 of 33 strings)

Translated using Weblate: Czech (cs) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 12.1% (4 of 33 strings)

Translated using Weblate: French (fr) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 96.9% (32 of 33 strings)

Translated using Weblate: Spanish (Mexico) (es-rMX) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 43.9% (200 of 455 strings)

Co-authored-by: Hans-Christoph Steiner <hans@guardianproject.info>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/cs/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hant/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-02-09 21:17:22 +01:00
Yaron Shahrabani
04b69a9e2b Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (34 of 34 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
Translation: F-Droid/F-Droid metadata
2021-02-09 21:17:22 +01:00
Verdulo
3d4055d1e8 Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (34 of 34 strings)

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Verdulo <tomek@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-02-09 21:17:22 +01:00
Hans-Christoph Steiner
0e38288705 Merge branch 'search-overhaul' into 'master'
overhaul the search based on two recent merge requests

See merge request fdroid/fdroidclient!972
2021-02-09 17:54:10 +00: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
a0c809f0ad onCreateLoader() is @NonNull, throw useful error instead 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
e9b03e5a2a properly pad and scale the search sort button 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
d96dda0519
Merge 'bugfix/repo_url_querystring' into 'master'
* commit 'a81140be4749189861b2961f84e2704eb5bb467b':
  run Android Studio default code formatter with Ctrl-Alt-L
  Add Repo.getFileUrl() method to get file URL in a standard way
  RepoUrlsTest: Add new tests for correct repo URL formatting

fdroid/fdroidclient!935
2021-02-09 17:52:54 +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
8cd82e0287 update CHANGELOG 2021-02-08 14:03:15 +01: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
b9efb143be Merge branch 'latest-tab-localized-overhaul' into 'master'
convert the Latest Tab SELECT logic to ORDER BY, with accurate IS_LOCALIZED

Closes #939, #2024, #1186, and #987

See merge request fdroid/fdroidclient!971
2021-02-08 11:02:17 +00:00
Hans-Christoph Steiner
c927f37013 remove outdated stuff from CONTRIBUTING.md 2021-02-08 10:40:18 +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
5c7be1e852 move all App.setLocalized() tests into LocaleSelectionTest class 2021-02-08 09:51:04 +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
fbbf78dcf8
fix: crashing in the search activity 2021-02-07 20:01:18 +01:00
Hans-Christoph Steiner
e757c14148 Merge branch 'auto-color-vector-assets' into 'master'
fix icon and text tinting and replace some pixel maps with vector graphs

See merge request fdroid/fdroidclient!968
2021-02-04 21:44:00 +00: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
Hans-Christoph Steiner
2086f50d05 Merge branch 'AppCompatActivity' into 'master'
Change Activity to AppCompatActivity

See merge request fdroid/fdroidclient!969
2021-01-28 16:52:58 +00:00
proletarius101
e2979f632d Change Activity to AppCompatActivity 2021-01-28 16:52:58 +00:00
Hans-Christoph Steiner
34b24a5b60 Merge branch 'feature/always_include_repo_name' into 'master'
Always include repo name in exception toasts

See merge request fdroid/fdroidclient!966
2021-01-27 15:55:40 +00:00
Sylvia van Os
e95e99018a Always include repo name in exception toasts 2021-01-27 15:32:14 +00:00
Hans-Christoph Steiner
e6819e7f12 Merge 'Use_WorkManager' into 'master'
* origin/master:
  gitlab-ci: fix excluding @LargeTest from emulator jobs
  use TAG to identify CleanCacheWorker to WorkManager
  add WorkManagerTestRule to CleanCacheWorkerTest
  move static helper method into its class: CleanCacheWorker
  fdroidclient does not use variables for gradle dependencies
  Add WorkManagerTestRule.
  Use WorkManager to clean the cache.
  Add AndroidX WorkManager.

fdroid/fdroidclient!959
2021-01-27 16:27:40 +01:00
Hans-Christoph Steiner
8f64b45e79 gitlab-ci: fix excluding @LargeTest from emulator jobs
fixup for !899
2021-01-27 15:38:43 +01: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
06dbd048af add WorkManagerTestRule to CleanCacheWorkerTest 2021-01-27 15:38:42 +01:00
Hans-Christoph Steiner
2e10c7ba03 move static helper method into its class: CleanCacheWorker 2021-01-25 15:29:09 +01:00
Hans-Christoph Steiner
fa7e7fccdc fdroidclient does not use variables for gradle dependencies
Using variables makes the lint stuff not work so well.
2021-01-25 15:25:59 +01:00
Isira Seneviratne
ab8e7935b0 Add WorkManagerTestRule. 2021-01-21 06:18:23 +05:30
Isira Seneviratne
7c81b1ad15 Use WorkManager to clean the cache. 2021-01-21 06:17:28 +05:30
Isira Seneviratne
df66d127c2 Add AndroidX WorkManager. 2021-01-21 06:17:28 +05:30
Hans-Christoph Steiner
c72a315872 Merge branch 'gitlab-ci-stability' into 'master'
Gitlab ci stability

See merge request fdroid/fdroidclient!964
2021-01-19 09:09:17 +00:00
Hans-Christoph Steiner
83b7d7ff67 bump all test dependencies
Hopefully this will give some stability in the Robolectric tests.
2021-01-19 09:06:05 +01:00
Hans-Christoph Steiner
c5056a8167 gitlab-ci: run errorprone with Java11 2021-01-18 19:26:14 +01:00
Hans-Christoph Steiner
c697501f8f gitlab-ci: run all test_lint_pmd_checkstyle parts, even after failures 2021-01-18 19:26:13 +01:00
Hans-Christoph Steiner
06b6f8794f gitlab-ci: retry flaky testFullDebugUnitTest 2021-01-18 19:23:47 +01:00
Hans-Christoph Steiner
474bbdfdbd
LocalHTTPDManagerTest: extend timeout to 60 seconds
If the job is successful, it should finish without coming closes to
the timeout.  Extending the timeout will make it take longer to fail,
but since the job is flaky, and the related code is rarely touched, it
seems worth it.
2021-01-18 11:07:31 +01:00
Hans-Christoph Steiner
69b845c34f
gitlab-ci: disable ignored emulator runs that always fail 2021-01-12 20:05:54 +01:00
Hans-Christoph Steiner
99a5262730 make robolectric fetch dependencies via HTTPS
https://robolectric.org/configuring/#system-properties

https://gitlab.com/fdroid/fdroidclient/-/merge_requests/963#note_483716081
2021-01-12 18:02:03 +01:00
Hans-Christoph Steiner
97aaf5a067
gitlab-ci: include Java crash dump logs in artifacts
https://gitlab.com/fdroid/ci-images-client/-/jobs/957371759

```
A fatal error has been detected by the Java Runtime Environment:

 SIGSEGV (0xb) at pc=0x00007f6775b513c0, pid=1923, tid=0x00007f675eef6700

JRE version: OpenJDK Runtime Environment (8.0_275-b01) (build 1.8.0_275-8u275-b01-1~deb9u1-b01)
Java VM: OpenJDK 64-Bit Server VM (25.275-b01 mixed mode linux-amd64 compressed oops)
Problematic frame:
V  [libjvm.so+0x92d3c0]

Core dump written. Default location: /builds/test/fdroidclient/app/core or core.1923

An error report file with more information is saved as:
/builds/test/fdroidclient/app/hs_err_pid1923.log

Compiler replay data is saved as:
/builds/test/fdroidclient/app/replay_pid1923.log

If you would like to submit a bug report, please visit:
  http://bugreport.java.com/bugreport/crash.jsp
```
2021-01-12 11:50:53 +01:00
Hans-Christoph Steiner
94dbaab83d
version code 1011050 2021-01-04 20:33:34 +01:00
Hans-Christoph Steiner
ec9ce60813 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!961
2021-01-04 19:31:02 +00:00
Hans-Christoph Steiner
95a2803185 remove unneeded Android strings.xml quoting 2021-01-04 18:26:47 +01:00
Hans-Christoph Steiner
42cdeddd01 ./tools/remove-unused-and-blank-translations.py 2021-01-04 18:26:23 +01:00
Hans-Christoph Steiner
dc8e662b7b Translated using Weblate: Afrikaans (af) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/af/
2021-01-04 18:25:26 +01:00
Hans-Christoph Steiner
4ed6afb532 Translated using Weblate: Kannada (kn) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/kn/
2021-01-04 18:23:45 +01:00
Besnik Bleta
e24fd389c2 Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>
Currently translated at 99.1% (451 of 455 strings)

Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>

Currently translated at 99.7% (454 of 455 strings)

Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
2021-01-04 18:23:45 +01:00
Eduardo Rodrigues
f188e0df71 Translated using Weblate: Bengali (bn) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>
Currently translated at 0.2% (1 of 455 strings)

Translated using Weblate: English (United States) (en_US@rude) (b+en+US@rude) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 67.6% (308 of 455 strings)

Translated using Weblate: English (United Kingdom) (en-rGB) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Spanish (Mexico) (es-rMX) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 43.9% (200 of 455 strings)

Translated using Weblate: Mongolian (mn) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Welsh (cy) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Kannada (kn) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Afrikaans (af) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Hindi (hi) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Slovenian (sl) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Korean (ko) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Galician (gl) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Bulgarian (bg) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Albanian (sq) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Eduardo Rodrigues <edu.rodrigues2580@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/af/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bg/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/cy/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/en_GB/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/en_US@rude/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/gl/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hi/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/kn/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ko/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/mn/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sl/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
2021-01-04 18:23:45 +01:00
Oymate
d4f9e91938 Added translation using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>
Co-authored-by: Oymate <dhruboadittya96@gmail.com>
2021-01-04 18:23:45 +01:00
Jennifer Kitts
95e1cd4a89 Translated using Weblate: English (United States) (b+en+US@rude) by Jennifer Kitts <kittsjennifer44@gmail.com>
Currently translated at 0.0% (0 of 455 strings)

Co-authored-by: Jennifer Kitts <kittsjennifer44@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/en_US@rude/
Translation: F-Droid/F-Droid
2021-01-04 18:23:45 +01:00
Hans-Christoph Steiner
e6529d9ff1 Deleted translation using Weblate: English (United States) (en-rUS)
Co-authored-by: Hans-Christoph Steiner <hans@guardianproject.info>
2021-01-04 18:23:45 +01:00
Chris Jr Williams
58379f68cf Added translation using Weblate: English (United States) (en-rUS) by Chris Jr Williams <chrisjr4eva1987@gmail.com>
Added translation using Weblate: English (United Kingdom) (en-rGB) by Chris Jr Williams <chrisjr4eva1987@gmail.com>

Co-authored-by: Chris Jr Williams <chrisjr4eva1987@gmail.com>
2021-01-04 18:16:47 +01:00
JoC
658ce1cfdd Translated using Weblate: Spanish (Argentina) (es-rAR) by JoC <jo_91_lp@hotmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: JoC <jo_91_lp@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_AR/
Translation: F-Droid/F-Droid
2021-01-04 18:12:48 +01:00
Yogesh
9f443e8562 Translated using Weblate: Kannada (kn) by Yogesh <yogesh@karnatakaeducation.org.in>
Currently translated at 68.1% (310 of 455 strings)

Co-authored-by: Yogesh <yogesh@karnatakaeducation.org.in>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/kn/
Translation: F-Droid/F-Droid
2021-01-04 18:12:42 +01:00
Besnik Bleta
0cc38b3d0a Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>
Currently translated at 99.1% (451 of 455 strings)

Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
2021-01-04 18:11:18 +01:00
Eduardo Rodrigues
29c8ed09a0 Translated using Weblate: Albanian (sq) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Eduardo Rodrigues <edu.rodrigues2580@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
2021-01-04 18:11:16 +01:00
Hans-Christoph Steiner
ef22161f91 Translated using Weblate: Marathi (mr) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 73.1% (333 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/mr/
2021-01-04 18:10:30 +01:00
Mahem Jadhav
164adf3cf3 Translated using Weblate: Marathi (mr) by Mahem Jadhav <mahem4ever@gmail.com>
Currently translated at 72.7% (331 of 455 strings)

Translated using Weblate: Marathi (mr) by Mahem Jadhav <mahem4ever@gmail.com>

Currently translated at 54.5% (248 of 455 strings)

Translated using Weblate: Marathi (mr) by Mahem Jadhav <mahem4ever@gmail.com>

Currently translated at 37.1% (169 of 455 strings)

Translated using Weblate: Marathi (mr) by Mahem Jadhav <mahem4ever@gmail.com>

Currently translated at 37.8% (172 of 455 strings)

Added translation using Weblate: Marathi (mr) by Mahem Jadhav <mahem4ever@gmail.com>

Co-authored-by: Mahem Jadhav <mahem4ever@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/mr/
Translation: F-Droid/F-Droid
2021-01-04 18:10:26 +01:00
Bruno Rocha
25a61583ac Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Bruno Rocha <brunorocha@outlook.com>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
2021-01-04 18:09:54 +01:00
Miguel
4fc0a3d313 Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Miguel <miguelcristovao99@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Miguel <miguelcristovao99@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
Translation: F-Droid/F-Droid
2021-01-04 18:09:52 +01:00
mrkazoodle
626d924e03 Translated using Weblate: Dutch (Belgium) (nl-rBE) by mrkazoodle <philip_hoflack@hotmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Dutch (nl) by mrkazoodle <philip_hoflack@hotmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: mrkazoodle <philip_hoflack@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl_BE/
Translation: F-Droid/F-Droid
2021-01-04 18:09:40 +01:00
Oukiki Saleh
069dc9de15 Translated using Weblate: Arabic (ar) by Oukiki Saleh <salehoukiki@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Oukiki Saleh <salehoukiki@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/
Translation: F-Droid/F-Droid
2021-01-04 18:09:05 +01:00
Balázs Meskó
9e6900452b Translated using Weblate: Hungarian (hu) by Balázs Meskó <meskobalazs@mailbox.org>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Balázs Meskó <meskobalazs@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hu/
Translation: F-Droid/F-Droid
2021-01-04 18:08:50 +01:00
Allan Nordhøy
9be0dc3414 Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>
Currently translated at 99.7% (454 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/
2021-01-04 18:08:40 +01:00
Allan Nordhøy
4eb5146f17 Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>
Currently translated at 99.5% (453 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/
2021-01-04 18:08:38 +01:00
mondstern
3147fd9646 Translated using Weblate: Norwegian Bokmål (nb) by mondstern <mondstern@snopyta.org>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/
2021-01-04 18:08:35 +01:00
Allan Nordhøy
344e5923af Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>
Currently translated at 62.5% (20 of 32 strings)

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 99.5% (453 of 455 strings)

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-01-04 18:08:32 +01:00
Danial Behzadi
1df2613b7c Translated using Weblate: Persian (fa) by Danial Behzadi <dani.behzi@ubuntu.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/
Translation: F-Droid/F-Droid
2021-01-04 18:08:10 +01:00
Gerrits
0738c4dfee Translated using Weblate: Dutch (nl) by Gerrits <rf.gerrits@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Gerrits <rf.gerrits@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translation: F-Droid/F-Droid
2021-01-04 18:08:01 +01:00
jimman2003
6134a2ee0a Translated using Weblate: Greek (el) by jimman2003 <jim41825@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: jimman2003 <jim41825@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/el/
Translation: F-Droid/F-Droid
2021-01-04 18:07:50 +01:00
BennyBeat
11b375531a Translated using Weblate: Catalan (ca) by BennyBeat <bennybeat@gmail.com>
Currently translated at 99.7% (454 of 455 strings)

Co-authored-by: BennyBeat <bennybeat@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/
Translation: F-Droid/F-Droid
2021-01-04 18:07:29 +01:00
Fernando Verdugo
292ac90e8e Translated using Weblate: Catalan (ca) by Fernando Verdugo <fv3rdugo@gmail.com>
Currently translated at 99.7% (454 of 455 strings)

Co-authored-by: Fernando Verdugo <fv3rdugo@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/
Translation: F-Droid/F-Droid
2021-01-04 18:07:26 +01:00
Alvaro
151446adff Translated using Weblate: Spanish (es) by Alvaro <alvaro@null.net>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Alvaro <alvaro@null.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
Translation: F-Droid/F-Droid
2021-01-04 18:07:14 +01:00
Crisalis
bd219210c0 Translated using Weblate: Spanish (es) by Crisalis <tegaminorune@disroot.org>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Crisalis <tegaminorune@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
Translation: F-Droid/F-Droid
2021-01-04 18:07:09 +01:00
Bjorn Roesbeke
1ac266ac1e Translated using Weblate: Dutch (Belgium) (nl-rBE) by Bjorn Roesbeke <inbox@bjornroesbeke.be>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Bjorn Roesbeke <inbox@bjornroesbeke.be>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl_BE/
Translation: F-Droid/F-Droid
2021-01-04 18:07:00 +01:00
Jonatan Nyberg
ac7b4dcbc9 Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
Translation: F-Droid/F-Droid
2021-01-04 18:06:53 +01:00
Gontzal Manuel Pujana Onaindia
ce7c14e4a2 Translated using Weblate: Basque (eu) by Gontzal Manuel Pujana Onaindia <thadahdenyse@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Gontzal Manuel Pujana Onaindia <thadahdenyse@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eu/
Translation: F-Droid/F-Droid
2021-01-04 18:06:37 +01:00
C. Rüdinger
9c7648a03d Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: C. Rüdinger <Mail-an-CR@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2021-01-04 18:04:56 +01:00
Fynn Godau
faa27d181e Translated using Weblate: German (de) by Fynn Godau <fynngodau@mailbox.org>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Fynn Godau <fynngodau@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2021-01-04 18:04:56 +01:00
J. Lavoie
7d9c12ecf9 Translated using Weblate: Spanish (Argentina) (es-rAR) by J. Lavoie <j.lavoie@net-c.ca>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: German (de) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_AR/
Translation: F-Droid/F-Droid
2021-01-04 18:04:56 +01:00
Eduardo Rodrigues
90bd663ad9 Translated using Weblate: Portuguese (Brazil) (pt-BR) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>
Currently translated at 100.0% (33 of 33 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/
2021-01-04 18:04:39 +01:00
Eric
a77feac6f0 Translated using Weblate: Chinese (Simplified) (zh-CN) by Eric <spice2wolf@gmail.com>
Currently translated at 100.0% (33 of 33 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
2021-01-04 18:04:15 +01:00
Moo
3d39d1ee4a Translated using Weblate: Lithuanian (lt) by Moo <hazap@hotmail.com>
Currently translated at 72.3% (329 of 455 strings)

Translated using Weblate: Lithuanian (lt) by Moo <hazap@hotmail.com>

Currently translated at 71.8% (327 of 455 strings)

Translated using Weblate: Lithuanian (lt) by Moo <hazap@hotmail.com>

Currently translated at 6.2% (2 of 32 strings)

Translated using Weblate: Lithuanian (lt) by Moo <hazap@hotmail.com>

Currently translated at 72.0% (328 of 455 strings)

Co-authored-by: Moo <hazap@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/lt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/lt/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2021-01-04 18:03:18 +01:00
aqwer-T
99b14f5a54 Translated using Weblate: Lithuanian (lt) by aqwer-T <aleksas.muliuolis18@gmail.com>
Currently translated at 72.9% (332 of 455 strings)

Co-authored-by: aqwer-T <aleksas.muliuolis18@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/lt/
Translation: F-Droid/F-Droid
2021-01-04 18:02:59 +01:00
HardLight
73e189613d Translated using Weblate: Lithuanian (lt) by HardLight <hardlightxda@gmail.com>
Currently translated at 72.3% (329 of 455 strings)

Co-authored-by: HardLight <hardlightxda@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/lt/
Translation: F-Droid/F-Droid
2021-01-04 18:02:48 +01:00
Ihor Hordiichuk
e36e1b0aee Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>
Currently translated at 100.0% (33 of 33 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
2021-01-04 18:00:22 +01:00
Oğuz Ersen
42dbdef5f1 Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 100.0% (33 of 33 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
2021-01-04 18:00:22 +01:00
Andrey
67bf515a17 Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (33 of 33 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
2021-01-04 18:00:22 +01:00
Andrey
aa453227af Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
2021-01-04 18:00:22 +01:00
Eduardo Rodrigues
810445c298 Translated using Weblate: Portuguese (pt) by Eduardo Rodrigues <edu.rodrigues2580@gmail.com>
Currently translated at 100.0% (33 of 33 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
2021-01-04 18:00:22 +01:00
Yaron Shahrabani
fc88599132 Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (33 of 33 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
2021-01-04 18:00:22 +01:00
Verdulo
64fb1f17a3 Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (33 of 33 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
2021-01-04 18:00:22 +01:00
Hans-Christoph Steiner
3a15230eba pick-complete-translations.py: print out rationale 2020-12-30 12:56:02 +01:00
Hans-Christoph Steiner
13614a916b
fix checks in weblate
https://hosted.weblate.org/checks/?project=f-droid&component=f-droid
2020-12-29 22:38:22 +01:00
Hans-Christoph Steiner
6b50a963b8 update CHANGELOG 2020-12-29 22:18:56 +01:00
Hans-Christoph Steiner
797a006b02 IntentFilters for longer URLs to support GitCDN/RawGit/etc mirrors
https://guardianproject.info/2020/12/07/distribution-in-depth-mirrors-as-a-source-of-resiliency/

These mirrors do not have archives in general.
2020-12-29 22:18:56 +01:00
Hans-Christoph Steiner
1d10bf16d2 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!960
2020-12-29 21:18:18 +00:00
Hans-Christoph Steiner
054d6318e9 Translated using Weblate: Belarusian (be) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/be/
2020-12-29 18:00:11 +01:00
Hans-Christoph Steiner
560b178c09 Translated using Weblate: Afrikaans (af) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/af/
2020-12-29 18:00:11 +01:00
Hans-Christoph Steiner
bdbf48185d Translated using Weblate: Uyghur (ug) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 49.2% (224 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ug/
2020-12-29 18:00:11 +01:00
Hans-Christoph Steiner
5581a84788 Translated using Weblate: Latvian (lv) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 45.2% (206 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/lv/
2020-12-29 18:00:11 +01:00
Hans-Christoph Steiner
fc97db723a Translated using Weblate: Galician (gl) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/gl/
2020-12-29 18:00:11 +01:00
Hans-Christoph Steiner
d4134ab03f Translated using Weblate: Asturian (ast) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 90.7% (413 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ast/
2020-12-29 18:00:11 +01:00
Hans-Christoph Steiner
9d57cd2076 Translated using Weblate: Arabic (ar) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/
2020-12-29 18:00:11 +01:00
Nine Lima
ee22e1710b Translated using Weblate: Afrikaans (af) by Nine Lima <ninelima@yahoo.com>
Currently translated at 12.5% (4 of 32 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/af/
2020-12-29 18:00:11 +01:00
Ldm Public
d59bfd5af4 Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
2020-12-29 18:00:11 +01:00
Sergiu
c986a70a08 Translated using Weblate: Romanian (ro) by Sergiu <adinfinitvm@wail.ch>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ro/
2020-12-29 18:00:11 +01:00
Nine Lima
fb442d82db Translated using Weblate: Afrikaans (af) by Nine Lima <ninelima@yahoo.com>
Currently translated at 72.9% (332 of 455 strings)

Co-authored-by: Nine Lima <ninelima@yahoo.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/af/
Translation: F-Droid/F-Droid
2020-12-29 18:00:11 +01:00
Besnik Bleta
865f4a7c1f Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>
Currently translated at 96.8% (31 of 32 strings)

Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/sq/
Translation: F-Droid/F-Droid metadata
2020-12-29 18:00:11 +01:00
WaldiS
5a0cfb93ba Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: WaldiS <sto@tutanota.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
Translation: F-Droid/F-Droid metadata
2020-12-29 18:00:11 +01:00
The Cats
b2b7a27377 Translated using Weblate: Portuguese (Brazil) (pt-BR) by The Cats <philosoph@snopyta.org>
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: The Cats <philosoph@snopyta.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/
Translation: F-Droid/F-Droid metadata
2020-12-29 18:00:11 +01:00
askar882
0225805e88 Translated using Weblate: Chinese (Simplified) (zh-rCN) by askar882 <askar882@qq.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: askar882 <askar882@qq.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
Translation: F-Droid/F-Droid
2020-12-29 18:00:11 +01:00
NightFeather
3218a5e0ae Translated using Weblate: Chinese (Traditional) (zh-TW) by NightFeather <ss900328@gmail.com>
Currently translated at 21.8% (7 of 32 strings)

Co-authored-by: NightFeather <ss900328@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hant/
Translation: F-Droid/F-Droid metadata
2020-12-29 18:00:11 +01:00
Étienne Deparis
6497d8f8ba Translated using Weblate: French (fr) by Étienne Deparis <etienne@depar.is>
Currently translated at 100.0% (32 of 32 strings)

Translated using Weblate: French (fr) by Étienne Deparis <etienne@depar.is>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Étienne Deparis <etienne@depar.is>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-12-29 18:00:11 +01:00
Michal L
62aea8a02a Translated using Weblate: Polish (pl) by Michal L <michalrmsmi@wp.pl>
Currently translated at 96.8% (31 of 32 strings)

Translated using Weblate: Polish (pl) by Michal L <michalrmsmi@wp.pl>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Michal L <michalrmsmi@wp.pl>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-12-29 18:00:11 +01:00
Eric
12568dfd31 Translated using Weblate: Chinese (Simplified) (zh-CN) by Eric <spice2wolf@gmail.com>
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Eric <spice2wolf@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
Translation: F-Droid/F-Droid metadata
2020-12-29 18:00:11 +01:00
Tymofij Lytvynenko
182200659d Translated using Weblate: Ukrainian (uk) by Tymofij Lytvynenko <till.svit@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Tymofij Lytvynenko <till.svit@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
2020-12-29 17:41:29 +01:00
Ihor Hordiichuk
5acde313b6 Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Ukrainian (uk) by Ihor Hordiichuk <igor_ck@outlook.com>

Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-12-29 17:41:29 +01:00
Ali Demirtas
2bc0a847ed Translated using Weblate: Turkish (tr) by Ali Demirtas <alidemirtas94@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Ali Demirtas <alidemirtas94@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
2020-12-29 17:41:29 +01:00
Oğuz Ersen
d35d44f4bf Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
Translation: F-Droid/F-Droid metadata
2020-12-29 17:41:29 +01:00
Golubev Alexander
56039cbdbb Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
2020-12-29 17:41:29 +01:00
Artem
6e9385b190 Translated using Weblate: Russian (ru) by Artem <KovalevArtem.ru@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
2020-12-29 17:41:29 +01:00
Golubev Alexander
cf4429e341 Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>
Currently translated at 100.0% (32 of 32 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
2020-12-29 17:41:29 +01:00
Golubev Alexander
9ac9eca6ce Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
2020-12-29 17:41:29 +01:00
Golubev Alexander
bfa281e9ac Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Golubev Alexander <fatzer2@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translation: F-Droid/F-Droid metadata
2020-12-29 17:41:28 +01:00
Ertu Official
6ef94ef9cd Translated using Weblate: Russian (ru) by Ertu Official <er2off@outlook.com>
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Ertu Official <er2off@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translation: F-Droid/F-Droid metadata
2020-12-29 17:41:28 +01:00
Igor Benek-Lins
e7ae54590e Translated using Weblate: Portuguese (pt) by Igor Benek-Lins <beneklins@protonmail.ch>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Igor Benek-Lins <beneklins@protonmail.ch>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
Translation: F-Droid/F-Droid
2020-12-29 17:41:28 +01:00
ssantos
342c5b3fa6 Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (32 of 32 strings)

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
Translation: F-Droid/F-Droid metadata
2020-12-29 17:41:28 +01:00
x
55547291c7 Translated using Weblate: Italian (it) by x <hardwired1.0@protonmail.com>
Currently translated at 100.0% (32 of 32 strings)

Translated using Weblate: Italian (it) by x <hardwired1.0@protonmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: x <hardwired1.0@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-12-29 17:41:28 +01:00
random r
58429b81f7 Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: random r <epsilin@yopmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2020-12-29 17:41:28 +01:00
x
e33751ef3b Translated using Weblate: Italian (it) by x <hardwired1.0@protonmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Italian (it) by x <hardwired1.0@protonmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: x <hardwired1.0@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2020-12-29 17:41:28 +01:00
Massimiliano Caniparoli
34abd85289 Translated using Weblate: Italian (it) by Massimiliano Caniparoli <massic80@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Italian (it) by Massimiliano Caniparoli <massic80@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Massimiliano Caniparoli <massic80@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2020-12-29 17:41:28 +01:00
Yaron Shahrabani
9c4c4e9883 Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (32 of 32 strings)

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
Translation: F-Droid/F-Droid metadata
2020-12-29 17:41:28 +01:00
Verdulo
897f4b0f8f Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Verdulo <tomek@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-12-29 17:41:28 +01:00
Hans-Christoph Steiner
d14a5200f1 Merge branch 'Use_ViewCompat_requireViewById' into 'master'
Use ViewCompat.requireViewById().

See merge request fdroid/fdroidclient!958
2020-12-29 15:52:11 +00:00
Hans-Christoph Steiner
81ba7148d3 Merge branch 'Use_ServiceCompat_stopForeground' into 'master'
Use ServiceCompat.stopForeground().

See merge request fdroid/fdroidclient!956
2020-12-29 15:48:51 +00:00
Isira Seneviratne
0835b777a9 Use ViewCompat.requireViewById(). 2020-12-20 05:26:25 +05:30
Isira Seneviratne
1b428087cf Use ServiceCompat.stopForeground(). 2020-12-20 04:58:10 +05:30
Hans-Christoph Steiner
be3ac52000 rename PackageProvider to PackageIdProvider 2020-11-19 14:02:12 +01:00
Hans-Christoph Steiner
413e2672c6 Merge branch 'linkify-web-urls' into 'master'
Linkify web urls

See merge request fdroid/fdroidclient!952
2020-11-18 23:55:20 +00:00
Hans-Christoph Steiner
331d4a174d
fix checkstyle EmptyStatement 2020-11-18 23:30:35 +01:00
Hans-Christoph Steiner
7248375a3a
linkify web URLs in description in App Details
fdroid-website#510
fdroid-website#167
fdroidserver#845
fdroiddata@d6c5315a
jekyll-fdroid!60
2020-11-18 23:20:37 +01:00
Hans-Christoph Steiner
f4ae1aacc7 Merge branch 'usb-otg-nearby-repos' into 'master'
fix repo handling on SDCard/USB-OTG

See merge request fdroid/fdroidclient!950
2020-11-18 21:57:39 +00:00
Hans-Christoph Steiner
8f4263097c Merge branch 'Use_HtmlCompat' into 'master'
Use HtmlCompat.fromHtml().

See merge request fdroid/fdroidclient!917
2020-11-18 21:55:32 +00:00
Isira Seneviratne
ae4b6a8b7c Use HtmlCompat.fromHtml(). 2020-11-12 06:45:25 +05:30
Hans-Christoph Steiner
d00108ba68 support opening USB-OTG on android-29+
Here's another gem: they added this nice new API in android-24 and told
everyone this was THE WAY. Then they made it a no-op in android-29
https://developer.android.com/reference/android/os/storage/StorageVolume#createAccessIntent(java.lang.String)
2020-11-11 18:26:22 +01:00
Hans-Christoph Steiner
6887e09d88 properly track ContentObservers so they can be unregistered 2020-11-11 18:25:30 +01:00
Hans-Christoph Steiner
8209bf9a0b allow SDCard/TreeUri scans to be manually triggered by user button press
Before, the preference blocked all scans.  That lead to confusing UX
since the "Try it" and USB-OTG buttons would do nothing.
2020-11-11 18:25:30 +01:00
Hans-Christoph Steiner
6af66abf54 use MEDIA_* events to update USB-OTG detection
This means that sometimes the NearbyView is updated from a
BroadcastReceiver's Context, which is not an Activity.  So this has to
try a little harder to fetch the Activity instance needed for the
prompt to request permissions to a folder on the USB.  This adds a
failsafe to fallback to the file:/// scanning in SDCardScannerService.
2020-11-11 18:25:30 +01:00
Hans-Christoph Steiner
6fd7970ca5 update USB-OTG status every time the user switches to Nearby
The USB-OTG device can be plugged and unplugged anytime, so the Nearby view
should be updated each time the user switches to this screen.  Registered
callbacks should handle updating the USB-OTG status while the Nearby view
is active.
2020-11-11 18:25:30 +01:00
Hans-Christoph Steiner
bd45f0fdc5 Merge branch 'Remove_MenuItemCompat' into 'master'
Remove MenuItemCompat usages.

See merge request fdroid/fdroidclient!948
2020-11-11 17:00:19 +00:00
Hans-Christoph Steiner
043ed328d2 Merge branch 'Use_ContextCompat_methods' into 'master'
Use ContextCompat methods.

See merge request fdroid/fdroidclient!914
2020-11-11 16:57:39 +00:00
Isira Seneviratne
fcd3fadc9e Remove MenuItemCompat usages. 2020-11-06 16:36:59 +05:30
Isira Seneviratne
fb8922b252 Use ContextCompat.getSystemService(). 2020-11-06 16:27:11 +05:30
Isira Seneviratne
8b9c624d75 Use ContextCompat.startForegroundService(). 2020-11-06 16:26:37 +05:30
Isira Seneviratne
5254a6f1aa Use ContextCompat.getColor(). 2020-11-06 16:26:34 +05:30
Isira Seneviratne
6a0cd0a14a Use ContextCompat.getDrawable(). 2020-11-06 16:25:23 +05:30
Isira Seneviratne
07f3e778d3 Use ContextCompat.startActivity(). 2020-11-06 16:23:25 +05:30
Hans-Christoph Steiner
2f0994d16f Merge branch 'master' into 'master'
ApplicationID / PackageName is defined as case-sensitive

See merge request fdroid/fdroidclient!944
2020-11-06 10:12:41 +00:00
Hans-Christoph Steiner
038eeadca6 Merge branch 'disable-metadata-verification' into 'master'
gradle dependency verification is too buggy with .pom metadata

See merge request fdroid/fdroidclient!945
2020-11-06 10:11:59 +00:00
Hans-Christoph Steiner
5ffb6636a3 Merge branch 'Use_vector_drawables' into 'master'
Use vector drawables.

See merge request fdroid/fdroidclient!946
2020-11-06 09:45:37 +00:00
Isira Seneviratne
9a0ae69bbd Set tint for license, translation and video drawables to match the new ones. 2020-10-24 08:54:01 +05:30
Isira Seneviratne
554eb27a81 Replace website PNGs with a vector drawable. 2020-10-24 08:04:53 +05:30
Isira Seneviratne
7777272313 Replace donate PNGs with a vector drawable. 2020-10-24 06:02:27 +05:30
Isira Seneviratne
0ebb0b1b40 Replace changelog PNGs with a vector drawable. 2020-10-24 05:54:53 +05:30
Isira Seneviratne
aefaf38cee Replace do not disturb PNGs with a vector drawable. 2020-10-23 17:31:46 +05:30
Isira Seneviratne
a2858b7e8b Replace code PNGs with a vector drawable. 2020-10-23 17:31:45 +05:30
Isira Seneviratne
3b318e4b6f Replace share PNGs with a vector drawable. 2020-10-23 17:31:45 +05:30
Isira Seneviratne
a92eb3c899 Replace search PNGs with a vector drawable. 2020-10-23 17:31:44 +05:30
Isira Seneviratne
1924f38bc6 Replace refresh PNGs with a vector drawable. 2020-10-23 17:31:44 +05:30
Isira Seneviratne
c438611030 Replace NFC PNGs with a vector drawable. 2020-10-23 17:31:43 +05:30
Isira Seneviratne
dd5153e445 Replace error PNGs with a vector drawable. 2020-10-23 17:31:43 +05:30
Isira Seneviratne
b6f8f8d6b7 Replace lock PNGs with a vector drawable. 2020-10-23 17:31:42 +05:30
Isira Seneviratne
6c241c8e4a Replace alphabetical order PNGs with a vector drawable. 2020-10-23 17:31:41 +05:30
Isira Seneviratne
d5d9aa897c Replace expand PNGs with vector drawables. 2020-10-23 17:31:40 +05:30
Isira Seneviratne
89d6c475f7 Replace email PNGs with a vector drawable. 2020-10-23 17:31:35 +05:30
Isira Seneviratne
de5b35e776 Replace delete PNGs with a vector drawable. 2020-10-23 16:10:11 +05:30
Isira Seneviratne
2fa3ff166b Replace access time and last updated PNGs with a vector drawable. 2020-10-23 16:10:05 +05:30
Isira Seneviratne
4b28ca9591 Replace add PNGs with a vector drawable. 2020-10-23 16:09:02 +05:30
Isira Seneviratne
7b0e2b3ec9 Replace forward arrow PNGs with a vector drawable. 2020-10-23 16:09:01 +05:30
Isira Seneviratne
607d27a139 Replace Bluetooth PNGs with a vector drawable. 2020-10-23 16:09:01 +05:30
Isira Seneviratne
5bf7a33903 Replace check circle PNGs with a vector drawable. 2020-10-23 16:09:01 +05:30
Isira Seneviratne
0b25365330 Replace add circle outline PNGs with a vector drawable. 2020-10-23 16:09:00 +05:30
Isira Seneviratne
a9b37a533e Replace WiFi and hotspot PNGs with vector drawables. 2020-10-23 16:09:00 +05:30
Hans-Christoph Steiner
16095c8bfd remove unused imports 2020-10-22 11:52:06 +02:00
Hans-Christoph Steiner
4640146842 gradle dependency verification is too buggy with .pom metadata
This disables the verification of .pom files.  .pom files can add
dependencies, so it would be good to have them verified.  But since this
current setup requires all JAR to be verified, any new dependencies would
fail anyway:
https://docs.gradle.org/current/userguide/dependency_verification.html#sec:disabling-metadata-verification

In some cases everything works fine, like on gitlab-ci, and in other places
it always gives errors like this:

```
A problem occurred configuring root project 'client'.
> Dependency verification failed for configuration ':classpath'
  4 artifacts failed verification:
    - all-1.2.0.pom (com.sun.activation:all:1.2.0) from repository MavenRepo
    - jvnet-parent-1.pom (net.java:jvnet-parent:1) from repository MavenRepo
    - oss-parent-7.pom (org.sonatype.oss:oss-parent:7) from repository MavenRepo
    - oss-parent-9.pom (org.sonatype.oss:oss-parent:9) from repository MavenRepo
  This can indicate that a dependency has been compromised. Please carefully verify the checksums.

  Open this report for more details: file:///home/hans/code/fdroid/client/build/reports/dependency-verification/at-1603359642220/dependency-verification-report.html
```

@glennmen and @eighthave both are getting that error.
2020-10-22 11:49:17 +02:00
Hans-Christoph Steiner
f51527befa
ApplicationID / PackageName is defined as case-sensitive
* fdroidserver uses case-sensitive naming since it is based on GNU/Linux
  filesystems, which are case-sensitive by default.

* "the application ID looks like a traditional Java package name, the naming
   rules for the application ID are a bit more restrictive"
   https://developer.android.com/studio/build/application-id

* Java is a case-sensitive language for all names used in .java files:
  "In the Java programming universe, case-sensitive String keys are ubiquitous"
  "Java package names... are case-sensitive"
  https://docs.oracle.com/javase/8/docs/technotes/guides/preferences/designfaq.html
2020-10-22 10:59:44 +02:00
Hans-Christoph Steiner
2b57f49734
version code 1010050 2020-10-22 10:59:42 +02:00
Hans-Christoph Steiner
a9ac8ba6ce ./tools/remove-unused-and-blank-translations.py 2020-10-22 10:59:31 +02:00
Hans-Christoph Steiner
fd954168ce
update changelogs 2020-10-22 10:57:13 +02:00
Hans-Christoph Steiner
9ea4024082 Merge branch 'install-obf-file' into 'master'
install OsmAnd OBF files

See merge request fdroid/fdroidclient!941
2020-10-22 08:00:32 +00:00
Hans-Christoph Steiner
3ab5b5f670 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!942
2020-10-22 07:52:25 +00:00
Sazid Kabir
8951996831 Translated using Weblate: Bengali (Bangladesh) (bn-rBD) by Sazid Kabir <szd.mohd@gmail.com>
Currently translated at 18.4% (84 of 455 strings)

Co-authored-by: Sazid Kabir <szd.mohd@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn_BD/
Translation: F-Droid/F-Droid
2020-10-21 17:48:42 +02:00
Jo
3a67065878 Translated using Weblate: Spanish (es) by Jo <joaquinfc@protonmail.com>
Currently translated at 38.7% (12 of 31 strings)

Co-authored-by: Jo <joaquinfc@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/es/
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:42 +02:00
Edoardo Regni
4cb57eda8f Translated using Weblate: Dutch (Belgium) (nl-rBE) by Edoardo Regni <eregni@pm.me>
Currently translated at 98.6% (449 of 455 strings)

Co-authored-by: Edoardo Regni <eregni@pm.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl_BE/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
random r
b310c9267f Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: random r <epsilin@yopmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Oskari Lavinto
ecd4face33 Translated using Weblate: Finnish (fi) by Oskari Lavinto <oskari.lavinto@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Oskari Lavinto <oskari.lavinto@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Max
ba65044889 Translated using Weblate: Bulgarian (bg) by Max <no_greediness@yahoo.com>
Currently translated at 98.6% (449 of 455 strings)

Co-authored-by: Max <no_greediness@yahoo.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bg/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
tamer dab
c2796d95ac Translated using Weblate: Arabic (ar) by tamer dab <dabsantamer@yahoo.com>
Currently translated at 99.7% (454 of 455 strings)

Co-authored-by: tamer dab <dabsantamer@yahoo.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Kristjan Räts
f1f8d1b741 Translated using Weblate: Estonian (et) by Kristjan Räts <kristjanrats@gmail.com>
Currently translated at 25.8% (8 of 31 strings)

Co-authored-by: Kristjan Räts <kristjanrats@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/et/
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
Aled Powell
83e64f0c61 Translated using Weblate: Welsh (cy) by Aled Powell <aled@aledpowell.cymru>
Currently translated at 99.7% (454 of 455 strings)

Co-authored-by: Aled Powell <aled@aledpowell.cymru>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/cy/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Andres
1f7ee0ba9b Translated using Weblate: Estonian (et) by Andres <andres_ott@hotmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Andres <andres_ott@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/et/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
naofum
e1e086f8b7 Translated using Weblate: Japanese (ja) by naofum <naofum@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: naofum <naofum@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ja/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
abidin toumi
d84ffac02d Translated using Weblate: Arabic (ar) by abidin toumi <abidin24@disroot.org>
Currently translated at 99.5% (453 of 455 strings)

Co-authored-by: abidin toumi <abidin24@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Hakim Oubouali
1001fca4f2 Translated using Weblate: Central Atlas Tamazight (tzm) by Hakim Oubouali <hakim.oubouali.skr@gmail.com>
Currently translated at 3.2% (1 of 31 strings)

Translated using Weblate: Central Atlas Tamazight (tzm) by Hakim Oubouali <hakim.oubouali.skr@gmail.com>

Currently translated at 29.6% (135 of 455 strings)

Translated using Weblate: Central Atlas Tamazight (tzm) by Hakim Oubouali <hakim.oubouali.skr@gmail.com>

Currently translated at 28.1% (128 of 455 strings)

Translated using Weblate: Central Atlas Tamazight (tzm) by Hakim Oubouali <hakim.oubouali.skr@gmail.com>

Currently translated at 6.5% (30 of 455 strings)

Co-authored-by: Hakim Oubouali <hakim.oubouali.skr@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tzm/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tzm/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
Satjawat Paanakaan
a69aa26e9c Translated using Weblate: Thai (th) by Satjawat Paanakaan <peanutbutteer@gmail.com>
Currently translated at 35.1% (160 of 455 strings)

Co-authored-by: Satjawat Paanakaan <peanutbutteer@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/th/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Ldm Public
cdc7b41fb5 Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Ldm Public <ldmpub@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Ortinomax
f81e7cdca5 Translated using Weblate: French (fr) by Ortinomax <commerce@blaise-moreau.fr>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Ortinomax <commerce@blaise-moreau.fr>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
WaldiS
ea3b84b6e3 Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>
Currently translated at 100.0% (31 of 31 strings)

Co-authored-by: WaldiS <sto@tutanota.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
rooban23
686494fc3a Translated using Weblate: Malayalam (ml) by rooban23 <TP045411@mail.apu.edu.my>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: rooban23 <TP045411@mail.apu.edu.my>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ml/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Besnik Bleta
551a869c7e Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>
Currently translated at 99.1% (451 of 455 strings)

Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Mattias Axell
9f37e03e91 Translated using Weblate: Swedish (sv) by Mattias Axell <mattias@libertador.es>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Mattias Axell <mattias@libertador.es>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Maja Košir Habjan
3bfe3cd440 Translated using Weblate: Slovenian (sl) by Maja Košir Habjan <majakh@protonmail.com>
Currently translated at 6.4% (2 of 31 strings)

Translated using Weblate: Slovenian (sl) by Maja Košir Habjan <majakh@protonmail.com>

Currently translated at 99.7% (454 of 455 strings)

Co-authored-by: Maja Košir Habjan <majakh@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/sl/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sl/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
San Kang
f2f75f8129 Translated using Weblate: Korean (ko) by San Kang <devrivmt@gmail.com>
Currently translated at 99.7% (454 of 455 strings)

Co-authored-by: San Kang <devrivmt@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ko/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Massimiliano Caniparoli
a4ed1ab5ee Translated using Weblate: Italian (it) by Massimiliano Caniparoli <massic80@gmail.com>
Currently translated at 99.5% (453 of 455 strings)

Co-authored-by: Massimiliano Caniparoli <massic80@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Óscar Beiro - TICgal
1b0525b0bd Translated using Weblate: Galician (gl) by Óscar Beiro - TICgal <oscar@ticgal.com>
Currently translated at 99.3% (452 of 455 strings)

Co-authored-by: Óscar Beiro - TICgal <oscar@ticgal.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/gl/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Danial Behzadi
e89df0b6dc Translated using Weblate: Persian (fa) by Danial Behzadi <dani.behzi@ubuntu.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Crisalis
c88d696d64 Translated using Weblate: Spanish (es) by Crisalis <tegaminorune@disroot.org>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Crisalis <tegaminorune@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
nautilusx
c305ffbbe1 Translated using Weblate: German (de) by nautilusx <mail.ka@mailbox.org>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: nautilusx <mail.ka@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
kak mi
3ab35a8e92 Translated using Weblate: Chinese (Simplified) (zh-CN) by kak mi <wavelake@outlook.com>
Currently translated at 100.0% (31 of 31 strings)

Co-authored-by: kak mi <wavelake@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
Mostafa Ahangarha
af3577afc9 Translated using Weblate: Persian (fa) by Mostafa Ahangarha <ahangarha@gmail.com>
Currently translated at 99.5% (453 of 455 strings)

Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
ssantos
829372a18b Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (31 of 31 strings)

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (31 of 31 strings)

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 96.7% (30 of 31 strings)

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
ihor_ck
58e83039ac Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>
Currently translated at 100.0% (31 of 31 strings)

Co-authored-by: ihor_ck <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
Dmitry Mikhirev
d7b0356e69 Translated using Weblate: Russian (ru) by Dmitry Mikhirev <mikhirev@gmail.com>
Currently translated at 93.5% (29 of 31 strings)

Co-authored-by: Dmitry Mikhirev <mikhirev@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
Verdulo
ccbc6c9e8c Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (31 of 31 strings)

Co-authored-by: Verdulo <tomek@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
Hans-Christoph Steiner
9830c2685f Translated using Weblate: Malayalam (ml) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 98.6% (449 of 455 strings)

Co-authored-by: Hans-Christoph Steiner <hans@guardianproject.info>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ml/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Eric
154d40fd16 Translated using Weblate: Chinese (Simplified) (zh-rCN) by Eric <spice2wolf@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Eric <spice2wolf@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
zmni
aecc0ed234 Translated using Weblate: Indonesian (id) by zmni <zmni@outlook.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: zmni <zmni@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/id/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Emanuel Palm
7096460141 Translated using Weblate: Swedish (sv) by Emanuel Palm <ep__palm@hotmail.com>
Currently translated at 98.9% (450 of 455 strings)

Co-authored-by: Emanuel Palm <ep__palm@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Wellington Terumi Uemura
10f64237af Translated using Weblate: Portuguese (Brazil) (pt-BR) by Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Currently translated at 100.0% (31 of 31 strings)

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Wellington Terumi Uemura <wellingtonuemura@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
Bart
9219d20a82 Translated using Weblate: Dutch (nl) by Bart <bart@mogwai.be>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Bart <bart@mogwai.be>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Arttu Ylhävuori
cb1041ddf1 Translated using Weblate: Finnish (fi) by Arttu Ylhävuori <arjymoi@hotmail.com>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Arttu Ylhävuori <arjymoi@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/
Translation: F-Droid/F-Droid
2020-10-21 17:48:41 +02:00
Yaron Shahrabani
26850ba40e Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (31 of 31 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
Oğuz Ersen
10d848768b Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 100.0% (31 of 31 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
Andrey
b240f9575d Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (31 of 31 strings)

Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translation: F-Droid/F-Droid metadata
2020-10-21 17:48:41 +02:00
Hans-Christoph Steiner
c157c3f047
fix Espresso test broken by androidx id change
fdroid/fdroidclient!899
2020-10-21 11:52:26 +02:00
Hans-Christoph Steiner
3b2b9ae1df
fix ApkVerifierTest when running on android-29+
fdroid/fdroidclient!856
2020-10-21 11:52:24 +02:00
Hans-Christoph Steiner
15a024b06e
update javadocs 2020-10-21 11:52:22 +02:00
Hans-Christoph Steiner
c0344c1eed
handle .obf.zip by unzipping the map file then installing it 2020-10-21 11:52:21 +02:00
Hans-Christoph Steiner
021d5cc1ff
EXTRA_CANONICAL_URL instance must always be a String 2020-10-21 11:52:19 +02:00
Hans-Christoph Steiner
b316eab85d
post-install Intent to tell OsmAnd to import "installed" OBF
OsmAnd will import map files from a file:// URL pointing to an OBF file,
but this currently only works for file:// and not the proper content://.
This uses a hack to disable the warning about file:// URIs but only for the
final stage of installing the .obf file.

Hopefully in the future, this can be changed to use a proper content:// URL
as I suggested to them in this merge request:
https://github.com/osmandapp/OsmAnd/pull/10043
2020-10-21 11:52:18 +02:00
Hans-Christoph Steiner
8cf267ea6c
code formatting 2020-10-21 11:52:15 +02:00
Hans-Christoph Steiner
4bb158ef77
handle installing OTA files separately from generic .zip files
It is valid to include .zip files in a repo, but only OTA ZIP files
should be installed into the OTA dir.
2020-10-21 11:52:13 +02:00
Hans-Christoph Steiner
5a0092d42e
use shared method for getting full installed path for media files 2020-10-21 11:52:08 +02:00
Hans-Christoph Steiner
fe45b33851
use case-insensitive file extension comparison for Apk.isApk()
foo.APK is valid and installable, though not recommended.  Without this,
foo.APK would be copied to /sdcard/Downloads, which seems wrong
2020-10-21 11:30:51 +02:00
Hans-Christoph Steiner
0797d82d67
fix emulator test breakage from !873
Use Mockito to mock LocaleList rather than changing App.java.  The only
reliably working emulator tests on gitlab-ci are emulator-22. The change to
App.java in 3406edefcd1807cc9352589ac86dbb725c3165b0 broke there:

E/ACRA    ( 2231): Caused by: java.lang.NoClassDefFoundError: android.os.LocaleList
E/ACRA    ( 2231): 	at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
E/ACRA    ( 2231): 	at java.lang.Class.getDexCacheType(Class.java:479)
E/ACRA    ( 2231): 	at java.lang.reflect.ArtMethod.getDexCacheType(ArtMethod.java:191)
E/ACRA    ( 2231): 	at java.lang.reflect.ArtMethod.getReturnType(ArtMethod.java:145)
E/ACRA    ( 2231): 	at java.lang.reflect.Method.getReturnType(Method.java:184)
E/ACRA    ( 2231): 	at java.lang.Class.getDeclaredMethods(Class.java:771)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.util.ClassUtil.getClassMethods(ClassUtil.java:1172)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector._addMemberMethods(AnnotatedMethodCollector.java:117)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector.collect(AnnotatedMethodCollector.java:49)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector.collectMethods(AnnotatedMethodCollector.java:40)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.AnnotatedClass._methods(AnnotatedClass.java:382)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.AnnotatedClass.memberMethods(AnnotatedClass.java:322)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addMethods(POJOPropertiesCollector.java:555)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collectAll(POJOPropertiesCollector.java:323)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getPropertyMap(POJOPropertiesCollector.java:287)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getProperties(POJOPropertiesCollector.java:186)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.BasicBeanDescription._properties(BasicBeanDescription.java:164)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.BasicBeanDescription.findProperties(BasicBeanDescription.java:239)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._findCreatorsFromProperties(BasicDeserializerFactory.java:292)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._constructDefaultValueInstantiator(BasicDeserializerFactory.java:276)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findValueInstantiator(BasicDeserializerFactory.java:224)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:220)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:143)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:414)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:458)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.createContextual(ObjectArrayDeserializer.java:128)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.DeserializationContext.handleSecondaryContextualization(DeserializationContext.java:696)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:496)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.Objec
2020-10-21 11:30:48 +02:00
Hans-Christoph Steiner
adc62211aa
Merge branch 'mixed-translations' into 'master'
Fixed translations preferring secondary locale over primary

See merge request fdroid/fdroidclient!873
2020-10-20 23:18:10 +02:00
Hans-Christoph Steiner
33fb22eae1
LocaleSelectionTest: include test for TW/HK issue
closes #2087
2020-10-20 23:17:30 +02:00
Hans-Christoph Steiner
138b78572c
LocaleSelectionTest: reuse variables to make test cases clear 2020-10-20 23:17:28 +02:00
Marcus Hoffmann
3406edefcd
tests for locale selection 2020-10-20 23:17:25 +02:00
Jonas Kalderstam
87d4779c2d Fixed translations preferring secondary locale over english
In the case where a non-standard region has been set for the primary
system language, the secondary locale will be used for localized
strings when available instead of the expected primary language.

For example, set system locales to [en-SE, ja-JP], that is English
with region Sweden, and Japanese with region Japan, most apps will
display English descriptions but those which have a Japanese
translation will display that instead.

This commit adds a fallback case for when the primary locale has not
matched any translations, but it's language part does.
2020-10-20 17:40:56 +00:00
Hans-Christoph Steiner
c8dcb6260c
add Central Atlas Tamazight (tzm) translation
[skip ci]
2020-10-07 09:22:16 +02:00
Hans-Christoph Steiner
6730d6097e
version code 1010001 2020-09-30 20:57:04 +02:00
Hans-Christoph Steiner
d0b8da7322 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!937
2020-09-30 13:42:06 +00:00
Eric
1b300e1273
Translated using Weblate: Chinese (Simplified) (zh-rCN) by Eric <spice2wolf@gmail.com>
Currently translated at 99.7% (454 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
2020-09-30 13:49:20 +02:00
ssantos
d33a1851a3
Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (30 of 30 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
2020-09-30 13:45:47 +02:00
ssantos
62ab323fff
Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
2020-09-30 13:45:45 +02:00
ssantos
fa6fc5ef5c
Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>
Currently translated at 100.0% (30 of 30 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
2020-09-30 13:45:43 +02:00
Ole Carlsen
52796f786e
Translated using Weblate: Danish (da) by Ole Carlsen <ole@carlsen-web.dk>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/da/
2020-09-30 13:45:10 +02:00
ssantos
998c56e721
Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
2020-09-30 13:45:09 +02:00
Andrey
f7f15df0a9
Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (455 of 455 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
2020-09-30 13:45:06 +02:00
Hans-Christoph Steiner
d3b041cb86 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!936
2020-09-30 10:47:57 +00:00
Hans-Christoph Steiner
ba8c150a72
update changelogs 2020-09-29 21:39:03 +02:00
Hans-Christoph Steiner
9bc61e07c8
fix formats and blank strings 2020-09-29 21:39:00 +02:00
Zmicer Turok
f996061712
Translated using Weblate: Belarusian (be) by Zmicer Turok <nashtlumach@gmail.com>
Currently translated at 6.6% (2 of 30 strings)

Translated using Weblate: Belarusian (be) by Zmicer Turok <nashtlumach@gmail.com>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Belarusian (be) by Zmicer Turok <nashtlumach@gmail.com>

Currently translated at 98.4% (448 of 455 strings)

Co-authored-by: Zmicer Turok <nashtlumach@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/be/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/be/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:53 +02:00
Sylphystia
b92bf6700c
Translated using Weblate: Italian (it) by Sylphystia <yuidirnt@gmail.com>
Currently translated at 99.3% (452 of 455 strings)

Co-authored-by: Sylphystia <yuidirnt@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2020-09-29 16:51:53 +02:00
Laura Arjona Reina
a1bc1c1613
Translated using Weblate: Spanish (es) by Laura Arjona Reina <larjona@larjona.net>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Laura Arjona Reina <larjona@larjona.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
Translation: F-Droid/F-Droid
2020-09-29 16:51:53 +02:00
THANOS SIOURDAKIS
80a5b4066b
Translated using Weblate: Greek (el) by THANOS SIOURDAKIS <siourdakisthanos@gmail.com>
Currently translated at 99.5% (453 of 455 strings)

Co-authored-by: THANOS SIOURDAKIS <siourdakisthanos@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/el/
Translation: F-Droid/F-Droid
2020-09-29 16:51:52 +02:00
RachelB
0c8bdf9cc8
Translated using Weblate: Galician (gl) by RachelB <maresdelno@gmail.com>
Currently translated at 98.2% (447 of 455 strings)

Translated using Weblate: Spanish (es) by RachelB <maresdelno@gmail.com>

Currently translated at 98.4% (448 of 455 strings)

Co-authored-by: RachelB <maresdelno@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/gl/
Translation: F-Droid/F-Droid
2020-09-29 16:51:52 +02:00
Eric
16d0fc9a4c
Translated using Weblate: Chinese (Simplified) (zh-rCN) by Eric <spice2wolf@gmail.com>
Currently translated at 99.5% (453 of 455 strings)

Co-authored-by: Eric <spice2wolf@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
Translation: F-Droid/F-Droid
2020-09-29 16:51:51 +02:00
Ajeje Brazorf
11709ca2b3
Translated using Weblate: Sardinian (sc) by Ajeje Brazorf <lmelonimamo@yahoo.it>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sc/
Translation: F-Droid/F-Droid
2020-09-29 16:51:51 +02:00
Andrey
759d324985
Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
2020-09-29 16:51:50 +02:00
WaldiS
48f1d50917
Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: WaldiS <sto@tutanota.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/
Translation: F-Droid/F-Droid
2020-09-29 16:51:50 +02:00
Localisation Lab
3f8bcc38f2
Translated using Weblate: French (fr) by Localisation Lab <ao@localizationlab.org>
Currently translated at 100.0% (455 of 455 strings)

Co-authored-by: Localisation Lab <ao@localizationlab.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
2020-09-29 16:51:50 +02:00
zeritti
cf3822012f
Translated using Weblate: Czech (cs) by zeritti <woodenmo@posteo.de>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Czech (cs) by zeritti <woodenmo@posteo.de>

Currently translated at 99.5% (453 of 455 strings)

Co-authored-by: zeritti <woodenmo@posteo.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/cs/
Translation: F-Droid/F-Droid
2020-09-29 16:51:49 +02:00
Ldm Public
3a3011a5e0
Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 99.1% (451 of 455 strings)

Co-authored-by: Ldm Public <ldmpub@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translation: F-Droid/F-Droid
2020-09-29 16:51:49 +02:00
Kornelijus Tvarijanavičius
61b0d3f875
Translated using Weblate: Lithuanian (lt) by Kornelijus Tvarijanavičius <kornelitvari@protonmail.com>
Currently translated at 3.3% (1 of 30 strings)

Translated using Weblate: Lithuanian (lt) by Kornelijus Tvarijanavičius <kornelitvari@protonmail.com>

Currently translated at 73.7% (331 of 449 strings)

Co-authored-by: Kornelijus Tvarijanavičius <kornelitvari@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/lt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/lt/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:48 +02:00
rooban23
1e7596ecb6
Translated using Weblate: Tamil (ta) by rooban23 <TP045411@mail.apu.edu.my>
Currently translated at 37.8% (170 of 449 strings)

Co-authored-by: rooban23 <TP045411@mail.apu.edu.my>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ta/
Translation: F-Droid/F-Droid
2020-09-29 16:51:48 +02:00
Adiitya Andre
0e8656cd70
Translated using Weblate: Indonesian (id) by Adiitya Andre <adiiit.and@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Indonesian (id) by Adiitya Andre <adiiit.and@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Adiitya Andre <adiiit.and@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/id/
Translation: F-Droid/F-Droid
2020-09-29 16:51:48 +02:00
Oğuz Ersen
f6e57ea946
Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (30 of 30 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:47 +02:00
Wellington Terumi Uemura
bd1da011dc
Translated using Weblate: Portuguese (Brazil) (pt-BR) by Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Currently translated at 100.0% (30 of 30 strings)

Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:47 +02:00
Milo Ivir
a0e64f1085
Translated using Weblate: Croatian (hr) by Milo Ivir <mail@milotype.de>
Currently translated at 87.0% (391 of 449 strings)

Co-authored-by: Milo Ivir <mail@milotype.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hr/
Translation: F-Droid/F-Droid
2020-09-29 16:51:47 +02:00
Kentaro Shirakata
d362cb33c8
Translated using Weblate: Japanese (ja) by Kentaro Shirakata <argrath@ub32.org>
Currently translated at 10.0% (3 of 30 strings)

Co-authored-by: Kentaro Shirakata <argrath@ub32.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ja/
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:46 +02:00
ihor_ck
a374b114e6
Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>

Currently translated at 100.0% (30 of 30 strings)

Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: ihor_ck <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:46 +02:00
Maksym
18c82fcb2a
Translated using Weblate: Ukrainian (uk) by Maksym <dpadar@protonmail.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Maksym <dpadar@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
2020-09-29 16:51:45 +02:00
Igor Polyakov
2f5276c4c7
Translated using Weblate: Russian (ru) by Igor Polyakov <igorpolyakov@protonmail.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Igor Polyakov <igorpolyakov@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
2020-09-29 16:51:45 +02:00
Yaron Shahrabani
02749f36ff
Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/he/
Translation: F-Droid/F-Droid
2020-09-29 16:51:45 +02:00
Hinaloe
3a005cbf52
Translated using Weblate: Japanese (ja) by Hinaloe <hina@hinaloe.net>
Currently translated at 6.6% (2 of 30 strings)

Co-authored-by: Hinaloe <hina@hinaloe.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ja/
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:44 +02:00
Crisalis
b34d736592
Translated using Weblate: Spanish (es) by Crisalis <tegaminorune@disroot.org>
Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Spanish (es) by Crisalis <tegaminorune@disroot.org>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Crisalis <tegaminorune@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
Translation: F-Droid/F-Droid
2020-09-29 16:51:44 +02:00
naveenkumar palaniswamy
dce093cf8b
Translated using Weblate: Tamil (ta) by naveenkumar palaniswamy <naveenmtp@gmail.com>
Currently translated at 32.7% (147 of 449 strings)

Co-authored-by: naveenkumar palaniswamy <naveenmtp@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ta/
Translation: F-Droid/F-Droid
2020-09-29 16:51:43 +02:00
Kahina Messaoudi
4710ce460e
Translated using Weblate: Kabyle (kab) by Kahina Messaoudi <messaoudikahina02@gmail.com>
Currently translated at 61.9% (282 of 455 strings)

Translated using Weblate: Kabyle (kab) by Kahina Messaoudi <messaoudikahina02@gmail.com>

Currently translated at 6.6% (2 of 30 strings)

Co-authored-by: Kahina Messaoudi <messaoudikahina02@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/kab/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/kab/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:43 +02:00
HKalbasi
25333469ff
Translated using Weblate: Persian (fa) by HKalbasi <hamid.6.11.79@gmail.com>
Currently translated at 99.7% (448 of 449 strings)

Co-authored-by: HKalbasi <hamid.6.11.79@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/
Translation: F-Droid/F-Droid
2020-09-29 16:51:43 +02:00
Sveinn í Felli
ed491ed609
Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/is/
Translation: F-Droid/F-Droid
2020-09-29 16:51:42 +02:00
ーーー
aeedf5f396
Translated using Weblate: Japanese (ja) by ーーー <nnn1590@nnn1590.org>
Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Japanese (ja) by ーーー <nnn1590@nnn1590.org>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: ーーー <nnn1590@nnn1590.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ja/
Translation: F-Droid/F-Droid
2020-09-29 16:51:42 +02:00
HARADA Hiroyuki
61ff42d74e
Translated using Weblate: Japanese (ja) by HARADA Hiroyuki <haradah98@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: HARADA Hiroyuki <haradah98@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ja/
Translation: F-Droid/F-Droid
2020-09-29 16:51:42 +02:00
Selyan Sliman Amiri
b5c62dbc79
Translated using Weblate: Kabyle (kab) by Selyan Sliman Amiri <selyan.kab@gmail.com>
Currently translated at 62.5% (281 of 449 strings)

Translated using Weblate: Kabyle (kab) by Selyan Sliman Amiri <selyan.kab@gmail.com>

Currently translated at 61.9% (278 of 449 strings)

Co-authored-by: Selyan Sliman Amiri <selyan.kab@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/kab/
Translation: F-Droid/F-Droid
2020-09-29 16:51:41 +02:00
mahmut özcan
4ba21b82d3
Translated using Weblate: Turkish (tr) by mahmut özcan <mahmutozcan65@yahoo.com>
Currently translated at 96.6% (29 of 30 strings)

Co-authored-by: mahmut özcan <mahmutozcan65@yahoo.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:41 +02:00
ssantos
35403599e4
Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (30 of 30 strings)

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (30 of 30 strings)

Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:40 +02:00
sivemortenfan
1a61016851
Translated using Weblate: Malayalam (ml) by sivemortenfan <anuay@tutanota.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: sivemortenfan <anuay@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ml/
Translation: F-Droid/F-Droid
2020-09-29 16:51:40 +02:00
Juraj Liso
9a38fac9ed
Translated using Weblate: Slovak (sk) by Juraj Liso <lisojuraj@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Juraj Liso <lisojuraj@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sk/
Translation: F-Droid/F-Droid
2020-09-29 16:51:40 +02:00
Dominik Martinicky
f739b82735
Translated using Weblate: Slovak (sk) by Dominik Martinicky <apocrypth@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Dominik Martinicky <apocrypth@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sk/
Translation: F-Droid/F-Droid
2020-09-29 16:51:39 +02:00
Edoardo Regni
04a1f48144
Translated using Weblate: Dutch (nl) by Edoardo Regni <eregni@pm.me>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Edoardo Regni <eregni@pm.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translation: F-Droid/F-Droid
2020-09-29 16:51:39 +02:00
take100yen
c7944d1274
Translated using Weblate: Japanese (ja) by take100yen <take100yen@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: take100yen <take100yen@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ja/
Translation: F-Droid/F-Droid
2020-09-29 16:51:38 +02:00
pjammo
27d17207e0
Translated using Weblate: Italian (it) by pjammo <adrianoghr@hotmail.it>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: pjammo <adrianoghr@hotmail.it>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
Translation: F-Droid/F-Droid
2020-09-29 16:51:38 +02:00
Rafael Fontenelle
0e2505b3a9
Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Rafael Fontenelle <rafaelff@gnome.org>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Rafael Fontenelle <rafaelff@gnome.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
Translation: F-Droid/F-Droid
2020-09-29 16:51:37 +02:00
aevw
11fdbb0a8e
Translated using Weblate: Portuguese (Brazil) (pt-rBR) by aevw <arcanevw@tuta.io>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: aevw <arcanevw@tuta.io>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
Translation: F-Droid/F-Droid
2020-09-29 16:51:37 +02:00
primarto24c8a9c6889c407b
fdfb4b8140
Translated using Weblate: Macedonian (mk) by primarto24c8a9c6889c407b <prodavac3@protonmail.com>
Currently translated at 43.6% (196 of 449 strings)

Translated using Weblate: Macedonian (mk) by primarto24c8a9c6889c407b <prodavac3@protonmail.com>

Currently translated at 40.5% (182 of 449 strings)

Co-authored-by: primarto24c8a9c6889c407b <prodavac3@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/mk/
Translation: F-Droid/F-Droid
2020-09-29 16:51:37 +02:00
Allan Nordhøy
6665459ae9
Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>
Currently translated at 99.5% (453 of 455 strings)

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Swedish (sv) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
Translation: F-Droid/F-Droid
2020-09-29 16:51:36 +02:00
Hakim Oubouali
43879ea35e
Translated using Weblate: Berber (ber) by Hakim Oubouali <hakim.oubouali.skr@gmail.com>
Currently translated at 20.7% (93 of 449 strings)

Translated using Weblate: Berber (ber) by Hakim Oubouali <hakim.oubouali.skr@gmail.com>

Currently translated at 17.5% (79 of 449 strings)

Translated using Weblate: Berber (ber) by Hakim Oubouali <hakim.oubouali.skr@gmail.com>

Currently translated at 7.3% (33 of 449 strings)

Translated using Weblate: Berber (ber) by Hakim Oubouali <hakim.oubouali.skr@gmail.com>

Currently translated at 6.6% (30 of 449 strings)

Added translation using Weblate: Berber (ber) by Hakim Oubouali <hakim.oubouali.skr@gmail.com>

Co-authored-by: Hakim Oubouali <hakim.oubouali.skr@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ber/
Translation: F-Droid/F-Droid
2020-09-29 16:51:36 +02:00
tamer dab
351460d0af
Translated using Weblate: Arabic (ar) by tamer dab <dabsantamer@yahoo.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: tamer dab <dabsantamer@yahoo.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/
Translation: F-Droid/F-Droid
2020-09-29 16:51:35 +02:00
Jonatan Nyberg
9740a2a014
Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
Translation: F-Droid/F-Droid
2020-09-29 16:51:35 +02:00
yyyyyyyan
95a2f6c969
Translated using Weblate: Portuguese (Brazil) (pt-rBR) by yyyyyyyan <contact@yyyyyyyan.tech>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: yyyyyyyan <contact@yyyyyyyan.tech>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
Translation: F-Droid/F-Droid
2020-09-29 16:51:35 +02:00
ーーー
824cd13c99
Translated using Weblate: Japanese (ja) by ーーー <nnn1590@nnn1590.org>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: ーーー <nnn1590@nnn1590.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ja/
Translation: F-Droid/F-Droid
2020-09-29 16:51:34 +02:00
Osoitz
157a963b22
Translated using Weblate: Basque (eu) by Osoitz <oelkoro@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Osoitz <oelkoro@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eu/
Translation: F-Droid/F-Droid
2020-09-29 16:51:34 +02:00
Priit Jõerüüt
7de0e12142
Translated using Weblate: Estonian (et) by Priit Jõerüüt <hwlate@joeruut.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Estonian (et) by Priit Jõerüüt <hwlate@joeruut.com>

Currently translated at 23.3% (7 of 30 strings)

Translated using Weblate: Estonian (et) by Priit Jõerüüt <hwlate@joeruut.com>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Priit Jõerüüt <hwlate@joeruut.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/et/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/et/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:33 +02:00
sudoLife
88cb6f7fc9
Translated using Weblate: Russian (ru) by sudoLife <mt.ovinov@gmail.com>
Currently translated at 100.0% (30 of 30 strings)

Co-authored-by: sudoLife <mt.ovinov@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:33 +02:00
zmni
77a42538ac
Translated using Weblate: Indonesian (id) by zmni <zmni@outlook.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: zmni <zmni@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/id/
Translation: F-Droid/F-Droid
2020-09-29 16:51:33 +02:00
ihor_ck
e436485cf8
Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: ihor_ck <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
Translation: F-Droid/F-Droid
2020-09-29 16:51:32 +02:00
Tautvydas Zukauskas
54b591b7e9
Translated using Weblate: Lithuanian (lt) by Tautvydas Zukauskas <tautzuk@tutanota.com>
Currently translated at 73.0% (328 of 449 strings)

Co-authored-by: Tautvydas Zukauskas <tautzuk@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/lt/
Translation: F-Droid/F-Droid
2020-09-29 16:51:32 +02:00
Jeff Huang
d2a5e0e987
Translated using Weblate: Chinese (Traditional) (zh-rTW) by Jeff Huang <s8321414@gmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Chinese (Traditional) (zh-rTW) by Jeff Huang <s8321414@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Jeff Huang <s8321414@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hant/
Translation: F-Droid/F-Droid
2020-09-29 16:51:31 +02:00
Licaon Kter
35aac2727a
Translated using Weblate: Romanian (ro) by Licaon Kter <licaon.kter@protonmail.com>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Romanian (ro) by Licaon Kter <licaon.kter@protonmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Romanian (ro) by Licaon Kter <licaon.kter@protonmail.com>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Licaon Kter <licaon.kter@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ro/
Translation: F-Droid/F-Droid
2020-09-29 16:51:31 +02:00
Verdulo
7246e71679
Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (455 of 455 strings)

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Verdulo <tomek@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/
Translation: F-Droid/F-Droid
2020-09-29 16:51:30 +02:00
primarto
c70b4b5ac7
Translated using Weblate: Macedonian (mk) by primarto <prodavac5@protonmail.com>
Currently translated at 18.0% (81 of 449 strings)

Co-authored-by: primarto <prodavac5@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/mk/
Translation: F-Droid/F-Droid
2020-09-29 16:51:30 +02:00
Oğuz Ersen
c9e76a9641
Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>
Currently translated at 96.6% (29 of 30 strings)

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-09-29 16:51:30 +02:00
Oymate
c623a08727
Translated using Weblate: Bengali (Bangladesh) (bn-rBD) by Oymate <dhruboadittya96@gmail.com>
Currently translated at 18.2% (82 of 449 strings)

Co-authored-by: Oymate <dhruboadittya96@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn_BD/
Translation: F-Droid/F-Droid
2020-09-29 16:51:27 +02:00
Hans-Christoph Steiner
10a586100e Merge branch 'kunpw-master-patch-10611' into 'master'
Measure http download progress by size of complete file in resumed downloads

See merge request fdroid/fdroidclient!923
2020-09-29 14:51:19 +00:00
Hans-Christoph Steiner
2396a32bb4 Merge branch 'Use_notification_channels' into 'master'
Create and use notification channels on Android Oreo and higher.

See merge request fdroid/fdroidclient!930
2020-09-23 12:03:10 +00:00
Isira Seneviratne
dbbedc7ab1 Create and use notification channels on Android Oreo and higher. 2020-09-22 06:41:41 +05:30
Marcus
17ce6110c2 Merge branch 'Add_Android_11' into 'master'
Add Android 11 to ANDROID_VERSION_NAMES.

See merge request fdroid/fdroidclient!926
2020-08-26 09:58:10 +00:00
Isira Seneviratne
f4409bad02 Add Android 11 to ANDROID_VERSION_NAMES. 2020-08-26 14:52:46 +05:30
kunpw
1c6ab58a30 Measure http download progress by size of complete file in resumed downloads 2020-08-25 15:12:56 +00:00
Hans-Christoph Steiner
a8f1a58f2d Merge branch 'Use_ConnectivityManagerCompat' into 'master'
Use ConnectivityManagerCompat.isActiveNetworkMetered().

See merge request fdroid/fdroidclient!915
2020-08-25 11:35:30 +00:00
Hans-Christoph Steiner
48c520e343 Merge branch 'Use_ConfigurationCompat' into 'master'
Use ConfigurationCompat.getLocales().

See merge request fdroid/fdroidclient!916
2020-08-25 11:29:28 +00:00
Hans-Christoph Steiner
9fd0a433e4 Merge branch 'support-offline-components' into 'master'
allow differing sha256 values in Google Maven vs Android Offline

See merge request fdroid/fdroidclient!918
2020-08-04 09:35:33 +00:00
Hans-Christoph Steiner
708a6d8dbd
allow differing sha256 values in Google Maven vs Android Offline
It turns out that some of the dependencies in the Google Offline Components
downloadable maven repository have difference to the ones Google publishes
to maven.google.com.  WTF.  In any case, the new Gradle Dependency
Verification feature handles this gracefully.  I manually verified the
diffs between the two using diffoscope.  One just differed by timestamps in
the ZIP header, and the other just differed by linefeeds at the end of the
file.  Then I generated this metadata update using:

`./gradlew --write-verification-metadata pgp,sha256`

* https://developer.android.com/studio#offline
2020-08-04 09:46:43 +02:00
Hans-Christoph Steiner
e0cb3f8afc
App.isLocalized() marks whether relevant translations are available
!886
2020-07-22 19:46:54 +02:00
Glenn Carremans
2021f43761
Changed isLocalized logic
`isLocalized` will be true when App will contain 1 or more valid locales for this device
2020-07-22 19:43:03 +02:00
Isira Seneviratne
a44829d33f Use ConfigurationCompat.getLocales(). 2020-07-22 11:10:32 +05:30
Isira Seneviratne
7b8c12bc78 Use ConnectivityManagerCompat.isActiveNetworkMetered(). 2020-07-22 08:48:12 +05:30
Hans-Christoph Steiner
33683cf870 Merge branch 'gradle-dependency-verification' into 'master'
Gradle dependency verification

See merge request fdroid/fdroidclient!913
2020-07-21 10:02:00 +00:00
Hans-Christoph Steiner
be5bdf3219
enable built-in gradle dependency verification
This fully replaces gradle-witness and goes far beyond what it offered. As
far as I can tell, this actually will verify every single artifact that
gradle downloads and uses.

This was generated in two passes to get both the PGP and the SHA256 info:

```
./gradlew --write-verification-metadata pgp,sha256 build connectedFullDebugAndroidTest --export-keys
./gradlew --write-verification-metadata sha256 build connectedFullDebugAndroidTest
```

Thanks to  @vlsi who made me aware of this, and helped make it possible.
closes !837
2020-07-21 10:33:44 +02:00
Hans-Christoph Steiner
dc93686926
update CHANGELOG 2020-07-20 17:48:58 +02:00
Hans-Christoph Steiner
d02ea22572
bump gradle plugin to latest bugfix version 2020-07-20 17:48:55 +02:00
Hans-Christoph Steiner
0c43c66b12 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!912
2020-07-20 14:22:16 +00:00
Hans-Christoph Steiner
dfec1f305b
fix format strings 2020-07-20 13:50:38 +02:00
Hans-Christoph Steiner
91e04bd9e8
Translated using Weblate: Portuguese (pt) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Afrikaans (af) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 71.0% (319 of 449 strings)

Translated using Weblate: Burmese (my) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 46.7% (210 of 449 strings)

Translated using Weblate: Catalan (ca) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 99.7% (448 of 449 strings)

Translated using Weblate: Flemish (nl-rBE) by Hans-Christoph Steiner <hans@guardianproject.info>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Hans-Christoph Steiner <hans@guardianproject.info>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/af/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/my/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl_BE/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
Translation: F-Droid/F-Droid
2020-07-20 13:50:24 +02:00
Jonatan Nyberg
8e95dcb63c
Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
Translation: F-Droid/F-Droid
2020-07-20 13:50:23 +02:00
kak mi
1614ad7c31
Translated using Weblate: Chinese (Simplified) (zh-rCN) by kak mi <wavelake@outlook.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: kak mi <wavelake@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
Translation: F-Droid/F-Droid
2020-07-20 13:50:23 +02:00
naofum
fa50b8f1a1
Translated using Weblate: Japanese (ja) by naofum <naofum@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: naofum <naofum@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ja/
Translation: F-Droid/F-Droid
2020-07-20 13:50:23 +02:00
Jesper Hertel
9ec5dbcf82
Translated using Weblate: Danish (da) by Jesper Hertel <jesper.hertel@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Jesper Hertel <jesper.hertel@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/da/
Translation: F-Droid/F-Droid
2020-07-20 13:50:23 +02:00
Andrey
13208de90a
Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/
Translation: F-Droid/F-Droid
2020-07-20 13:50:22 +02:00
40e3004b-a296-47bd-a073-3dd8af36f77f
1607df0d8c
Translated using Weblate: Flemish (nl-rBE) by 40e3004b-a296-47bd-a073-3dd8af36f77f <40e3004b-a296-47bd-a073-3dd8af36f77f@anonaddy.me>
Currently translated at 99.7% (448 of 449 strings)

Translated using Weblate: Dutch (nl) by 40e3004b-a296-47bd-a073-3dd8af36f77f <40e3004b-a296-47bd-a073-3dd8af36f77f@anonaddy.me>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Flemish (nl-rBE) by 40e3004b-a296-47bd-a073-3dd8af36f77f <40e3004b-a296-47bd-a073-3dd8af36f77f@anonaddy.me>

Currently translated at 99.7% (448 of 449 strings)

Translated using Weblate: Dutch (nl) by 40e3004b-a296-47bd-a073-3dd8af36f77f <40e3004b-a296-47bd-a073-3dd8af36f77f@anonaddy.me>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: French (fr) by 40e3004b-a296-47bd-a073-3dd8af36f77f <40e3004b-a296-47bd-a073-3dd8af36f77f@anonaddy.me>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: 40e3004b-a296-47bd-a073-3dd8af36f77f <40e3004b-a296-47bd-a073-3dd8af36f77f@anonaddy.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl_BE/
Translation: F-Droid/F-Droid
2020-07-20 13:50:22 +02:00
zeritti
fbb609824c
Translated using Weblate: Czech (cs) by zeritti <woodenmo@posteo.de>
Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: zeritti <woodenmo@posteo.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/cs/
Translation: F-Droid/F-Droid
2020-07-20 13:50:22 +02:00
nopogo4376
1b31ffa093
Translated using Weblate: Russian (ru) by nopogo4376 <nopogo4376@mailsecv.com>
Currently translated at 100.0% (30 of 30 strings)

Co-authored-by: nopogo4376 <nopogo4376@mailsecv.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
Translation: F-Droid/F-Droid metadata
2020-07-20 13:50:22 +02:00
J. Lavoie
f58bf3eb50
Translated using Weblate: Spanish (Mexico) (es-rMX) by J. Lavoie <j.lavoie@net-c.ca>
Currently translated at 38.3% (172 of 449 strings)

Translated using Weblate: Spanish (Argentina) (es-rAR) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Portuguese (pt) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Estonian (et) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 99.7% (448 of 449 strings)

Translated using Weblate: Danish (da) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 99.7% (448 of 449 strings)

Translated using Weblate: Dutch (nl) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: French (fr) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Finnish (fi) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Greek (el) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 99.7% (448 of 449 strings)

Translated using Weblate: Czech (cs) by J. Lavoie <j.lavoie@net-c.ca>

Currently translated at 99.7% (448 of 449 strings)

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/cs/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/da/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/el/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_AR/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/et/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
Translation: F-Droid/F-Droid
2020-07-20 13:50:21 +02:00
bas w
7ba4e02754
Translated using Weblate: Dutch (nl) by bas w <myth.usa538@gmail.com>
Currently translated at 99.7% (448 of 449 strings)

Co-authored-by: bas w <myth.usa538@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nl/
Translation: F-Droid/F-Droid
2020-07-20 13:50:21 +02:00
Éfrit
7e77a65a24
Translated using Weblate: French (fr) by Éfrit <efrit@posteo.net>
Currently translated at 96.6% (29 of 30 strings)

Co-authored-by: Éfrit <efrit@posteo.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/
Translation: F-Droid/F-Droid metadata
2020-07-20 13:50:21 +02:00
ssantos
5320dbbddc
Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (30 of 30 strings)

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (30 of 30 strings)

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (30 of 30 strings)

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (449 of 449 strings)

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (30 of 30 strings)

Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-07-20 13:50:21 +02:00
grrgui
cb44a26d77
Translated using Weblate: French (fr) by grrgui <baz.14@zaclys.net>
Currently translated at 93.3% (28 of 30 strings)

Co-authored-by: grrgui <baz.14@zaclys.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/
Translation: F-Droid/F-Droid metadata
2020-07-20 13:50:20 +02:00
Aman ALam
f86869487f
Translated using Weblate: Punjabi (pa) by Aman ALam <alam.yellow@gmail.com>
Currently translated at 20.7% (93 of 449 strings)

Co-authored-by: Aman ALam <alam.yellow@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pa/
Translation: F-Droid/F-Droid
2020-07-20 13:50:20 +02:00
Strubbl
b67e146b44
Translated using Weblate: German (de) by Strubbl <github@linux4tw.de>
Currently translated at 100.0% (30 of 30 strings)

Co-authored-by: Strubbl <github@linux4tw.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
Translation: F-Droid/F-Droid metadata
2020-07-20 13:50:20 +02:00
keerthana
fc571f14bd
Translated using Weblate: Tamil (ta) by keerthana <keerthanaravichandran96@gmail.com>
Currently translated at 31.1% (140 of 449 strings)

Co-authored-by: keerthana <keerthanaravichandran96@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ta/
Translation: F-Droid/F-Droid
2020-07-20 13:50:20 +02:00
WaldiS
215dd00550
Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>
Currently translated at 100.0% (30 of 30 strings)

Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>

Currently translated at 100.0% (30 of 30 strings)

Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>

Currently translated at 96.6% (29 of 30 strings)

Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>

Currently translated at 100.0% (449 of 449 strings)

Co-authored-by: WaldiS <sto@tutanota.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/
Translation: F-Droid/F-Droid
Translation: F-Droid/F-Droid metadata
2020-07-20 13:50:19 +02:00
Hosted Weblate
d5b08cb8c4
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>

Currently translated at 100.0% (30 of 30 strings)

Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>

Currently translated at 83.3% (25 of 30 strings)

Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>

Currently translated at 80.0% (24 of 30 strings)

Translated using Weblate: Chinese (Simplified) (zh-CN) by kak mi <wavelake@outlook.com>

Currently translated at 100.0% (30 of 30 strings)

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (30 of 30 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
Translation: F-Droid/F-Droid metadata
2020-07-20 13:50:19 +02:00
Hans-Christoph Steiner
1be81fc813 Merge branch 'jackson-update' into 'master'
update to latest Jackson JSON, 2.8 is no longer maintained

See merge request fdroid/fdroidclient!909
2020-07-15 16:58:12 +00:00
Hans-Christoph Steiner
857a7f7567
update to latest Jackson JSON, 2.8 is no longer maintained 2020-07-15 15:18:06 +02:00
Hans-Christoph Steiner
850b1cf414
fix checkstyle after androidx update !899 2020-07-15 15:02:34 +02:00
Hans-Christoph Steiner
fcc1656595
remove unused imports to placate checkstyle 2020-07-15 15:02:27 +02:00
Hans-Christoph Steiner
1ee0d7568b Merge branch 'bottom-nav-colors' into 'master'
make bottom nav color configurable

See merge request fdroid/fdroidclient!906
2020-07-15 08:17:16 +00:00
Hans-Christoph Steiner
5ba756ba5b Merge branch 'androidx' into 'master'
AndroidX Migration

See merge request fdroid/fdroidclient!899
2020-07-15 08:05:32 +00:00
Dominik Schürmann
fa209c457f Use Android Gradle Plugin 3.6.0 2020-07-14 21:34:39 +02:00
Dominik Schürmann
44c284d723 Use Gradle 6.4.1 2020-07-14 21:27:50 +02:00
Dominik Schürmann
2701961175 Fix LocalizationTest by recognizing ds format 2020-07-14 17:57:07 +02:00
Dominik Schürmann
319b615da0 Remove unused imports, fix line lengths 2020-07-14 14:10:22 +02:00
Dominik Schürmann
8a0b7eca12 Re-add missing hamcrest dependency 2020-07-14 14:10:22 +02:00
Dominik Schürmann
64e1ec12b9 Remove old support lib proguard rules
AndroidX ships proguard rules that are automatically used
2020-07-14 14:10:22 +02:00
Dominik Schürmann
22c98036c1 build.gradle: use == instead of equals 2020-07-14 14:10:22 +02:00
Dominik Schürmann
f6b3c4bbe2 Migrate AntiFeaturesListingView to AndroidX 2020-07-14 14:10:22 +02:00
Dominik Schürmann
f089b9df08 Use correct uses-library tag in androidTest 2020-07-14 14:10:22 +02:00
Dominik Schürmann
14996c1eca Fix errors reported by lint 2020-07-14 14:10:22 +02:00
Dominik Schürmann
0034e1faff Replace old InstrumentationRegistry.getTargetContext()
with ApplicationProvider.getApplicationContext()
2020-07-14 14:10:22 +02:00
Dominik Schürmann
0ed4fb8e60 Update bouncycastle to 1.65 2020-07-14 14:10:22 +02:00
Dominik Schürmann
06b839d14f Fix test and androidTest dependencies 2020-07-14 14:10:21 +02:00
Dominik Schürmann
1fde5bd355 Remove androidx.legacy dependency 2020-07-14 14:10:21 +02:00
Dominik Schürmann
930f7e2c13 Remove obsolete useProguard flag 2020-07-14 14:10:21 +02:00
Dominik Schürmann
78e81fb781 Use androidx.preference artifact
- use PreferenceFragmentCompat
- this requires androidx Fragments
- explicit declaration of androidx widgets in preferences.xml
  no longer required
2020-07-14 14:10:21 +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
d67db78997 Fix AndroidManifest for androidTest 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
f9663a5ac6 add gradle.properties file to git
This tells gradle that we are an androidX project now.
2020-07-14 14:10:21 +02:00
Marcus Hoffmann
352b6fc7c1 add NonNull annotations to override method 2020-07-14 14:10:21 +02:00
Marcus Hoffmann
59ad42a73b add magic prefrence xml to cancel preferences page offset
Taken from here:
https://stackoverflow.com/a/53969021
2020-07-14 14:10:21 +02:00
Marcus Hoffmann
38374e1d32 update androidX libraries to latest versions
This needs another AGP and gradle update as
com.google.android.material:material:1.1.0 created compile errors
otherwise.
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
Marcus Hoffmann
e2a75f69ee androidX migrations preparations
We need compileSdk 28 and the required AGP and gradle versions, as well
as updating to compatible support library revisions.

minSdk and targetSdk needs to move to build.gradle from manifest.
buildToolsVersion isn't used anymore.
2020-07-14 14:10:21 +02:00
Dominik Schürmann
f9e4506f2d make bottom nav color configurable 2020-07-13 13:36:50 +02:00
Marcus
d0604cb886 Merge branch 'changelog_1.9' into 'master'
even more 1.9 changelog [ci skip]

See merge request fdroid/fdroidclient!905
2020-07-09 11:44:26 +00:00
Marcus Hoffmann
600842c5ff even more 1.9 changelog [ci skip] 2020-07-09 13:43:51 +02:00
Marcus
986c9d0689 Merge branch 'changelog_1.9' into 'master'
add more tings to 1.9 changelog [ci skip]

See merge request fdroid/fdroidclient!904
2020-07-09 11:36:39 +00:00
Marcus Hoffmann
eddc99879b add more tings to 1.9 changelog [ci skip] 2020-07-09 13:35:40 +02:00
Hans-Christoph Steiner
c226523ecc Merge branch 'acra-email' into 'master'
Make acra report email configurable via gradle

See merge request fdroid/fdroidclient!900
2020-07-02 09:29:38 +00:00
Dominik Schürmann
78a69e7703 Make acra report email configurable via gradle 2020-07-02 09:47:58 +02:00
Hans-Christoph Steiner
0a9e58cb2a
version code to 1010000
[skip ci]
2020-06-25 22:49:00 +02:00
Hans-Christoph Steiner
69ced9d114 Merge branch 'antifeature-icons' into 'master'
Anti-Feature icons

Closes #2014

See merge request fdroid/fdroidclient!834
2020-06-25 20:39:00 +00:00
Michael Pöhn
a4c3df6c24 Anti-Feature icons 2020-06-25 20:39:00 +00:00
Hans-Christoph Steiner
2f6dfa02d0
include FUNDING.yml directly, fdroid update reads it
Also, it is the number two hit when searching for "FUNDING.yml":
https://duckduckgo.com/html/?q=funding.yml

This was copied from https://github.com/f-droid/.github.git
2020-06-25 22:21:01 +02:00
Hosted Weblate
e66fdeb8ef
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-06-25 17:15:25 +02:00
Hosted Weblate
d62eba1a00
Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>
Currently translated at 100.0% (30 of 30 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/

Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
2020-06-25 17:15:25 +02:00
Hans-Christoph Steiner
73f1725da9 Merge branch 'autoVerify-false' into 'master'
set App Link Auto Verify to false

See merge request fdroid/fdroidclient!896
2020-06-25 15:15:16 +00:00
Hans-Christoph Steiner
aea5452904 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!895
2020-06-25 12:43:38 +00:00
Hans-Christoph Steiner
864453bb5d
autoVerify="false" on all IntentFilters for HTTP/HTTPS #2004
The autoVerify function seems to require that the app only declare domain
names in the IntentFilters that are set up with the "site association"
files.  For F-Droid to support the verified app link, it would have to stop
matching play.google.com, amazon.com, etc.  This autoVerify function also
triggers DNS lookups at the system level, which might not be forwarded over
Tor, in certain scenarios.  So this just disables the whole feature.

https://developer.android.com/training/app-links/verify-site-associations
2020-06-25 13:31:22 +02:00
Hans-Christoph Steiner
757476dc9b
use canonical download URL: https://f-droid.org/F-Droid.apk
fdroid-website@6be403585352126b04e5c72623ef5852cceb2502
fdroid-website!536
2020-06-25 13:31:20 +02:00
Hans-Christoph Steiner
dfca502ac4
use https://f-droid.org/packages/ instead of https://f-droid.org/app
This avoids a redirect.  Both are supported in the IntentFilters.
2020-06-25 13:31:17 +02:00
Hans-Christoph Steiner
adf62a5b1f
fix format strings 2020-06-25 13:11:37 +02:00
Hans-Christoph Steiner
993611e90f
remove Android string quoting 2020-06-25 13:05:32 +02:00
Hans-Christoph Steiner
3b14604589
Merge remote-tracking branch 'weblate/master' into weblate
* weblate/master:
  Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
  Update translation files
  Update translation files
  Update translation files
  Update translation files
  Update translation files
  Update translation files
  Update translation files
  Translated using Weblate: Portuguese (Portugal) (pt-PT) by Manuela Silva <mmsrs@sky.com>
  Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>
  Update translation files
  Update translation files
  Translated using Weblate: Marathi (mr) by Prachi Joshi <josprachi@yahoo.com>
  Translated using Weblate: Romanian (ro) by Licaon Kter <licaon.kter@protonmail.com>
  Translated using Weblate: Serbian (sr) by Саша Петровић <salepetronije@gmail.com>
  Update translation files
  Update translation files
  Update translation files
  Update translation files

 Conflicts:
	app/src/main/res/values-fa/strings.xml
	app/src/main/res/values-hr/strings.xml
	app/src/main/res/values-ta/strings.xml
	app/src/main/res/values-uk/strings.xml
2020-06-25 13:03:53 +02:00
Yaron Shahrabani
73ffd6453b
Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (30 of 30 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
2020-06-25 12:19:12 +02:00
Hans-Christoph Steiner
a6d1e18ee9 Merge branch 'free-donation-options' into 'master'
Free donation options

See merge request fdroid/fdroidclient!891
2020-06-25 10:19:08 +00:00
Hans-Christoph Steiner
5c0ffea1ef fix checkstyle from !817 !818 2020-06-25 10:31:46 +02:00
Hans-Christoph Steiner
770d80340b run Ctrl-Alt-L code formatter on DBHelper 2020-06-25 10:31:46 +02:00
Hans-Christoph Steiner
c9178d1a08 switch donate layout grid from 3 to 2 columns to handle longer URLs 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
Hans-Christoph Steiner
35d2047536 only show donate icons for free software, otherwise show plain URLs
fdroidserver!754
fdroid-website !557
2020-06-25 10:31:44 +02:00
Hosted Weblate
82e07f59d9
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-06-25 08:54:04 +02:00
Hosted Weblate
fbf964f1a3
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
2020-06-25 08:54:04 +02:00
Hosted Weblate
a28c62e77e
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Hungarian (hu) by Balázs Meskó <meskobalazs@mailbox.org>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/hu/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Hungarian (hu) by Balázs Meskó <meskobalazs@mailbox.org>

Currently translated at 55.1% (16 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/hu/

Translated using Weblate: Hungarian (hu) by Balázs Meskó <meskobalazs@mailbox.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hu/
2020-06-25 08:54:03 +02:00
Hosted Weblate
36dbdfb8c0
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/

Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/is/
2020-06-25 08:54:03 +02:00
Hosted Weblate
a7c7f83d18
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Italian (it) by FrancescoSoave <fs@francescosoave.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-06-25 08:54:03 +02:00
Hosted Weblate
0270cdbccd
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
2020-06-25 08:54:03 +02:00
Hosted Weblate
b3220091e4
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Brazil) (pt-BR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 96.5% (28 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Brazil) (pt-BR) by Wellington Terumi Uemura <wellingtonuemura@gmail.com>

Currently translated at 96.5% (28 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Wellington Terumi Uemura <wellingtonuemura@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/
2020-06-25 08:54:03 +02:00
Hosted Weblate
78dbde3870
Translated using Weblate: Portuguese (Portugal) (pt-PT) by Manuela Silva <mmsrs@sky.com>
Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by Manuela Silva <mmsrs@sky.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
2020-06-25 08:54:03 +02:00
Hosted Weblate
33949c2ee5
Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>
Currently translated at 65.5% (19 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/

Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Ukrainian (uk) by Tymofij Lytvynenko <till.svit@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>

Currently translated at 58.6% (17 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/

Translated using Weblate: Ukrainian (uk) by ihor_ck <igor_ck@outlook.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-06-25 08:54:03 +02:00
Hosted Weblate
2eb652c23a
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Chinese (Simplified) (zh-CN) by Trey Yang <stevsfy@gmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/

Translated using Weblate: Chinese (Simplified) (zh-rCN) by Trey Yang <stevsfy@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/

Translated using Weblate: Chinese (Simplified) (zh-CN) by Sak94664 <hdudhhhdh@gmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/

Translated using Weblate: Chinese (Simplified) (zh-CN) by Trey Yang <stevsfy@gmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/

Translated using Weblate: Chinese (Simplified) (zh-CN) by Lesya Novaselskaya <mesnevi@airpost.net>

Currently translated at 37.9% (11 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/

Translated using Weblate: Chinese (Simplified) (zh-CN) by kak mi <wavelake@outlook.com>

Currently translated at 37.9% (11 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
2020-06-25 08:54:03 +02:00
Hosted Weblate
e71f139be5
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Croatian (hr) by Milo Ivir <mail@milotype.de>

Currently translated at 6.8% (2 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/hr/

Translated using Weblate: Croatian (hr) by Milo Ivir <mail@milotype.de>

Currently translated at 87.3% (392 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-06-25 08:54:03 +02:00
Hosted Weblate
a071b756a4
Translated using Weblate: Marathi (mr) by Prachi Joshi <josprachi@yahoo.com>
Currently translated at 6.8% (2 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/mr/

Translated using Weblate: Marathi (mr) by Anonymous <noreply@weblate.org>

Currently translated at 6.8% (2 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/mr/
2020-06-25 08:54:03 +02:00
Hosted Weblate
49942cf2fb
Translated using Weblate: Romanian (ro) by Licaon Kter <licaon.kter@protonmail.com>
Currently translated at 6.8% (2 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ro/
2020-06-25 08:54:02 +02:00
Hosted Weblate
9673ac3102
Translated using Weblate: Serbian (sr) by Саша Петровић <salepetronije@gmail.com>
Currently translated at 10.3% (3 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/sr/
2020-06-25 08:54:02 +02:00
Hosted Weblate
977a923573
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-06-25 08:54:02 +02:00
Hosted Weblate
23cd5a0b3b
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Slovak (sk) by Juraj Liso <lisojuraj@gmail.com>

Currently translated at 6.8% (2 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/sk/

Translated using Weblate: Slovak (sk) by Juraj Liso <lisojuraj@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sk/
2020-06-25 08:54:02 +02:00
Hosted Weblate
ebdad96b0e
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Julien BRONDINO <dev@brondino.fr>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Lesya Novaselskaya <mesnevi@airpost.net>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Ortinomax <commerce@blaise-moreau.fr>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Nathan <bonnemainsnathan@gmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Anonymous <noreply@weblate.org>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Translated using Weblate: French (fr) by Nathan <bonnemainsnathan@gmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/
2020-06-25 08:54:02 +02:00
Hosted Weblate
35fa77cfe7
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Spanish (Mexico) (es-rMX) by Anonymous <noreply@weblate.org>

Currently translated at 38.3% (172 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/

Translated using Weblate: Spanish (Mexico) (es-rMX) by Leviatansan21 <jorgeivanponcehernandez@yahoo.co.jp>

Currently translated at 38.3% (172 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/

Translated using Weblate: Spanish (Mexico) (es-rMX) by Anonymous <noreply@weblate.org>

Currently translated at 22.0% (99 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/

Translated using Weblate: Spanish (Mexico) (es-rMX) by Leviatansan21 <jorgeivanponcehernandez@yahoo.co.jp>

Currently translated at 22.0% (99 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/

Translated using Weblate: Spanish (Mexico) (es-rMX) by Anonymous <noreply@weblate.org>

Currently translated at 21.3% (96 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/

Translated using Weblate: Spanish (Mexico) (es-rMX) by Leviatansan21 <jorgeivanponcehernandez@yahoo.co.jp>

Currently translated at 21.3% (96 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Spanish (Mexico) (es_MX) by Leviatansan21 <jorgeivanponcehernandez@yahoo.co.jp>

Currently translated at 31.0% (9 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/es_MX/

Translated using Weblate: Spanish (Mexico) (es-rMX) by Leviatansan21 <jorgeivanponcehernandez@yahoo.co.jp>

Currently translated at 17.5% (79 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es_MX/

Added translation using Weblate: Spanish (Mexico) (es-rMX) by Leviatansan21 <jorgeivanponcehernandez@yahoo.co.jp>
2020-06-25 08:54:02 +02:00
Hans-Christoph Steiner
2498c127b4
add changelog for upcoming v1.9 release 2020-06-25 08:53:18 +02:00
Marcus
3ddbd00976 Merge branch 'fix_1460' into 'master'
Icon fixes

Closes #1686, #1772, #1771, and #1460

See merge request fdroid/fdroidclient!817
2020-06-24 15:20:05 +00:00
Marcus Hoffmann
4a5bee3e84 use icon from pm, when there's none from the metadata
This was already done for list views because of the panic uninstall list
but we can easily apply the same logic to the tile view and app detail
view as well.
2020-06-24 16:57:28 +02:00
Marcus Hoffmann
56c05933a2 ignore xml icons
They will never work, they should not be set by fdroidserver but we can
be defensive about not returning them to any views here.
2020-06-24 16:57:28 +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
941d8a0b8b rename app.icon to app.iconFromApk
This makes it clearer what this is actually referring to.
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
a1701ca8c0 Merge branch 'repo_archive_switch' into 'master'
Repo archive switch

Closes #1686, #1772, and #1771

See merge request fdroid/fdroidclient!818
2020-06-24 14:56:23 +00:00
Marcus Hoffmann
4ac2f93238 put archive repo before main
Otherwise when both are enabled the metadata from the archive gets
priority over repo which is not really what we want.
It also breaks a lot of icons, featuregraphics and screenshots.

Fixes fdroid/fdroidclient#1771
Fixes fdroid/fdroidclient#1772
Fixes fdroid/fdroidclient#1686

We also update the default repo priorities for existing installs if we
find the default repos in the original order.

The query is pretty annoying to write in java, here is the raw sql form.

UPDATE fdroid_repo
SET priority = ( SELECT SUM(priority)
            FROM fdroid_repo
            WHERE address IN ('https://f-droid.org/repo', 'https://f-droid.org/archive')
          ) - priority
WHERE address IN ('https://f-droid.org/repo', 'https://f-droid.org/archive') AND
'TRUE' IN (
    SELECT
    CASE
        WHEN a.priority = b.priority-1 THEN 'TRUE'
        ELSE 'FALSE'
    END
    FROM fdroid_repo as a
    INNER JOIN fdroid_repo as b ON
    a.address = "https://f-droid.org/repo" and b.address = "https://f-droid.org/archive"
)
2020-06-24 16:34:43 +02:00
Hans-Christoph Steiner
87d2db3a80 Merge branch 'update_scheduling_fix' into 'master'
UpdateService: fix update scheduling condition

See merge request fdroid/fdroidclient!893
2020-06-15 19:03:57 +00:00
Marcus Hoffmann
82bca90009 UpdateService: fix update scheduling condition
This was blocking updates being scheduled when either data or wifi
updates were disabled. We only want to completely disable the update
service when both are disbaled though.

Ref: #1623
2020-06-15 20:39:56 +02:00
Hans-Christoph Steiner
4031df22f4 Merge branch 'fix_uninstall_crash' into 'master'
fixes a crash that can be triggered when uninstalling with privext

See merge request fdroid/fdroidclient!888
2020-06-10 20:59:16 +00:00
Hans-Christoph Steiner
a0b9150bb3 Merge branch 'cleanup_repo_delete' into 'master'
clean up db when deleting a repository

Closes Bubu/fdroidclassic#29

See merge request fdroid/fdroidclient!887
2020-06-10 20:53:43 +00:00
Marcus Hoffmann
3a2ab0baa6 fixes a crash that can be triggered when uninstalling with privext
Fixes the following crash:

05-19 22:39:55.535  1037 24513 W WindowManager: Attempted to add application window with unknown token Token{2f841 null}.  Aborting.
05-19 22:39:55.536 10844 10844 D AndroidRuntime: Shutting down VM
05-19 22:39:55.540 10844 10844 E AndroidRuntime: FATAL EXCEPTION: main
05-19 22:39:55.540 10844 10844 E AndroidRuntime: Process: org.fdroid.fdroid.debug, PID: 10844
05-19 22:39:55.540 10844 10844 E AndroidRuntime: android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@d8ae31 is not valid; is your activity running?
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at android.view.ViewRootImpl.setView(ViewRootImpl.java:891)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:372)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:128)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at android.app.Dialog.show(Dialog.java:454)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at org.fdroid.fdroid.views.AppDetailsActivity$7.onReceive(AppDetailsActivity.java:607)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:311)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:47)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:120)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:108)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:166)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7529)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
05-19 22:39:55.540 10844 10844 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)

The !isFinishing check was already in the installReceiver part, but
somehow missing in uninstallReceiver. There's also a reference to this
here: http://blackriver.to/2012/08/android-annoying-exception-unable-to-add-window-is-your-activity-running/

I don't understand this crash, especially as the dialouge still gets
shown after adding this check (possibly the parent activity is finishing
and then immediately restarting?). But this sems to realibly fix it.

This was happening when I installed an app, used a new settings entry to
unregister privext as a device owner (by calling it via binder/aidl) and
then trying to uninstall the app I just installed again, whithout
closing f-droid inbetween.
2020-05-19 23:43:25 +02:00
Marcus Hoffmann
a965deb51e clean up db when deleting a repository
Previously everything from a repo staying inside the db when removing it
without disabling it first, the problem manifests when the repo is
readded later (or a mirror), as it would get a new id but all apk
entries still point to the original repoid.

So we now first disable a repo (which just calls
RepoProvider.Helper.purgeApps) before deleting it from the db.

closes Bubu/fdroidclassic#29
2020-05-18 23:36:54 +02:00
Marcus
527917393e Merge branch 'do-not-crop-featureimage' into 'master'
Do not crop feature image

Closes #1798

See merge request fdroid/fdroidclient!874
2020-05-18 18:28:34 +00:00
Marcus
80693c48ff Merge branch 'fix_1845' into 'master'
do not disable update button because of antifeatures

Closes #1845

See merge request fdroid/fdroidclient!872
2020-05-18 18:00:40 +00:00
Hans-Christoph Steiner
f2a625aa75 Merge branch 'patch-1' into 'master'
Make soft navigation bar dark

See merge request fdroid/fdroidclient!878
2020-05-11 08:22:58 +00:00
Hans-Christoph Steiner
3f0361ce79 Merge branch 'Remove_unused_API_level_checks' into 'master'
Remove unused API level checks.

See merge request fdroid/fdroidclient!882
2020-05-11 08:20:20 +00:00
Isira Seneviratne
983593688c Remove unused API level checks. 2020-05-11 08:20:20 +00:00
Hans-Christoph Steiner
32be04285b
version code 1009000 2020-04-22 15:01:37 +02:00
Hans-Christoph Steiner
80408b95d7
./tools/remove-unused-and-blank-translations.py 2020-04-22 14:54:03 +02:00
Hans-Christoph Steiner
fa2cb96577
fix format strings 2020-04-22 14:44:04 +02:00
Hosted Weblate
e1070c0755
Translated using Weblate: Arabic (ar) by Rex_sa <asd1234567890m@gmail.com>
Currently translated at 17.2% (5 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ar/
2020-04-22 14:43:34 +02:00
Hosted Weblate
4eb86f3e5a
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: German (de) by Oliver <websites@posteo.de>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
2020-04-22 14:43:34 +02:00
Hosted Weblate
d312b80916
Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
2020-04-22 14:43:34 +02:00
Hosted Weblate
f4812c5a1a
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Basque (eu) by Osoitz <oelkoro@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eu/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Basque (eu) by Osoitz <oelkoro@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eu/

Translated using Weblate: Basque (eu) by Osoitz <oelkoro@gmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eu/
2020-04-22 14:43:34 +02:00
Hosted Weblate
7e33726a74
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:34 +02:00
Hosted Weblate
41edad08d4
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Localisation Lab <ao@localizationlab.org>

Currently translated at 41.3% (12 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Translated using Weblate: French (fr) by Localisation Lab <ao@localizationlab.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Julien Gontier <emeuraudeman@protonmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Localisation Lab <ao@localizationlab.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Localisation Lab <ao@localizationlab.org>

Currently translated at 41.3% (12 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Translated using Weblate: French (fr) by Localisation Lab <ao@localizationlab.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
2020-04-22 14:43:34 +02:00
Hosted Weblate
6a06e9ea7c
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:34 +02:00
Hosted Weblate
b963130a30
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/he/

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
2020-04-22 14:43:34 +02:00
Hosted Weblate
335d7f3faa
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:34 +02:00
Hosted Weblate
cbc7c841ff
Translated using Weblate: Korean (ko) by Myeongjin Lee <aranet100@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ko/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:34 +02:00
Hosted Weblate
444f593ce6
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:34 +02:00
Hosted Weblate
0533bb8588
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:33 +02:00
Hosted Weblate
17ee32e0b6
Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>
Currently translated at 96.5% (28 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
2020-04-22 14:43:33 +02:00
Hosted Weblate
cd84aa846c
Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>
Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/

Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
2020-04-22 14:43:33 +02:00
Hosted Weblate
9fb7685fe3
Translated using Weblate: Slovak (sk) by Attila Farkas <farkasattila@ymail.com>
Currently translated at 3.4% (1 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/sk/
2020-04-22 14:43:33 +02:00
Hosted Weblate
ab13ba34dc
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:33 +02:00
Hosted Weblate
1304a6603d
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
2020-04-22 14:43:33 +02:00
Hosted Weblate
204b136fa3
Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>
Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
2020-04-22 14:43:33 +02:00
Hosted Weblate
d028baff66
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:33 +02:00
Hosted Weblate
3960a1e6c5
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/sq/

Translated using Weblate: Albanian (sq) by Besnik Bleta <besnik@programeshqip.org>

Currently translated at 99.7% (448 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sq/
2020-04-22 14:43:33 +02:00
Hosted Weblate
5d49a8a325
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:33 +02:00
Hosted Weblate
65526288a2
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:33 +02:00
Hosted Weblate
65ca378f74
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:32 +02:00
Hosted Weblate
063787ee6e
Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>
Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/
2020-04-22 14:43:32 +02:00
Hosted Weblate
056b47934d
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:32 +02:00
Hosted Weblate
4b83d4ee8a
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:32 +02:00
Hosted Weblate
e3b1d937b3
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:32 +02:00
Hosted Weblate
41e613ba1b
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:32 +02:00
Hosted Weblate
0f9e015f72
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:32 +02:00
Hosted Weblate
3cd77a50ff
Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 96.5% (28 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
2020-04-22 14:43:32 +02:00
Hosted Weblate
075d4ee9e5
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:32 +02:00
Hosted Weblate
2a28ede418
Translated using Weblate: Bengali (Bangladesh) (bn-rBD) by Oymate <dhruboadittya96@gmail.com>
Currently translated at 3.5% (16 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn_BD/
2020-04-22 14:43:32 +02:00
Hosted Weblate
83a65b7f95
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:32 +02:00
Hosted Weblate
3a0cce4185
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:31 +02:00
Hosted Weblate
29d920cb72
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 100.0% (29 of 29 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nn/

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nn/
2020-04-22 14:43:31 +02:00
Hosted Weblate
cafbf4783c
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:31 +02:00
Hosted Weblate
f9835f295a
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-04-22 14:43:31 +02:00
Matthieu
d58052d325 Make soft navigation bar dark 2020-03-22 22:29:37 +00:00
Hans-Christoph Steiner
f4b52b2753 Merge branch 'funding' into 'master'
Funding

Closes #1845

See merge request fdroid/fdroidclient!877
2020-03-20 16:36:34 +00:00
Marcus Hoffmann
10af09a911 don't override org wide FUNDING.yml 2020-03-20 14:10:03 +01:00
ByteHamster
b3f24ba34d Do not crop feature image 2020-03-03 21:48:56 +01:00
Marcus Hoffmann
03600c347c do not disable update button because of antifeatures
This testing at the wrong point, namely in the app details where you are
already looking at the antifeatures which might be present.
In the list view there's an additional direct check with
isDisabledByAntiFeatures() anyway.

Fix fdroid/fdroidclient#1845
2020-02-25 15:47:33 +01:00
Hans-Christoph Steiner
bc36e92731 Merge branch 'fix_inactive_action_buttons' into 'master'
Fix inactive action buttons

Closes #1938

See merge request fdroid/fdroidclient!871
2020-02-14 13:51:39 +00:00
Dmitriy Bogdanov
b64b938f78
Fix inactive action buttons 2020-02-13 17:12:34 +04:00
Hans-Christoph Steiner
d1d71e4900
update changelogs 2020-02-04 17:15:07 +01:00
Hans-Christoph Steiner
03189986d5
version code 1008002
[skip ci]
2020-02-04 17:08:12 +01:00
Hans-Christoph Steiner
da8d02afcc Merge branch 'usb-r' into 'master'
Handle USB-OTG support differently

See merge request fdroid/fdroidclient!870
2020-02-04 15:58:39 +00:00
Hans-Christoph Steiner
7cd42ce499 Merge branch 'api29-3' into 'master'
Handle API 29 split-permissions v3

See merge request fdroid/fdroidclient!869
2020-02-04 15:57:19 +00:00
Chirayu Desai
6c4315f9a1 Handle USB-OTG support differently
* Use separate receivers instead of one combined activity
  to avoid showing the "Use F-Droid to handle Mass Storage"
  prompt every time a drive is plugged in.
2020-02-03 02:36:17 +05:30
Chirayu Desai
02b613a08e Handle API 29 split-permissions v3
* Re-do the logic completely, and make it much more clearer.
* Also, Read external storage implies access media location
  *ONLY* on apps not targetting API 29 or above, i.e <= 28
2020-02-02 20:15:18 +05:30
Hans-Christoph Steiner
881a7e59c6 Merge branch 'fix_null_icons_in_list' into 'master'
Fix displaying default icon for apps without icons

See merge request fdroid/fdroidclient!868
2020-01-23 22:53:09 +00:00
Dmitriy Bogdanov
827e2b2e04
Fix displaying default icon for apps without icons 2020-01-23 13:49:48 +04:00
Hans-Christoph Steiner
5de957de0d Merge branch 'links-ripple' into 'master'
add ripple effect to links on app details activity

See merge request fdroid/fdroidclient!864
2020-01-13 10:38:09 +00:00
Michael Pöhn
b0b3657269 add ripple effect to links on app details activity 2020-01-12 01:17:06 +01:00
Michael Pöhn
3312a1d44b Merge branch 'android10' into 'master'
include android 10 in versions display

See merge request fdroid/fdroidclient!863
2020-01-11 22:34:20 +00:00
Marcus Hoffmann
90d803dc7b include android 10 in versions display 2020-01-11 00:44:47 +01:00
Hans-Christoph Steiner
2cd2f82394
version code 1008001
[skip ci]
2020-01-10 20:34:33 +01:00
Hans-Christoph Steiner
9fca42e252 Merge branch 'suggestedVersionName-sync-up' into 'master'
suggestedVersionName sync up

Closes #1063

See merge request fdroid/fdroidclient!862
2020-01-10 19:22:30 +00:00
Hans-Christoph Steiner
3f64fd4930
init suggestedVersionCode to Integer.MIN_VALUE
Java inits ints to 0.  Since it is valid to have a negative Version Code,
versionCodes are inited to Integer.MIN_VALUE;

https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html

closes #1063
2020-01-10 18:15:42 +01: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
cd635459ad
rename Cols.SuggestedApk to AutoInstallApk #1063 2020-01-10 18:15:36 +01:00
Hans-Christoph Steiner
cc3d874dc4
rename App.suggestedVersionCode to autoInstallVersionCode #1063 2020-01-10 18:15:34 +01:00
Hosted Weblate
0d84836153
Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>
Currently translated at 100.0% (28 of 28 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/
2020-01-10 18:10:53 +01:00
Hosted Weblate
a8b75e8243
Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>
Currently translated at 96.4% (27 of 28 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
2020-01-10 18:10:53 +01:00
Hans-Christoph Steiner
92327cbc99 Merge branch 'modernize-pmd-and-randoms' into 'master'
modernize PMD and random fixes

See merge request fdroid/fdroidclient!861
2020-01-10 16:40:22 +00: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
Hans-Christoph Steiner
3b67aa1a60
modernize PMD setup 2020-01-10 16:27:58 +01:00
Hans-Christoph Steiner
cd23d5cd85
bump to latest bugfix version of gradle android plugin 2020-01-10 16:27:57 +01:00
Hans-Christoph Steiner
1cfae44aec
only download from jCenter as a last resort
"Artifact integrity verification aside, not only should jcenter() always be
last, but you need to put mavenCentral() before them. JCenter and Bintray
keep proving they're not a trustworthy artifact host. Ideally you fetch
nothing from them."
https://twitter.com/JakeWharton/status/1073102730443526144

https://blog.autsoft.hu/a-confusing-dependency/
2020-01-10 16:27:55 +01:00
Hans-Christoph Steiner
e0fd1ec771
gitlab-ci: echo when test/pmd/lint/etc fails 2020-01-10 16:27:52 +01:00
Chirayu Desai
2ac9100eea Merge branch 'network-security-config-force-https' into 'master'
set up whitelist of repo domains to force HTTPS

See merge request fdroid/fdroidclient!835
2020-01-10 15:26:08 +00:00
Hans-Christoph Steiner
3ff70a8b6a Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!860
2020-01-10 15:23:30 +00:00
Hans-Christoph Steiner
e6d99a6887
update changelogs
[skip ci]
2020-01-10 15:46:05 +01:00
Hosted Weblate
a2848520fa
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-01-10 15:40:24 +01:00
Hosted Weblate
14c4cdafc9
Translated using Weblate: Catalan (ca) by Kintu <kintukp@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Catalan (ca) by BennyBeat <bennybeat@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Catalan (ca) by BennyBeat <bennybeat@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/

Translated using Weblate: Catalan (ca) by BennyBeat <bennybeat@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Catalan (ca) by BennyBeat <bennybeat@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/

Translated using Weblate: Catalan (ca) by BennyBeat <bennybeat@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Catalan (ca) by Kintu <kintukp@gmail.com>

Currently translated at 14.8% (4 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ca/

Translated using Weblate: Catalan (ca) by Kintu <kintukp@gmail.com>

Currently translated at 98.0% (440 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/
2020-01-10 15:40:22 +01:00
Hosted Weblate
1048e44996
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (27 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 96.3% (26 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/
2020-01-10 15:40:21 +01:00
Hosted Weblate
03576a656c
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>

Currently translated at 100.0% (27 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>

Currently translated at 96.3% (26 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/

Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/is/
2020-01-10 15:40:19 +01:00
Hosted Weblate
1e5994d74b
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Italian (it) by Michael Moroni <michaelmoroni@disroot.org>

Currently translated at 55.6% (15 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/
2020-01-10 15:40:17 +01:00
Hosted Weblate
a2b6a30e11
Translated using Weblate: Turkish (tr) by Ali Demirtas <alidemirtas94@gmail.com>
Currently translated at 81.5% (22 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/

Translated using Weblate: Turkish (tr) by Ali Demirtas <alidemirtas94@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2020-01-10 15:40:15 +01:00
Hosted Weblate
74a5a5a400
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Spanish (es) by J <joaquinfc@protonmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Spanish (es) by J <joaquinfc@protonmail.com>

Currently translated at 44.4% (12 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/es/

Translated using Weblate: Spanish (es) by J <joaquinfc@protonmail.com>

Currently translated at 99.6% (447 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/es/
2020-01-10 15:40:14 +01:00
Hosted Weblate
42409f7c71
Translated using Weblate: Hungarian (hu) by Balázs Meskó <meskobalazs@gmail.com>
Currently translated at 59.3% (16 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/hu/
2020-01-10 15:40:12 +01:00
Hosted Weblate
6d5d6b5ef8
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (27 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/
2020-01-10 15:40:11 +01:00
Hosted Weblate
0ad00f9576
Translated using Weblate: Portuguese (Brazil) (pt-BR) by Rafael Fontenelle <rafaelff@gnome.org>
Currently translated at 100.0% (27 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/
2020-01-10 15:40:09 +01:00
Hosted Weblate
2e275db9b2
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (27 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/
2020-01-10 15:40:07 +01:00
Hosted Weblate
6fff5599de
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (27 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/
2020-01-10 15:40:06 +01:00
Hosted Weblate
3a3c2583ff
Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>
Currently translated at 100.0% (27 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/

Translated using Weblate: German (de) by nautilusx <mail.ka@mailbox.org>

Currently translated at 100.0% (27 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
2020-01-10 15:40:03 +01:00
Hans-Christoph Steiner
30d16a8862
ManageRepos: force to HTTPS when required by Network Security Config
Since GitLab, GitHub, and Amazon S3 allow some HTTP access while always
providing HTTPS, those should always use HTTPS.  This prevents
2020-01-10 15:28:13 +01:00
Hans-Christoph Steiner
5b8d85a4da
set up whitelist of repo domains to force HTTPS
This uses the new Network Security Config feature:
https://developer.android.com/training/articles/security-config
2020-01-10 15:25:38 +01:00
Hans-Christoph Steiner
05347d5cbc Merge branch 'api29-2' into 'master'
Handle API 29 split-permissions v2

See merge request fdroid/fdroidclient!856
2020-01-10 14:19:32 +00:00
Chirayu Desai
fae735c468 Handle API 29 split-permissions v2
* This new permission comes courtesy of the Q December update.
* Read external storage implies access media location

References:
* ac7b10c135%5E%21/#F1
2020-01-10 19:27:53 +05:30
Hans-Christoph Steiner
ee1f4d3dc4 Merge branch 'tests-support-variable-nr-of-default-repos' into 'master'
Make tests support a variable number of default repos.

See merge request fdroid/fdroidclient!857
2020-01-10 13:25:38 +00:00
Hans-Christoph Steiner
cc9796127d
run new zopflipng compression settings from !844 2020-01-02 22:38:54 +01:00
Hans-Christoph Steiner
e2d7199f3f
png-pre-compress: use best of singleCrunch or zopflipng 2020-01-02 22:06:19 +01:00
Hans-Christoph Steiner
ab81295639 Merge branch 'OptimizePNG' into 'master'
Compress PNG images losslessly with zopflipng

See merge request fdroid/fdroidclient!844
2020-01-02 20:19:35 +00:00
Peter Dave Hello
a7fa47e3e9 Compress PNG images losslessly with zopflipng 2020-01-02 20:19:35 +00: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
25262e4463 Merge branch 'close-search-keyboard' into 'master'
activity list: open keyboard when clearing search term

Closes #1915

See merge request fdroid/fdroidclient!858
2020-01-02 13:59:51 +00:00
Michael Pöhn
f7c757bf33 app list: open keyboard when X-ing search query 2019-12-29 21:46:29 +01:00
Michael Pöhn
432a7882fd Merge branch 'summary-design' into 'master'
display summary text on app details activity

Closes #1820

See merge request fdroid/fdroidclient!855
2019-12-25 22:59:34 +00:00
Hans-Christoph Steiner
1379d1e365
./tools/remove-unused-and-blank-translations.py 2019-12-11 11:31:32 +01:00
Michael Pöhn
e42718b11f display summary text on app details activity 2019-12-08 03:37:13 +01:00
Hans-Christoph Steiner
dca8023d7d
ignore flaky swap webserver tests by default 2019-11-30 22:00:53 +01:00
Hans-Christoph Steiner
6375dccb06
gitlab-ci: only run Espresso tests if KVM is available
The emulators without KVM are just too slow to reliably run the Espresso
tests, at least with the timeouts that are set by default.
2019-11-30 22:00:40 +01:00
Hans-Christoph Steiner
4d28b52419
gitlab-ci: use new image that handles the emulator setup 2019-11-30 13:38:05 +01:00
Hosted Weblate
053ffab395
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-21 21:44:52 +01:00
Hosted Weblate
975013700a
Translated using Weblate: English (United States) (en-US) by Allan Nordhøy <epost@anotheragency.no>
Currently translated at 92.6% (25 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/en_US/

Translated using Weblate: English (United States) (en-US) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 88.0% (22 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/en_US/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: English (United States) (en-rUS) by sam <swafa4@gmail.com>

Currently translated at 0.5% (2 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/en_US/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: English (United States) (en-US) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/en_US/
2019-11-21 21:40:37 +01:00
Hosted Weblate
eabb1ba950
Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>
Currently translated at 63.0% (17 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nb_NO/
2019-11-21 21:40:34 +01:00
Hosted Weblate
b143a76466
Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/he/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (27 of 27 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/he/
2019-11-21 21:40:32 +01:00
Hans-Christoph Steiner
6b7d82dba7
add translations from Android when they are missing from a locale 2019-11-21 18:07:23 +01:00
Hans-Christoph Steiner
103098d31c
map more Android string keys to F-Droid string keys
These strings are part of the install/uninstall UI which is originally
sourced from Android itself.  So the translations should stay in sync with
Android's.
2019-11-21 17:22:19 +01:00
Hans-Christoph Steiner
aecf4fdc17
sync common works to the Android v9.0.0r50 sources 2019-11-21 16:06:34 +01:00
Hans-Christoph Steiner
984fe6ad2b
tools/check-string-maxlength.py: include limits from Android sources 2019-11-21 16:06:32 +01:00
Hans-Christoph Steiner
69e85ed202
update embedded GPG signing key so that it is no longer expired
This is the same exact key, just the signed metadata is updated so that it
includes the new expiration date.  This is the same as just updating this
key from the keyservers.
2019-11-21 10:14:21 +01:00
Hans-Christoph Steiner
bfd6959c34
Revert "Language: Data is "kept", not "not lost"."
This reverts commit 346db627ba3dee71bea8ef49184dc7ef60c7286b.

These strings come from Android:
https://gitlab.com/fdroid/fdroidclient/merge_requests/853#note_248378487
2019-11-21 10:14:18 +01:00
Hans-Christoph Steiner
ae06166d18
version code 1008000 2019-11-20 23:11:35 +01:00
Hans-Christoph Steiner
666d8cc7d7
update changelogs 2019-11-20 23:11:33 +01:00
Hans-Christoph Steiner
38e6103c0f
fix broken format strings 2019-11-20 23:11:27 +01:00
Hans-Christoph Steiner
947945dc92
tools/check-format-strings.py: remove blank translations 2019-11-20 22:35:44 +01:00
Hans-Christoph Steiner
c829d232a3 remove unneeded Android string quoting 2019-11-20 22:33:19 +01:00
Hosted Weblate
573c9a3d0a Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Persian (fa) by Mostafa Ahangarha <ahangarha@gmail.com>

Currently translated at 12.0% (3 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fa/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Persian (fa) by Danial Behzadi <dani.behzi@ubuntu.com>

Currently translated at 12.0% (3 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fa/

Translated using Weblate: Persian (fa) by Danial Behzadi <dani.behzi@ubuntu.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Persian (fa) by Mostafa Ahangarha <ahangarha@gmail.com>

Currently translated at 99.8% (448 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/

Translated using Weblate: Persian (fa) by hpn33 <hamed.hpn332@gmail.com>

Currently translated at 8.0% (2 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fa/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Persian (fa) by Mehrad Mahmoudian <m.mahmoudian@gmail.com>

Currently translated at 99.5% (429 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fa/

Translated using Weblate: Persian (fa) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 9.5% (2 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fa/
2019-11-20 22:18:52 +01:00
Hosted Weblate
745839e9ed Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Spanish (es) by Fioddor Superconcentrado <fioddor@gmail.com>

Currently translated at 40.0% (10 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/es/
2019-11-20 22:18:52 +01:00
Hosted Weblate
bf75b6bbcb Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>

Currently translated at 96.0% (24 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/
2019-11-20 22:18:52 +01:00
Hosted Weblate
047988895c Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Serbian (sr) by Саша Петровић <salepetronije@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sr/

Translated using Weblate: Serbian (sr) by Саша Петровић <salepetronije@gmail.com>

Currently translated at 99.8% (448 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sr/
2019-11-20 22:18:52 +01:00
Hosted Weblate
47974be2a1 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:18:52 +01:00
Hosted Weblate
0204ce5106 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 48.0% (12 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nn/

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nn/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 0.0% (0 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nn/

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nn/

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 1.2% (5 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nn/

Translated using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>

Currently translated at 0.5% (2 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nn/

Added translation using Weblate: Norwegian Nynorsk (nn) by Karl Ove Hufthammer <karl@huftis.org>
2019-11-20 22:18:52 +01:00
Hosted Weblate
8941188d3c Translated using Weblate: Chinese (Traditional) (zh-TW) by Hsiu-Ming Chang <cges30901@gmail.com>
Currently translated at 20.0% (5 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hant/
2019-11-20 22:18:52 +01:00
Hosted Weblate
1b7b368e98 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:18:52 +01:00
Hosted Weblate
7badadcdae Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Turkish (tr) by Oğuz Ersen <oguzersen@protonmail.com>

Currently translated at 80.0% (20 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Turkish (tr) by Oguz Ersen <oguzersen@protonmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/

Translated using Weblate: Turkish (tr) by Kemal Oktay Aktoğan <oktay454@disroot.org>

Currently translated at 72.0% (18 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/

Translated using Weblate: Turkish (tr) by mahmut özcan <mahmutozcan65@yahoo.com>

Currently translated at 68.0% (17 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
2019-11-20 22:18:52 +01:00
Hosted Weblate
d926014538 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Telugu (te) by leela <53352@protonmail.com>

Currently translated at 82.0% (368 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/te/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Telugu (te) by Vinay Kumar <mulamatamvinay@gmail.com>

Currently translated at 92.0% (23 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/te/
2019-11-20 22:18:52 +01:00
Hosted Weblate
76eb99d03a Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Belarusian (be) by Zmicer Turok <nashtlumach@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/be/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Belarusian (be) by Zmicer Turok <nashtlumach@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/be/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Belarusian (be) by Zmicer Turok <nashtlumach@gmail.com>

Currently translated at 8.0% (2 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/be/

Translated using Weblate: Belarusian (be) by Zmicer Turok <nashtlumach@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/be/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Belarusian (be) by Viktar Vauchkevich <victorenator@gmail.com>

Currently translated at 8.0% (2 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/be/
2019-11-20 22:18:52 +01:00
Hosted Weblate
f93768b94f Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:18:52 +01:00
Hosted Weblate
eab406ee1f Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:18:52 +01:00
Hosted Weblate
f605b76d3d Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:18:52 +01:00
Hosted Weblate
f6ea6f3763 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (26 of 26 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
2019-11-20 22:18:52 +01:00
Hosted Weblate
00c437f6a7 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (26 of 26 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
2019-11-20 22:18:52 +01:00
Hosted Weblate
0188758d9f Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 72.0% (18 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nb_NO/

Translated using Weblate: Norwegian Bokmål (nb) by Thomas johansen <lavahd@protonmail.ch>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/

Translated using Weblate: Norwegian Bokmål (nb) by Thomas johansen <lavahd@protonmail.ch>

Currently translated at 72.0% (18 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nb_NO/
2019-11-20 22:18:52 +01:00
Hosted Weblate
fddc369c6c Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:18:52 +01:00
Hosted Weblate
dca5c73ffd Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Swedish (sv) by Mattias Münster <mattiasmun@gmail.com>

Currently translated at 30.8% (8 of 26 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/sv/
2019-11-20 22:18:52 +01:00
Hosted Weblate
2bf36381e5 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:18:52 +01:00
Hosted Weblate
a37808a9d7 Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (26 of 26 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
2019-11-20 22:18:52 +01:00
Hosted Weblate
3796f19cd0 Translated using Weblate: Danish (da) by Jesper Hertel <jesper.hertel@gmail.com>
Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/da/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:18:52 +01:00
Hosted Weblate
d9ba782d97 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Welsh (cy) by Aled Powell <aled@aledpowell.cymru>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/cy/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Welsh (cy) by Aled Powell <aled@aledpowell.cymru>

Currently translated at 82.2% (369 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/cy/
2019-11-20 22:18:52 +01:00
Hosted Weblate
dcdfb863d2 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Basque (eu) by Osoitz <oelkoro@gmail.com>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eu/

Translated using Weblate: Basque (eu) by Osoitz <oelkoro@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eu/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Basque (eu) by Osoitz <oelkoro@gmail.com>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eu/

Translated using Weblate: Basque (eu) by Osoitz <oelkoro@gmail.com>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eu/

Translated using Weblate: Basque (eu) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 95.2% (20 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eu/
2019-11-20 22:18:52 +01:00
Hosted Weblate
9eb863e3da Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:18:52 +01:00
Hosted Weblate
e33eb7cc83 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:18:52 +01:00
Hosted Weblate
a57a01687f
Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>
Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (26 of 26 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: German (de) by ssantos <ssantos@web.de>

Currently translated at 100.0% (26 of 26 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
2019-11-20 22:17:44 +01:00
Hosted Weblate
b17c4b473f
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Arabic (ar) by Omar Aglan <omar.aglan91@yahoo.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Arabic (ar) by ButterflyOfFire <ButterflyOfFire@protonmail.com>

Currently translated at 99.6% (447 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/

Translated using Weblate: Arabic (ar) by ButterflyOfFire <ButterflyOfFire@protonmail.com>

Currently translated at 16.0% (4 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ar/
2019-11-20 22:17:44 +01:00
Hosted Weblate
d0b868025e
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Hungarian (hu) by Balázs Meskó <meskobalazs@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/hu/

Translated using Weblate: Hungarian (hu) by Doma Gergő <domag02@gmail.com>

Currently translated at 10.0% (2 of 20 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/hu/
2019-11-20 22:17:44 +01:00
Hosted Weblate
13b7ae99fb
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:17:43 +01:00
Hosted Weblate
03e56ab389
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Czech (cs) by zeritti <woodenmo@posteo.de>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/cs/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Czech (cs) by zeritti <woodenmo@posteo.de>

Currently translated at 16.0% (4 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/cs/
2019-11-20 22:17:43 +01:00
Hosted Weblate
2536af8cad
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:17:43 +01:00
Hosted Weblate
0e32304952
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:17:43 +01:00
Hosted Weblate
ad37ca43c4
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Julien Lepiller <roptat@lepiller.eu>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Translated using Weblate: French (fr) by davidthehackerman <davidpeterrodrigues@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Nathan <bonnemainsnathan@gmail.com>

Currently translated at 48.0% (12 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Julien Lepiller <roptat@lepiller.eu>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Arnaud Jacquemin <arnaud.jacquemin+weblate@free.fr>

Currently translated at 48.0% (12 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 99.1% (444 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Translated using Weblate: French (fr) by xin <xin@riseup.net>

Currently translated at 99.1% (444 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Translated using Weblate: French (fr) by André MIRAS <andre.miras@gmail.com>

Currently translated at 32.0% (8 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 99.1% (444 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 98.9% (443 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Translated using Weblate: French (fr) by Florian <floflr@zaclys.net>

Currently translated at 98.4% (441 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 98.0% (439 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Translated using Weblate: French (fr) by Arnaud Jacquemin <arnaud.jacquemin+weblate@free.fr>

Currently translated at 13.6% (3 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/

Translated using Weblate: French (fr) by xin <xin@riseup.net>

Currently translated at 19.0% (4 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fr/
2019-11-20 22:17:43 +01:00
Hosted Weblate
9abe99d2b9
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:17:43 +01:00
Hosted Weblate
b074934e3e
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:17:43 +01:00
Hosted Weblate
d21c43e97d
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:17:43 +01:00
Hosted Weblate
cbe264ec2f
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Wilker Santana da Silva <wilker@tutamail.com>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-BR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/
2019-11-20 22:17:43 +01:00
Hosted Weblate
b3c11263ae
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Estonian (et) by Kristjan Räts <kristjanrats@gmail.com>

Currently translated at 28.0% (7 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/et/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Estonian (et) by Kristjan Räts <kristjanrats@gmail.com>

Currently translated at 8.0% (2 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/et/

Translated using Weblate: Estonian (et) by Kristjan Räts <kristjanrats@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/et/

Translated using Weblate: Estonian (et) by Janar Leas <janar.leas@gmail.com>

Currently translated at 4.5% (1 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/et/
2019-11-20 22:17:43 +01:00
Hosted Weblate
7abf7b92b0
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:17:43 +01:00
Hosted Weblate
6957488974
Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>
Currently translated at 56.0% (14 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/
2019-11-20 22:17:43 +01:00
Hosted Weblate
a1c08a2453
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Finnish (fi) by Ammuu5 <ammuu5@tutanota.com>

Currently translated at 8.0% (2 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fi/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Finnish (fi) by Tuomas Hietala <tuomas.hietala@iki.fi>

Currently translated at 99.3% (446 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/

Translated using Weblate: Finnish (fi) by Tuomas Hietala <tuomas.hietala@iki.fi>

Currently translated at 99.8% (448 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/

Translated using Weblate: Finnish (fi) by Developer From Jokela Offical Channel <developerfromjokela@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Finnish (fi) by Nikolay Korotkiy <sikmir@gmail.com>

Currently translated at 4.0% (1 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/fi/
2019-11-20 22:17:42 +01:00
Hosted Weblate
159c0023e7
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
2019-11-20 22:17:42 +01:00
Hosted Weblate
ea10fe3549
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (26 of 26 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
2019-11-20 22:17:42 +01:00
Hosted Weblate
117113e266
Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-11-20 22:17:42 +01:00
Hosted Weblate
fb757a2c01
Translated using Weblate: Chinese (Simplified) (zh-CN) by RainSlide <RainSlide@outlook.com>
Currently translated at 32.0% (8 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/

Translated using Weblate: Chinese (Simplified) (zh-CN) by Dingzhong Chen <wsxy162@gmail.com>

Currently translated at 32.0% (8 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
2019-11-20 22:17:42 +01:00
Hans-Christoph Steiner
4f368db1db Merge branch 'nononegations' into 'master'
Language: Data is "kept", not "not lost".

See merge request fdroid/fdroidclient!853
2019-11-20 20:30:31 +00:00
Florian Sesser
346db627ba Language: Data is "kept", not "not lost". 2019-11-20 19:14:51 +01:00
Hans-Christoph Steiner
bc78eba6ba Merge branch 'api29' into 'master'
Handle API 29 split-permissions

See merge request fdroid/fdroidclient!852
2019-11-14 20:04:36 +00:00
Chirayu Desai
09835721f2 Handle API 29 split-permissions
* For apps targetting 28 or lower,
  fine/coarse location now implies background location.
* Fine location now implies coarse location.

References:
* https://developer.android.com/about/versions/10/privacy/changes#access_granted_automatically_when_targeting_android_9_or_lower
* https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-10.0.0_r1/data/etc/platform.xml#186
2019-11-14 20:35:50 +05:30
Hans-Christoph Steiner
7c0cb2064e Merge branch 'left-padding' into 'master'
Add left padding on first screenshot to match header

See merge request fdroid/fdroidclient!851
2019-10-30 11:29:07 +00:00
Hans-Christoph Steiner
4312deb4c8 Merge branch 'padding' into 'master'
Fix extra large padding after every five items on main page

See merge request fdroid/fdroidclient!850
2019-10-29 17:27:23 +00:00
Hans-Christoph Steiner
9994728c37 Merge branch 'fix-blur' into 'master'
Fix blur on seekbar drawable

See merge request fdroid/fdroidclient!848
2019-10-29 10:09:28 +00:00
dkanada
c9040e2cf4 add left padding on first screenshot to match header 2019-10-29 04:35:25 +09:00
dkanada
d538760ad1 fix extra large padding after every five items on main page 2019-10-29 04:02:37 +09:00
dkanada
4253f49e79 fix blur on seekbar drawable 2019-10-29 03:41:09 +09:00
Hans-Christoph Steiner
a2583f0255 Merge branch 'hide-seekbar-value' into 'master'
Hide the seekbar value on all devices

See merge request fdroid/fdroidclient!849
2019-10-28 17:17:16 +00:00
dkanada
6393923274 hide the seekbar value on all devices 2019-10-29 01:51:54 +09:00
Hans-Christoph Steiner
96229f01e8 Merge branch 'spelling_fix' into 'master'
PrivilegedInstaller: fix a grammar mistake in error message

See merge request fdroid/fdroidclient!846
2019-10-15 11:43:08 +00:00
Marcus
65463781d0 PrivilegedInstaller: fix a grammar mistake in error message 2019-10-15 11:43:08 +00:00
Hans-Christoph Steiner
8ee5fa75e4 Merge branch 'fix-acra-crashes' into 'master'
Fix ACRA crashes

See merge request fdroid/fdroidclient!845
2019-10-14 14:46:42 +00:00
Hans-Christoph Steiner
36961c2139
update CHANGELOG 2019-10-14 15:19:16 +02:00
Hans-Christoph Steiner
887f53cf95
stop crash in TreeUriScannerIntentService.onActivityResult()
This might happen if the user denies storage permission.

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=16613, result=0, data=null} to activity {org.fdroid.fdroid/org.fdroid.fdroid.views.main.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.Uri android.content.Intent.getData()' on a null object reference
	at android.app.ActivityThread.deliverResults(ActivityThread.java:4612)
	at android.app.ActivityThread.handleSendResult(ActivityThread.java:4654)
	at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7073)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.Uri android.content.Intent.getData()' on a null object reference
	at org.fdroid.fdroid.nearby.TreeUriScannerIntentService.onActivityResult(TreeUriScannerIntentService.java:99)
	at org.fdroid.fdroid.views.main.MainActivity.onActivityResult(MainActivity.java:270)
	at android.app.Activity.dispatchActivityResult(Activity.java:7759)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:4605)
	... 11 more
java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.Uri android.content.Intent.getData()' on a null object reference
	at org.fdroid.fdroid.nearby.TreeUriScannerIntentService.onActivityResult(TreeUriScannerIntentService.java:99)
	at org.fdroid.fdroid.views.main.MainActivity.onActivityResult(MainActivity.java:270)
	at android.app.Activity.dispatchActivityResult(Activity.java:7759)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:4605)
	at android.app.ActivityThread.handleSendResult(ActivityThread.java:4654)
	at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7073)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
2019-10-14 15:19:15 +02:00
Hans-Christoph Steiner
df818b0aed
fix crash in SwapView on android < 21
In order to support Android < 21, this calls `super` rather than `this`.
RelativeLayout}'s methods just use a 0 for the fourth argument, just like
this used to.
2019-10-14 15:19:13 +02:00
Hans-Christoph Steiner
f5a5805610
stop crash if hotspot returns null WifiConfiguration
java.lang.NullPointerException: Attempt to read from field 'java.lang.String android.net.wifi.WifiConfiguration.SSID' on a null object reference
	at org.fdroid.fdroid.nearby.StartSwapView.uiUpdateWifiNetwork(StartSwapView.java:226)
	at org.fdroid.fdroid.nearby.StartSwapView.uiInitWifi(StartSwapView.java:211)
	at org.fdroid.fdroid.nearby.StartSwapView.onFinishInflate(StartSwapView.java:111)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:876)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
	at org.fdroid.fdroid.nearby.SwapWorkflowActivity.inflateSwapView(SwapWorkflowActivity.java:488)
	at org.fdroid.fdroid.nearby.SwapWorkflowActivity.showIntro(SwapWorkflowActivity.java:541)
	at org.fdroid.fdroid.nearby.SwapWorkflowActivity.showRelevantView(SwapWorkflowActivity.java:468)
	at org.fdroid.fdroid.nearby.SwapWorkflowActivity.access$100(SwapWorkflowActivity.java:86)
	at org.fdroid.fdroid.nearby.SwapWorkflowActivity$1.onServiceConnected(SwapWorkflowActivity.java:135)
	at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1652)
	at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1681)
	at android.os.Handler.handleCallback(Handler.java:790)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:164)
	at android.app.ActivityThread.main(ActivityThread.java:6494)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
2019-10-14 15:19:11 +02:00
Hans-Christoph Steiner
d233b03029
WifiStateChangeService: handle BSSID when WifiConfiguration is null
fixes:

java.lang.NullPointerException: Attempt to read from field 'java.lang.String android.net.wifi.WifiConfiguration.BSSID' on a null object reference
 at org.fdroid.fdroid.nearby.WifiStateChangeService.setSsid(WifiStateChangeService.java:265)
 at org.fdroid.fdroid.nearby.WifiStateChangeService.access$100(WifiStateChangeService.java:59)
 at org.fdroid.fdroid.nearby.WifiStateChangeService$WifiInfoThread.run(WifiStateChangeService.java:174)
2019-10-14 15:19:09 +02:00
Hans-Christoph Steiner
915aeb6c54 Merge branch 'backup' into 'master'
Explicitly define backup rules

Closes #1700

See merge request fdroid/fdroidclient!843
2019-10-14 13:05:27 +00:00
Chirayu Desai
e9c26d0e60 Explicitly define backup rules
* So that we don't go over the backup limit (25MB) by including
  APKs and the local swap repo in the backup
2019-09-03 01:12:03 +05:30
Hans-Christoph Steiner
ce37822bb7
add donation links to GitHub FUNDING.yml
https://github.blog/2019-05-23-announcing-github-sponsors-a-new-way-to-contribute-to-open-source/

fdroiddata!5041
fdroidserver!668
2019-08-29 09:31:29 +02:00
Hans-Christoph Steiner
9fe882294d
version code 1007050 2019-07-06 00:12:33 +02:00
Hans-Christoph Steiner
e7b8eee0b6
update CHANGELOG 2019-07-06 00:12:31 +02:00
Hans-Christoph Steiner
1e29c281c6
catch random NullPointerExceptions related to WifiApControl
java.lang.NullPointerException: Attempt to read from field 'boolean android.net.wifi.WifiConfiguration.hiddenSSID' on a null object reference
at org.fdroid.fdroid.nearby.WifiStateChangeService.setSsid(WifiStateChangeService.java:252)
at org.fdroid.fdroid.nearby.WifiStateChangeService.access$100(WifiStateChangeService.java:59)
at org.fdroid.fdroid.nearby.WifiStateChangeService$WifiInfoThread.run(WifiStateChangeService.java:174)


java.lang.NullPointerException: null receiver
	at java.lang.reflect.Method.invoke(Native Method)
	at cc.mvdan.accesspoint.WifiApControl.invokeQuietly(WifiApControl.java:178)
	at cc.mvdan.accesspoint.WifiApControl.isWifiApEnabled(WifiApControl.java:189)
	at cc.mvdan.accesspoint.WifiApControl.isEnabled(WifiApControl.java:198)
	at org.fdroid.fdroid.nearby.WifiStateChangeService.setSsid(WifiStateChangeService.java:249)
	at org.fdroid.fdroid.nearby.WifiStateChangeService.access$100(WifiStateChangeService.java:59)
	at org.fdroid.fdroid.nearby.WifiStateChangeService$WifiInfoThread.run(WifiStateChangeService.java:133)

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.app.AppOpsManager.checkOpNoThrow(int, int, java.lang.String)' on a null object reference
 at android.provider.Settings.isCallingPackageAllowedToPerformAppOpsProtectedOperation(Settings.java:13730)
 at android.provider.Settings.isCallingPackageAllowedToWriteSettings(Settings.java:13634)
 at android.provider.Settings$System.canWrite(Settings.java:4793)
 at cc.mvdan.accesspoint.WifiApControl.getInstance(WifiApControl.java:122)
 at org.fdroid.fdroid.nearby.WifiStateChangeService.setSsid(WifiStateChangeService.java:240)
 at org.fdroid.fdroid.nearby.WifiStateChangeService.access$100(WifiStateChangeService.java:59)
 at org.fdroid.fdroid.nearby.WifiStateChangeService$WifiInfoThread.run(WifiStateChangeService.java:133)
2019-07-06 00:12:30 +02:00
Hans-Christoph Steiner
bfcc5c974e
fix crash in Panic Settings
This got missed in ef90fd2dfdb0b07aca21f4be34e2c418f092bf06
fdroid/fdroidclient!829

for f in `find app/src/ -type f -name \*.xml|xargs grep --no-filename -F '<org.fdroid.fdroid' | awk '{ print $1}' |sort -u`; do test -e app/src/*/java/`echo $f | sed -e 's,<,,' -e 's,\.,/,g'`.java || echo FAIL $f; done
2019-07-06 00:12:28 +02:00
Hans-Christoph Steiner
18d6110a31 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!833
2019-07-05 22:11:59 +00:00
Hans-Christoph Steiner
ebd63bad5e
./tools/remove-unused-and-blank-translations.py 2019-07-05 23:14:31 +02:00
Hans-Christoph Steiner
40f157a817 remove unneeded Android XML string quoting 2019-07-05 23:12:13 +02:00
Hosted Weblate
3848ec28c1 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (24 of 24 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/
2019-07-05 23:10:49 +02:00
Hosted Weblate
aed8748600 Translated using Weblate: Tibetan (bo) by Allan Nordhøy <epost@anotheragency.no>
Currently translated at 4.8% (1 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/bo/
2019-07-05 23:10:43 +02:00
Hosted Weblate
89c2409841 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Romanian (ro) by Licaon Kter <licaon.kter@protonmail.com>

Currently translated at 4.0% (1 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ro/
2019-07-05 23:10:28 +02:00
Hosted Weblate
2e45e7326b Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 92.0% (23 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
2019-07-05 23:10:18 +02:00
Hosted Weblate
7ca55dd04d Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Arabic (ar) by Omar Aglan <omar.aglan91@yahoo.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/

Translated using Weblate: Arabic (ar) by Omar Aglan <omar.aglan91@yahoo.com>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/

Translated using Weblate: Arabic (ar) by ButterflyOfFire <ButterflyOfFire@protonmail.com>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Arabic (ar) by ButterflyOfFire <ButterflyOfFire@protonmail.com>

Currently translated at 18.2% (4 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ar/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Arabic (ar) by Omar Aglan <omar.aglan91@yahoo.com>

Currently translated at 99.8% (428 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/

Translated using Weblate: Arabic (ar) by Rex_sa <asd1234567890m@gmail.com>

Currently translated at 19.0% (4 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ar/
2019-07-05 23:09:33 +02:00
Hosted Weblate
cee8711797 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Russian (ru) by Denis <alladinnn7@gmail.com>

Currently translated at 92.0% (23 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/

Translated using Weblate: Russian (ru) by Denis <alladinnn7@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 87.5% (21 of 24 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/

Translated using Weblate: Russian (ru) by Andrey <andrey@mailbox.org>

Currently translated at 96.2% (431 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/

Translated using Weblate: Russian (ru) by Anton Bershanskiy <anton.bersh@yandex.ua>

Currently translated at 95.5% (21 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/

Translated using Weblate: Russian (ru) by Anton Bershanskiy <anton.bersh@yandex.ua>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ru/

Translated using Weblate: Russian (ru) by tolstoevsky <tolstoevsky@riseup.net>

Currently translated at 95.2% (20 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/

Translated using Weblate: Russian (ru) by Luba <gapalm@yandex.ru>

Currently translated at 85.7% (18 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/

Translated using Weblate: Russian (ru) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 81.0% (17 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ru/
2019-07-05 23:09:14 +02:00
Hosted Weblate
b0212d3182 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (24 of 24 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
2019-07-05 23:09:05 +02:00
Hosted Weblate
9e500ef30b Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Ukrainian (uk) by AB <ao7nro+6ltrjuwxelfo4@sharklasers.com>

Currently translated at 77.3% (17 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/uk/
2019-07-05 23:09:00 +02:00
Hosted Weblate
2072cebfca Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>
Currently translated at 95.8% (23 of 24 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/
2019-07-05 23:08:55 +02:00
Hosted Weblate
636b0886d8 Translated using Weblate: Portuguese (Brazil) (pt-BR) by Rafael Fontenelle <rafaelff@gnome.org>
Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-BR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 100.0% (24 of 24 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (Brazil) (pt-BR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Lunovox Heavenfinder <lunovox@disroot.org>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Jackson S de Jesus <jackson@bsd.com.br>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Lunovox Heavenfinder <lunovox@disroot.org>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-BR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 95.5% (21 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/
2019-07-05 23:08:45 +02:00
Hosted Weblate
5566f4d8fa Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 68.0% (17 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nb_NO/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 68.0% (17 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nb_NO/

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 99.3% (446 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 99.8% (447 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/

Translated using Weblate: Norwegian Bokmål (nb) by Syver Stensholt <sssandum@gmail.com>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/

Translated using Weblate: Norwegian Bokmål (nb) by Syver Stensholt <sssandum@gmail.com>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 98.8% (426 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 81.8% (18 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nb_NO/

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 98.8% (424 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/nb_NO/

Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 81.0% (17 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nb_NO/
2019-07-05 23:08:42 +02:00
Hosted Weblate
8822962f85 Translated using Weblate: Japanese (ja) by naofum <naofum@gmail.com>
Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ja/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Japanese (ja) by naofum <naofum@gmail.com>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ja/

Translated using Weblate: Japanese (ja) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 4.8% (1 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ja/
2019-07-05 23:08:21 +02:00
Hosted Weblate
4e2a22247a Translated using Weblate: Chinese (Traditional) (zh-rTW) by Jeff Huang <s8321414@gmail.com>
Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hant/

Translated using Weblate: Chinese (Traditional) (zh-rTW) by Jeff Huang <s8321414@gmail.com>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hant/

Translated using Weblate: Chinese (Traditional) (zh-TW) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 9.5% (2 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hant/
2019-07-05 23:08:17 +02:00
Hosted Weblate
084e41c60f Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Chinese (Simplified) (zh-rCN) by HagbGreen(郭俊余) <hagb_green@qq.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Chinese (Simplified) (zh-rCN) by kak mi <wavelake@outlook.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/

Translated using Weblate: Chinese (Simplified) (zh-rCN) by kak mi <wavelake@outlook.com>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Chinese (Simplified) (zh-CN) by gledos <cngledos@gmail.com>

Currently translated at 22.7% (5 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Chinese (Simplified) (zh-rCN) by kak mi <wavelake@outlook.com>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Chinese (Simplified) (zh-CN) by Noke <lei@seenke.com>

Currently translated at 19.0% (4 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/

Translated using Weblate: Chinese (Simplified) (zh-rCN) by kak mi <wavelake@outlook.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/

Translated using Weblate: Chinese (Simplified) (zh-CN) by Allan Nordhøy <epost@anotheragency.no>

Currently translated at 4.8% (1 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/zh_Hans/
2019-07-05 23:07:46 +02:00
Hosted Weblate
e913fc2bd1 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
2019-07-05 23:07:24 +02:00
Hosted Weblate
d8be3ab597 Translated using Weblate: Turkish (tr) by Haydar ŞAHİN <haydarsahin34@gmail.com>
Currently translated at 68.0% (17 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/

Translated using Weblate: Turkish (tr) by Haydar ŞAHİN <haydarsahin34@gmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Turkish (tr) by mahmut özcan <mahmutozcan65@yahoo.com>

Currently translated at 60.0% (15 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Turkish (tr) by Cenk YILDIZLI <cenk.yildizli@hacettepe.edu.tr>

Currently translated at 56.0% (14 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/

Translated using Weblate: Turkish (tr) by Cenk YILDIZLI <cenk.yildizli@hacettepe.edu.tr>

Currently translated at 99.6% (447 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/

Translated using Weblate: Turkish (tr) by mahmut özcan <mahmutozcan65@yahoo.com>

Currently translated at 99.6% (447 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Turkish (tr) by Ali Demirtas <alidemirtas94@gmail.com>

Currently translated at 54.5% (12 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/tr/
2019-07-05 23:06:58 +02:00
Hosted Weblate
d3b216e036 Translated using Weblate: Catalan (ca) by Agusti Grau <agusti@lacalafa.cat>
Currently translated at 13.6% (3 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/ca/
2019-07-05 23:06:49 +02:00
Hosted Weblate
c4afbdb563 Translated using Weblate: Bengali (bn) by Dark Horse <darkhorse19972@gmail.com>
Currently translated at 9.1% (2 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/bn/
2019-07-05 23:06:40 +02:00
Hosted Weblate
fe3cc58da9 Translated using Weblate: Greek (el) by THANOS SIOURDAKIS <siourdakisthanos@gmail.com>
Currently translated at 97.3% (437 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/el/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Greek (el) by THANOS SIOURDAKIS <siourdakisthanos@gmail.com>

Currently translated at 97.1% (436 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/el/

Translated using Weblate: Greek (el) by THANOS SIOURDAKIS <siourdakisthanos@gmail.com>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/el/

Translated using Weblate: Greek (el) by THANOS SIOURDAKIS <siourdakisthanos@gmail.com>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/el/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Greek (el) by THANOS SIOURDAKIS <siourdakisthanos@gmail.com>

Currently translated at 9.1% (2 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/el/
2019-07-05 23:06:35 +02:00
Hosted Weblate
01061e0dc1 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Italian (it) by aleb2000 <aleb2000@hotmail.com>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Italian (it) by Full Name <uselessmail2@tutanota.com>

Currently translated at 98.7% (443 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/

Translated using Weblate: Italian (it) by aleb2000 <aleb2000@hotmail.com>

Currently translated at 54.5% (12 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/

Translated using Weblate: Italian (it) by aleb2000 <aleb2000@hotmail.com>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>

Currently translated at 28.6% (6 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/

Translated using Weblate: Italian (it) by Marco Ieni <marcoieni94@gmail.com>

Currently translated at 9.5% (2 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/it/

Translated using Weblate: Italian (it) by random r <epsilin@yopmail.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/it/
2019-07-05 23:06:13 +02:00
Hosted Weblate
752dce0938 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (449 of 449 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/
2019-07-05 23:03:41 +02:00
Hosted Weblate
5d078d0fb6 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-07-05 23:03:41 +02:00
Hosted Weblate
380b366d33 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (25 of 25 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
2019-07-05 23:03:41 +02:00
Hans-Christoph Steiner
d45d187628 Merge branch 'patch-1' into 'master'
Remove Unused Import

See merge request fdroid/fdroidclient!831
2019-07-05 20:31:12 +00:00
PatOnTheBack
fe92b4afc6 Remove Unused Import 2019-07-05 20:31:12 +00:00
Hans-Christoph Steiner
ad9074232d Merge branch 'patch-2' into 'master'
Remove Unused `import re`

See merge request fdroid/fdroidclient!832
2019-07-05 20:30:46 +00:00
PatOnTheBack
2c882741e7 Remove Unused import re 2019-07-05 20:30:46 +00:00
Hans-Christoph Steiner
ec35f0c998
fix lint: "internett" is usually capitalized as "Internett" [Typos] 2019-06-18 23:39:44 +02:00
Hans-Christoph Steiner
47f8e0bc89
version code 1007002 2019-06-18 23:29:09 +02:00
Hans-Christoph Steiner
63a67698ac update CHANGELOG 2019-06-18 23:29:06 +02:00
Hans-Christoph Steiner
44ae615b29
remove unneeded Android string quoting 2019-06-18 23:28:57 +02:00
Hosted Weblate
14739c301f Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>
Currently translated at 100.0% (24 of 24 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (448 of 448 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 86.4% (19 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 77.3% (17 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 50.0% (11 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/

Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>

Currently translated at 42.9% (9 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pl/
2019-06-18 23:17:59 +02:00
Hosted Weblate
2e5beb2f96 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-06-18 23:17:59 +02:00
Hosted Weblate
05a225b432 Translated using Weblate: German (de) by ssantos <ssantos@web.de>
Currently translated at 100.0% (24 of 24 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
2019-06-18 23:17:59 +02:00
Hans-Christoph Steiner
4260539374 Merge branch 'usb-otg-support' into 'master'
USB OTG support

See merge request fdroid/fdroidclient!830
2019-06-18 20:42:12 +00:00
Hans-Christoph Steiner
6c9afd823e speed up repo searchs by using "depth last"
Recursively search for index-v1.jar starting from the given directory,
looking at files first before recursing into directories.  This is
"depth last" since the index file is much more likely to be shallow
than deep, and there can be a lot of files to search through starting
at 4 or more levels deep, like the fdroid icons dirs and the per-app
"external storage" dirs.
2019-06-18 15:55:19 +02:00
Hans-Christoph Steiner
ca5996c5b3 detect when USB OTG device is plugged in and show Nearby tab 2019-06-17 18:37:26 +02:00
Hans-Christoph Steiner
23b296a012 add Intent Extra to force Nearby tab to show, like the other tabs have 2019-06-17 18:37:00 +02:00
Hans-Christoph Steiner
525f99b056 implement mirror/repos on USB OTG via Storage Access Framework
* https://developer.android.com/training/articles/scoped-directory-access

One potential future direction, if this proves too limiting:
https://github.com/magnusja/libaums
2019-06-17 18:36:58 +02:00
Hans-Christoph Steiner
1ce70d3703 remove mistaken Service entry from full AndroidManifest.xml
LocalHTTPDManager is not a Service subclass.

79e7e78e7f69fc7dbe47684ee102c930e2c3a13f
2019-06-17 16:59:42 +02:00
Hans-Christoph Steiner
474073b48c Merge branch 'great-package-reorg' into 'master'
move classes into packages for "nearby" and "panic"

See merge request fdroid/fdroidclient!829
2019-06-17 11:59:22 +00:00
Hans-Christoph Steiner
02669ea31f move WifiStateChangeReceiver into ".nearby" package 2019-06-17 11:28:52 +02:00
Hans-Christoph Steiner
842db03d8a fold ".views.hiding" into ".panic", it is only use there 2019-06-17 11:28:52 +02:00
Hans-Christoph Steiner
ef90fd2dfd move ".views.panic" to ".panic", it has more than just Views 2019-06-17 11:28:52 +02:00
Hans-Christoph Steiner
69642d88f7 add placeholder SwapWorkflowActivity for basic flavor 2019-06-17 11:28:52 +02:00
Hans-Christoph Steiner
32aad6b562 move ".net.bluetooth" into ".nearby" package 2019-06-17 11:18:07 +02:00
Hans-Christoph Steiner
15d349f863 move LocalHTTPD and WifiStateChangeService into ".nearby" package 2019-06-17 11:18:07 +02:00
Hans-Christoph Steiner
43c7574228 fold ".views.swap" package into ".nearby" class 2019-06-17 10:50:56 +02:00
Hans-Christoph Steiner
790b5ab27d rename 'localrepo' package to 'nearby' to cover the whole thing 2019-06-17 10:50:56 +02:00
Hans-Christoph Steiner
1e00910a42
remove bizarre mistaken app name 2019-06-17 09:09:56 +02:00
Hans-Christoph Steiner
dc80851536
fix broken string format in translation 2019-06-14 22:27:21 +02:00
Hans-Christoph Steiner
ac286dac56
remove unneeded android string quoting 2019-06-14 22:13:19 +02:00
Hosted Weblate
165457d27e Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/
2019-06-14 22:11:19 +02:00
Hans-Christoph Steiner
14033a7975 version code 1007001 2019-06-14 22:07:50 +02:00
Hans-Christoph Steiner
45eab6598e
add ChangeLog entries 2019-06-14 22:00:11 +02:00
Hans-Christoph Steiner
9bc78ed297 Merge branch 'nearby-swap-with-hotspot' into 'master'
nearby swap with hotspot

See merge request fdroid/fdroidclient!828
2019-06-14 19:54:36 +00:00
Hans-Christoph Steiner
df3a09dd2b ensure SwapService is running first, after Location perm prompt 2019-06-14 11:25:41 +02:00
Hans-Christoph Steiner
ec6f9cef2b allow SwapService to start SwapWorkflowActivity on Android < 7.0
https://stackoverflow.com/a/50833599
2019-06-13 21:17:31 +02:00
Hans-Christoph Steiner
254bd6a4db allow hotspots to work for swapping, even if they don't have internet
It is possible to enable the Hotspot AP on a device, and disable mobile
data.  This setup will work fine for swapping, but the detection logic for
whether there is metered internet was blocking it.  So this adds a new
state to represent and handle this condition.
2019-06-13 21:17:31 +02:00
Hans-Christoph Steiner
679820c0b2 get the SSID info when hotspot is active 2019-06-13 21:17:31 +02:00
Hans-Christoph Steiner
9db9f32bf1 show hotspot-specific status messages when hotspot is active 2019-06-13 21:17:31 +02:00
Hans-Christoph Steiner
b11ac7a64a set min width of Wi-Fi SSID field to keep it easily clickable 2019-06-13 21:17:31 +02:00
Hans-Christoph Steiner
abd61208d4 remember Hotspot state when using swap, restore on return 2019-06-13 21:17:31 +02:00
Hans-Christoph Steiner
ca81518f74 Merge branch 'panic-app-wipe' into 'master'
panic app and repo wipe

See merge request fdroid/fdroidclient!827
2019-06-13 10:37:37 +00: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
89140d5334 InstalledAppProvider: use Android sematics for query methods
Throughout Android, a null projection means return the full record.  This
is well documented.

Also, null sortOrder means use default sort order.
2019-06-12 14:48:50 +02:00
Hans-Christoph Steiner
4c352aeadc color destructive panic prefs with red background 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
72f5398b79 panic: uninstall apps based destructive panic trigger
This will uninstall the list of apps that the user has setup in the Panic
Settings if Privileged Extension is installed.  This also requires that the
user set up a trusted connection between a panic trigger app (e.g. Ripple)
and F-Droid.
2019-06-12 14:48:50 +02:00
Hans-Christoph Steiner
d762e187dc update to PanicKit v1.0 2019-06-12 14:48:50 +02:00
Hans-Christoph Steiner
515b5b08f0 set up Panic preference to choose apps to uninstall on trigger 2019-06-12 14:48:50 +02:00
Hans-Christoph Steiner
3812331166 stop crashing if the suggested version ends up being bogus
It is possible for repo operators to specify a bad CurrentVersionCode for
an app that is also in another repo, and cause confusion in the suggested
version calculation.  Or if one repo's index is very out of date.  This
adds a fallback for these cases, so at least it'll stop the crash and
attempt the user's requested install.
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
301c2fff2d remove redundant preference constants 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
736341b34e Merge branch 'proxy-on-app-start' into 'master'
Proxy on app start

See merge request fdroid/fdroidclient!815
2019-06-12 12:47:03 +00:00
Hans-Christoph Steiner
fd625ca8d4
gitlab-ci: android-Q is now officially android-29 2019-06-12 14:24:26 +02:00
Michael Pöhn
5dd866d39e fix checkstyle 2019-06-12 12:04:15 +02:00
Michael Pöhn
067d39f72d preferences fragment: setup use tor preferences changed only once 2019-06-11 16:23:22 +02:00
Michael Pöhn
88f3a68f83 deduplicate error prone proxy settings code 2019-06-11 16:23:22 +02:00
Michael Pöhn
292950898e replace prone useTor preference mirror value from FDroidApp with direct preference calls 2019-06-11 16:23:22 +02:00
Hans-Christoph Steiner
1f565d7638 Merge branch 'typo-fixes' into 'master'
Fix Typos

See merge request fdroid/fdroidclient!826
2019-06-11 12:11:03 +00:00
Yoginth
0851fea8eb
Fix Typos 2019-06-05 03:52:40 +00:00
Hans-Christoph Steiner
3ea365a1f5 update changelog 2019-05-24 15:47:48 +02:00
Hans-Christoph Steiner
6d3a7d4537 move all QR Code related classes to .qr package 2019-05-24 15:47:48 +02:00
Hans-Christoph Steiner
23fc17ba5f purge confusing, unused duplicate string/icon assignment in bottom nav
fdroid/fdroidclient#1785
2019-05-24 15:47:48 +02:00
Hans-Christoph Steiner
c652718a4a fix lint: Repeated word "do" in message: possible typo [Typos] 2019-05-24 15:47:48 +02:00
Hans-Christoph Steiner
1b670df1fd
./tools/remove-unused-and-blank-translations.py 2019-05-24 15:38:36 +02:00
Hosted Weblate
36f29bc6a8 Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/

Translated using Weblate: Portuguese (pt) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/

Translated using Weblate: Portuguese (pt) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/

Translated using Weblate: Portuguese (pt) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt/

Translated using Weblate: Portuguese (pt) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt/

Added translation using Weblate: Portuguese (pt) by Rui Mendes <xz9@protonmail.com>
2019-05-24 15:36:13 +02:00
Hosted Weblate
2289a07483 Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>
Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/is/

Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/
2019-05-24 15:36:13 +02:00
Hosted Weblate
4258315286 Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 100.0% (431 of 431 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/he/

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/
2019-05-24 15:36:13 +02:00
Hosted Weblate
c2070fb76f Translated using Weblate: German (de) by Hans-Christoph Steiner <hans@guardianproject.info>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by ssantos <ssantos@web.de>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/

Translated using Weblate: German (de) by ssantos <ssantos@web.de>

Currently translated at 100.0% (22 of 22 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/

Translated using Weblate: German (de) by CurlingTongs <o11577482@nwytg.net>

Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by Sören Strecke <soeren.strecke@live.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by ssantos <ssantos@web.de>

Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/
2019-05-24 15:36:13 +02:00
Hans-Christoph Steiner
f69b38aad5 Merge branch 'major-swap-overhaul' into 'master'
major swap overhaul

See merge request fdroid/fdroidclient!825
2019-05-24 13:34:51 +00:00
Hans-Christoph Steiner
14e006b924 mark two flaky swap test classes to omit them from gitlab-ci runs
They work fine on my machine, but fail often/always on gitlab-ci
2019-05-24 15:01:33 +02:00
Hans-Christoph Steiner
7acc0cd4c3 make LocalHTTPDTest resilient to LocalHTTPDManagerTest's detritus
LocalHTTPDManagerTest seems to leave port 8888 running sometimes, causing
all of LocalHTTPDTest tests to fail.
2019-05-24 13:36:47 +02:00
Hans-Christoph Steiner
051d58acaf start LocalRepoService once SelectApps is shown to speed up connecting 2019-05-24 13:36:47 +02:00
Hans-Christoph Steiner
6e8c4eb1bf store the current Bluetooth name and restore it when swap is done
fdroid/fdroidclient#1669
2019-05-24 13:36:47 +02:00
Hans-Christoph Steiner
7f35420e37 purge last RxAndroid code, replace with good ol' Intents
Rx needs to be used as the basis of the whole system, it doesn't make sense
to just have one small part handled by Rx.

RxJava is still used in InstallAppProviderService, so that would have to be
tackled separately.
2019-05-24 13:36:47 +02:00
Hans-Christoph Steiner
18a7690758 track all successful peers, and remove all unsuccessful peers
Since it is possible to connect to a peer via NFC, "Swap back", QR Code,
etc. once a peer is successfully used, it can show up in the StartSwapView
list of peers.
2019-05-24 13:35:56 +02:00
Hans-Christoph Steiner
0727787713 make BonjourPeer and WifiPeer equals if they point to the same device 2019-05-24 13:35:56 +02:00
Hans-Christoph Steiner
74c3c24f0a reset idle timer each time a new swap screen is loaded
This means that as long as the user is using swap, it'll stay running.
2019-05-24 13:35:56 +02:00
Hans-Christoph Steiner
e02bc4134a fix display of swap cancel button and installing progress
closes #1612
2019-05-24 13:35:56 +02:00
Hans-Christoph Steiner
fea778793c replace BluetoothSwap with BluetoothManager, using HandlerThread
This is the last of the SwapType stuff!

fdroid/fdroidclient#1723
fdroid/fdroidclient#1669
2019-05-24 13:35:56 +02:00
Hans-Christoph Steiner
ddbe93aeb4 SwapWorkflowActivity: save BluetoothAdapter instance for reuse 2019-05-24 13:35:56 +02:00
Hans-Christoph Steiner
da66949b9e turn LocalRepoService Intents into status Intents like other Services 2019-05-24 13:35:56 +02:00
Hans-Christoph Steiner
effcf4bfa9 purge WifiSwap class in favor of Intents and Services 2019-05-24 13:35:56 +02:00
Hans-Christoph Steiner
46472ba7a4 create BonjourManager to manage jmdns in HandlerThread, with tests 2019-05-24 13:35:55 +02:00
Hans-Christoph Steiner
79e7e78e7f create testable LocalHTTPDManager for controlling the webserver
The RxJava tricks were a nightmare...
2019-05-24 10:02:22 +02:00
Hans-Christoph Steiner
5b610798c2 more reliably set WiFi SSID in nearby/swap interfaces
Often times, the WiFi is properly setup, the IP address is showing, but the
SSID is showing as "No network yet".
2019-05-24 10:02:22 +02:00
Hans-Christoph Steiner
11e0c1926c move swap repo polling to SwapService
SwapService is the long lived background service, and it was already doing
the core work anyway.
2019-05-24 10:02:22 +02:00
Hans-Christoph Steiner
6c1375bf3a quick hack to show "Installing..." when swap install process runs 2019-05-24 10:02:22 +02:00
Hans-Christoph Steiner
e7979fca48 name all SwapService getters properly: getSwapService()
This also switches to always using getActivity().getSwapService() to make
it easily traceable where that is happening.  It shouldn't be happening in
SwapViews...
2019-05-24 10:02:22 +02:00
Hans-Christoph Steiner
e98393f092 use launchMode="singleTask", there can be only one SwapWorkflowActivity!
* https://developer.android.com/reference/android/app/Activity.html#onNewIntent(android.content.Intent)
* https://developer.android.com/guide/topics/manifest/activity-element#lmode
* https://inthecheesefactory.com/blog/understand-android-activity-launchmode/en
2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
289976667d fix NullPointerException in BonjourPeer and BluetoothPeer
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
    at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:62)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6128)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
    at org.fdroid.fdroid.localrepo.peers.BonjourPeer.equals(BonjourPeer.java:34)
    at java.util.HashMap.put(HashMap.java:427)
    at java.util.HashSet.add(HashSet.java:217)
    at rx.internal.operators.OperatorDistinct$1.onNext(OperatorDistinct.java:62)
    at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.pollQueue(OperatorObserveOn.java:202)
    at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber$2.call(OperatorObserveOn.java:162)
    at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
779a0122fd fix ConcurrentModificationException crash in LocalRepoService
https://stackoverflow.com/a/602660

java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextEntry(HashMap.java:851)
    at java.util.HashMap$ValueIterator.next(HashMap.java:879)
    at org.fdroid.fdroid.localrepo.LocalRepoManager.copyIconsToRepo(LocalRepoManager.java:296)
    at org.fdroid.fdroid.localrepo.LocalRepoService$1.run(LocalRepoService.java:131)
2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
910f5da81a create download and install receivers per-app, not globally
Each individual app needs its own receivers for these things, just like in
AppListActivity and InstallManagerService.
2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
d91fbe7b0e rework swap startup putting SwapService first
SwapService is the thing that needs to be always running, and the last
thing killed.  So it should start first, and stop last.  So now, the user
clicking the button starts SwapService, which starts SwapWorkflowActivity.
This also eliminatings the "Loading" screen in favor of just showing the
StartSwapView with various inline progress indicators.
2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
035a89e5f6 move all current View tracking to SwapWorkflowActivity
This information is only ever used in SwapWorkflowActivity and nowhere else
so if it needs to be stored, it could be stored via saveInstanceState().
2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
39f23f6876 add required length limits to swap strings for the translators 2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
9dc9a23a41 fix all RtL lint errors in swap layouts 2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
89f5127f6d turn inline Install button into Cancel button during download 2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
bc14e62e46 receive Downloader error messages in swap 2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
f0158063fb show full error messages from UpdateService
The "cause" is the Exception that was caught and embedded into the
UpdateException, so it has more info on what happened.
2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
ad3fd26756 immediately regenerate swap repo when user changes app selections
Instead of waiting for the user to make all the app selections, then click
next, this constantly regenerates the swap repo on each click of the app
list.  This means that the swap repo is more likely to be immediately ready
when the user clicks next.
2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner
b5d94b7476 convert swap error "back" button to "Try again"
The Android back button provides a working back function, and the Swap
"close" button on the upper left already provides a reset function. So this
turns the "back" button to be a "try again" button which re-runs the
connection process.
2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
5851ea73e0 move ConnectingView to pure XML view, and remove Receiver superclass
The Receiver superclass is not reusing difficult code, but it is hiding the
simple list of UI configuration that it does.

This also eliminates the "error" TextView and just reuses the existing
TextView for error messages.
2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
5ddc287ab3 move NfcView to pure XML view 2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
a9aafa080d move JoinWifiView to pure XML view 2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
1e1ea03bc3 move ConfirmReceiveView to pure XML SwapView with logic in Presenter 2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
d5f2e26ea7 use one method everywhere for the "swap back" requests 2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
014fb0b99d move WifiQrView and SendFDroidView to pure XML views
This puts the logic in the "Presenter": SwapWorkflowActivity
2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
69ce8dbe8c move all WiFi/QR logic to Presenter (SwapWorkflowActivity) 2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
ea3b47f705 purge CacheSwapAppsService in favor of InstalledAppProvider
The most expensive part of this whole process is calculating the hash of the
whole APK.  InstalledAppProvider already caches that, and the rest is OK to
query.  If any particular part of the query is expensive, it could also be
moved to InstalledAppProviderService.
2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
85410504da LocalRepoService for setting up the local swap repo
This moves all logic for setting up the local fdroid repo to its own
IntentService.  That makes it much easier to interact with since things can
just use the static helper method to request it to update, and it'll do the
right thing.
2019-05-24 10:00:01 +02:00
Hans-Christoph Steiner
9fc1ecd5a4
doh! only change translations in Weblate, or suffer merge conflicts! 2019-05-21 14:50:47 +02:00
Hans-Christoph Steiner
866a7276a4 Merge branch 'bugfixes' into 'master'
a few bug fixes

Closes #1737, #1782, and #1769

See merge request fdroid/fdroidclient!824
2019-05-20 13:38:28 +00:00
Hans-Christoph Steiner
c5a6445239 fix bottom bar loading the wrong "Updates" string
closes #1785
2019-05-20 14:14:29 +02:00
Hans-Christoph Steiner
1cc14b3499 show progress spinner on Updates Tab if index is being updated
The "Congrats, your apps are up to date" message isn't quite right in this
context.

closes #1769
2019-05-20 14:14:29 +02:00
Hans-Christoph Steiner
dffc8e5925 make sure ImageLoader is inited before trying to use it
closes #1782
2019-05-20 14:14:29 +02:00
Hans-Christoph Steiner
86908ceeaa the calculated ETag should be compared to the stored ETag
Thanks to @amiraliakbari for tracking this down!

closes fdroid/fdroidclient#1737
2019-05-20 14:14:29 +02:00
Hans-Christoph Steiner
8d60f40e98 Merge branch 'snackbars' into 'master'
Show snackbars with undo buttons. Fix #1756.

Closes #1756

See merge request fdroid/fdroidclient!823
2019-05-20 12:09:30 +00:00
Hans-Christoph Steiner
200548d6ba Merge branch 'move-swap-views-towards-mvc' into 'master'
Move swap views towards MVC

See merge request fdroid/fdroidclient!822
2019-05-14 11:56:01 +00:00
Hocuri
dbfe267540
Show snackbars with undo buttons. 2019-05-13 17:55:09 +02:00
Hans-Christoph Steiner
291e4c4c3c change 'fragment' name to avoid confusion, Swap doesn't use Fragments 2019-05-13 15:01:37 +02:00
Hans-Christoph Steiner
9d6c95d51d move menu handling to SwapView and SwapWorkflowActivity
The menus originate in the Activity, so avoid pushing it to the Views.
2019-05-13 15:01:37 +02:00
Hans-Christoph Steiner
fe59522666 SwapView base class so all swap views can just be XML
Almost all of the nearby/swap view classes could be condensed into a single
base class that is instantiated in the view XML.  This is the first step
towards making that happen.

It also lays the groundwork where "steps" are all SwapViews.  The
original concept of "steps" put all steps together, whether
F-Droid could control them or not.  For example, the Views were
mixed with the system Bluetooth prompts.  This is the first step
towards converting the steps to always be SwapViews, which are
always under control of this app.

When coming back to a SwapView/step, it does not seem feasible to handle
automatically restarting things like permissions and Bluetooth prompts. If
there is a way, it should be possible to first load the proper SwapView
instance, then trigger the system prompt.  The makes the SwapView a pure
View, without any Controller in it.
2019-05-13 15:01:32 +02:00
Hans-Christoph Steiner
6a8f5fb4a7 rename SwapAppsView things to "Swap Success" 2019-05-13 14:55:13 +02:00
Hans-Christoph Steiner
568abe9f3b rename swap_blank to swap_start_swap to match View name 2019-05-13 14:55:13 +02:00
Hans-Christoph Steiner
68cc241bc0 rename ConfirmReceive to ConfirmReceiveView to match standard 2019-05-13 14:55:13 +02:00
Hans-Christoph Steiner
9aa73b95e4 rename SwapConnecting to ConnectingView to match standard 2019-05-13 14:55:13 +02:00
Hans-Christoph Steiner
40c52821fa standardized code format for all swap layout XML 2019-05-13 14:55:13 +02:00
Hans-Christoph Steiner
a8fc3d2b2c gitlab-ci: output versions for base 'tools' and 'emulator' packages 2019-05-13 14:13:27 +02:00
Hans-Christoph Steiner
fac36457ea Merge branch 'bug-fixes-1.7' into 'master'
Bug fixes 1.7

Closes #1678 and #1757

See merge request fdroid/fdroidclient!820
2019-05-10 18:56:47 +00:00
Hans-Christoph Steiner
826d70f2c9 script to automatically cherry-pick complete translations from Weblate
This creates a branch 'merge_weblate' and cherry picks commits from Weblate
that contain 100% complete translations.
2019-05-10 16:30:26 +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
d62c0cf723 AppDetails: use inline OnClickListeners in Android style
no need to declare variables that are used in one place.  Also, reordered
related lines a bit for clarity.
2019-05-10 14:13:23 +02:00
Hans-Christoph Steiner
a71489a102 set max width on places where the translations get too long
closes #1678
2019-05-10 14:13:23 +02:00
ioTY
67af661640 Check whether fdroidPrivileged enabled 2019-05-10 14:13:23 +02:00
Hans-Christoph Steiner
af1040443e ignore Errors and Exceptions in background services
Throwable includes Errors and Exceptions.  Fixes stacktraces like these:

java.lang.RuntimeException: An error occurred while executing doInBackground()
	at android.os.AsyncTask$3.done(AsyncTask.java:325)
	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
	at java.util.concurrent.FutureTask.run(FutureTask.java:242)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
	at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.NoSuchMethodError: No virtual method toPath()Ljava/nio/file/Path; in class Ljava/io/File; or its super classes (declaration of 'java.io.File' appears in /system/framework/core-oj.jar)
	at org.apache.commons.io.FileUtils.isSymlink(FileUtils.java:3107)
	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1616)
	at org.fdroid.fdroid.DeleteCacheService.onHandleWork(DeleteCacheService.java:32)
	at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:391)
	at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:382)
	at android.os.AsyncTask$2.call(AsyncTask.java:305)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	... 3 more
java.lang.NoSuchMethodError: No virtual method toPath()Ljava/nio/file/Path; in class Ljava/io/File; or its super classes (declaration of 'java.io.File' appears in /system/framework/core-oj.jar)
	at org.apache.commons.io.FileUtils.isSymlink(FileUtils.java:3107)
	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1616)
	at org.fdroid.fdroid.DeleteCacheService.onHandleWork(DeleteCacheService.java:32)
	at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:391)
	at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:382)
	at android.os.AsyncTask$2.call(AsyncTask.java:305)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
	at java.lang.Thread.run(Thread.java:761)
2019-05-10 14:13:23 +02:00
Hans-Christoph Steiner
5cce64e153
version code 1007000 2019-05-10 14:13:15 +02:00
Hans-Christoph Steiner
738a4be9fd
update ChangeLog 2019-05-10 14:13:07 +02:00
Hans-Christoph Steiner
5a3e9f2f58 Merge branch 'master' into 'master'
IndexV1Updater: Closing JarFile on end of use. Closes issue #1382.

Closes #1382

See merge request fdroid/fdroidclient!819
2019-05-10 10:34:16 +00:00
AmirAli Akbari
f76f9357d7 IndexV1Updater: Closing JarFile on end of use. Closes issue #1382. 2019-05-10 10:34:16 +00:00
Hans-Christoph Steiner
0d9a203447
Revert "gitlab-ci: job must be called 'pages' to deploy to GitLab Pages"
This reverts commit c5daf1981a7f00de16e19120ac42575c0e4bc424.

Turns I was confused here.  Yes, the job has to be called "pages" if the
job is deploying to GitLab Pages.  But in the case of `fdroid nightly`, the
thing that is deploying to GitLab Pages is the .gitlab-ci.yml that is in
the *-nightly repo, which is auto-generated by `fdroid nightly`.

fdroid/fdroidserver#649
2019-04-26 10:46:39 +02:00
Hans-Christoph Steiner
080f93eb9c Merge branch 'fix-emulator-tests' into 'master'
Fix emulator tests

See merge request fdroid/fdroidclient!816
2019-04-25 22:57:08 +00:00
Hans-Christoph Steiner
306786c9e5 gitlab-ci: run tests three times before marking whole job as failed
There are soo many of these:

org.fdroid.fdroid.net.HttpDownloaderTest > downloadThenCancel[avd27(AVD) - 8.1.0] FAILED
Test failed to run to completion. Reason: 'Instrumentation run failed due to 'Process crashed.''. Check device logcat for details
2019-04-26 00:00:47 +02:00
Hans-Christoph Steiner
ad093d49e6 add weblate config file for wlc CLI tool 2019-04-25 21:19:09 +02:00
Hans-Christoph Steiner
b1fd5395b6 gitlab-ci: download proven emulator version
based on https://aur.archlinux.org/android-emulator.git
2019-04-25 21:19:09 +02:00
Hans-Christoph Steiner
951375f526 gitlab-ci: ensure standard RAM sizes if it needs to be downscaled
gitlab.com says they always use 4GB instances now anyways.
2019-04-23 17:57:23 +02:00
Hans-Christoph Steiner
b8dba454e3 gitlab-ci: only run Espresso tests on emulators newer than 25 2019-04-23 16:34:57 +02:00
Hans-Christoph Steiner
854941363d Merge branch 'test-nightly-fix' into 'master'
fix nightly

See merge request fdroid/fdroidclient!814
2019-04-18 16:54:04 +00:00
Hans-Christoph Steiner
003c448bba gitlab-ci: only set ramsize if host has <4GB RAM 2019-04-17 19:40:31 +02:00
Hans-Christoph Steiner
dbe65f0365 gitlab-ci: fix emulator install for android-Q 2019-04-17 19:28:31 +02:00
Hans-Christoph Steiner
c5daf1981a gitlab-ci: job must be called 'pages' to deploy to GitLab Pages
https://docs.gitlab.com/ee/user/project/pages/getting_started_part_four.html#job

fdroid/fdroidserver#649
2019-04-17 15:51:21 +02:00
Hans-Christoph Steiner
d7453d878d fix lint: Repeated word "do" in message: possible typo 2019-04-17 15:51:21 +02:00
Hans-Christoph Steiner
3915abccc0 version code 1006050 2019-04-10 00:59:51 +02:00
Hans-Christoph Steiner
8be69b7fc4 update changelogs 2019-04-10 00:59:12 +02:00
Rafael Fontenelle
28b5744fe9 Translated using Weblate: Portuguese (Brazil) (pt-BR) by Rafael Fontenelle <rafaelff@gnome.org>
Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-BR) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (20 of 20 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (428 of 428 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (428 of 428 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-rBR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 100.0% (428 of 428 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_BR/

Translated using Weblate: Portuguese (Brazil) (pt-BR) by Rafael Fontenelle <rafaelff@gnome.org>

Currently translated at 100.0% (20 of 20 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_BR/
2019-04-10 00:58:54 +02:00
Hosted Weblate
4073c26132 Translated using Weblate: Norwegian Bokmål (nb) by Allan Nordhøy <epost@anotheragency.no>
Currently translated at 66.7% (14 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/nb_NO/
2019-04-10 00:57:49 +02:00
Hosted Weblate
95787b637e Translated using Weblate: Chinese (Traditional) (zh-rTW) by Jeff Huang <s8321414@gmail.com>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hant/
2019-04-10 00:41:42 +02:00
Hosted Weblate
fe7d836f28 Translated using Weblate: French (fr) by Arnaud Jacquemin <arnaud.jacquemin+weblate@free.fr>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fr/
2019-04-10 00:40:54 +02:00
Hosted Weblate
5c64e722b8 Translated using Weblate: Galician (gl) by Iván Seoane <ivanrsm1997@gmail.com>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/gl/

Translated using Weblate: Galician (gl) by Iván Seoane <ivanrsm1997@gmail.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/gl/

Translated using Weblate: Galician (gl) by Iván Seoane <ivanrsm1997@gmail.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/gl/
2019-04-10 00:40:54 +02:00
Hosted Weblate
aa1ea98244 Translated using Weblate: Sardinian (sc) by Ajeje Brazorf <lmelonimamo@yahoo.it>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sc/
2019-04-10 00:40:54 +02:00
Hosted Weblate
2147f952cd Translated using Weblate: Basque (eu) by Osoitz <oelkoro@gmail.com>
Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eu/

Translated using Weblate: Basque (eu) by Osoitz <oelkoro@gmail.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eu/

Update translation files:  ()

Updated by "Squash Git commits" hook in Weblate.

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/
2019-04-10 00:40:54 +02:00
Hosted Weblate
a4c19b3dc8 Translated using Weblate: Catalan (ca) by Adrià García-Alzórriz <adria@fsfe.org>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ca/
2019-04-10 00:40:54 +02:00
Hosted Weblate
2903a0f059 Translated using Weblate: Turkish (tr) by Kemal Oktay Aktoğan <oktay454@disroot.org>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/tr/
2019-04-10 00:40:54 +02:00
Hosted Weblate
bf4ead6470 Translated using Weblate: German (de) by ssantos <ssantos@web.de>
Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/de/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by CurlingTongs <o11577482@nwytg.net>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by CurlingTongs <o11577482@nwytg.net>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by ssantos <ssantos@web.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/

Translated using Weblate: German (de) by C. Rüdinger <Mail-an-CR@web.de>

Currently translated at 100.0% (428 of 428 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/de/
2019-04-10 00:40:54 +02:00
Hosted Weblate
0f2fbc9ed1 Translated using Weblate: Japanese (ja) by naofum <naofum@gmail.com>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ja/
2019-04-10 00:40:54 +02:00
___
a1e1417e42 Translated using Weblate: Ukrainian (uk) by ___ <o.kravtsov@ukr.net>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/uk/
2019-04-10 00:40:54 +02:00
Hosted Weblate
f9998e15ea Translated using Weblate: Polish (pl) by WaldiS <admin@sto.ugu.pl>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pl/
2019-04-10 00:40:54 +02:00
Hosted Weblate
b89967d566 Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 76.2% (16 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/he/

Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/he/
2019-04-10 00:40:54 +02:00
Hosted Weblate
bc50ffa2cc Translated using Weblate: Belarusian (be) by Zmicer Turok <zmicerturok@gmail.com>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/be/
2019-04-10 00:40:54 +02:00
Hosted Weblate
dac403731c Translated using Weblate: Chinese (Simplified) (zh-rCN) by kak mi <wavelake@outlook.com>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/zh_Hans/
2019-04-10 00:40:54 +02:00
Hosted Weblate
d2c5dc76de Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>
Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/

Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/is/
2019-04-10 00:40:54 +02:00
Hosted Weblate
52a1719fa9 Translated using Weblate: Portuguese (Portugal) (pt-PT) by Rui Mendes <xz9@protonmail.com>
Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by ssantos <ssantos@web.de>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (20 of 20 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Sérgio Marques <smarquespt@gmail.com>

Currently translated at 100.0% (428 of 428 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Sérgio Marques <smarquespt@gmail.com>

Currently translated at 100.0% (428 of 428 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (428 of 428 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-rPT) by Rui Mendes <xz9@protonmail.com>

Currently translated at 100.0% (428 of 428 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/pt_PT/

Translated using Weblate: Portuguese (Portugal) (pt-PT) by Rui Mendes <xz9@protonmail.com>

Currently translated at 10.0% (2 of 20 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/pt_PT/
2019-04-10 00:40:54 +02:00
Hosted Weblate
04335a9c20 Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>
Currently translated at 100.0% (21 of 21 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/eo/

Translated using Weblate: Esperanto (eo) by Verdulo <tomek@disroot.org>

Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/eo/
2019-04-10 00:40:54 +02:00
Hosted Weblate
5a41ca85d9 Translated using Weblate: Finnish (fi) by Arttu Ylhävuori <arjymoi@hotmail.com>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/fi/
2019-04-10 00:40:54 +02:00
Hosted Weblate
cb1627d666 Translated using Weblate: Swedish (sv) by Jonatan Nyberg <jonatan.nyberg.karl@gmail.com>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/sv/
2019-04-10 00:35:49 +02:00
Hosted Weblate
c4906e0002 Translated using Weblate: Romanian (ro) by Licaon Kter <licaon.kter@protonmail.com>
Currently translated at 100.0% (429 of 429 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ro/
2019-04-10 00:35:29 +02:00
Hans-Christoph Steiner
307abc5706 Merge branch 'finalize-1.6' into 'master'
Finalize 1.6

Closes #1556

See merge request fdroid/fdroidclient!813
2019-04-09 22:16:00 +00:00
Hans-Christoph Steiner
623e27931a Merge branch 'swipe-refresh' into 'master'
Color swipe to refresh indicator

See merge request fdroid/fdroidclient!804
2019-04-09 21:26:32 +00:00
mueller-ma
1c881baa9c Color swipe to refresh indicator 2019-04-09 21:26:32 +00:00
Hans-Christoph Steiner
4f771c4add gitlab-ci: update emulator in Q job to version that works with Q 2019-04-09 23:17:21 +02:00
Hans-Christoph Steiner
d2fea72ed9 always update itself last
When auto-updates are enabled, the app should update itself last, to ensure
that all of the other apps are completely updated before this app is killed
as part of the update process.

closes #1556
2019-04-09 23:17:21 +02:00
Hans-Christoph Steiner
272a0e3f27 fix crash when there is no cache when DeleteCacheService runs
java.lang.NoSuchMethodError: No virtual method toPath()Ljava/nio/file/Path; in class Ljava/io/File; or its super classes (declaration of 'java.io.File' appears in /system/framework/core-oj.jar)
at org.apache.commons.io.FileUtils.isSymlink(FileUtils.java:3107)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1616)
at org.fdroid.fdroid.DeleteCacheService.onHandleWork(DeleteCacheService.java:30)
at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:391)
at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:382)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
2019-04-09 14:39:45 +02:00
Hans-Christoph Steiner
593ce5284c fix insane NPE
java.lang.NullPointerException: println needs a message
 at android.util.Log.println_native(Native Method)
 at android.util.Log.e(Log.java:232)
 at org.fdroid.fdroid.net.DownloaderService.handleIntent(DownloaderService.java:232)
 at org.fdroid.fdroid.net.DownloaderService.access$000(DownloaderService.java:88)
 at org.fdroid.fdroid.net.DownloaderService$ServiceHandler.handleMessage(DownloaderService.java:108)
 at android.os.Handler.dispatchMessage(Handler.java:102)
 at android.os.Looper.loop(Looper.java:148)
 at android.os.HandlerThread.run(HandlerThread.java:61)
2019-04-09 14:39:45 +02:00
Hans-Christoph Steiner
66e909d606 standardize all Downloaders on 8k block sizes
This is needed since this affects the onProgress broadcasts, and sending
too many can peg the device's CPU.  1k was just too small.  ANd 8k works
fine for Bluetooth.

fdroid/fdroidclient#1590
2019-04-09 14:39:45 +02:00
Hans-Christoph Steiner
06b9abcee3 gitlab-ci: stick with built-in emulator on ARM
The newest emulator releases always segfault when booting the trusty ARM
android-22 image.
2019-04-09 14:39:45 +02:00
Hans-Christoph Steiner
9a8eb5d495 Merge branch 'improve-add-repo-from-clipboard' into 'master'
Improve adding repos from the clipboard

See merge request fdroid/fdroidclient!811
2019-03-29 09:14:44 +00:00
Jonas L
94e441cc9c Improve adding repos from the clipboard
In some cases (e.g. when using Firefox Klar) and copying the URL
(of a link), then only the uri is set and not the text. This
prevented (before this commit) the autofill of the
add package source dialog in such cases.
2019-03-29 09:14:43 +00:00
Hans-Christoph Steiner
ada263feca
gitlab-ci: allow all emulator jobs to fail, they are too flaky 2019-03-29 10:10:25 +01:00
Hans-Christoph Steiner
9ed4fe8c64 Merge branch 'suite-of-crash-fixes' into 'master'
Suite of crash fixes

See merge request fdroid/fdroidclient!810
2019-03-29 06:08:50 +00:00
Hans-Christoph Steiner
934eb06ff1 SwapAppsView: don't crash on update if app is null
java.lang.NullPointerException: Attempt to read from field 'java.lang.String org.fdroid.fdroid.data.App.packageName' on a null object reference
at org.fdroid.fdroid.views.swap.SwapAppsView$AppListAdapter$ViewHolder$2.onChange(SwapAppsView.java:294)
at android.database.ContentObserver.onChange(ContentObserver.java:130)
at android.database.ContentObserver.onChange(ContentObserver.java:145)
at android.database.ContentObserver$NotificationRunnable.run(ContentObserver.java:216)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:152)
at android.app.ActivityThread.main(ActivityThread.java:5497)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
2019-03-29 00:11:16 +01:00
Hans-Christoph Steiner
81139c40fa trigger WifiStateChangeService after user accepts location perms
Normally, WifiStateChangeService finds the SSID when F-Droid starts. But if
the user hasn't granted location permissions yet, then WifiStateChangeService
won't have been able to read the SSID yet.
2019-03-29 00:11:16 +01:00
Hans-Christoph Steiner
43d3653753 create utility method for sending Toasts from Services 2019-03-29 00:11:16 +01:00
Hans-Christoph Steiner
0322e87d18 purge debug message that causes NullPointerException
java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File java.io.File.getCanonicalFile()' on a null object reference
at android.os.storage.StorageManager.getStorageVolume(StorageManager.java:844)
at android.os.storage.StorageManager.getStorageVolume(StorageManager.java:838)
at android.os.Environment.isExternalStorageRemovable(Environment.java:725)
at org.fdroid.fdroid.views.main.NearbyViewBinder.<init>(NearbyViewBinder.java:85)
at org.fdroid.fdroid.views.main.MainViewController.bindSwapView(MainViewController.java:64)
at org.fdroid.fdroid.views.main.MainViewAdapter.onCreateViewHolder(MainViewAdapter.java:94)
at org.fdroid.fdroid.views.main.MainViewAdapter.onCreateViewHolder(MainViewAdapter.java:47)
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6685)
2019-03-29 00:11:16 +01:00
Hans-Christoph Steiner
d201851784 fix crash when ExternalStorage fails to find something
java.lang.IllegalArgumentException: Failed to find storage device at null
at android.os.Environment.isExternalStorageRemovable(Environment.java:859)
at org.fdroid.fdroid.views.main.NearbyViewBinder.<init>(NearbyViewBinder.java:85)
at org.fdroid.fdroid.views.main.MainViewController.bindSwapView(MainViewController.java:64)
at org.fdroid.fdroid.views.main.MainViewAdapter.onCreateViewHolder(MainViewAdapter.java:94)
at org.fdroid.fdroid.views.main.MainViewAdapter.onCreateViewHolder(MainViewAdapter.java:47)
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6685)
2019-03-29 00:11:16 +01:00
Hans-Christoph Steiner
f21e4b5931 fix crashes when parsing bad dates
java.lang.ArrayIndexOutOfBoundsException: length=13; index=42
at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:454)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2340)
at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2740)
at java.util.Calendar.updateTime(Calendar.java:2589)
at java.util.Calendar.getTimeInMillis(Calendar.java:1101)
at java.util.Calendar.getTime(Calendar.java:1074)
at java.text.SimpleDateFormat.parseInternal(SimpleDateFormat.java:1518)
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1413)
at java.text.DateFormat.parse(DateFormat.java:356)
at org.fdroid.fdroid.Utils.parseDateFormat(Utils.java:577)
at org.fdroid.fdroid.Utils.parseDate(Utils.java:592)
at org.fdroid.fdroid.data.Apk.<init>(Apk.java:178)


java.lang.NumberFormatException: Not a number:
at android.icu.math.BigDecimal.bad(BigDecimal.java:3349)
at android.icu.math.BigDecimal.<init>(BigDecimal.java:526)
at android.icu.math.BigDecimal.<init>(BigDecimal.java:910)
at android.icu.text.DigitList.getBigDecimalICU(DigitList.java:278)
at android.icu.text.DecimalFormat.parse(DecimalFormat.java:2058)
at android.icu.text.DecimalFormat.parse(DecimalFormat.java:1931)
at java.text.DecimalFormat.parse(DecimalFormat.java:804)
at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:2353)
at java.text.SimpleDateFormat.parseInternal(SimpleDateFormat.java:1615)
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1528)
at java.text.DateFormat.parse(DateFormat.java:360)
at org.fdroid.fdroid.Utils.parseDateFormat(Utils.java:577)
at org.fdroid.fdroid.Utils.parseDate(Utils.java:592)
at org.fdroid.fdroid.data.App.<init>(App.java:311)
at org.fdroid.fdroid.views.whatsnew.WhatsNewAdapter.onBindViewHolder(WhatsNewAdapter.java:95)
at org.fdroid.fdroid.views.whatsnew.WhatsNewAdapter.onBindViewHolder(WhatsNewAdapter.java:19)

java.lang.ArrayIndexOutOfBoundsException: length=13; index=36
at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:454)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2411)
at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2813)
at java.util.Calendar.updateTime(Calendar.java:3397)
at java.util.Calendar.getTimeInMillis(Calendar.java:1761)
at java.util.Calendar.getTime(Calendar.java:1734)
at java.text.SimpleDateFormat.parseInternal(SimpleDateFormat.java:1633)
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1528)
at java.text.DateFormat.parse(DateFormat.java:360)
at org.fdroid.fdroid.Utils.parseDateFormat(Utils.java:577)
at org.fdroid.fdroid.Utils.parseDate(Utils.java:592)
at org.fdroid.fdroid.data.App.<init>(App.java:314)
at org.fdroid.fdroid.views.updates.UpdatesAdapter.onCanUpdateLoadFinished(UpdatesAdapter.java:241)
at org.fdroid.fdroid.views.updates.UpdatesAdapter.onLoadFinished(UpdatesAdapter.java:224)
at org.fdroid.fdroid.views.updates.UpdatesAdapter.onLoadFinished(UpdatesAdapter.java:67)
2019-03-29 00:11:16 +01:00
Hans-Christoph Steiner
56ddbf2056 fix crash on bad values in minSdkVersion
java.lang.NumberFormatException: For input string: "@2131034146"
at java.lang.Integer.parseInt(Integer.java:615)
at java.lang.Integer.parseInt(Integer.java:650)
at org.fdroid.fdroid.data.App.getMinTargetMaxSdkVersions(App.java:1092)
at org.fdroid.fdroid.data.App.initInstalledApk(App.java:769)
at org.fdroid.fdroid.data.App.getInstance(App.java:395)
at
org.fdroid.fdroid.localrepo.CacheSwapAppsService.onHandleIntent(CacheSwapAppsService.java:77)
at
android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:76)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2019-03-29 00:11:16 +01:00
Hans-Christoph Steiner
275a674d26 version code 1006002 2019-03-28 13:30:30 +01:00
Hans-Christoph Steiner
64ff1c472e
update CHANGELOG
[skip ci]
2019-03-28 12:36:29 +01:00
Hans-Christoph Steiner
727e9ed5dd Merge branch 'canonical-url-overhaul' into 'master'
Canonical URL overhaul

Closes #1742, #1736, and #1727

See merge request fdroid/fdroidclient!809
2019-03-28 11:32:46 +00:00
Hans-Christoph Steiner
c7c16131e9 fix OBB support for repositories
The repoId was hard-coded to 0.

fdroid/fdroidclient#1403
2019-03-28 11:41:10 +01:00
Hans-Christoph Steiner
5f14628524 DownloaderService: improve debug logs for Canonical vs Download URLs 2019-03-28 11:41:10 +01:00
Hans-Christoph Steiner
edb2b838eb DownloaderService: track active using the canonical URL
This was using the actual download URL, which might change, depending on
whether a mirror was used.

closes #1727
2019-03-28 11:41:10 +01:00
Hans-Christoph Steiner
0aab6bc422 standardize on EXTRA_CANONICAL_URL throughout the code base
There were a few different constants used, this unifies them all into one,
so that it is easy to track where it is used, and what it means.
2019-03-28 11:41:10 +01:00
Hans-Christoph Steiner
3378c0a333 rename Canonical vs. Download URL in InstallManagerService process
AppUpdateStatusManager and InstallManagerService should be using only the
Canonical URL of the package since that is the global unique ID.  The actual
URL used to download it needs to be isolated in DownloaderService, which can
entirely manage the mirror selection process.  This is just a bunch of
renaming to make this all clearer.
2019-03-28 11:41:10 +01:00
Hans-Christoph Steiner
3a5f96e0b3 DownloaderService: use canonical URL to fix progress updates
The download URL is not the unique ID, the canonical URL is.

closes #1736
2019-03-28 11:41:10 +01:00
Hans-Christoph Steiner
7f22c3c221 DownloaderService: convert String to Uri to avoid repeated parsing
This parses the String into a Uri once per Intent, rather than once per
broadcast.  The Uri instance is also nicer to work with, since it is the
native URL format for Intents.

It should make the progress updates a bit more efficient also.
fdroid/fdroidclient#1742
2019-03-28 11:41:10 +01:00
Hans-Christoph Steiner
288577407d move towards only using canonical URLs in InstallManagerService
Only DownloaderService really needs to know about the mirror tricks, the
rest of the process should only ever use the canonical URL to keep things
simple.
2019-03-28 11:41:10 +01:00
Hans-Christoph Steiner
04298f8886 DownloaderService: only broadcast progress when it actually changes
On a slow download, this could send like 100+ updates even though no more
data had been received.

closes #1742
2019-03-28 11:41:10 +01:00
Hans-Christoph Steiner
d794c5a77c purge urlString from ProgressListener, it is unused and confusing 2019-03-28 11:41:03 +01:00
Hans-Christoph Steiner
6b0a784a26 normalize canonical URL variable names 2019-03-26 21:46:38 +01:00
Hans-Christoph Steiner
e346d2351b rename AppUpdateStatus.getUniqueKey to getCanonicalUrl
This highlights the relationship between the various things that are using
the canonical URL as the unique ID.
2019-03-26 21:46:38 +01:00
Hans-Christoph Steiner
4ea775be00 remove wrong "ERROR" description from Downloader Intend Extras
Looks like a copy-paste bug in a160476a14c40412728f4974f53d1a18f7064346
2019-03-26 21:46:38 +01:00
Hans-Christoph Steiner
a0b318c383 rename Apk.getUrl() to getCanonicalUrl() to highlight it is also an ID
This method returns the URL that points to the canonical download
source for this package.  This is also used as the unique ID for
tracking downloading, progress, and notifications throughout the
whole install process.  It is guaranteed to uniquely represent
this file since it points to a file on the file system of the
canonical webserver.
2019-03-26 21:46:38 +01:00
Hans-Christoph Steiner
19a0428944 Merge branch 'download-updates-by-default' into 'master'
Download updates by default

See merge request fdroid/fdroidclient!806
2019-03-26 20:41:25 +00:00
Hans-Christoph Steiner
80bab5611b Merge branch 'no-featured-app' into 'master'
* no-featured-app:
  cleanup imports
  fix padding of top item in Latest Tab
  Remove feature graphic of first app from "Latest" view

See merge request fdroid/fdroidclient!807
2019-03-26 21:29:33 +01:00
Hans-Christoph Steiner
51431d59ee cleanup imports 2019-03-26 21:29:13 +01:00
Hans-Christoph Steiner
496a3a2938 fix padding of top item in Latest Tab 2019-03-26 21:28:20 +01:00
mueller-ma
59fe365ed6 Remove feature graphic of first app from "Latest" view
Closes #1748
2019-03-26 18:08:38 +01: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
99591c050c Merge branch 'latest-apps-criteria' into 'master'
Latest apps criteria

See merge request fdroid/fdroidclient!805
2019-03-26 15:17:09 +00:00
Hans-Christoph Steiner
90d4821e99 fix checkstyle LineLength 2019-03-22 22:16:08 +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
3862f941e6 add new criteria for apps shown in Latest tab
This adds requirements before an app is shown on the Latest tab.  It must
have all of these:

* name
* summary
* description
* license
* What's New entry
* at least some text localized

And then it must have at least one of these:

* screenshots
* feature graphic
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
765bd2892d Merge branch 'nearby-view' into 'master'
Improve nearby swap splash layout

See merge request fdroid/fdroidclient!800
2019-03-22 08:46:39 +00:00
Hans-Christoph Steiner
ff111bd6af Merge branch 'improve-error' into 'master'
Mention F-Droid in index file fetch error string

See merge request fdroid/fdroidclient!803
2019-03-21 21:59:28 +00:00
AJ Jordan
8eea0f6c34
Mention F-Droid in index file fetch error string
The problem here is that oftentimes, the index fetch will happen
automatically in the background while the user is in a different app. If
the fetch fails, the warning text changed here is displayed as a toast,
but without this change there's no way to tell that it's coming from
F-Droid.
2019-03-21 13:18:08 -04:00
Hans-Christoph Steiner
5d21f0bc86 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!802
2019-03-21 13:07:15 +00:00
Hans-Christoph Steiner
bba0d5b753 Translated using Weblate: Danish (da) by Jesper Hertel <jesper.hertel@gmail.com>
Currently translated at 93.7% (401 of 428 strings)

Translation: F-Droid/F-Droid
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/da/
2019-03-21 13:07:15 +00:00
Hans-Christoph Steiner
42f73fb54b remove app:textAllCaps that was missed in 3adfb65c690c37855f1f120006606478575a564b
fdroid/fdroidclient!797
2019-03-21 13:28:25 +01:00
Hans-Christoph Steiner
49c32a4392 remove unused resource since 3adfb65c690c37855f1f120006606478575a564b
fdroid/fdroidclient!797
2019-03-21 13:28:24 +01:00
Hans-Christoph Steiner
07131e981b gitlab-ci: purge only: merge_requests, it doesn't work for this
The merge_requests feature is really confusing, and doesn't seem to do
anything useful for what we need it to.  Like it doesn't let new
contributors' merge requests run on the fdroid runners.
2019-03-21 13:28:24 +01:00
Hans-Christoph Steiner
5e1d95c361 add comments to translators in source strings 2019-03-21 11:56:21 +01:00
mueller-ma
05bbe94b47 Improve nearby swap splash layout
* Rename ids to something meaningful
* Remove inner layouts from constraint layout
* Use same text and button styles
* Make sure the background image doesn't overlap with the text
2019-03-17 00:04:40 +01:00
Hans-Christoph Steiner
dc59d48be3 Merge branch 'fix_button_background' into 'master'
Improve Buttons

See merge request fdroid/fdroidclient!797
2019-02-26 16:02:30 +00:00
Conny Duck
3adfb65c69 Improve Buttons 2019-02-26 16:02:30 +00:00
Sveinn í Felli
eacce08a13 Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>
Currently translated at 78.9% (15 of 19 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/

[skip ci]
2019-02-21 00:32:10 +01:00
Sveinn í Felli
7ed7cf3bcb Translated using Weblate: Icelandic (is) by Sveinn í Felli <sv1@fellsnet.is>
Currently translated at 100.0% (19 of 19 strings)

Translation: F-Droid/F-Droid metadata
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid-metadata/is/

[skip ci]
2019-02-21 00:30:27 +01:00
Hans-Christoph Steiner
886cd0b1bf version code 1006001 2019-02-21 00:21:55 +01:00
Hans-Christoph Steiner
3a992c10d2 update CHANGELOG 2019-02-21 00:21:55 +01:00
Hans-Christoph Steiner
72d33ffe3d remove empty changelog translations 2019-02-21 00:21:55 +01:00
Hosted Weblate
bd93c5743f clean up whitespace and formatting in strings.xml 2019-02-21 00:21:55 +01:00
Hans-Christoph Steiner
8da7fc5103 set comments to point out button labels to translators
closes #1678
2019-02-21 00:21:55 +01:00
Hans-Christoph Steiner
7ce7b46ed2 metadata: script to delete 0 size files and standardize whitespace 2019-02-21 00:21:55 +01:00
Hans-Christoph Steiner
9897c97ef8 Merge branch 'switches-to-disable-mirrors' into 'master'
add switches to disable mirrors

Closes #1696

See merge request fdroid/fdroidclient!795
2019-02-20 23:21:27 +00:00
Hans-Christoph Steiner
6a18ba1b85 RepoDetails: hide mirror lists if they are not useful
e.g., empty lists or the official mirror list just repeating the canonical
URL.
2019-02-21 00:18:25 +01:00
Hans-Christoph Steiner
b1569795a2 IndexV1Updater: use LinkedHashSet to preserve mirror ordering 2019-02-21 00:18:25 +01:00
Hans-Christoph Steiner
c3ec29df93 RepoDetails: add switches to disable any or all mirrors
This also needs to handle mirror lists with 1 element, since mirrors can
now be disabled. If the user disables all mirrors, then there will be only one URL in the
list of mirrors.  Asking for a random mirror in that case should not return
null, but the one enabled mirror.


closes #1696
2019-02-20 21:10:34 +01:00
Hans-Christoph Steiner
a81a61be61 RepoDetails: convert mirror lists to have on/off switches 2019-02-20 15:59:29 +01:00
Hans-Christoph Steiner
2b1f851617
standardize whitespace formating for fastlane files
```python
import glob
for f in glob.glob('metadata/*/*.txt'):
    with open(f) as fp:
        data = fp.read()
    with open(f, 'w') as fp:
        fp.write(data.rstrip())
        fp.write('\n')
```

for f in metadata/*/short_description.txt; do data=`cat $f`; echo $data > $f; done
2019-02-20 15:26:50 +01:00
Hans-Christoph Steiner
0f08a66696 Merge branch 'randomize-package-downloads' into 'master'
Randomize package downloads

Closes #1708

See merge request fdroid/fdroidclient!794
2019-02-20 13:46:04 +00:00
Hans-Christoph Steiner
14b4a7e00a cache all downloads based on canonical URL, not download URL
This makes the download cache be shared across all mirrors used to download
rather than having a cache per-mirror.
2019-02-20 13:39:26 +01:00
Hans-Christoph Steiner
dd14b9e315 choose random mirror for each package/APK download
This spreads downloads across all available mirrors randomly.  This could
definitely be improved, like choosing the fastest or nearest mirror, or
only .onion addresses on Tor.  This will improve the current situation and
should reduce the load on f-droid.org a lot.

fdroidclient#1696
2019-02-20 13:39:26 +01:00
Hans-Christoph Steiner
89422e9c8f clarify get mirrors method: Repo.getRandomMirror() 2019-02-20 13:39:26 +01:00
Hans-Christoph Steiner
cf9a6b851d RepoAdapter: code cleanup
Remove unused code and simplify to only present args that are used. This is
remnants from:

fdroidclient#490
fdroidclient#606
fdroidclient!295
fdroidclient!242
2019-02-20 13:39:26 +01:00
Hans-Christoph Steiner
afe6de94a0 handle Apache and Nginx ETags when checking if index is current
fdroid/fdroidclient#1708
2019-02-20 13:39:22 +01:00
Hans-Christoph Steiner
9323ccdfd1 add HTTP Last-Modified header to nearby/swap webserver
This should support the new cache check scheme when using swap repos.
2019-02-19 11:17:09 +01:00
Hans-Christoph Steiner
9522012fe1 use built-in constants for HTTP status codes 2019-02-19 11:17:09 +01:00
Hans-Christoph Steiner
07971080c4 Merge branch 'random-fixes' into 'master'
Random fixes

Closes #1715

See merge request fdroid/fdroidclient!793
2019-02-18 23:40:21 +00:00
Hans-Christoph Steiner
b632066ca7 gitlab-ci: only run the reliable emulators on merge requests 2019-02-18 23:58:10 +01:00
Hans-Christoph Steiner
683a990da8 include test string comment to see if Weblate supports them 2019-02-18 23:52:41 +01:00
Hans-Christoph Steiner
b5de4898b1 improve "try it" permissions prompt on Nearby screen
This should make all the translations fit on the screen properly.

closes #1715
2019-02-18 23:52:41 +01:00
Hans-Christoph Steiner
8e8d4a4af6 espresso tests: print RAM info to logcat 2019-02-18 23:52:40 +01:00
Hans-Christoph Steiner
181f2ec292 version code 1006000 2019-02-15 16:00:12 +01:00
Hans-Christoph Steiner
6847dc656a update changelog 2019-02-15 16:00:12 +01:00
Hans-Christoph Steiner
a8fbb64f5a gitlab-ci: remove flaky emulator test 21/22 and make 23 optional 2019-02-15 16:00:12 +01:00
Hans-Christoph Steiner
e30e5004f1 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!792
2019-02-15 14:58:59 +00:00
Hans-Christoph Steiner
bb597537f2 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (428 of 428 strings)
2019-02-15 14:58:59 +00:00
Hans-Christoph Steiner
1ed99835a0 remove-unused-and-blank-translations.py: force Android/Weblate XML format
https://github.com/WeblateOrg/weblate/issues/1886
https://github.com/WeblateOrg/weblate/issues/2333
2019-02-15 14:46:34 +01:00
Hans-Christoph Steiner
1587505389 Merge branch 'mirror-tweaks' into 'master'
mirror tweaks

Closes #1702

See merge request fdroid/fdroidclient!789
2019-02-15 13:24:09 +00:00
Hans-Christoph Steiner
251391f051 Merge branch 'fix-back-animation' into 'master'
fix activity transitions by limiting view rebinding

Closes #1636

See merge request fdroid/fdroidclient!781
2019-02-15 07:28:57 +00:00
Conny Duck
074f72f58a fix activity transitions by limiting view rebinding 2019-02-15 07:28:57 +00:00
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 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
Hans-Christoph Steiner
b264688385 Weblate 2018-12-25 23:05:19 +00:00
Hans-Christoph Steiner
e4537a4271 Merge branch 'clean-up-sdcard-swap' into 'master'
Clean up sdcard swap

See merge request fdroid/fdroidclient!775
2018-12-25 22:32:23 +00:00
Marcus
928042540f Merge branch 'fix_iconquery' into 'master'
Fix iconquery

Closes #1108

See merge request fdroid/fdroidclient!715
2018-12-23 11:06:16 +00:00
Peter Serwylo
da9eba94eb Remove unused parameter from app provider, after updating icon query 2018-12-22 19:39:03 +11:00
Peter Serwylo
d82023b943 Add test for loading app icons from correct repository 2018-12-22 19:34:23 +11:00
Hans-Christoph Steiner
7f9bfd38a1 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!774
2018-12-21 23:10:37 +00:00
Hans-Christoph Steiner
fc474ddf58 Weblate 2018-12-21 23:10:37 +00:00
Marcus Hoffmann
4595517aba AppProvider: fix IconUpdateQuery
The query was trying to figure out some thing about suggestedVercode
which shouldn't at all be necessary for setting the iconUrl.
The index already contains the icon pointing to the suggested version by
that repository, so we just take that regardless.
2018-12-22 09:40:16 +11:00
Marcus Hoffmann
43e5ab7eb2 fix typoes in comments 2018-12-22 09:40:16 +11:00
Hans-Christoph Steiner
0a306a4df2 after requesting Storage permissions, start SDCard scan 2018-12-21 23:06:10 +01:00
Hans-Christoph Steiner
c97424f054 show Toast when scanning an SDCard for repos 2018-12-21 23:06:04 +01:00
Hans-Christoph Steiner
43ee48ac2b only show "SDCards can be used to swap" if an SD Card is present 2018-12-21 23:05:24 +01:00
Hans-Christoph Steiner
20ebc00e5e improved log warning about TargetSdkVersion mismatch 2018-12-21 23:03:08 +01:00
Hans-Christoph Steiner
9c8c3380c1 Merge branch 'update-bottombar-translations' into 'master'
Update BottomBar translations

Closes #1569 and #887

See merge request fdroid/fdroidclient!773
2018-12-21 22:01:07 +00:00
Hans-Christoph Steiner
30c4a26145 Merge branch 'bottom-bar-overhaul' into 'master'
remove text animation from BottomBar so more text fits in the labels

Closes #1569

See merge request fdroid/fdroidclient!772
2018-12-21 21:57:06 +00:00
Hans-Christoph Steiner
4b30b42e16 add "Updates" translation to kn from Android strings 2018-12-21 17:16:28 +01:00
Hans-Christoph Steiner
0a4ee45083 sync up "Categories" translation with Android standard strings
fdroid/fdroidclient#1569
2018-12-21 17:16:25 +01:00
Hans-Christoph Steiner
3868b81587 sync up "Settings" translation with Android standard strings
fdroid/fdroidclient#1569

```python
import glob
import os
import re

locale_pat = re.compile(r'.*values-([a-z][a-z][a-zA-Z-]*)/strings.xml')
translation_pat = re.compile(r'.*name="settings_label"[^>]*>"?([^"<]*).*')
for f in glob.glob('/home/hans/code/android.googlesource.com/packages/apps/Settings/res/values-[a-z][a-z]*/strings.xml'):
    m = locale_pat.search(f)
    if m:
        locale = m.group(1)
        if locale.endswith('-nokeys'):
            continue
    #print(locale)
    with open(f) as fp:
        m = translation_pat.search(fp.read())
        if m:
            word = m.group(1)
            print(locale, '\t', word)
            fdroid = '/home/hans/code/fdroid/client/app/src/main/res/values-' + locale + '/strings.xml'
            if os.path.exists(fdroid):
                with open(fdroid) as fp:
                    data = fp.read()
                with open(fdroid, 'w') as fp:
                    fp.write(re.sub(r'menu_settings">[^<]+</string', 'menu_settings">' + word + '</string', data))
```
2018-12-21 17:07:41 +01:00
Hans-Christoph Steiner
c031f49ede sync up "Nearby" translation with Android standard strings
fdroid/fdroidclient#1569
fdroid/fdroidclient#887

```python
import glob
import os
import re

locale_pat = re.compile(r'.*values-([a-zA-Z-]*)/strings.xml')
translation_pat = re.compile(r'.*name="corpus_name_websearch_nearby">([^<]*).*')
for f in glob.glob('/tmp/Velvet/res/values-*/strings.xml'):
    m = locale_pat.search(f)
    if m:
        locale = m.group(1)
    with open(f) as fp:
        m = translation_pat.search(fp.read())
        if m:
            word = m.group(1)
            print(locale, '\t', word)
            fdroid = '/home/hans/code/fdroid/client/app/src/main/res/values-' + locale + '/strings.xml'
            if os.path.exists(fdroid):
                with open(fdroid) as fp:
                    data = fp.read()
                with open(fdroid, 'w') as fp:
                    fp.write(re.sub(r'main_menu__swap_nearby">[^<]+</string', 'main_menu__swap_nearby">' + word + '</string', data))
```
2018-12-21 17:07:40 +01:00
Hans-Christoph Steiner
38e0b8d29d update language to reflect "nearby" usage
closes #887
2018-12-21 17:07:40 +01: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
ae0c712a3e remove animation from BottomBar to make more text fit into labels
For many languages, there are unavoidable long words needed for the labels
on the button bar, for example, the standard word for Settings can be up to
15 characters long:
https://gitlab.com/fdroid/fdroidclient/issues/1569#note_126469088

The BottomBar was scaling the active one up, and sizing all the fields based
on that size.  This removes that animation, and sets all tabs to always have
the same text size.  That makes it possible to make the spacing tighter.
This also sets the text truncating mode to "middle" which sticks an elipsis
in the middle of the truncated word and shows the start and end.

closes #1569
closes !756
2018-12-21 14:27:57 +01:00
Hans-Christoph Steiner
59befbd355 use Android constants for common URI schemes
This makes the code easier to trace.
2018-12-21 14:27:57 +01:00
Hans-Christoph Steiner
d8e8cc82f1
version code 1005002 2018-12-21 00:25:56 +01:00
Hans-Christoph Steiner
8c5263c5c5 Merge branch 'use-repos-from-usb-and-sdcard' into 'master'
use repos from USB-OTG Drives and SDCards

Closes #1377 and #656

See merge request fdroid/fdroidclient!769
2018-12-20 23:25:01 +00:00
Hans-Christoph Steiner
f95af36140 allow repos on removable storage to work without any internet 2018-12-21 00:06:15 +01:00
Hans-Christoph Steiner
69e2ca4283 keep F-Droid visible after adding removeable storage mirror 2018-12-21 00:06:15 +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
90c3baf5af scanning WiFi/Bluetooth in android-23 requires location permission
This requires that admin#65 is fixed, otherwise every F-Droid update will
require Unknown Sources with Privileged Extension.

https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id
https://stackoverflow.com/a/44200390

closes #656
2018-12-21 00:06:13 +01:00
Hans-Christoph Steiner
1d1f489d85 handle repo Intents for mirrors that are already enabled
This adds a new IntentService to pre-process Intents that request a
new repo is added.  Right now, this only handles Intents that come
from the new storage scanners.

This also adds a new case to the AddRepo UI logic to cover when an
incoming Intent is for a mirror that is already included in an enabled
repo.  In that case, the user is show the Repo Details screen for the
repo that includes that mirror.  This is done is a hacky way right now
since the only path through is to click the button.  So this clicks
the button in code.
2018-12-21 00:04:34 +01:00
Hans-Christoph Steiner
c4b0955c96 add preference to disable removable storage scanning 2018-12-21 00:04:34 +01:00
Hans-Christoph Steiner
f9bc219073 SDCardScannerService for using repos from SD Cards
Creates an IntentService subclass for scanning removable "external
storage" for F-Droid package repos, e.g. SD Cards. This is intented to
support sharable package repos, so it ignores non-removable storage,
like the fake emulated sdcard from devices with only built-in storage.
This method will only ever allow for reading repos, never writing.  It
also will not work for removeable storage devices plugged in via USB,
since do not show up as "External Storage"

* https://stackoverflow.com/a/40201333
* https://commonsware.com/blog/2017/11/14/storage-situation-external-storage.html

closes #1377
2018-12-21 00:04:34 +01:00
Hans-Christoph Steiner
1571e28f68 support swapping with removable storage on android-21+
This uses the new Storage Access Framework, which was required for
accessing files on the SD Card starting in android-19.  But the API
was really limited until android-21, and not really complete until
android-23 or even android-26.  So the levels of usability will vary a
lot based on how new the version of Android is.
2018-12-21 00:03:39 +01:00
Hans-Christoph Steiner
ac1a5e0ad8 ensure the canonical repo URL is always included in mirrors list
The mirror logic assumes that it has a mirrors list with at least once
valid entry in it.  In the index format as defined by `fdroid update`,
there is always at least one valid URL: the canonical URL.  That also
means if there is only one item in the mirrors list, there are no
other URLs to try.

The initial state of the repos in the database also include the canonical
URL in the mirrors list so the mirror logic works on the first index
update.  That makes it possible to do the first index update via SD Card
or USB OTG drive.
2018-12-20 22:58:13 +01:00
ButterflyOfFire
9380a6fd0f Translated using Weblate (Kabyle)
Currently translated at 50.4% (211 of 419 strings)
2018-12-20 22:56:53 +01:00
C. Rüdinger
89ce8cb5a9 Translated using Weblate (German)
Currently translated at 99.8% (418 of 419 strings)
2018-12-20 22:56:53 +01:00
Ldm Public
d6eb7ece89 Translated using Weblate (French)
Currently translated at 100.0% (419 of 419 strings)
2018-12-20 22:52:45 +01:00
Verdulo
09ffe21969 Translated using Weblate (Esperanto)
Currently translated at 100.0% (419 of 419 strings)
2018-12-20 22:51:06 +01:00
Hans-Christoph Steiner
6a12fd011a Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!771
2018-12-20 21:48:37 +00:00
Hans-Christoph Steiner
2d2a36bab7 Weblate 2018-12-20 21:48:37 +00:00
Hans-Christoph Steiner
a24a98aaf2 script to run the steps for pulling translations from Weblate
Hopefully the need for this will go away soon, once we work with Weblate to
smooth out the workflow.

[skip ci]
2018-12-20 22:44:22 +01:00
Hans-Christoph Steiner
a2addd22a6 Merge branch 'fix-1326' into 'master'
display versionCode in expanded Versions list entries

Closes #1326

See merge request fdroid/fdroidclient!770
2018-12-20 21:41:16 +00:00
Hans-Christoph Steiner
f7049a3295 display versionCode in expanded Versions list entries
closes #1326
2018-12-20 13:14:18 +01:00
Hans-Christoph Steiner
fc27122dae Merge branch 'master' into 'master'
fix #1642

Closes #1642

See merge request fdroid/fdroidclient!768
2018-12-18 08:55:32 +00:00
dkanada
28863cf88f fix #1642 2018-12-18 08:55:32 +00:00
Hans-Christoph Steiner
083e3ead75 Merge branch 'class-renames' into 'master'
Class renames

See merge request fdroid/fdroidclient!767
2018-12-17 16:58:10 +00:00
Hans-Christoph Steiner
0e6b4acabf
rename RepoUpdater to IndexUpdater 2018-12-17 17:17:28 +01:00
Hans-Christoph Steiner
148d1cdc8a rename AppDetails2 to AppDetailsActivity
This also moves it into org.fdroid.fdroid.views
2018-12-17 17:16:51 +01:00
Hans-Christoph Steiner
9cddc0c990 Merge branch 'html' into 'master'
remove html method from changelog section

See merge request fdroid/fdroidclient!766
2018-12-13 18:17:46 +00:00
dkanada
2b512d96c5 remove html method from changelog section 2018-12-14 02:48:22 +09:00
Hans-Christoph Steiner
b0ee5b120c version code 1005001 2018-12-12 23:56:04 +01:00
Hans-Christoph Steiner
a589f53e30 update CHANGELOG 2018-12-12 23:56:04 +01:00
Hans-Christoph Steiner
f1a27c72ef Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!765
2018-12-12 22:55:02 +00:00
Hans-Christoph Steiner
b8dc569809 Weblate 2018-12-12 22:55:02 +00:00
Hans-Christoph Steiner
551b577bca Merge branch 'badge' into 'master'
use new design for other badge instances

See merge request fdroid/fdroidclient!754
2018-12-12 20:17:47 +00:00
Hans-Christoph Steiner
ea9697b48e Merge branch 'pr-1144' into 'master'
Improve error messages, prevent duplicate information display.

Closes #1144

See merge request fdroid/fdroidclient!764
2018-12-12 19:45:15 +00:00
darken
1ea4d0a330 Improve error messages, prevent duplicate information display.
Fixes #1144
2018-12-12 14:08:11 +01:00
dkanada
568ef56247 fix merge issues and tweak the header layouts a bit more 2018-12-09 16:37:18 +09:00
dkanada
85ed0d46ab string changes 2018-12-09 16:29:07 +09:00
dkanada
24a4da9d89 some layout modifications to Updates and AppDetails headers 2018-12-09 16:28:45 +09:00
Hans-Christoph Steiner
eb651c9996 Merge branch 'wording-fixes' into 'master'
Wording fixes

See merge request fdroid/fdroidclient!759
2018-12-06 18:33:48 +00:00
Jan-Christoph Borchardt
9dd64b8cbc Avoid addressing person with 'me' (when 'you' is used elsewhere)
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-12-06 18:01:08 +00:00
Jan-Christoph Borchardt
09a7ec3fd3 Change inconsistent 'Upgrade' to 'Update'
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-12-06 18:01:08 +00:00
Jan-Christoph Borchardt
5f660501e3 Change technical 'Run' to more understandable 'Open'
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-12-06 18:01:08 +00:00
Hans-Christoph Steiner
42934a6ec9 Merge branch 'index-v1.json-integer-sdk-version' into 'master'
switch all SDK version values to integers, as per definition

See merge request fdroid/fdroidclient!763
2018-12-06 16:35:43 +00: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
589a29386c Merge branch 'fix_apk_address' into 'master'
fix apk address

See merge request fdroid/fdroidclient!762
2018-11-20 09:24:30 +00:00
Danial Behzadi
a912c3ea3e fix apk address 2018-11-19 11:35:04 +03:30
dkanada
3f00b2a4fb standardize version properties 2018-10-27 05:27:01 +09:00
dkanada
fef3309714 slight changes to update header 2018-10-27 05:27:01 +09:00
dkanada
ce1756db62 use new design for other badge instances 2018-10-27 05:27:01 +09:00
Hans-Christoph Steiner
f6a7029fed version code 1005000 2018-10-19 15:30:02 +02:00
Hans-Christoph Steiner
04468d4576 update changelog 2018-10-19 15:29:18 +02:00
Hans-Christoph Steiner
071bca951e Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!758
2018-10-19 12:55:50 +00:00
Hans-Christoph Steiner
d191d10621 Weblate 2018-10-19 12:55:50 +00:00
Hans-Christoph Steiner
255fe37dc1 Merge branch 'jsonLoader' into 'master'
* jsonLoader: (28 commits)
  fix checkstyle complaints
  force DBHelperTest.canAddAdditionalRepos() to run on CI
  clean up whitespace in repo descriptions
  rename parseXmlRepos to parseAdditionalReposXml
  rename item lists to repoItems
  rename defaultReposFile to additionalReposFile
  separate defaultRepos from initialRepos, which includes additionalRepos
  rename REPO_XML_ARG_COUNT to REPO_XML_ITEM_COUNT
  fix additional_repos.xml handling to be properly parsed
  move comments to javadoc
  priority is NOT ignored, just additional_repos.xml is not allowed to set
  fix DBHelperTest to actually load and parse additional_repos.xml
  changed the tests: now testing only DBHelper.parseXmlRepos()
  removed stars from imports
  finished additional repos test
  some minor style changes
  minor style changes
  implemented creating xml file on oem partition; not sure whether it works cause gradle runs forever (>20min)
  started implementing test
  removed priority from additional_repos.xml
  ...

closes fdroid/fdroidclient!705
2018-10-19 13:40:48 +02: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
ec58141379 rename item lists to repoItems 2018-10-18 15:07:53 +02:00
Hans-Christoph Steiner
9f3a32d986 rename defaultReposFile to additionalReposFile 2018-10-18 15:07:53 +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
b9b7dab2c4 fix additional_repos.xml handling to be properly parsed
additional_repos.xml has 7 <item> elements per repo, while default_repos.xml
has 8.  The difference is that additional_repos.xml does not have the
"priority" <item> since it is not allowed to override anything that is set
in default_repos.xml.

see spec in !705
2018-10-18 15:07:53 +02:00
Hans-Christoph Steiner
7eb53518aa move comments to javadoc 2018-10-18 15:07:53 +02:00
Hans-Christoph Steiner
b529e10c4a priority is NOT ignored, just additional_repos.xml is not allowed to set 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
Dimitri Rusin
5a6d2df3ac removed stars from imports 2018-09-20 12:19:35 +00:00
Dimitri Rusin
dc19b11ae1 finished additional repos test 2018-09-17 13:54:15 +00:00
Dimitri Rusin
59d0f7d6be some minor style changes 2018-09-17 13:54:15 +00:00
Dimitri Rusin
324cb2998b minor style changes 2018-09-17 13:54:15 +00:00
Dimitri Rusin
27e0eaad9e implemented creating xml file on oem partition; not sure whether it works cause gradle runs forever (>20min) 2018-09-17 13:54:15 +00:00
Dimitri Rusin
895166e9db started implementing test 2018-09-17 13:54:15 +00:00
Dimitri Rusin
f5a5260e3e removed priority from additional_repos.xml 2018-09-17 13:54:15 +00:00
Dimitri Rusin
9e2882451f add internal repos after additional ones 2018-09-17 13:54:15 +00:00
Dimitri Rusin
3193b7f93a syntactic improvements, plus now prioritizes correctly 2018-09-17 13:54:15 +00:00
Dimitri Rusin
a96621c6ec renamed to additional_repos.xml, now collects them on all custom partitions 2018-09-17 13:54:15 +00:00
Dimitri Rusin
51135e5684 replaced json with xml 2018-09-17 13:54:15 +00:00
Dimitri Rusin
03507804b6 started implementing xml approach with priority checking 2018-09-17 13:54:15 +00:00
Dimitri Rusin
adc1c80b77 more syntax improvements 2018-09-17 13:54:15 +00:00
Dimitri Rusin
b150a01706 improved syntax 2018-09-17 13:54:15 +00:00
Dimitri Rusin
b17a40c215 now default repos from /oem are loaded every time ./databases cannot be found 2018-09-17 13:54:15 +00:00
Hans-Christoph Steiner
e500299c24 version code 1004050 2018-09-12 14:28:20 +02:00
Hans-Christoph Steiner
907dc03253 update changelog 2018-09-12 14:28:20 +02:00
Hans-Christoph Steiner
c56e5262d3 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!753
2018-09-12 12:27:56 +00:00
Hans-Christoph Steiner
d386183f1a Weblate 2018-09-12 12:27:56 +00:00
Hans-Christoph Steiner
4127e235e2 Merge branch 'little-fixes' into 'master'
two little UI fixes for the 1.4 release

See merge request fdroid/fdroidclient!752
2018-09-12 12:18:18 +00:00
Hans-Christoph Steiner
10b9dc7f1e include Android 9.0 (28) in the versions display 2018-09-12 13:47:22 +02:00
Hans-Christoph Steiner
d11c67ead5 fix Anti-Features list display in < android-24
Html.fromHtml() strips <li> and <ul> on Android 6.0 and older, but div works
2018-09-12 13:40:15 +02:00
Hans-Christoph Steiner
1c7e4aac29 Merge branch 'installed-version' into 'master'
Always display installed app version in the app version list

Closes #1572

See merge request fdroid/fdroidclient!749
2018-09-12 11:38:32 +00:00
wsdfhjxc
11e8a3e2b6 Always display installed app version in the app version list 2018-09-12 11:38:32 +00:00
Hans-Christoph Steiner
71e87043a2 Merge branch 'installed-apps' into 'master'
Refresh installed apps on a forced update

See merge request fdroid/fdroidclient!751
2018-09-12 11:36:07 +00:00
wsdfhjxc
f10e6f8afe Refresh installed apps after database purge on forced update 2018-09-11 16:14:05 +02:00
wsdfhjxc
66a7fd81bf Recreate installed app table on database purge 2018-09-11 16:14:05 +02:00
Hans-Christoph Steiner
2a9a3bddae Merge branch 'forced-update' into 'master'
Purge database only once after a forced update

Closes #1586

See merge request fdroid/fdroidclient!748
2018-09-11 08:42:51 +00:00
Hans-Christoph Steiner
ae136c8342 Merge branch 'archs' into 'master'
Display required arch also for compatible app versions

Closes #1589

See merge request fdroid/fdroidclient!750
2018-09-11 08:41:10 +00:00
wsdfhjxc
93efab2d12 Purge database only once after a forced update 2018-09-07 18:08:51 +02:00
wsdfhjxc
c937cbf297 Display required arch also for compatible app versions 2018-09-07 03:06:43 +02:00
Hans-Christoph Steiner
9ddd5bb1a7 Merge branch 'versions-fix' into 'master'
Differentiate app versions even if their version code is the same

See merge request fdroid/fdroidclient!747
2018-09-03 20:39:11 +00:00
wsdfhjxc
2bb49d7dde Differentiate app versions even if their version code is the same 2018-09-03 17:24:07 +02:00
wsdfhjxc
fe22a849ff Show downgrade button only when version code is smaller than installed 2018-09-03 17:16:53 +02:00
wsdfhjxc
62f1a60949 Use apkName to keep track of expanded version items 2018-09-03 17:14:36 +02:00
Hans-Christoph Steiner
dd56dc6bca Merge branch 'appbarlayout-workaround' into 'master'
Use a workaround for AppBarLayout bug to make app details screen responsive

See merge request fdroid/fdroidclient!745
2018-09-03 08:51:07 +00:00
wsdfhjxc
de837284ba Use a workaround for AppBarLayout bug to make app details screen responsive 2018-09-02 13:08:28 +02:00
Hans-Christoph Steiner
8b30179ac2 version code 1004001 2018-08-30 23:34:59 +02:00
Hans-Christoph Steiner
9fbc1d0d66 update ChangeLog 2018-08-30 23:34:59 +02:00
Ldm Public
d5738f19a2 Translated using Weblate (French)
Currently translated at 99.7% (420 of 421 strings)
2018-08-30 23:34:58 +02:00
Hans-Christoph Steiner
13c3781b7e Merge branch 'readme' into 'master'
readme: root install method is removed

See merge request fdroid/fdroidclient!744
2018-08-30 21:36:58 +00:00
Hans-Christoph Steiner
9e41200fb9 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!743
2018-08-30 20:50:03 +00:00
Hans-Christoph Steiner
385d337235 Weblate 2018-08-30 20:50:03 +00:00
Marcus Hoffmann
6ff3a422c4 readme: root install method is removed 2018-08-30 22:48:21 +02:00
Hans-Christoph Steiner
054bdb5cd4 Merge branch 'focusable' into 'master'
Add missing "focusable" attributes.

See merge request fdroid/fdroidclient!735
2018-08-30 20:33:20 +00:00
Hans-Christoph Steiner
c4265fe5cb Merge branch 'lintfix' into 'master'
Minor fixes for NonNull annotations and Javadoc

See merge request fdroid/fdroidclient!742
2018-08-30 20:09:30 +00:00
Hans-Christoph Steiner
070d9af9a8 Merge branch 'versions-overhaul' into 'master'
App version list overhaul

Closes #1564, #1327, #1525, #1333, and #1322

See merge request fdroid/fdroidclient!725
2018-08-30 20:07:31 +00:00
wsdfhjxc
3b711ea571 App version list overhaul 2018-08-30 20:07:31 +00:00
Reimar Döffinger
6b655b8c04 Minor JavaDoc fixes. 2018-08-30 19:14:14 +02:00
Reimar Döffinger
7e14bf4c10 Add @NonNull annotations to @Override methods. 2018-08-30 19:14:14 +02:00
Hans-Christoph Steiner
acefc4ca59 Merge branch 'header-image' into 'master'
Fix missing header image after scrolling down and scrolling up in app details

Closes #1540

See merge request fdroid/fdroidclient!731
2018-08-30 10:52:38 +00:00
Hans-Christoph Steiner
5701cfe34b Merge branch 'expert-mode-scroll' into 'master'
Keep "Expert mode" item at top of screen when revealing expert preferences

See merge request fdroid/fdroidclient!737
2018-08-30 10:08:15 +00:00
Hans-Christoph Steiner
037c6ec3f6 Merge branch 'about-forum' into 'master'
Replace e-mail address with forum link in "About F-Droid" screen

See merge request fdroid/fdroidclient!738
2018-08-30 10:06:21 +00:00
Hans-Christoph Steiner
6647bc465d Merge branch 'bottomnavupdate' into 'master'
Update bottom-navigation-bar version.

See merge request fdroid/fdroidclient!740
2018-08-30 09:58:52 +00:00
Hans-Christoph Steiner
766247c1d3 Merge branch 'app-null' into 'master'
Make checking app availability after external changes a little bit safer

Closes #1573

See merge request fdroid/fdroidclient!739
2018-08-28 13:59:39 +00:00
Reimar Döffinger
9eb6e3fc3e Update bottom-navigation-bar version.
It now supports keyboard/D-Pad navigation.
2018-08-26 19:27:03 +02:00
wsdfhjxc
37b310575a Make checking app availability after external changes a little bit safer 2018-08-25 13:02:45 +02:00
wsdfhjxc
834997c5cd Remove leftover translations 2018-08-22 16:02:05 +02:00
wsdfhjxc
9a1162c556 Replace e-mail address with forum link in "About F-Droid" screen 2018-08-22 15:29:57 +02:00
wsdfhjxc
e68de76185 Keep "Expert mode" item at top of screen when revealing expert preferences 2018-08-22 02:56:06 +02:00
Reimar Döffinger
da4c97c4c2 Add missing "focusable" attributes.
Fixes lint warnings and improves keyboard navigation
a little bit.
2018-08-20 13:25:07 +02:00
Hans-Christoph Steiner
6345195d41 version code 1004000 2018-08-17 16:36:33 +02:00
Hans-Christoph Steiner
a5ba847df3 update changelog 2018-08-17 16:36:33 +02:00
Hans-Christoph Steiner
c6904bcd74 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!734
2018-08-17 14:38:19 +00:00
Hans-Christoph Steiner
add211ff67 Weblate 2018-08-17 14:38:19 +00:00
Hans-Christoph Steiner
795dd0dbf7 Merge branch 'swap-and-installer-improvements' into 'master'
Swap and installer improvements

See merge request fdroid/fdroidclient!733
2018-08-17 14:05:20 +00:00
Hans-Christoph Steiner
efd577b36b add Share button to "Installed Apps" to export CSV list
refs #1484
2018-08-17 15:32:27 +02:00
Hans-Christoph Steiner
aead26f02c show "Open" button when media is installed and viewable
This checks if there is an app that can view the installed media file, and
if so, it shows an "Open" button where the "Run" button is for apps.
2018-08-17 15:32:27 +02:00
Hans-Christoph Steiner
9cfe8ef091 Merge branch 'index-downloads-from-mirrors' into 'master'
Index downloads from mirrors

See merge request fdroid/fdroidclient!730
2018-08-17 13:07:20 +00:00
Hans-Christoph Steiner
6b6ab02c9c bump to bouncycastle 1.60 2018-08-17 15:05:00 +02:00
Hans-Christoph Steiner
6db0fa6387 add clickable list of APKs to the swap HTML index page
This allows for rapid, direct download of APKs.  It is sometimes useful, as
long as it doesn't get in the way.
2018-08-17 15:05:00 +02:00
Hans-Christoph Steiner
ab8948eb5a fix "Send F-Droid via Bluetooth"
The 'com.mediatek.bluetooth' Bluetooth or android-23 devices were not
being granted URI permissions.
2018-08-17 15:05:00 +02:00
Hans-Christoph Steiner
9ea6afef33 Merge branch 'espresso-tests' into 'master'
enable Espresso tests with some basic UI tasks

See merge request fdroid/fdroidclient!718
2018-08-17 12:45:19 +00:00
Hans-Christoph Steiner
db5ac3bdfc stop throwing an exception in DBHelper.onDowngrade()
I missed this little detail ind64a55e013882a7d6b3de646955ed68647a82e97,
the super version of this throws an exception, so it stops the downgrade.

fdroid/fdroidclient!729
2018-08-17 14:33:50 +02:00
Hans-Christoph Steiner
c291b8f0f8 retry index downloads from mirrors when failing for a networking reason
f1f56abd0f4253d69ee91bccaf09ce3730a648a3
fdroid/fdroidclient!697
2018-08-17 14:33:50 +02:00
Hans-Christoph Steiner
e02a5987d2 make DownloaderService use urlString var names like rest of code 2018-08-17 14:33:50 +02:00
Hans-Christoph Steiner
20a1b4c83d standardize on "sha256" as the hash name, like fdroidserver uses
fdroidserver has always written "sha256" to the index.xml file, so client
should use the same.  The Java hashers will correctly respond to both
"sha256" and "SHA-256", and the only place that the hashType is read from
the DB and used is in the swap repo index.xml generation, where it should
also use "sha256".
2018-08-17 14:33:50 +02:00
Hans-Christoph Steiner
20c93c64d8 eliminate .views.fragments package used by a single class 2018-08-17 14:33:50 +02:00
Hans-Christoph Steiner
8ce08c5920 fully ignore Espresso tests until something works out with gitlab-ci 2018-08-17 14:15:23 +02:00
Hans-Christoph Steiner
0fb65f6921 gitlab-ci: dump complete logcat into artifacts zipball
Before, it was only including errors.
2018-08-17 12:04:19 +02:00
Hans-Christoph Steiner
558dde5f77 run Deflator.end() to get rid of StrictMode errors:
java.lang.Throwable: Explicit termination method 'end' not called
	at dalvik.system.CloseGuard.open(CloseGuard.java:180)
	at java.util.zip.Deflater.<init>(Deflater.java:171)
	at kellinwood.zipio.ZioEntryOutputStream.<init>(ZioEntryOutputStream.java:35)
	at kellinwood.zipio.ZioEntry.getOutputStream(ZioEntry.java:482)
	at kellinwood.security.zipsigner.ZipSigner.signZip(ZipSigner.java:759)
	at kellinwood.security.zipsigner.ZipSigner.signZip(ZipSigner.java:664)
	at org.fdroid.fdroid.localrepo.LocalRepoKeyStore.signZip(LocalRepoKeyStore.java:213)
	at org.fdroid.fdroid.localrepo.LocalRepoManager.writeIndexJar(LocalRepoManager.java:492)
	at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:759)
	at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:709)
	at android.os.AsyncTask$2.call(AsyncTask.java:304)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
	at java.lang.Thread.run(Thread.java:761)
E StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
2018-08-17 12:03:31 +02:00
Hans-Christoph Steiner
2ddf94a9f0 gitlab-ci: set emulator RAM to 75% of available host RAM 2018-08-17 12:03:31 +02:00
Hans-Christoph Steiner
e450569a69 espresso: do extra memory clean up to keep StrictMode happy
There were some occasional StrictMode errors about multiple instances of
MainActivity.  This cleanup idea comes from Google:

6f3a38f3af
2018-08-17 12:03:31 +02:00
Hans-Christoph Steiner
7493118a92 gitlab-ci: only run emulator tests for full flavor
The emulator runs are super crashy on gitlab-ci, so just run the emulator
tests for the "full" build flavor.  Once these prove stable, the task
should be switched to connectedCheck to test all the build flavors
2018-08-17 12:03:31 +02:00
Hans-Christoph Steiner
9d8232472f tests: dismiss dialogs in the emulator with back button before run
The ARM emulator can show ANRs for 'system' on boot, so that dialog needs
to be dismissed before the Espresso tests can happen.

https://android.googlesource.com/platform/frameworks/testing/+/master/uiautomator_test_libraries/src/com/android/uiautomator/common/UiWatchers.java
2018-08-17 12:03:30 +02:00
Hans-Christoph Steiner
990d05dc0f skip Espresso tests on ARM emulators
ARM emulators are too slow to run these tests in a useful way.  The
sad thing is that it would probably work if Android didn't put up the
ANR "Process system isn't responding" on boot each time.  There seems
to be no way to increase the ANR timeout.
2018-08-17 12:03:08 +02:00
Hans-Christoph Steiner
fd7acd6304 disable all animations in emulator for Espresso tests
* https://gist.github.com/xrigau/11284124
* https://gist.github.com/xrigau/ea8d306e0a751fafb1e6
* https://artemzin.com/blog/easiest-way-to-give-set_animation_scale-permission-for-your-ui-tests-on-android/
* https://github.com/finn-no/android_emulator_hacks
* https://gist.github.com/caipivara/9371a79a7222a156ddad
2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
2f038d81e0 error on NewApi/InlinedApi to catch compat issues with old devices 2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
897a35aa76 enable lint TrustAllX509TrustManager as error 2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
896d4a788f enable lint PackageManagerGetSignatures as error 2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
4a684182ca enable lint "GetInstance" security check as error 2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
0e6e839ed7 fix lint "WifiManager Potential Leak" 2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
e75a1a7005 remove test runner that was needed by Jenkins and Eclipse
Even the project's README says it is no longer needed:
https://github.com/jsankey/android-junit-report
2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
81b32120e9 fix UnusedResources errors left over from basic/full flavor split 2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
667197eeac remove old unused strings and translations
90acd75b90549d1cdc700672a6bb21cc1895f75a

fdroid/fdroidclient#928
2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
9bb7463863 remove obsolete RELEASE_CHECKLIST
See https://f-droid.org/docs/Release_Process/
2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
8fb43b29b2 misc lint fixes
fdroid/fdroidclient!543
2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
32296910df set @NotNull properly when overriding methods
fdroid/fdroidclient!543
2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
ae56d5c97c set some vars to final
fdroid/fdroidclient!543
2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
e5d25ae8d0 use StringBuilder when assembling the repo fingerprint for display
Should speed things up a bit, and fixes a lint issue.
2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
6f88dcdbf5 fix NewApi lint issue in InstallerService.uninstall
For whatever reason, this didn't seem to cause crashes on old devices. But
better safe than sorry.
2018-08-17 10:10:00 +02:00
Hans-Christoph Steiner
0e368c6d6e only disable lint in the basic flavor for UnusedResources
My hack before was actually always making exit with success, breaking the
CI runs :-/  I loathe gradle and groovy with a passion.
2018-08-17 10:09:59 +02:00
Hans-Christoph Steiner
3d05363c31 enable Espresso tests with some basic UI tasks 2018-08-17 10:09:59 +02:00
Hans-Christoph Steiner
8cae4da748 tests: fix running test suite in Android Studio
Sometimes the test suite just totally bombs out and fails on every single
job with the same Robolectric crash.  Adding this line seems to fix it.

https://github.com/robolectric/robolectric/issues/3846

Here's the error:
java.lang.VerifyError: class org.robolectric.android.fakes.RoboMonitoringInstrumentation overrides final method specifyDexMakerCacheProperty.()V
2018-08-17 10:09:59 +02:00
Hans-Christoph Steiner
15aaa12e25 gitlab-ci: run only a single pass on the tests
Before, it was running:

* testBasicDebugUnitTest
* testBasicReleaseUnitTest
* testFullDebugUnitTest

Since there are no Robolectric tests for only "basic", and there are no
tests specific to "release" or "debug", those three runs will be running
the same tests, except for the handful of "full" tests. So running
testFullDebugUnitTest covers all cases.
2018-08-17 10:09:59 +02:00
Hans-Christoph Steiner
e215c26517 tests: ensure all database usages are properly closed
Leaving lots of DB connections open seems to make OpenJDK crash a lot,
giving false fails for the CI tests.
2018-08-17 10:09:59 +02:00
Hans-Christoph Steiner
21b10f65c7 Merge branch 'whats-new' into 'master'
Prevent auto scrolling to "What's new" section in app details

See merge request fdroid/fdroidclient!732
2018-08-16 11:58:35 +00:00
wsdfhjxc
0af7c18750 Set focus on the header section if there's a changelog 2018-08-15 22:23:13 +02:00
wsdfhjxc
66530358b8 Don't use OverscrollLinearLayoutManager in AppDetails2 anymore 2018-08-15 02:56:53 +02:00
Hans-Christoph Steiner
10e275037b Merge branch 'little-db-fixes' into 'master'
Little db fixes

See merge request fdroid/fdroidclient!729
2018-08-08 07:28:30 +00:00
Hans-Christoph Steiner
d64a55e013 close the database after completing the test run 2018-08-08 00:00:20 +02:00
Hans-Christoph Steiner
2cf2fe5341 when downgrading, reset the database 2018-08-08 00:00:01 +02:00
Hans-Christoph Steiner
91c84a8588 version code 1003051 2018-08-07 23:33:33 +02:00
Hans-Christoph Steiner
8de89cc6dd update changelogs 2018-08-07 23:33:33 +02:00
Hans-Christoph Steiner
0d1a53863e ./tools/png-pre-compress to strip unneeded stuff 2018-08-07 23:33:33 +02:00
Hans-Christoph Steiner
fc65502ce4 make some LocalHTTPD tests require no Keep-Alive 2018-08-07 23:33:33 +02:00
Hans-Christoph Steiner
e3b26b76f6 make swap webserver never support HTTP Connection Keep-Alive
NanoHTTPD has issues with HTTP Keep-Alive, especially when other requests
are mixed in, like the /request-swap POST or perhaps the F-Droid HEAD to
fetch the ETag before the GET.

This disables gzip encoding and sets a Content Security Policy while I'm at
it.  APKs, PNGs, and JARs are already compressed, so gzip would only ever
cause problems.  And the index page is meant to be viewed by browsers, so
having a CSP will limit potential malicious swap activity.
2018-08-07 23:33:33 +02:00
Hans-Christoph Steiner
47929fa4b3 Merge branch 'master' into 'master'
bump to latest netcipher to fix TLSv1.3

Closes #1040

See merge request fdroid/fdroidclient!728
2018-08-07 18:55:25 +00:00
Hans-Christoph Steiner
03619dea3e Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!727
2018-08-07 16:24:00 +00:00
Hans-Christoph Steiner
b6c69f7548 Weblate 2018-08-07 16:24:00 +00:00
Hans-Christoph Steiner
2194dbd649 bump to latest netcipher to fix TLSv1.3, closes #1040 2018-08-07 17:21:38 +02:00
Hans-Christoph Steiner
73388ddf8c Merge branch 'make-swap-great-again' into 'master'
make swap great again ;-)

Closes #248

See merge request fdroid/fdroidclient!726
2018-08-07 13:41:15 +00:00
Hans-Christoph Steiner
738216c205 totally rework LocalHTTPD based on nanohttpd 2.3.1
The webserver was totally broken since nanohttpd had changed so much since
the swap webserver was implemented.  This syncs up with the sample file and
gets rid of our hacks.  The only differences now are the stuff that is
removed since it is totally unused in F-Droid.  This also adds a full test
suite.

this actually closes #248
2018-08-07 13:51:47 +02:00
Hans-Christoph Steiner
f1e5653601 hardcode limited MIME Types for the swap webserver
The MIME Types only need to be set on files that we are actually using to
display in the browser.  All others should not be set so that they cannot
be abused.
2018-08-07 11:28:48 +02:00
Hans-Christoph Steiner
e4c9d1d522 move requestSwap method to static Intent-sending method pattern 2018-08-07 11:28:48 +02:00
Hans-Christoph Steiner
ddb85befa6 index.xml must use "sha256" as hash type, not "SHA-256"
Otherwise the string matching in RepoXMLHandler.endElement() fails, and the
swap repo's index.xml will use "SHA-256" instead of the correct "sha256".
2018-08-07 11:28:48 +02:00
Hans-Christoph Steiner
f56fbf4dcb swap connections fail with strange errors with keep-alive enabled 2018-08-07 11:28:48 +02:00
Hans-Christoph Steiner
57a00938a0 fix broken index.jar signing for swap repos
Broken in the switch to bouncycastle: 5c6c54cadfa8511296b8f7374b113c4e26b7b3a4
2018-08-07 11:28:48 +02:00
Hans-Christoph Steiner
e0d6371147 use constants for index.xml and index.jar throughout the code 2018-08-07 11:28:48 +02:00
Hans-Christoph Steiner
e8ec045c55 Merge branch 'finalize-basic-flavor' into 'master'
add Latest view to basic flavor

Closes #48

See merge request fdroid/fdroidclient!723
2018-08-02 08:59:28 +00:00
Hans-Christoph Steiner
8ad951317a set basic flavor app name to "F-Droid Basic" 2018-07-31 16:20:31 +02:00
Hans-Christoph Steiner
cdf419d1fe set Basic to use auto-download by default
This will give us a nice testing ground for how this will work for the main
build flavor.

fdroid/fdroidclient#932
2018-07-31 16:20:07 +02:00
Hans-Christoph Steiner
49e1e0bf17 add separate, rough icon for F-Droid Basic 2018-07-31 16:09:45 +02:00
Hans-Christoph Steiner
af7b94ff4c add Latest view to basic flavor
This is a quick hack to reuse the Latest view with a slightly simpler
layout.  It makes the "basic" flavor fully functional as an fdroid client.
The goal here is just to have something simpler with as little new code as
possible.  It is essential that the whitelabeling and "Light" aka "basic"
flavor does not increase the maintenance load.

closes fdroid/fdroidclient#48
fdroid/fdroidclient!692
fdroid/fdroidclient!695
2018-07-31 15:06:09 +02:00
Hans-Christoph Steiner
8e0c355534 version code 1003050 2018-07-31 14:40:32 +02:00
Hans-Christoph Steiner
a0bc2335ef update changelog 2018-07-31 14:40:32 +02:00
Hans-Christoph Steiner
6c6e3ad82d Merge branch 'finalize-1.3' into 'master'
Finalize 1.3

Closes #1438, #1533, and #1527

See merge request fdroid/fdroidclient!721
2018-07-31 11:11:12 +00:00
Hans-Christoph Steiner
8f393d9f43 hide "Include touchscreen apps" pref on devices with touchscreen
closes fdroid/fdroidclient#1438
2018-07-31 12:19:07 +02:00
Hans-Christoph Steiner
3a501c9eac show PendingInstall and Installing in the Updates tab 2018-07-30 18:03:45 +02:00
Hans-Christoph Steiner
fe37695751 show "Anti-features" in list view when app is filtered
closes fdroid/fdroidclient#1533
2018-07-30 18:03:45 +02:00
Hans-Christoph Steiner
90acd75b90 purge broken, semi-used root filtering preference
RequiresRoot should become an Anti-Feature or <uses-feature> or
something like that. Having it a one-off makes it too brittle

fdroid/fdroidclient#928
2018-07-30 18:03:12 +02:00
Hans-Christoph Steiner
109a927a68 show downloading header on Downloading/PendingInstall status
PendingInstall means that the user considers the install still in process,
like when F-Droid gets killed in the background.  There is unfortunately no
reliable way currently to ensure that removePendingInstall() is called when
the app is finally installed so we can't use it here.

This reverts a small part of 1c50e2891054b629e2af6b2d0b1fc89e0b1cf18b

closes fdroid/fdroidclient#1527
fdroid/fdroidclient#1532
2018-07-30 18:02:03 +02:00
Hans-Christoph Steiner
8f8aa44f43 simplify reseting package when coming to App Details screen 2018-07-30 18:02:03 +02:00
Hans-Christoph Steiner
395efa2e3f mark app as installed only after F-Droid has processed the installed APK
InstalledAppProviderService also updates the AppUpdateStatus of any
package installs that are still in progress.  Most importantly, this
provides the final status update to mark the end of the installation
process.  It also errors out installation processes where some outside
factor uninstalled the package while the F-Droid process was underway, e.g.
uninstalling via adb, updates via Google Play, Yalp, etc.

fdroid/fdroidclient#1536
fdroid/fdroidclient#1357
2018-07-30 18:02:03 +02:00
Hans-Christoph Steiner
7d808b6e73 prevent Update button in Updates tab from being clicked multiple times
fdroid/fdroidclient#1357
2018-07-30 18:02:03 +02:00
Hans-Christoph Steiner
a2361df854 hide "Update All" button once clicked to prevent repeated clicks
fdroid/fdroidclient#1357
2018-07-30 18:02:03 +02:00
Hans-Christoph Steiner
e49d8c92df remove unused eu.chainfire:libsuperuser library
I forgot to remove this in ab767ce621b92c5aa82c16e1edfd0aa724293391

fdroid/fdroidclient#982
2018-07-30 18:02:03 +02:00
Markel Cuesta Manciles
d4ebed134d Translated using Weblate (Spanish)
Currently translated at 99.3% (432 of 435 strings)
2018-07-30 17:28:56 +02:00
Omar Aglan
fb98c75210 Translated using Weblate (Arabic)
Currently translated at 99.7% (434 of 435 strings)
2018-07-30 17:28:51 +02:00
Hans-Christoph Steiner
6184bf6813 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!720
2018-07-30 12:29:50 +00:00
Hans-Christoph Steiner
9cd3d81783 Weblate 2018-07-30 12:29:50 +00:00
Hans-Christoph Steiner
94e87d83c5 version code 1003005 2018-07-21 00:52:13 +02:00
Hans-Christoph Steiner
2aa72ff2ac update CHANGELOG 2018-07-21 00:52:13 +02:00
Hans-Christoph Steiner
6876088ede Merge branch 'big-install-process-event-overhaul' into 'master'
Big install process event overhaul

Closes #1357

See merge request fdroid/fdroidclient!717
2018-07-20 22:55:23 +00:00
Hans-Christoph Steiner
01280d65a5 show different inline button when installing app
This could definitely use a better design treatment, but at least it is
better than showing the "click to install" button again during the install
process.

closes #1357
2018-07-21 00:49:53 +02:00
Hans-Christoph Steiner
5e75bc060c remove unneeded method, it is only called once by the method above 2018-07-21 00:49:53 +02:00
Hans-Christoph Steiner
8feb735140 disable inline install/progress button when active
refs #1357
2018-07-21 00:49:53 +02:00
Hans-Christoph Steiner
1c50e28910 use new PendingInstall mechanism to control AppDetails buttons
This should hopefully give more reliable display/hiding of the buttons.

refs #1357
2018-07-21 00:49:53 +02:00
Hans-Christoph Steiner
bda755584f Merge branch 'whitelabel-privileged-extension' into 'master'
support whitelabeled Privileged Extension

Closes #982

See merge request fdroid/fdroidclient!716
2018-07-20 22:09:21 +00:00
Hans-Christoph Steiner
d1cbbe72d7 when canceling download, delay removeApk() until its no longer needed
This was deleting the Apk from appMapping too fast, so the later status
updates couldn't be sent.
2018-07-21 00:07:54 +02:00
Hans-Christoph Steiner
2ff47ed5c3 remove unneeded startInstall() method to make tracing easier
Now tracing where .queue() is used is more direct.
2018-07-21 00:07:54 +02:00
Hans-Christoph Steiner
4bf1a4fa2b App Details: do not show cancel X on installing/uninstalling
It is not possible to cancel these, so do not show the X button.  This is a
hacky way to do it, but I couldn't see another way.
2018-07-21 00:07:54 +02:00
Hans-Christoph Steiner
a1edfdfc8d PendingInstall event for announcing start of process
This adds a new PendingInstall event which broadcasts that an install
process has started, but the state of it is not yet known, like
whether it needs to be downloaded still, or is ready to install.  It
marks the very first step of the whole InstallManagerService process.

Installer events should only be directly related to the install process as
managed by the Installer set of classes.  The newer AppStatusUpdate stuff
now tracks the whole lifecycle of the process.

This mostly reverts f0d6acd974548e24662a64271ae57922f74c3225 since there is
now the overarching concept of "Pending Install" to mark packages that are
somewhere in the whole process.

refs #828
refs #1357
2018-07-21 00:07:54 +02:00
Hans-Christoph Steiner
ab767ce621 purge deprecated, broken ExtensionInstaller, only works < android-20
This code is unmaintained, semi-broken, and only works on old Android
versions.  Time to go!

closes #982
2018-07-20 14:18:57 +02:00
Hans-Christoph Steiner
b75fc8e011 let whitelabel builds set custom Privileged Extension
For fullstack custom builds, they'll also need a whitelabel build of
Privileged Extension, which will have a different Application ID and
signing key than F-Droid Privileged Extension.
2018-07-20 13:54:07 +02:00
Hans-Christoph Steiner
e374a3da5a Merge branch 'first-run-index-update' into 'master'
First run index update

See merge request fdroid/fdroidclient!714
2018-07-20 11:23:22 +00:00
Hans-Christoph Steiner
25016fdb2f gitlab-ci: switch to 24 emulator to get some useful results
The emulator support seems to have totally melted down, so this is a step
back towards the old working setup.
2018-07-20 12:27:04 +02:00
Hans-Christoph Steiner
2040d885f2 do not show Data/WiFi Settings Toast if device has no internet
Before, if the Data/WiFi Settings made it so the update process is not
allowed to run and the device was not offline or in Airplane Mode, it would
show this Toast then it would show the "your device is offline" Toast.
2018-07-20 10:43:34 +02:00
Hans-Christoph Steiner
34c788681b ensure single progressbar is shown while doing first index update 2018-07-20 10:43:34 +02:00
Hans-Christoph Steiner
339afa1e72 show indeterminite progress if doing initial index update
#509
2018-07-19 16:35:29 +02:00
Hans-Christoph Steiner
048d5531be only first trigger initial repo update if it is not already happening
I was seeing double index updates on first start.
2018-07-19 16:35:29 +02:00
Hans-Christoph Steiner
0d386b824f merges triedEmptyUpdate and lastUpdateCheck prefs into one useful one
This merges the triedEmptyUpdate preference into the lastUpdateCheck pref,
and uses that to determine whether the index update has ever run.  It seems
that lastUpdateCheck used to be used for that, but was semi-disabled. Then
triedEmptyUpdate was added. This merges the two into lastUpdateCheck, which
also tracks the timestamp of the last index update.
2018-07-19 16:34:14 +02:00
Hans-Christoph Steiner
e44ca193dd save result of Preferences.get() to speed up start up times
The initial start time is getting pretty slow, so hopefully this will save
a little bit.  It also makes it consistent with other places in the code,
like UpdateService.
2018-07-19 16:34:14 +02:00
Hans-Christoph Steiner
8503a625b5 show toast if user tries to update, but Data/WiFi settings disallow it 2018-07-19 16:34:14 +02:00
Hans-Christoph Steiner
ac7916298a Merge branch 'ever-more-bug-fixes' into 'master'
Ever more bug fixes

Closes #1262, #1484, #1224, #70, and #1448

See merge request fdroid/fdroidclient!713
2018-07-19 13:50:52 +00:00
Hans-Christoph Steiner
1cb9754545 only show "Install History" Setting when it is actually enabled 2018-07-18 10:57:56 +02:00
Hans-Christoph Steiner
1771f2ce9f show repo title on certificate error toast messages
closes #1262
2018-07-18 10:57:56 +02:00
Hans-Christoph Steiner
36c0505115 add Share button to install history viewer
closes #1484
closes #1224
closes #70
2018-07-18 10:57:56 +02:00
Hans-Christoph Steiner
0b3e52a924 don't crash when manually adding a repo by typing it in
closes #1448
fdroid/fdroidclient!664
c83c8301e6ccca7ee408c7b4b898e81f6c23e222
2018-07-18 10:57:56 +02:00
Hans-Christoph Steiner
e05e306006 version code 1003004 2018-07-13 23:47:52 +02:00
Hans-Christoph Steiner
ca42217217 update CHANGELOG 2018-07-13 23:47:52 +02:00
Hans-Christoph Steiner
9d398746fa Merge branch 'data-wifi-update-schedule' into 'master'
data/wifi update scheduling

Closes #1474, #1451, and #1457

See merge request fdroid/fdroidclient!711
2018-07-13 21:41:12 +00:00
Hans-Christoph Steiner
42424ad902 Merge branch 'sort-out-install-uninstall-events' into 'master'
Sort out install uninstall events

Closes #1311, #1031, #1271, #1435, and #1145

See merge request fdroid/fdroidclient!710
2018-07-13 16:14:19 +00:00
Hans-Christoph Steiner
277cd3c992 rework UpdateService scheduling to work with data/interval prefs
This was doing a couple of things wrong:

* the scheduled job should always require a network, NONE doesn't work
* when the preferences change, it should cancel any scheduled job first,
  so that if the user chooses to disable auto-updates, that takes effect

closes #1474
closes #1451
closes #1457
2018-07-13 18:13:03 +02:00
Hans-Christoph Steiner
01abcc2f4d basic onStopJob() method for UpdateJobService
If the scheduler decides it should cancel a job, this will attempt to shut
down UpdateService.
2018-07-13 18:10:18 +02:00
Hans-Christoph Steiner
a912eebe5b stop all updates when "Over Data" and "Over WiFi" are both disabled
fdroid/fdroidclient#1457
fdroid/fdroidclient#1451
2018-07-13 18:10:18 +02:00
Balázs Úr
a12425cb92 Translated using Weblate (Hungarian)
Currently translated at 100,0% (432 of 432 strings)
2018-07-13 15:46:48 +02:00
YFdyh000
f7986073a8 Translated using Weblate (Chinese (Simplified))
Currently translated at 97.9% (423 of 432 strings)
2018-07-13 15:46:48 +02:00
Hans-Christoph Steiner
6996bb6968 rename InstallManagerService Receivers for clarity and consistency 2018-07-13 13:34:15 +02:00
Hans-Christoph Steiner
0952f3ba71 track pending installs from first request to confirmed install
This changes the logic to only use a SharedPreference to track pending
installs, and to set the "pending install" mark as soon as possible
while waiting until final confirmation to unmark.  Before, there was a
complicated combination of a SharedPreference and the use of the APK in the
cache as a mark.

!488
refs #962
closes #1311
closes #1031
closes #1271
2018-07-13 13:34:15 +02:00
Hans-Christoph Steiner
862e985cc4 the current app is not always available when requesting uninstall
Since there are many ways to uninstall an app, including from Google
Play, {@code adb uninstall}, or Settings -> Apps, this method cannot
ever be sure that the app isn't already being uninstalled.  So it
needs to check that we can actually get info on the installed app,
otherwise, just call it interrupted and quit.

closes #1435
2018-07-13 13:34:15 +02:00
Hans-Christoph Steiner
be560f7179 show indeterminate progress when installing and uninstalling
This should make the buttons in AppDetails show the realistic state a lot
better.

closes #1145
refs #1357
2018-07-13 13:34:15 +02:00
Hans-Christoph Steiner
6c66697762 send ACTION_UNINSTALL_STARTED before any work has started
This needs to be broadcast as soon as possible so the UI can change to lock
out the user from doing conflicting actions.

refs #1357
2018-07-13 13:34:15 +02:00
Hans-Christoph Steiner
ab8f405dd2 Revert "add adaptive icon"
This reverts commit 3034afedeb81ab77ded807b66f06eea6cfab3b2c.

It still needs some work, see fdroid/fdroidclient#1298
fdroid/fdroidclient!680
2018-07-13 13:33:57 +02:00
Hans-Christoph Steiner
955edb49cd Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!709
2018-07-13 11:34:24 +00:00
Hans-Christoph Steiner
d74e63c784 Weblate 2018-07-13 11:34:24 +00:00
Hans-Christoph Steiner
35a2ec5687 Merge branch '1.3-release-polish' into 'master'
1.3 release polish

Closes #1450, #1502, #1434, and #871

See merge request fdroid/fdroidclient!708
2018-07-12 22:00:23 +00:00
Hans-Christoph Steiner
c7dcb92a20 make SeekBarPreference format summary text in a standard way
I fixed it by using the same style as a standard preference:
* the summary text size was a bit too large
* the summary text should be allowed to wrap

closes #1450
2018-07-12 17:52:16 +02:00
Hans-Christoph Steiner
54a080f7f7 only scroll to bottom of Setting when toggling Expert Mode
closes #1502
2018-07-12 17:35:50 +02:00
Hans-Christoph Steiner
edb9fcd044 do not crash on mystery last second null IP addresses, closes #1434
java.lang.IllegalArgumentException: Could not parse [null/24]
 at org.apache.commons.net.util.SubnetUtils.calculate(SubnetUtils.java:275)
 at org.apache.commons.net.util.SubnetUtils.<init>(SubnetUtils.java:51)
 at org.fdroid.fdroid.net.WifiStateChangeService.setIpInfoFromNetworkInterface(WifiStateChangeService.java:261)
 at org.fdroid.fdroid.net.WifiStateChangeService.access$100(WifiStateChangeService.java:50)
 at org.fdroid.fdroid.net.WifiStateChangeService$WifiInfoThread.run(WifiStateChangeService.java:132)
2018-07-12 17:34:24 +02:00
Hans-Christoph Steiner
5295b6f0d1 rename FAB id to make it easier to find 2018-07-12 17:34:24 +02:00
Hans-Christoph Steiner
6bcc1f2e68 fix crasher caused by wrong init
Also, app.installedApk.sig is set in App.initInstalledApk()
from 3a5ecc5e8ec6c820dbfdb788dc06f7dbb0699c18

refs #1305
refs #855

java.lang.NullPointerException
at org.fdroid.fdroid.data.App.getInstance(App.java:390)
at org.fdroid.fdroid.localrepo.CacheSwapAppsService.onHandleIntent(CacheSwapAppsService.java:77)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
2018-07-12 17:34:23 +02:00
Hans-Christoph Steiner
11c28bff2c use nearby icon in Nearby/Swap notification
closes #871
2018-07-12 17:34:23 +02:00
Hans-Christoph Steiner
4ff6afad1b Merge branch 'push-request-polish' into 'master'
push request polish

See merge request fdroid/fdroidclient!707
2018-07-12 15:27:10 +00:00
Hans-Christoph Steiner
02f10ea632 Merge branch 'three-randos' into 'master'
Three random low risk commits for 1.3

See merge request fdroid/fdroidclient!706
2018-07-12 10:15:41 +00:00
Hans-Christoph Steiner
c2d9749105 add Expert Pref to enable Push Requests
Since !705 will allow OEMs, ROM makers, etc. to add repos, there needs to
be a way for the user to prevent those from automatically installing or
uninstalling apps for users of the full F-Droid app, which guarantees user
control.
2018-07-11 16:05:53 +02:00
Hans-Christoph Steiner
1fe0d8f4b7 only process Repo Push Requests from IndexV1 if they are enabled 2018-07-11 16:05:53 +02:00
Hans-Christoph Steiner
d9781d735c ban internal Repo vars from being set by the index JSON
These things should never be settable from the server.
2018-07-11 16:05:53 +02:00
Hans-Christoph Steiner
5b11898ba3 improve debug message when Apk is missing NAME and/or REPO_ADDRESS 2018-07-11 15:58:42 +02:00
Hans-Christoph Steiner
61a452e7cd add new Anti-Feature: NoSourceSince
* https://f-droid.org/wiki/page/Antifeature:NoSourceSince
* fdroidserver!529
* fdroidserver#508
2018-07-11 15:58:42 +02:00
Hans-Christoph Steiner
0d1cdf84f9 stop all F-Droid services when hiding by querying for list
No need to list them out manually, it is easy to get the list of what is
actually registered for this app.
!629
2018-07-11 15:58:42 +02:00
Hans-Christoph Steiner
bfb67061b2 Merge branch 'share-repo-url' into 'master'
add share button to repo details activity, for sharing repo urls

See merge request fdroid/fdroidclient!696
2018-06-28 18:40:08 +00:00
Michael Pöhn
6f7a8db019 fix share repo dialog text 2018-06-28 16:15:57 +02:00
Michael Pöhn
4cdbee7d3b repo activity: move delete button to end of options menu 2018-06-28 16:15:57 +02:00
Michael Pöhn
c2fce47975 add share button to repo details activity, for sharing repo urls 2018-06-28 16:15:56 +02:00
Hans-Christoph Steiner
1bd4f9f4e7 bump to version code 1003003 2018-06-27 23:22:03 +02:00
Hans-Christoph Steiner
aa87a02584 update CHANGELOG 2018-06-27 23:21:23 +02:00
Hans-Christoph Steiner
56cbcd386c Merge branch 'final-whitelabel-features' into 'master'
final whitelabel features

See merge request fdroid/fdroidclient!695
2018-06-27 20:25:32 +00:00
Hans-Christoph Steiner
bae8d2718e Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!702
2018-06-27 19:51:52 +00:00
Hans-Christoph Steiner
40e6437602 Weblate 2018-06-27 19:51:52 +00:00
Hans-Christoph Steiner
f17b5061fd Merge branch 'adaptive-icon' into 'master'
add adaptive icon

Closes #1298

See merge request fdroid/fdroidclient!680
2018-06-27 18:55:09 +00:00
Hans-Christoph Steiner
c9241ae720 Merge branch 'key-fixes-for-todays-alpha' into 'master'
Key fixes for todays alpha

See merge request fdroid/fdroidclient!701
2018-06-27 18:48:05 +00:00
Hans-Christoph Steiner
7043627a3a basic Install History viewer, available only when logging is enabled
This provides a super simple way to view the install history directly in
F-Droid.
2018-06-27 20:45:27 +02:00
Hans-Christoph Steiner
460720c7f3 allow user to disable ACRA entirely with a preference
ACRA is sometimes problematic or annoying.  Also, whitelabel versions might
want to disable ACRA.  The setting the preference defaultValue is an easy
way to do that.

refs #1483
2018-06-27 20:45:27 +02:00
Hans-Christoph Steiner
b1c3d64748 add expert option to send debug version/UUID on each HTTP download
When debugging issues, tracking the client can be quite useful.  This makes
an "Expert" preference that adds the app version and a randomly generated,
stored UUID to the query string each time it downloads an index or an app
package.

This is also useful in whitelabeling, for use cases where there needs to be
some kind of identifier to make it work.
2018-06-27 20:45:27 +02:00
Hans-Christoph Steiner
d57b00ab7d Merge branch 'master' into 'master'
Highlight Install status below app version

See merge request fdroid/fdroidclient!700
2018-06-27 15:29:21 +00:00
Hans-Christoph Steiner
2c5fe8ffbe purge redundant system_install_* strings 2018-06-27 17:16:49 +02:00
Hans-Christoph Steiner
519101a8a4 prevent crash loop after rapid install/uninstall cycling
If you quickly cycle between installing an app and uninstalling it, then
`app.installedApk` will still be null when AppDetails2.startUninstall()
calls InstallerService.uninstall().  It is better to crash earlier here,
before the Intent is sent with a null APK, because InstallerService is set
to receive Sticky Intents.  That means they will automatically be resent
by the system until they successfully complete.
2018-06-27 17:16:30 +02:00
Hans-Christoph Steiner
ea166fbc81 "Privileged Extension" pref requires special defaults handling
Fix privileged installer mode, broken by 5ffec23b2f3d367e8e04.  See the
javadoc string for Preferences.isPrivilegedInstallerEnabled() for more info
2018-06-27 17:16:30 +02:00
Hans-Christoph Steiner
74cfbb9658 gitlab-ci: only run deploy_nightly if DEBUG_KEYSTORE is set 2018-06-27 17:16:30 +02:00
Hans-Christoph Steiner
6cb54e8821 gitlab-ci: name job using all key components: test_lint_pmd_checkstyle 2018-06-27 17:16:30 +02:00
Umang
4d9f3ffa29 Highlight Installed App version 2018-06-27 18:27:13 +05:30
Hans-Christoph Steiner
2e802fc6e4 version code 1003002 2018-06-25 22:55:33 +02:00
Hans-Christoph Steiner
8d62f2a27a update CHANGELOG 2018-06-25 22:55:33 +02:00
Hans-Christoph Steiner
6a3de3aab4 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!699
2018-06-25 20:46:18 +00:00
Hans-Christoph Steiner
9ed2539ea5 Weblate 2018-06-25 20:46:18 +00:00
Hans-Christoph Steiner
407e545a24 Merge branch 'notification-preferences' into 'master'
notification preferences

See merge request fdroid/fdroidclient!698
2018-06-25 20:44:09 +00:00
Hans-Christoph Steiner
4292832736 show Updating progress notification based on "available updates" pref
The notification that shows the download/parse progress of the index update
is now controled by the "Show available updates" preference.  That means it
will not be shown at all in the notifications bar if that preference is
disabled.  There will still be the header inside of F-Droid.  Ideally, the
Updating process would be shown in the Updates tab.
2018-06-25 21:22:12 +02:00
Hans-Christoph Steiner
d8d043125b add expert preference to disable all notifications
This preference is meant for whitelabel builds that are meant to be
entirely controlled by the server, without user interaction, e.g.
"appliances".  Some users have asked for such a thing, so it makes sense to
have it available as an expert preference.  In general, we want to ensure
that installs/updates always show a notification so that the user is aware
of what is being installed on their computers.  That is the same policy as
other app stores like Google Play, etc.
2018-06-25 21:22:07 +02:00
Hans-Christoph Steiner
5771908f90 make Expert preference show/hide all the expert preferences
This should make them less scary to people who do not want to see them at
all.  It also means that there can be quite a few expert preferences without
making the list super long for most users.
2018-06-25 21:11:00 +02:00
Hans-Christoph Steiner
654d2ca40e Merge branch 'whitelabel-overhaul' into 'master'
whitelabel overhaul

See merge request fdroid/fdroidclient!692
2018-06-25 18:48:18 +00:00
Hans-Christoph Steiner
9e2800a9b9 Merge branch 'fix-up-mirrors' into 'master'
Fix up mirrors

See merge request fdroid/fdroidclient!697
2018-06-25 15:32:54 +00:00
Hans-Christoph Steiner
f1f56abd0f try the next mirror on any network/HTTP/SSL errors
This labels all network, HTTP, and SSL related errors as CONNECTION_FAILED
so that the mirror selection logic will try the connection again with a new
mirror.
2018-06-25 11:58:21 +02:00
Hans-Christoph Steiner
06e922a35e when adding new repos via Intents, clean out Activities from the Task 2018-06-25 11:58:19 +02:00
Hans-Christoph Steiner
1a7c73064f fix off-by-one error when adding user mirrors to an existing repo 2018-06-25 11:58:15 +02:00
Hans-Christoph Steiner
654c5313de reorder gradle "android" sub-blocks in standard order
https://developer.android.com/studio/build/build-variants
2018-06-18 16:46:26 +02:00
Hans-Christoph Steiner
91b070675d mark old "cacheDownloaded" pref as deprecated 2018-06-18 16:46:26 +02:00
Hans-Christoph Steiner
5ffec23b2f set default values of preferences only in preferences.xml
This removes a layer of redundancy where there were defaults set in the
Preferences class, as well as in preferences.xml.  This makes it possible
for whitelabel versions to change the default values of the preferences by
changing it only in preferences.xml.
2018-06-18 16:46:26 +02:00
Hans-Christoph Steiner
a5d642911d move all main preference handling to Preferences class 2018-06-18 16:46:26 +02:00
Hans-Christoph Steiner
74a2b25dfc dynamically assign menu items to bottom nav tabs
This loads menu/main_activity_screens.xml and stores the item IDs as the
positions for the bottom nav tabs.
2018-06-18 16:46:26 +02:00
Hans-Christoph Steiner
c87f6a64f9 get "basic" flavor building and running 2018-06-18 16:46:26 +02:00
Hans-Christoph Steiner
ea80704598 split up everything into 'full' and 'basic' build flavor
"full" is the original F-Droid app with all the features.  It should still
build the exact same app after this change.  "basic" is the smallest
version of F-Droid possible.  It does not yet build, nor work.
2018-06-15 23:27:03 +02:00
Hans-Christoph Steiner
90748a3685 version code 1003001 2018-06-15 22:55:33 +02:00
Hans-Christoph Steiner
f159432bf1 update CHANGELOG 2018-06-15 22:54:49 +02:00
Hans-Christoph Steiner
7f314d7781 gitlab-ci: default emulator test to F-Droid image
This also only runs one emulator test by default, then runs 3 SDK
levels for final commits.  The single default test is the optimized
F-Droid system image included in the Docker image.
2018-06-15 18:27:20 +02:00
Hans-Christoph Steiner
9e4e435ae5 use latest constraint-layout bugfix version 2018-06-15 14:06:47 +02:00
Hans-Christoph Steiner
71e190ad2b Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!694
2018-06-15 12:10:02 +00:00
Hans-Christoph Steiner
0f4caf79b8 Weblate 2018-06-15 12:10:02 +00:00
Hans-Christoph Steiner
40d80bd41f Merge 'fdroidclient-seekbar3' into 'master'
* ByteHamster/fdroidclient-seekbar3:
  fix pmd "Overriding method merely calls super"
  Code style improvements
  Explain null value
  Make checkstyle happy
  Display disabled state
  Updated seekbar appearance

fdroid/fdroidclient!693
2018-06-15 13:52:36 +02:00
Hans-Christoph Steiner
55c2cbf9c2 fix pmd "Overriding method merely calls super" 2018-06-15 13:47:02 +02:00
Hans-Christoph Steiner
0d5d071eac remove redundant calls to String.format()
getString() can do formats itself.
2018-06-15 13:27:05 +02:00
ByteHamster
6b0653a488 Code style improvements 2018-06-14 22:48:04 +02:00
ByteHamster
14d80cf1c9 Explain null value 2018-06-14 17:50:13 +02:00
ByteHamster
5aca70c786 Make checkstyle happy 2018-06-14 17:44:59 +02:00
ByteHamster
53894db911 Display disabled state 2018-06-14 16:16:31 +02:00
ByteHamster
1f4b6e483a Updated seekbar appearance 2018-06-14 16:13:34 +02:00
Hans-Christoph Steiner
a8af84ecbc Merge branch 'master' into 'master'
nightly/test build tweaks

See merge request fdroid/fdroidclient!691
2018-06-13 12:54:23 +00:00
Hans-Christoph Steiner
b13394fdb0 run all Robolectric tests against the target SDK 2018-06-13 13:55:06 +02:00
Hans-Christoph Steiner
ab87755b20 set versionCode for nightly builds only in gitlab-ci
Having dynamic build config variables breaks instant APK updates:
https://developer.android.com/studio/build/optimize-your-build#use_static_build_properties
2018-06-13 13:55:06 +02:00
Hans-Christoph Steiner
361281aa3b Merge branch 'seekbar-updates' into 'master'
Tiny updates to seekbar

See merge request fdroid/fdroidclient!690
2018-06-13 08:26:35 +00:00
ByteHamster
1c89076393 Update TextView directly 2018-06-10 22:12:06 +02:00
ByteHamster
c7e692e9e5 Tiny updates to seekbar 2018-06-08 23:09:45 +02:00
Hans-Christoph Steiner
99b3152381 rename progressChangedListener to progressChangedRunnable
!689
2018-06-08 23:00:20 +02:00
Hans-Christoph Steiner
a41d64df4a Merge branch 'seekbar' into 'master'
Seekbar updates

See merge request fdroid/fdroidclient!689
2018-06-08 20:59:43 +00:00
ByteHamster
67e90bd1e7 Updated tickmark 2018-06-08 20:05:24 +02:00
ByteHamster
da856786ba Live updates 2018-06-08 20:00:45 +02:00
ByteHamster
54eaa273b6 Changed seekbar style 2018-06-08 19:23:29 +02:00
Hans-Christoph Steiner
bc6fba88fa Merge branch 'push-requests-for-index-v1' into 'master'
push requests for index-v1

See merge request fdroid/fdroidclient!688
2018-06-08 10:36:07 +00:00
Hans-Christoph Steiner
3878b781fd maven.google.com must be added before jcenter()
* https://stackoverflow.com/a/50570206
* https://stackoverflow.com/a/50563942
* https://developer.android.com/studio/build/dependencies#google-maven
2018-06-08 12:12:04 +02:00
Hans-Christoph Steiner
3cb34aa4b0 prevent crash if push uninstall request is app not in any repo 2018-06-06 21:34:55 +02:00
Hans-Christoph Steiner
c8f804d0f6 support push requests when using the index-v1.json
Before, push requests were only supported when using index.xml.  This adds
support for using push requests in index-v1.json.  `fdroid update` has been
generating them in both index versions for a while now.
2018-06-06 21:34:52 +02:00
Hans-Christoph Steiner
6f7fdec4eb Merge branch 'streamline-whitelabeling' into 'master'
Streamline whitelabeling

See merge request fdroid/fdroidclient!686
2018-06-06 19:10:40 +00:00
Hans-Christoph Steiner
d5d3abe2a3 fix lint "Implied default locale in case conversion"
find app/src/full/java/kellinwood/ -name \*.java |xargs sed -i 's,\.toLowerCase(),.toLowerCase(Locale.ROOT),g'
2018-06-06 21:09:39 +02:00
Hans-Christoph Steiner
e55b121489 simplify gradle repositories to fix Android plugin download error 2018-06-06 20:51:50 +02:00
Hans-Christoph Steiner
00da6080c7 remove unneeded bouncycastle dependencies
These calls to bouncycastle were just used because the library was
there.  Now with the upcoming 'basic' build flavor, there will be no
need for bouncycastle.  It is required for ZipSigner signing of swap
indexes, and TLS support in the swap NanoHTTPD webserver.
2018-06-06 09:47:18 +02:00
Hans-Christoph Steiner
f3974898af switch to faster, documented algorithm for Utils.toHexString()
This is covered already by tests of Utils.getBinaryHash().
2018-06-06 09:47:18 +02:00
Hans-Christoph Steiner
ca577dc65a 'dependencies' must be after 'android' for gradle to expose flavors there
With gradle build flavors, it is possible to specify things like
'myflavorImplementation' but only if the 'dependencies' section is after
the 'android' section where the build flavors are declared.  How 1982 of
them to make where things are declared in the file have meaning.
2018-06-01 11:56:47 +02:00
Hans-Christoph Steiner
c81e3f3d02 define default main tab as 0th element to support flavors 2018-06-01 11:56:47 +02:00
Hans-Christoph Steiner
e6c8cfa3f8 handle null Preferences when looping through SUMMARIES_TO_UPDATE
With more whitelabeling support, we need this workaround to avoid
trying to call a null instance when the whitelabeled version does not
include all of the possible preferences.
2018-06-01 11:56:14 +02:00
Hans-Christoph Steiner
4bcceeaf74 improve strings, also removing "F-Droid" for easier whitelabeling 2018-05-30 13:32:07 +02:00
Hans-Christoph Steiner
2a0150a45e format all 'res/values' XML files using Android Studio Ctrl-Alt-L 2018-05-30 13:31:39 +02:00
Hans-Christoph Steiner
ae7973f5c4 Merge branch 'spdx-4.0' into 'master'
AppDetails: don't mangle spdx link.

Closes #1472

See merge request fdroid/fdroidclient!684
2018-05-29 09:20:57 +00:00
Marcus Hoffmann
724234ef09
AppDetails: don't mangle spdx link.
Stripping the `+` form the license link will direct to the wrong spdx
page. (This would also need changing anyway because of spdx v4.0.0)

closes fdroid/fdroidclient#1472
2018-05-17 00:55:57 +02:00
Hans-Christoph Steiner
63812715aa Merge branch 'fix-tooltip-background' into 'master'
fix tooltip background in actionbar

Closes #1094

See merge request fdroid/fdroidclient!681
2018-05-03 08:09:47 +00:00
Hans-Christoph Steiner
93083c6111 Merge branch 'fix-icon-colors' into 'master'
fix icon color in search for dark theme

Closes #1187

See merge request fdroid/fdroidclient!682
2018-05-03 08:09:05 +00:00
Conny Duck
9103e49e20 fix icon color in search for dark theme 2018-04-29 09:23:57 +02:00
Conny Duck
5ae563ae51 fix tooltip background in actionbar 2018-04-28 22:59:03 +02:00
Conny Duck
3034afedeb add adaptive icon 2018-04-28 21:58:25 +02:00
Hans-Christoph Steiner
b10c8e5c79 version code 1003000 2018-04-25 23:17:58 +02:00
Hans-Christoph Steiner
5043a081a7 update CHANGELOG 2018-04-25 23:17:58 +02:00
Hans-Christoph Steiner
8ab5487daa Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!679
2018-04-25 21:20:28 +00:00
Hans-Christoph Steiner
3fcd880848 Weblate 2018-04-25 21:20:28 +00:00
Hans-Christoph Steiner
36b51c506f use separate IntentFilters to make App Links work
The App Links thing is quite strict, all possible scheme/hosts must have
a valid /.well-known/assetlinks.json file that is HTTP 200.

These two URLs are not 200, so they will fail for App Links:
* http://f-droid.org/.well-known/assetlinks.json
* http://www.f-droid.org/.well-known/assetlinks.json
2018-04-25 22:46:42 +02:00
Hans-Christoph Steiner
b1f0f43546 bump targetSdkVersion to 25
We have a lot of work to do to bump to the latest version: #1440
2018-04-25 22:46:42 +02:00
Hans-Christoph Steiner
76150db0c2 Merge branch 'JobIntentService-revamp' into 'master'
JobIntentService revamp

Closes #1426

See merge request fdroid/fdroidclient!678
2018-04-25 20:48:39 +00:00
Hans-Christoph Steiner
2cab890e34 Merge branch 'network-pref-revamp' into 'master'
Network pref revamp

Closes #1381

See merge request fdroid/fdroidclient!677
2018-04-25 20:46:55 +00:00
Hans-Christoph Steiner
fb8cbd04c3 add text description for DisabledAlgorithm and KnownVuln anti-features 2018-04-25 17:29:08 +02:00
Hans-Christoph Steiner
e76aa0390d make Anti-Features list in App Details clickable
This should provide some more info about each anti-feature.
2018-04-25 17:28:43 +02:00
Hans-Christoph Steiner
3a5ecc5e8e do not crash when getting hash of APK that disappears
This changes the logic of Utils.getBinaryHash() to return null on failure
rather than only throwing exceptions.  That makes it easier to handle these
failures where Utils.getBinaryHash() is called.

 #1305
 #855
2018-04-25 17:10:03 +02:00
Hans-Christoph Steiner
94b70608d0 format ApkProvider using Android Studio Ctrl-Alt-L 2018-04-25 11:23:39 +02:00
Hans-Christoph Steiner
80734891a6 Installer instances require an Apk instance, mark @NonNull #1436 2018-04-25 11:13:47 +02:00
Hans-Christoph Steiner
7b66ad4920 don't crash if installerPackageName is null #1436
This will instead lead users with Privileged Extension to the F-Droid
uninstall screen which will probably fail.  But that's better than crashing
in my opinion.

Introduced in c095a85c3dd3c505951bebb52e4ae010c69cc9f9
2018-04-25 11:12:18 +02:00
Hans-Christoph Steiner
e6fb837af0 use JobSchedule to better schedule CleanCacheService
#588
 #1426
2018-04-24 21:09:41 +02:00
Hans-Christoph Steiner
34ac465438 convert ConnectivityMonitorService to JobIntentService #1426 2018-04-24 21:09:41 +02:00
Hans-Christoph Steiner
07ada4e6b2 switch UpdateService to a JobIntentService
closes #1426
2018-04-24 21:09:36 +02:00
Hans-Christoph Steiner
fe260d931c use JobIntentService for CleanCache, DeleteCache, Installer, InstalledApp
This should ensure that these jobs complete before sleep, and also, they
should work more reliably with the new Android 8.0 background restrictions.
https://developer.android.com/reference/android/support/v4/app/JobIntentService.html #1426
2018-04-24 21:05:43 +02:00
Hans-Christoph Steiner
3785aecc26 UpdateService: use data URI rather than custom extra
Just proper Android style.
2018-04-24 21:05:43 +02:00
Hans-Christoph Steiner
94e5519d23 migrate "Only on Wifi" preference to "Over Wi-Fi" and "Over data"
This migrates the old "Only on Wifi" checkbox to something similar with the
new preferences layout.
2018-04-24 20:03:55 +02:00
Hans-Christoph Steiner
9c7d97a379 reschedule UpdateService based on data/wifi/interval preference changes
JobScheduler also take network type into account.

#1381
2018-04-24 20:03:55 +02:00
Hans-Christoph Steiner
5946d198b0 specify network type to JobScheduler based on new wifi/data prefs
#1381
2018-04-24 20:03:54 +02:00
Hans-Christoph Steiner
f8225f3122 update "Only on WiFi" pref to handle very low bandwidth better
This gives a lot more flexibility to the user to cover bandwidth, power,
and privacy issues related to network traffic.  The current implementation
does not represent these prefs as well as it should.  For example, it does
not force the traffic over the preferred network type if the other type is
set to "never".  Instead it just tracks the "unmetered" status of the
active network, and acts based on that.

closes #1381
2018-04-24 20:03:54 +02:00
Hans-Christoph Steiner
ce934d3846 change all Settings from CheckBox to Switch, except "expert"
This follows the Material preferred style using Switches instead of
CheckBoxes for boolean preferences.  This leaves the "expert" preferences
as CheckBoxes to differentiate them, and make them stand out as something
different.
2018-04-24 20:03:54 +02:00
Hans-Christoph Steiner
d0d0c1d62c standardize capitalization in Settings based on Material
https://material.io/guidelines/patterns/settings.html
2018-04-24 20:03:54 +02:00
Hans-Christoph Steiner
801d1693a7 convert "Update Interval" preference to a SeekBar 2018-04-24 20:03:51 +02:00
Hans-Christoph Steiner
f15c85146d fix lint warnings in PreferencesFragment 2018-04-24 18:07:38 +02:00
Hans-Christoph Steiner
50bce42940 switch to com.android.support:preference-v14 for Material themes 2018-04-24 18:07:38 +02:00
Hans-Christoph Steiner
c04a867b9b format preferences.xml with Android Studio Ctrl-Alt-L 2018-04-24 18:02:38 +02:00
Hans-Christoph Steiner
40635c36e5 rename Preferences constants to be readable, Java style 2018-04-24 18:02:38 +02:00
Hans-Christoph Steiner
16d15a358d include signer fingerprint in Apk instance created from a file 2018-04-24 18:02:38 +02:00
Hans-Christoph Steiner
ba2f1e1919 document AppListActivity 2018-04-24 18:02:38 +02:00
Hans-Christoph Steiner
4ff4f8056f Merge branch 'remove-gradle-witness' into 'master'
update to Gradle Android Plugin v3.0 semantics, remove gradle-witness

See merge request fdroid/fdroidclient!604
2018-04-24 16:01:07 +00:00
Hans-Christoph Steiner
b3bd4ff2f7 stop forcing Java 1.7, it is the oldest supported version now
This was introduced in 2014:
2f9c3b805675f02653a433637b33188b61f90c1e
2018-04-23 12:57:27 +02:00
Hans-Christoph Steiner
40fdccf262 purge gradle-witness until it is compatible with 'implementation'
https://github.com/signalapp/gradle-witness/issues/27
2018-04-23 12:57:18 +02:00
Hans-Christoph Steiner
518537f23a purge broken Javadoc generation that is very out of date
Introduced in 2014 to keep ant compatibility:
b3107eb6b249c9b1d595b32ea177f60b6040c709
2018-04-23 12:33:24 +02:00
Hans-Christoph Steiner
96e10d7bf1 migrate dependencies to new Gradle Android Plugin 3.0 terms
Fixes this warning:

WARNING: Configuration 'compile' is obsolete and has been replaced with
'implementation' and 'api'.  It will be removed at the end of 2018. For
more information see:
http://d.android.com/r/tools/update-dependency-configurations.html

https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html
2018-04-23 12:33:22 +02:00
Hans-Christoph Steiner
9f839bcca7 purge obsolete block in settings.gradle
missed this in dd169069823720a57d04a53b7e317e67cf55cf55
fdroid/fdroidclient!676
2018-04-23 12:31:28 +02:00
Hans-Christoph Steiner
b15fff082e force disk space calc to Long on < android-18
closes #1424
2018-04-23 11:46:31 +02:00
Hans-Christoph Steiner
8903a089ba Merge branch 'minSdkVersion-to-android14' into 'master'
The Great Upgrade to minSdkVersion 14!

Closes #1379, #1383, and #248

See merge request fdroid/fdroidclient!676
2018-04-23 08:16:46 +00:00
Hans-Christoph Steiner
71f7762521 remove unused NFC-ish <intent-filter> with lint error
Looks like an aborted effort to do:
https://developer.android.com/guide/topics/connectivity/nfc/nfc.html#mime
2018-04-19 16:36:35 +02:00
Hans-Christoph Steiner
15b0736252 new lint is more aggressive about erroring on upper case URI schemes 2018-04-19 16:29:53 +02:00
Hans-Christoph Steiner
7b679ef57c new version of lint is more aggressive at announcing UnusedResources
These are in fact needed:

  /export/share/code/fdroid/client/app/src/main/res/values/dimens.xml:25: Error: The resource R.dimen.fixed_width_padding appears to be unused [UnusedResources]
      <dimen name="fixed_width_padding">2dp</dimen>
             ~~~~~~~~~~~~~~~~~~~~~~~~~~
  /export/share/code/fdroid/client/app/src/main/res/values/styles.xml:162: Error: The resource R.style.SwapTheme_StartSwap appears to be unused [UnusedResources]
      <style name="SwapTheme.StartSwap" parent="AppThemeLight">
             ~~~~~~~~~~~~~~~~~~~~~~~~~~
  /export/share/code/fdroid/client/app/src/main/res/values/styles.xml:166: Error: The resource R.style.SwapTheme_StartSwap_Text appears to be unused [UnusedResources]
      <style name="SwapTheme.StartSwap.Text" parent="@style/SwapTheme.StartSwap">
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-04-19 16:27:41 +02:00
Hans-Christoph Steiner
898c731fcc don't run checkstyle or pmd on zipsigner, the format is too different
If someone wants to clean this up, feel free...
2018-04-19 16:19:21 +02:00
Hans-Christoph Steiner
4e4dd2385b reformat all zipsigner code with Android Studio Ctrl-Alt-L 2018-04-19 16:18:24 +02:00
Hans-Christoph Steiner
a3d9850a42 update to latest robolectric 3.8 and mockito 2.7.22
http://robolectric.org/getting-started/#building-with-gradle
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
14474aed01 reenable line length errors on ProperMultiRepoUpdaterTest 2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
e00fe0dcda switch to latest official BottomNavigation release
#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
5c6c54cadf switch from spongycastle to latest official bouncycastle
#1379
2018-04-19 15:51:44 +02:00
Greg Leach
dd2f43dcde Make sure to close streams when done with them.
488f8cd3b4

closes #1383
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
dd16906982 move zipsigner into this app, its not maintained anywhere else 2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
a2597ae3e8 switch to official nanohttpd releases
closes #248
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
404796a9fa switch to official support PreferenceFragment
#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
dfc6524fc1 switch Robolectric to use compile SDK version 2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
2a9c3fee5b purge all code blocks for < android-14, except installer stuff
The installer stuff should hopefully become a standalone library, so that
might as well keep the old support in place.

#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
e923427232 gitlab-ci: convert connected10 job to connected14
#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
6fbdd1210e update to the latest version of the Android support libraries
This requires bumping compile and built-tools verisons.
2018-04-19 15:51:43 +02:00
Hans-Christoph Steiner
3a2c10f077 update to latest Gradle Android Plugin (3.1.1) and gradle (4.4.1)
#1379
2018-04-19 15:51:43 +02:00
Hans-Christoph Steiner
5ec9789e73 switch minSdkVersion to 14 (Android 4.0)
#1379
2018-04-19 11:28:27 +02:00
Hans-Christoph Steiner
38a3ccda17 Merge branch 'update-scheduling' into 'master'
modernize update scheduling

See merge request fdroid/fdroidclient!416
2018-04-18 22:04:55 +00:00
Hans-Christoph Steiner
9e0de9ac69 rudimentary support for JobScheduler to run updates
The new JobScheduler API can opportunitistically run a job based on whether
there is good internet, connected to power, etc.  This is very useful for
running updates.  Ideally, updates would always happen in the background
while on unmetered internet and connected to power.

#588
2018-04-18 23:07:36 +02:00
Hans-Christoph Steiner
e36d7719b3 trigger an update after joining good wifi without JobSchedule
Each time the device connects to a wifi network, this waits for 2 minutes,
then if the wifi is still connected, it re-schedules the index update to
happen now.  The goal is to favor unmetered networks as much as possible
when downloading the index and any automatic app updates.

This is only needed on older platforms, JobScheduler handles this for us on
android-21+
2018-04-18 23:07:36 +02:00
Hans-Christoph Steiner
7d9f5e880c move update scheduling entirely to AlarmManager
This changes the flow of the update triggering so that any Intent sent to
UpdateService can potentially trigger an update, depending only on the
state of the internet and the "Only on WiFi" preference.  Instead of having
a timer that checks every hour to see if it is time to run the update, just
let AlarmManager send a trigger Intent based on the timing in the
"Update Interval" setting.

The update schedule is reset each time F-Droid restarts, and also each time
the user returns from the settings, so if AlarmManager fails us in the time
being, the updates will be rescheduled next time F-Droid is restarted, the
device is rebooted, etc.

refs #662
2018-04-18 22:04:52 +02:00
Hans-Christoph Steiner
5f3e952958 move "Update Interval" pref handling to Preferences class
Basically all of the settings are handled in the Preferences class now,
this was an outlier.
2018-04-18 21:56:14 +02:00
Hans-Christoph Steiner
552da24d30 fix HttpDownloaderTest after refactoring
HttpDownloaderTest doesn't get run in gitlab-ci since it was too flaky with
internet connections in the emulator.  So these were missed until I manually
ran the tests.

688057b3e7e214db49566b84d5b3dcd0db30dc2b
195aaae7e52dc1c47741965904ed17bdc816a71c
df08e84e7829652d7999eee5451080a012b00a1e
2018-04-18 20:29:27 +02:00
Hans-Christoph Steiner
d917d6d007 version code 1002051 2018-04-18 20:21:23 +02:00
Hans-Christoph Steiner
6a86762cd2 update CHANGELOG 2018-04-18 20:20:58 +02:00
Antón Méixome
e7bc6f1fd7 Translated using Weblate (Galician)
Currently translated at 96.8% (405 of 418 strings)
2018-04-18 20:15:08 +02:00
ezjerry liao
7ce639f4dd Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (418 of 418 strings)
2018-04-18 20:15:06 +02:00
Hans-Christoph Steiner
ce8d089dc7 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!675
2018-04-18 18:16:21 +00:00
Hans-Christoph Steiner
9b8f60c4fe Weblate 2018-04-18 18:16:21 +00:00
Hans-Christoph Steiner
9a33a751a1 Merge branch '1.2.1-polish' into 'master'
1.2.1 polish

Closes #577 and #440

See merge request fdroid/fdroidclient!674
2018-04-18 17:57:09 +00:00
Hans-Christoph Steiner
2615c461f2 debounce incoming "WiFi Connected" events for reliable status
Some devices send multiple copies of given events, like a Moto G often
sends three {@code CONNECTED} events.  So they have to be debounced to
keep the {@link #BROADCAST} useful.
2018-04-18 17:14:22 +02:00
Hans-Christoph Steiner
045fc1a35e make "Scan QR" immediately show the QR screen, not "Select Apps" 2018-04-18 17:14:22 +02:00
Hans-Christoph Steiner
fa1331139f delete all swap repos when before swap starts and after it stops
For now, swap repos are only trusted as long as swapping is active.  They
should have a long lived trust based on the signing key, but that requires
that the repos are stored in the database by fingerprint, not by URL
address.

#295
#703
2018-04-18 17:14:22 +02:00
Hans-Christoph Steiner
b9c247e2b1 if WifiManager fails to return netmask, directly query net interfaces
Google broke returning the netmask somewhere around android-21. This could
be done using more official APIs, but this reuses stuff that needs to be
there anyway.

closes #577
https://code.google.com/p/android/issues/detail?id=82477#c5
https://issuetracker.google.com/issues/37015180
2018-04-18 17:14:22 +02:00
Hans-Christoph Steiner
3fd1b055b3 tame debug logging in CompatibilityChecker
It makes a huge dump on every index refresh, making troubleshooting other
things around the index hard.
2018-04-18 17:14:22 +02:00
Hans-Christoph Steiner
eb77f72cd2 store last working mirror per repo
For mirroring to work on multiple repos, this must be stored and used per-
repo.  The timeout and number of tries seem fine to keep global to reduce
the total amount of mirror churn when this logic is searching.
2018-04-18 09:53:16 +02:00
Hans-Christoph Steiner
21e3124b5f prevent crash when starting swap on devices without Bluetooth/WiFi
This was introduced in f90b030e76ddb03e00bc0d46977c01c1bae3936d
2018-04-18 09:53:16 +02:00
Hans-Christoph Steiner
c42d7164cf exclude ROM apps from default swap app listing
Apps that are built as part of the ROM and signed by the platform keys
should very rarely be swapped.  This removes them from the default
list by comparing the signing keys.

This filter is deliberately only included on the list function and not on
the search function.  If people want to share system apps, they'll be able
to find them with the search function, but the system apps won't show up
by default.

https://source.android.com/devices/tech/ota/sign_builds#certificates-keys

closes #440
2018-04-18 09:53:16 +02:00
Hans-Christoph Steiner
59ec2a7751 Merge branch 'blank-versionName' into 'master'
handle Blank versionName

Closes #1418

See merge request fdroid/fdroidclient!673
2018-04-17 20:21:02 +00:00
Hans-Christoph Steiner
36c76070e5 Apk.versionName can be null, and the code should handle it
closes #1418
2018-04-17 15:30:56 +02:00
Hans-Christoph Steiner
94818e36bf fix swap to work with APKs with blank versionNames
fdroidclient#1418
fdroiddata!3061
2018-04-17 15:30:56 +02:00
Hans-Christoph Steiner
eac85e725f debug logging in release builds for disappearing F-Droid 2018-04-16 17:00:23 +02:00
Hans-Christoph Steiner
c327cd788b update changelogs 2018-04-13 21:42:56 +02:00
Hans-Christoph Steiner
2cba07b117 version code 1002050 2018-04-13 21:39:37 +02:00
Hans-Christoph Steiner
714a44ad5d Merge branch 'first-swap-overhaul' into 'master'
First swap overhaul

Closes #656, #612, and #586

See merge request fdroid/fdroidclient!671
2018-04-13 07:45:43 +00:00
Hans-Christoph Steiner
b0d11abc4e Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!672
2018-04-12 23:26:12 +00:00
Hans-Christoph Steiner
601e6f6e45 Weblate 2018-04-12 23:26:12 +00:00
Hans-Christoph Steiner
c770d4ef18 prefer WiFi in Send F-Droid when the conditions dictate that 2018-04-13 00:26:54 +02:00
Hans-Christoph Steiner
f07e5c040c when user selects WiFi over Hotspot, make sure WiFi is enabled 2018-04-13 00:20:55 +02:00
Hans-Christoph Steiner
444ecd024b when user turns on swap WiFi visibility, ensure that WiFi is on 2018-04-13 00:20:55 +02:00
Hans-Christoph Steiner
570b532bd6 prompt user for WRITE_SETTINGS permission when setting up Hotspot
closes #656
2018-04-13 00:20:55 +02:00
Hans-Christoph Steiner
f90b030e76 save and restore Bluetooth/WiFi swap state and previous state
This should make swap remember if Bluetooth/WiFi was disabled when swapping
started, then automatically disable it when swapping is done. This also
makes swapping remember the swap "visibility" that the user set, and restore
that when the user starts swapping again.  There are logic bugs elsewhere
in the whole thing that prevent this from always working, but the state
should be set and stored properly.
2018-04-13 00:20:55 +02:00
Hans-Christoph Steiner
3fca7c7153 disable swap "visible" checkboxes by default, they get dynamically set
If users click these fast, then its easy to get caught in a loop fighting
the dynamic setting of them.
2018-04-13 00:20:54 +02:00
Hans-Christoph Steiner
57e4315e18 quit BluetoothServer when Bluetooth is disabled 2018-04-13 00:20:54 +02:00
Hans-Christoph Steiner
73ad5bd6b3 update to latest jmDNS for more reliable detection
closes #612
2018-04-13 00:20:54 +02:00
Hans-Christoph Steiner
6b4b85d396 entirely purge AndroidHttpClient from the code base.
closes #586
2018-04-13 00:20:54 +02:00
Hans-Christoph Steiner
9cb53e93d0 allow Bluetooth swap to work when there is no available internet
#1393
2018-04-13 00:20:54 +02:00
Hans-Christoph Steiner
615e559ce1 only prompt to swap back to proper swap URLs
Before, it was possible to annoy the user by sending HTTP POST with any
repo URL in it.
2018-04-13 00:20:52 +02:00
Hans-Christoph Steiner
f181e41338 Merge branch '1.2-polish' into 'master'
1.2 polish

See merge request fdroid/fdroidclient!670
2018-04-11 15:05:57 +00:00
Hans-Christoph Steiner
86e128b7e8 document F-Droid's use of HTTP 2018-04-11 11:34:12 +02:00
Hans-Christoph Steiner
b523ecc969 check redelivered Intents whether they completed while we were killed
If F-Droid gets killed during the install/update process, then the install
procedure would keep getting readded and redownloaded since it is a sticky
Intent.  The test is very specific so that this does not block things like
installing updates with the same versionCode, which happens sometimes, and
is allowed by Android.

#1271
2018-04-11 11:34:12 +02:00
Hans-Christoph Steiner
1413c35342 use standard method for basic installed app queries
Makes easy to track where these lookups are happening, and hopefully
simplifies the code a bit.
2018-04-11 11:34:09 +02:00
Hans-Christoph Steiner
1e6fb13ebc register to receive gitlab nightly URLs
They have one more path segment than the others, e.g.:
https://gitlab.com/fdroid/fdroidclient-nightly/raw/master/fdroid/repo
2018-04-11 11:26:55 +02:00
Hans-Christoph Steiner
af509e431e reformat localrepo code in using Android Studio Ctrl-Alt-L 2018-04-11 11:26:55 +02:00
Hans-Christoph Steiner
00cfaa572f version code 1002001 2018-04-06 18:53:32 +02:00
Hans-Christoph Steiner
facf251cd1 update CHANGELOG 2018-04-06 18:53:32 +02:00
Hans-Christoph Steiner
3c14d273b2 Merge branch 'fix-only-on-wifi' into 'master'
fix "Only on WiFi" to apply to all downloads

See merge request fdroid/fdroidclient!669
2018-04-06 14:23:27 +00:00
Hans-Christoph Steiner
fbf7e98df9 no need to export WifiStateChangeService to the world 2018-04-06 15:51:00 +02:00
Hans-Christoph Steiner
5bd276c804 make "Only on WiFi" also apply to updates, graphics, and icons
The "Only on WiFi" pref originally only controlled index updates, but now
it makes sense to include all of the various files that are downloaded.

#1381
2018-04-06 15:50:57 +02:00
Hans-Christoph Steiner
7ba1966538 use standard code style and var naming patterns for AppDiff
The standard pattern is to pass a Context in rather than call things like
getPackageManager in.  It should only pass a PackageManager if that is
actually being reused.

This shouldn't change the logic at all.
2018-04-06 12:01:53 +02:00
Hans-Christoph Steiner
98aea01272 remove confusing Exception when checking permissions
Might as well just let things fail with a NullPointerException, that will
provide more information around the crash.
2018-04-06 12:01:53 +02:00
Hans-Christoph Steiner
b5adf7d0ef document ignoring EXIF 2018-04-06 12:01:53 +02:00
Ajeje Brazorf
36d699a6a6 Translated using Weblate (Sardinian)
Currently translated at 100.0% (416 of 416 strings)
2018-04-06 12:01:53 +02:00
Hans-Christoph Steiner
4fa86f548b Merge branch 'handle-low-storage' into 'master'
clean cache when the device has low storage; plus 1.2 bug fixes

Closes #1139, #1395, and #1400

See merge request fdroid/fdroidclient!667
2018-04-06 10:00:39 +00:00
Hans-Christoph Steiner
ddb694380b Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!668
2018-04-06 09:59:49 +00:00
Hans-Christoph Steiner
e7f428afce Weblate 2018-04-06 09:59:49 +00:00
Hans-Christoph Steiner
d06630f287 git hooks: use ./gradlew to ensure the right gradle version is used 2018-04-05 23:28:53 +02:00
Hans-Christoph Steiner
4a0dd8abe7 when storage is low, make UIL limit cache based on available size 2018-04-05 23:28:53 +02:00
Hans-Christoph Steiner
c1656f61a7 if device storage is really low, delete the entire cache 2018-04-05 23:28:53 +02:00
Hans-Christoph Steiner
af32e4ac85 trigger CleanCacheService if device storage is low 2018-04-05 23:28:53 +02:00
Hans-Christoph Steiner
661aebb75f properly gather all requested permissions from index-v1.json
The permissions from uses-permission and uses-permission-sdk-23 should be
combined into a single list of permissions that are being requested for the
current SDK version.  The previous code was overwriting one or the other,
based on the order that Jackson happen to call setRequestedPermissions().

closes #1139
#890
#1394
admin#65
2018-04-05 23:28:53 +02:00
Hans-Christoph Steiner
688057b3e7 fix some progress vars that were still int rather than long
This completes the work started in 195aaae7e52dc1c47741965904ed17bdc816a71c

closes #1395
closes #1400

# Conflicts:
#	app/src/main/java/org/fdroid/fdroid/UpdateService.java
2018-04-05 23:28:49 +02:00
Hans-Christoph Steiner
2c6ed51a35 fix last long lines in UpdateService 2018-04-05 23:26:06 +02:00
Hans-Christoph Steiner
9bec554d2f Merge branch 'finalize-uil-update' into 'master'
Finalize UIL update

See merge request fdroid/fdroidclient!666
2018-04-05 21:22:17 +00:00
Hans-Christoph Steiner
48e438d510 declare some key vars final to help the compiler optimize those
Apparently, the Java compiler can in some cases reuse a final value instead
of executing a method again.  This is from @hotlittlewhitedog

!653
2018-04-04 17:43:11 +02:00
Hans-Christoph Steiner
fa9a4ce608 scale all images to the exact required size to save memory/disk
!661
https://gitlab.com/fdroid/fdroidclient/merge_requests/653#note_65065867
2018-04-04 17:43:11 +02:00
Hans-Christoph Steiner
cb5923e03b ensure images are never larger than device supports
In order to save disk space and memory, at a cost of some CPU time,
this makes sure that all downloaded images are not bigger than the
device can support.  A nice side effect of this process is that EXIF
information is stripped from JPEG files since they are read into a
Bitmap, then written out as a PNG.  This should complete the JPEG EXIF
stripping started in 2a3aaacf2347679f30e2c8feffb92f25bb882c8b with
considerExifParams(false)
!653
2018-04-04 17:43:08 +02:00
Hans-Christoph Steiner
ce19d60e7b version code 1002000 2018-03-30 17:28:56 +02:00
Hans-Christoph Steiner
8b37ee5863 update CHANGELOG for 1.2-alpha0 2018-03-30 17:28:43 +02:00
Hans-Christoph Steiner
427f6f7bbf Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!665
2018-03-30 13:38:11 +00:00
Hans-Christoph Steiner
ae2df2a836 Weblate 2018-03-30 13:38:11 +00:00
Hans-Christoph Steiner
2d0168215e Merge branch 'more-clean-up-towards-usb-swap' into 'master'
More clean up towards usb swap

See merge request fdroid/fdroidclient!664
2018-03-30 12:59:06 +00:00
Hans-Christoph Steiner
258d2a41c3 do not include blank fingerprints in AddRepo fingerprintRepoMap 2018-03-30 14:05:06 +02:00
Hans-Christoph Steiner
67a5156641 remove verbose logging from InstalledAppProvider stuff 2018-03-30 14:05:06 +02:00
Hans-Christoph Steiner
2b8bfd4aa6 show placeholder image if screenshots fail to load 2018-03-30 14:05:06 +02:00
Hans-Christoph Steiner
c83c8301e6 improve URL normalizing in "Add Repo" and also support content:// URLs
This adds some case normalization to both the scheme and the host. This was
previously messing up TreeUri content:// URLs like this:
content://com.android.externalstorage.documents/tree/1AFB-2402%3A/document/1AFB-2402%3Atesty.at.or.at%2Ffdroid%2Frepo

Turning them into:
content://com.android.externalstorage.documents/tree/1AFB-2402:/document/1AFB-2402:testy.at.or.at/fdroid/repo
2018-03-30 14:05:06 +02:00
Hans-Christoph Steiner
06f42f864f don't crash in "Add Repo" if an invalid URL is given
Oops, missed this in 89e04cc078bb96a6999ccc4a42f23800272e2be2
2018-03-30 14:05:06 +02:00
Hans-Christoph Steiner
3f3ff5ffd7 further simplification of Downloader based on Uri
missed this in df08e84e7829652d7999eee5451080a012b00a1e
2018-03-30 14:05:06 +02:00
Hans-Christoph Steiner
401d094af1 purge out of date translations to trigger retranslation 2018-03-30 10:10:57 +02:00
Hans-Christoph Steiner
651f395738 fix build, oops 2018-03-30 00:06:46 +02:00
Hans-Christoph Steiner
5f2b053b1c Merge branch 'clean-up-repo-and-downloader' into 'master'
expose mirror options; Clean up Repo and Downloader

See merge request fdroid/fdroidclient!663
2018-03-29 21:59:26 +00:00
Hans-Christoph Steiner
df08e84e78 switch all Downloader subclasses to use Uri instead of URL
java.net.URL barfs on custom URL schemes, and making it handle them is
really hard.  Basically, there needs to be a Handler stub class, then
URL.setURLStreamHandlerFactory() must run when F-Droid starts, since
it has to be set before any URL instance is used.  This all leaves
some weird logic that gives the false impression that URLConnection
will handle these custom schemes.

Switching to Uri/urlString throughout the code matches the other
classes that use urlString as the unique ID, and this doesn't add more
lines of code.
2018-03-29 23:16:17 +02:00
Hans-Christoph Steiner
195aaae7e5 switch Downloader total download size to long to support >16MB
This was int because it was written arond UrlConnection.getContentLength()
which returns an int.  But that doesn't make sense since this will
definitely handle files large than 16MB.

!647
#1192
2018-03-29 22:33:42 +02:00
Hans-Christoph Steiner
a88b9c924e when validating added repo URLs, check whether they're already included 2018-03-29 22:33:42 +02:00
Hans-Christoph Steiner
70c9121995 enforce line lengths in ManageReposActivity 2018-03-29 22:33:42 +02:00
Hans-Christoph Steiner
2f0cb30ad0 support adding custom mirrors to any existing repo, via "App Repo"
This lets people add any URL as a mirror to an existing repo.  The UX is
people add URLs via any of the normal ways of adding a new repo via Intents,
like clicking URLs, QRCodes, etc.
2018-03-29 22:33:42 +02:00
Hans-Christoph Steiner
89e04cc078 include repo name in messages in "App Repo" dialog
This should hopefully make things a little clearer to the user.
2018-03-29 22:33:42 +02:00
Hans-Christoph Steiner
759c3b90fc display mirrors in RepoDetailsActivity
This is rough, but better than nothing.
2018-03-29 22:33:42 +02:00
Hans-Christoph Steiner
b3d90cd1b6 allow any path in incoming add repo Intent, filters check the paths
If anything wants to craft an Intent to send directly to F-Droid with an
arbitrary but valid path, that seems like a fine thing to support.  The
IntentFilters will still only match on the well known paths, so that the
user doesn't see F-Droid claiming all HTTP URLs.
2018-03-29 22:33:42 +02:00
Hans-Christoph Steiner
dd48103516 purge unused repo instance variable from UpdateException
The repo instance variable has long since been unused, but has just been
left there as a vestige.  Now its presence is blocking RepoUpdater.
getSigningCertFromJar() from being a static method that can be reused when
checking for repos on SD Cards and other removable storage devices.
2018-03-29 22:33:42 +02:00
Hans-Christoph Steiner
34381f9cfb simplify creation of Repo instances in tests
Creating a Repo instance first seems totally redundant and confusing.
2018-03-29 22:33:42 +02:00
Hans-Christoph Steiner
5e6ff06e0e bump to build-tools-25.0.3 2018-03-29 22:30:00 +02:00
Hans-Christoph Steiner
9a8f343fd9 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!662
2018-03-29 19:09:53 +00:00
Hans-Christoph Steiner
10d4a8fd8b Weblate 2018-03-29 19:09:53 +00:00
Hans-Christoph Steiner
a5acdc3db8 Merge branch 'UIL-update' into 'master'
Universal Image Loader update to use the cache better

See merge request fdroid/fdroidclient!661
2018-03-29 18:24:23 +00:00
Hans-Christoph Steiner
44fcfd36f9 use FileInputStream for file:// URLs when UIL loads images
This saves the levels of indirection that leads to a FileInputStream being
created in LocalFileDownloader.  Since there are already special cases for
assets:// and drawable://, it seems a natural place to put the file://
case.  Also, since this is used to load icons when scrolling through lists
of apps, this is particularly sensitive to inefficient loading.

This also removes custom code that UIL provides better.
2018-03-26 20:08:12 +02:00
Hans-Christoph Steiner
b10fa425b5 scale UIL parallelization based on amount of RAM the device comes with
This uses the total RAM that the device comes with as a rough measure of
the devices capabilities.  That is then used to set how many parallel
threads UIL can use.
2018-03-26 20:08:12 +02:00
Hans-Christoph Steiner
504286d44b respond to onLowMemory/onTrimMemory by clearing UIL memory cache 2018-03-26 16:17:45 +02:00
Hans-Christoph Steiner
efa1106d39 Wrap the “Your apps are up to date” message, to look better centered
!598

thanks @dantesoft!
2018-03-26 10:08:30 +02:00
Hans-Christoph Steiner
6e64438fa6 disable UIL image handling while scrolling
This should speed up the scrolling, especially on older devices.
2018-03-26 10:08:30 +02:00
Hans-Christoph Steiner
2a3aaacf23 set UIL DisplayImageOptions at startup
Instead of setting the same thing at each place its used, this puts all the
settings in one place.  For the most part, they are the same everywhere.
This makes it a lot easier to optimize how UIL works since all the settings
are in one place.
2018-03-26 10:08:30 +02:00
Hans-Christoph Steiner
b19eb1f91d use default disk cache for UIL, CleanCacheService handles cleanup
No need to slow down UIL by making it do a cache check since
CleanCacheService already does that in a low priority background service.

The default FileNameGenerator just uses imageUri.hashCode() so its safe an
faster than ours.  So just use the default.

Also, no need to set threadPriority() since we are using the default
2018-03-26 10:08:30 +02:00
Hans-Christoph Steiner
28fb229ad0 Merge branch 'lib-update' into 'master'
Lib update

See merge request fdroid/fdroidclient!660
2018-03-23 17:33:16 +00:00
Hans-Christoph Steiner
cd31976a58 update support libs to 25.3.1 2018-03-23 17:04:39 +01:00
Hans-Christoph Steiner
0260afcc99 bump org.robolectric to hopefully improve test reliability 2018-03-23 17:04:39 +01:00
Hans-Christoph Steiner
e3961a8c00 update spongycastle to latest version supporting pkix 2018-03-23 15:52:43 +01:00
Hans-Christoph Steiner
be11306a45 Merge branch 'settings' into 'master'
update filter preferences in settings

See merge request fdroid/fdroidclient!645
2018-03-23 14:33:11 +00:00
Hans-Christoph Steiner
d0e8d2da01 update to latest zxing core
This might be needed for the newest releases of Barcode Scanner.
2018-03-23 15:32:25 +01:00
Hans-Christoph Steiner
5de555d0b4 Merge branch 'purge-iconUrlLarge' into 'master'
purge all references to ICON_URL_LARGE, its unused

See merge request fdroid/fdroidclient!659
2018-03-23 14:02:30 +00:00
dkanada
20b75d5edc fix crash in settings and make variable names the same 2018-03-22 20:38:00 -06:00
dkanada
f57cafbdb1 migrate the old anti-feature preference 2018-03-22 20:38:00 -06:00
dkanada
aee621f3f5 negate show root preference, update english strings, and remove old translations 2018-03-22 20:38:00 -06:00
Hans-Christoph Steiner
cc540301d1 purge all references to ICON_URL_LARGE, its unused
This was only partially hooked up and often not even populated.
It was added in 4895e2d790ec3b91fa4271a24e1ea0ae69d362f4, but things have
changed a lot now.  We should be moving towards preferring the drawable XML
vector icons, which will scale nicely for all DPIs.
2018-03-21 20:10:37 +01:00
Hans-Christoph Steiner
57b2032e30 version code 1001050 2018-03-21 20:06:36 +01:00
Hans-Christoph Steiner
ccac3c41ff update CHANGELOG for v1.1 release 2018-03-21 20:06:36 +01:00
Hans-Christoph Steiner
51b22d50b6 Merge branch 'final-1.1-fixes' into 'master'
Final 1.1 fixes

Closes #1310

See merge request fdroid/fdroidclient!658
2018-03-21 19:06:58 +00:00
Hans-Christoph Steiner
df65905d19 only log installer messages on debug builds
This is stabilized, so we can tone down the logging.
2018-03-21 19:30:22 +01:00
Hans-Christoph Steiner
35471db83c always use sanitized URI from ApkFileProvider in install process
The previous commit makes this issue a lot easier to see. ApkFileProvider
getSafeUri() was already making the right URI for SDK_INT < 24, but then
this bit of logic was using the original URI, which didn't work. Installing
from the app's cache dir triggered a "Parse Error".  The Android default
installer API needs file:// URIs from getFiles().

closes #1310
2018-03-21 19:30:22 +01:00
Hans-Christoph Steiner
72fcc3d2c5 clean up content:// vs file:// logic in installation process
This hopefully makes apparent which pieces are only related to APKs, and
which pieces are used for all installable file types (media, OTA ZIPs, etc)

ExtensionInstaller only works on < android-20 anyway, so that's self-
enforcing in terms of URI scheme: it'll only ever see file:// URIs.
2018-03-21 19:30:22 +01:00
Hans-Christoph Steiner
32e5471d6c Merge branch '1.1-bug-fixes' into 'master'
1.1 bug fixes

Closes #1270

See merge request fdroid/fdroidclient!655
2018-03-20 19:03:20 +00:00
Marcus
ce0dfa48f9 Merge branch 'launch_crash_fix' into 'master'
don't crash when launching an app that isn't installed

See merge request fdroid/fdroidclient!656
2018-03-20 17:49:17 +00:00
Marcus Hoffmann
f32ed1eaed
don't crash when launching an app that isn't installed
This fixes the following crash:

* Install an app form F-Droid
* go to home screen
* uninstall app
* quickly switch to F-Droid the button will still show 'run' for a few
seconds
* launch the app you just uninstalled
2018-03-20 18:21:24 +01:00
Hans-Christoph Steiner
f52194ef7e Merge branch 'weblate' into 'master'
Weblate

Closes #1270

See merge request fdroid/fdroidclient!657
2018-03-20 16:56:13 +00:00
Hans-Christoph Steiner
806580acd3 Weblate 2018-03-20 16:56:13 +00:00
Hans-Christoph Steiner
dbfac03b52 sync AppUpdateStatusManager docs and varnames to InstallManagerService 2018-03-20 13:49:34 +01:00
Hans-Christoph Steiner
7c1e2ee09c actually remove Updates entries when they are swiped away 2018-03-20 13:49:34 +01:00
Hans-Christoph Steiner
52d09e6418 do not set cached APKs as ReadyToInstall if they are already installed
If an APK is already installed, and it is still in the cache, it should
never be marked "Ready to Install".

#1271
2018-03-20 13:49:34 +01:00
Hans-Christoph Steiner
23822cc247 switch English string to string resource
closes #1270
2018-03-20 13:49:34 +01:00
Hans-Christoph Steiner
9ffab6db0c Merge branch 'fix-detail-icon' into 'master'
fix-detail-icon

See merge request fdroid/fdroidclient!654
2018-03-19 14:14:13 +00:00
hotlittlewhitedog
e272badf8e fix-detail-icon
modified:   app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java
2018-03-10 22:10:54 +01:00
Hans-Christoph Steiner
9cf98ae158 Merge branch 'panic-app-list-crash' into 'master'
Prevent crash on screen rotation when showing panic app selector

See merge request fdroid/fdroidclient!652
2018-03-09 08:10:51 +00:00
Torsten Grote
50056317df
Prevent crash on screen rotation when showing panic app selector 2018-03-08 19:00:04 -03:00
Hans-Christoph Steiner
29a3016bd4 update CHANGELOG 2018-03-08 00:11:37 +01:00
Hans-Christoph Steiner
10db3bc057 version code 1001004 2018-03-08 00:09:09 +01:00
Hans-Christoph Steiner
a74c68afd4 Merge branch 'ui' into 'master'
slight changes to the user interface

fdroid/fdroidclient!646
2018-03-07 23:58:24 +01:00
Hans-Christoph Steiner
016e65375e pre-compress and strip EXIF from all PNGs in app
This makes the build reproducible, and makes the files smaller.

 metadata/en-US/images/phoneScreenshots/screenshot-dark-details.png   | Bin 358916 -> 309386 bytes
 metadata/en-US/images/phoneScreenshots/screenshot-dark-home.png      | Bin 277413 -> 224844 bytes
 metadata/en-US/images/phoneScreenshots/screenshot-dark-knownvuln.png | Bin 158903 -> 123484 bytes
 metadata/en-US/images/phoneScreenshots/screenshot-knownvuln.png      | Bin 66707 -> 41670 bytes
2018-03-07 23:57:42 +01:00
Hans-Christoph Steiner
068e0d1a7e recompress screenshots using zopflipng, strip using exiftool
This makes them as small as possible.
2018-03-07 23:57:27 +01:00
Hans-Christoph Steiner
a7ebb7827a Merge branch 'more-crash-fixes' into 'master'
More crash fixes

Closes #1332

See merge request fdroid/fdroidclient!651
2018-03-07 22:08:51 +00:00
Hans-Christoph Steiner
40d6ffeb49 remove odd black border from screenshot-knownvuln.png
This is the only screenshot that shows the Updates tab in detail.
2018-03-07 23:07:44 +01:00
Hans-Christoph Steiner
29c70d998e Revert "remove image with an odd black border from the app metadata"
This reverts commit 8df7781eed17f3d10981fefc6fd741c16af856f5.
2018-03-07 23:01:48 +01:00
Hans-Christoph Steiner
215db81802 use warning suggestions for .addAll() method and null guard 2018-03-07 22:51:39 +01:00
Hans-Christoph Steiner
5547f12527 actually fix crashes from update notifications on < android-11
8600ce8d8a56398a4eb731f0cccb848c4e18d2eb didn't get all the affected places.

#1306
2018-03-07 22:51:39 +01:00
Hans-Christoph Steiner
978f4a2928 ignore potential filesystem corruption
As nice as it would be to help the users, F-Droid is not well positioned to
help the user with this problem.  The Android OS itself should do it. Plus
this issue has been open a long time, without much work on it, and the
existing solution is causing crashes.

#855
!440
!581

Utils.getBinaryHash() is used in a lot of places in the code, so its not
easy to handle this specific issue.  Here's one example:

org.fdroid.fdroid.Utils$PotentialFilesystemCorruptionException: java.io.IOException: read failed: EIO (I/O error)
	at org.fdroid.fdroid.Utils.getBinaryHash(Utils.java:426)
	at org.fdroid.fdroid.AppUpdateStatusService.findApkMatchingHash(AppUpdateStatusService.java:159)
	at org.fdroid.fdroid.AppUpdateStatusService.processDownloadedApk(AppUpdateStatusService.java:110)
	at org.fdroid.fdroid.AppUpdateStatusService.onHandleIntent(AppUpdateStatusService.java:65)
	at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.os.HandlerThread.run(HandlerThread.java:60)
2018-03-07 22:51:39 +01:00
Hans-Christoph Steiner
b9144cc95d fix pedantic warnings in Provisioner.java to make null warnings clear
The NullPointerException fixed by the previous commit had a warning to that
effect.  This fixes almost all the warnings to make the warnings clearer:

* unused method
* unused result of File.delete()
* can have reduced visibility
* single char static "" strings can be '' chars
2018-03-07 22:51:39 +01:00
dkanada
64863bb1e1 add new screenshots for knownvuln replacement 2018-03-07 12:02:22 -07:00
dkanada
b4620bd0b6 fix right padding on version list 2018-03-07 12:02:22 -07:00
dkanada
8df7781eed remove image with an odd black border from the app metadata 2018-03-07 12:02:22 -07:00
dkanada
74bf125ccb modify layouts for donation buttons 2018-03-07 12:02:22 -07:00
dkanada
cf7b786054 wrap donate linear layout in a card view 2018-03-07 12:02:22 -07:00
dkanada
80915589ee improve UI for screenshots with dark theme 2018-03-07 12:02:22 -07:00
Hans-Christoph Steiner
dffac4e797 fix boot crash when Provisioner can't find ExternalFilesDir
closes #1332
!630
2018-03-07 16:46:18 +01:00
Hans-Christoph Steiner
6055874d9d do not crash if file vanishes during getBinaryHash()
APKs can be deleted at any time, either by being uninstalled or deleted
from the cache.
2018-03-07 16:46:17 +01:00
Hans-Christoph Steiner
86cc977746 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!650
2018-03-06 23:20:12 +00:00
Hans-Christoph Steiner
a0624639fc Weblate 2018-03-06 23:20:12 +00:00
Hans-Christoph Steiner
6bb8d5e92b a couple languages don't use "other" in plurals: be pl ru 2018-03-06 23:44:30 +01:00
Hans-Christoph Steiner
70370f5d88 LocalizationTest: hiding_dialog_message has new pattern: sds 2018-03-06 23:39:47 +01:00
Hans-Christoph Steiner
c76f7addd1 LocalizationTest: increase quantity test to 567 to test the whole range 2018-03-06 23:39:47 +01:00
Hans-Christoph Steiner
6ad3604a0e Merge branch 'afWarningQrCodeScan' into 'master'
* jif-afWarningQrCodeScan:
  do not include english string in translations
  Correct check style errors
  Add style for the poor QR code scanning autofocus capability warning
  Add 'poor QR code scanning capability' translations
  Call to the camera autofocus checker in the view
  Add camera characteristics checker

fdroid/fdroidclient!649
closes #260
2018-03-06 16:35:28 +01:00
Hans-Christoph Steiner
1ef1128cf7 do not include english string in translations 2018-03-06 15:15:43 +01:00
Hans-Christoph Steiner
7d45781611 Merge branch 'fix-download' into 'master'
fix download progress for large apps

Closes #1192

See merge request fdroid/fdroidclient!647
2018-03-06 14:04:54 +00:00
jif
3bf167e85f Correct check style errors 2018-03-01 20:52:13 +01:00
jif
6b484f4f01 Add style for the poor QR code scanning autofocus capability warning 2018-03-01 18:47:14 +01:00
jif
80b5addf62 Add 'poor QR code scanning capability' translations 2018-03-01 18:44:57 +01:00
jif
6d1fc68ff1 Call to the camera autofocus checker in the view 2018-03-01 18:40:30 +01:00
jif
b419b78c94 Add camera characteristics checker
Those classes consist of 1 abstract class, which provide a factory for
2 classes each of which implements different behaviors according to
the Android API version.
2018-03-01 18:35:45 +01:00
dkanada
1facc7d07c rename version layout 2018-02-27 22:40:19 -07:00
dkanada
216695285a fix int overflow 2018-02-27 22:38:54 -07:00
Hans-Christoph Steiner
d80f589b01 create_ota.sh: add second arg to allow specifying versionCode
This is needed for a manageable build process in fdroiddata.
2018-02-23 22:55:43 +01:00
Hans-Christoph Steiner
2d9cbc5455 untabify create_ota.sh, mixed tabs/spaces is no fun 2018-02-23 22:55:43 +01:00
Hans-Christoph Steiner
1cd2e62505 Merge branch '1300-alert-dialog-background' into 'master'
Fix background of AlertDialogs for DialogPreferences

Closes #1300

See merge request fdroid/fdroidclient!634
2018-02-23 14:38:13 +00:00
Hans-Christoph Steiner
31b6bbcd3e Merge branch 'data-ota' into 'master'
Create an ota zip for installing data to f-droid

See merge request fdroid/fdroidclient!640
2018-02-23 14:37:12 +00:00
Chirayu Desai
bee7de476b Data ota
Based on privileged-extension 0.2.7 scripts
2018-02-22 02:45:40 +05:30
Hans-Christoph Steiner
32601baf5c Merge branch 'liberapay' into 'master'
add liberapay field and donation option

See merge request fdroid/fdroidclient!644
2018-02-19 22:14:52 +00:00
Marcus Hoffmann
10e2bf2a7c
add liberapay field and donation option
This add the liberapayID index field to the local db and then displays a
donation badge for apps that provide this.
2018-02-15 19:58:12 +01:00
Hans-Christoph Steiner
f1d28d5768 versionCode 1001003 2018-02-13 22:05:56 +01:00
Hans-Christoph Steiner
7436274685 update CHANGELOG 2018-02-13 22:05:49 +01:00
Hans-Christoph Steiner
4766ed2868 Merge branch '1.1-crash-fixes' into 'master'
1.1 crash fixes

Closes #1325, #1305, and #1306

See merge request fdroid/fdroidclient!643
2018-02-13 20:48:32 +00:00
Hans-Christoph Steiner
5c2e9305a8 only force index update when the locale actually changes
This was forcing an index update on any config change, even just a simple
screen rotation.  Now it actually checks whether its needed.

closes #1325
2018-02-13 21:26:49 +01:00
Hans-Christoph Steiner
30b00156db javadoc cleanup 2018-02-13 21:26:49 +01:00
Hans-Christoph Steiner
833d3f40fd CleanCacheService: reduce logcat noise, check if file exists before rm 2018-02-13 21:26:49 +01:00
Hans-Christoph Steiner
8a0abdd841 AppDetails2 run style formatter and fix line length issues 2018-02-13 20:34:02 +01:00
Hans-Christoph Steiner
532d1dfc72 make sure cached file exists before trying to scan it
Files in the cache can be deleted at any time, without warning.  F-Droid's
CleanCacheService can do it, the user can do it in Settings --> Apps, etc.
So when working with files from the cache, the methods need to be extra
defensive, checking that the file that they were given still exists.

closes #1305
2018-02-13 20:34:02 +01:00
Hans-Christoph Steiner
8600ce8d8a prevent crashes from update notifications on < android-11
closes #1306

* https://stackoverflow.com/questions/3112008/android-java-lang-illegalargumentexception-contentintent-required-error-cause
* https://stackoverflow.com/questions/20032249/is-setcontentintentpendingintent-required-in-notificationcompat-builder
2018-02-13 20:34:02 +01:00
Hans-Christoph Steiner
96fb01ca52 Merge branch 'error-prone' into 'master'
Configure error prone

fdroidclient!635
2018-02-13 20:30:23 +01:00
Hans-Christoph Steiner
a4d35244bc errorprone: All Disabled Checks As Warnings 2018-02-13 20:20:02 +01:00
Hans-Christoph Steiner
3c341b7e4b move errorprone config to its own gitlab CI job 2018-02-13 20:19:45 +01:00
Hans-Christoph Steiner
f32b26d5c3 Merge branch 'add-sorting-redo' into 'master'
Add sorting redo

fdroidclient!637
2018-02-13 17:28:54 +01:00
Hans-Christoph Steiner
782cf9917f FDroidApp.isAppThemeLight() to avoid opaque, super long test lines 2018-02-13 17:22:00 +01:00
Hans-Christoph Steiner
c031939379 run Android Studio code formatter e.g. Ctrl-Alt-L 2018-02-13 17:15:29 +01:00
Hans-Christoph Steiner
0982e8dd2d Merge branch 'more-fields-for-acra' into 'master'
ACRA: add more fields to crash reports, but no user identifying info

See merge request fdroid/fdroidclient!641
2018-02-13 16:12:16 +00:00
Allan Nordhøy
a566890963 Translated using Weblate (Norwegian Bokmål)
Currently translated at 99.2% (407 of 410 strings)
2018-02-13 17:06:42 +01:00
Andreas Kleinert
c800cb9d5c Translated using Weblate (German)
Currently translated at 99.7% (409 of 410 strings)
2018-02-13 17:06:39 +01:00
ezjerry liao
f8b18a373f Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (410 of 410 strings)
2018-02-13 17:06:35 +01:00
Hans-Christoph Steiner
959c5c0b84 Translated using Weblate (Czech)
Currently translated at 100.0% (410 of 410 strings)
2018-02-13 17:05:20 +01:00
Hans-Christoph Steiner
583dde51db Weblate (closes !642)
Squashed commit of the following:

commit f6f528d67e9bef367cfb8a3a8eaaced06233df4a
Author: Hans-Christoph Steiner <hans@eds.org>
Date:   Tue Feb 13 16:24:53 2018 +0100

    remove android xml quoting

commit d7251cc20980841ca83fd27f1e4f60c5d99460ac
Author: anonymous <>
Date:   Tue Feb 13 14:23:12 2018 +0000

    Translated using Weblate (German)

    Currently translated at 99.7% (409 of 410 strings)

commit 60f449e154fa0cd2fc986781836bad491a964866
Author: Andreas Kleinert <Andy.Kleinert@gmail.com>
Date:   Tue Feb 13 14:22:48 2018 +0000

    Translated using Weblate (German)

    Currently translated at 99.7% (409 of 410 strings)

commit b16f2f6f58ed06264c8414c90ae9cc3dad9433d6
Author: Hans-Christoph Steiner <hans@guardianproject.info>
Date:   Tue Feb 13 15:03:19 2018 +0000

    Translated using Weblate (Hebrew)

    Currently translated at 100.0% (410 of 410 strings)

commit 66601011e3cbdd64d9b68432bfff13b17ca90f4b
Author: Hans-Christoph Steiner <hans@eds.org>
Date:   Tue Feb 13 16:15:52 2018 +0100

    check for invalid mixing for format stringsj

commit cdf2e7063297d4f61259a3354a946fffdfd58114
Author: Danial Behzadi <dani.behzi@ubuntu.com>
Date:   Tue Feb 13 10:46:48 2018 +0000

    Translated using Weblate (Persian)

    Currently translated at 100.0% (410 of 410 strings)

commit e7e37ad42c94091e2ec402caac5883272275c8c4
Author: ezjerry liao <ezjerry@gmail.com>
Date:   Mon Feb 12 15:26:00 2018 +0000

    Translated using Weblate (Chinese (Traditional))

    Currently translated at 100.0% (410 of 410 strings)

commit 0850c89e297f6256babdc7f087b242cf102ef267
Author: nautilusx <mail.ka@mailbox.org>
Date:   Sat Feb 10 14:32:57 2018 +0000

    Translated using Weblate (German)

    Currently translated at 99.2% (407 of 410 strings)

commit 52d6426b2a413dae1ff2c33814ec9df895eac41b
Author: Kristjan Räts <kristjanrats@gmail.com>
Date:   Sun Feb 11 12:25:23 2018 +0000

    Translated using Weblate (Estonian)

    Currently translated at 100.0% (410 of 410 strings)

commit a308ae180dbdac2fc65076e7f35ba4549ad9f6ea
Author: Allan Nordhøy <epost@anotheragency.no>
Date:   Sat Feb 10 00:37:43 2018 +0000

    Translated using Weblate (Norwegian Bokmål)

    Currently translated at 99.2% (407 of 410 strings)

commit fb44f4cd22f7cb6ef03265d76374646d8b554066
Author: jschwender <joachim.schwender@web.de>
Date:   Fri Feb 9 21:08:25 2018 +0000

    Translated using Weblate (German)

    Currently translated at 99.2% (407 of 410 strings)

commit 450a30bbc18908e53cb10027a30332646a1b6224
Author: Julien Lepiller <roptat@lepiller.eu>
Date:   Fri Feb 9 13:31:44 2018 +0000

    Translated using Weblate (French)

    Currently translated at 99.0% (406 of 410 strings)

commit 309f8b3527f176bd1cf9cd82757978ee2c3a941f
Author: Yunyang Liu <ensigma96@gmail.com>
Date:   Fri Feb 9 12:50:13 2018 +0000

    Translated using Weblate (Chinese (Simplified))

    Currently translated at 97.0% (398 of 410 strings)

commit b4d2fbe00e7c1b276c0dde64844c18935419f3fc
Author: Rivo Zängov <rivozangov@gmail.com>
Date:   Fri Feb 9 10:13:12 2018 +0000

    Translated using Weblate (Estonian)

    Currently translated at 98.5% (404 of 410 strings)

commit 6ec7f716405dc4efc3a12204f1ed97aaad09ba45
Author: Luiz Fernando Ranghetti <elchevive@opensuse.org>
Date:   Sat Feb 10 02:58:33 2018 +0000

    Translated using Weblate (Portuguese (Brazil))

    Currently translated at 100.0% (410 of 410 strings)

commit c8af9171ac4d5fdcecb8faaabbc5c58da4053b1f
Author: Ldm Public <ldmpub@gmail.com>
Date:   Fri Feb 9 13:17:30 2018 +0000

    Translated using Weblate (French)

    Currently translated at 99.0% (406 of 410 strings)

commit 04005a0277edca69cc6885d779e2d49673c0d97e
Author: Julien Lepiller <roptat@lepiller.eu>
Date:   Fri Feb 9 13:16:05 2018 +0000

    Translated using Weblate (French)

    Currently translated at 99.0% (406 of 410 strings)

commit 5af1c4d24d25eeb03bffe953e4c5ce7aa8a68697
Author: monolifed <monolifed@gmail.com>
Date:   Thu Feb 8 12:25:29 2018 +0000

    Translated using Weblate (Turkish)

    Currently translated at 100.0% (410 of 410 strings)

commit 4c56b7725905ecc6b4be49f9f4accc95859a46bc
Author: Osoitz <oelkoro@gmail.com>
Date:   Fri Feb 9 10:59:06 2018 +0000

    Translated using Weblate (Basque)

    Currently translated at 100.0% (410 of 410 strings)

commit 7d73c299ceab39b2c674fadc2a32b2154f96e060
Author: Ajeje Brazorf <lmelonimamo@yahoo.it>
Date:   Wed Feb 7 20:24:39 2018 +0000

    Translated using Weblate (Sardinian)

    Currently translated at 99.5% (408 of 410 strings)

commit b0027266898267619b0eb20e206a968c5e0c527e
Author: Felipe Rodrigues <bidu.pub@gmail.com>
Date:   Wed Feb 7 13:41:04 2018 +0000

    Translated using Weblate (Portuguese (Brazil))

    Currently translated at 99.7% (409 of 410 strings)

commit 0207c99f39fb5c43b530c6fa05c4c3f2edc278e6
Author: azumukupoe <azumukupoe1999@gmail.com>
Date:   Wed Feb 7 13:19:06 2018 +0000

    Translated using Weblate (Japanese)

    Currently translated at 100.0% (410 of 410 strings)

commit 439b5eeee86d2dc5a7eb9d06890ff3aa62aad4d0
Author: monolifed <monolifed@gmail.com>
Date:   Thu Feb 8 12:19:09 2018 +0000

    Translated using Weblate (Turkish)

    Currently translated at 100.0% (410 of 410 strings)

commit f3921bb42db891bf1cfa4c8e3d1699aba41f4807
Author: Yaron Shahrabani <sh.yaron@gmail.com>
Date:   Wed Feb 7 08:08:20 2018 +0000

    Translated using Weblate (Hebrew)

    Currently translated at 100.0% (410 of 410 strings)

commit 74c0eb25e6dcc75836bb01fd96b8c04de8cd4a4c
Author: Verdulo <tomek@disroot.org>
Date:   Wed Feb 7 18:04:14 2018 +0000

    Translated using Weblate (Polish)

    Currently translated at 100.0% (410 of 410 strings)

commit 272b00b8dfa0c530a9a51f6b980b0d311c921bfd
Author: Viktar Vauchkevich <victorenator@gmail.com>
Date:   Tue Feb 6 14:06:00 2018 +0000

    Translated using Weblate (Belarusian)

    Currently translated at 98.2% (403 of 410 strings)

commit b28a9e57dd21c5f28dbf3555cadca0a20770a337
Author: Takumi Shoji <azumukupoe1999@gmail.com>
Date:   Wed Feb 7 13:06:00 2018 +0000

    Translated using Weblate (Japanese)

    Currently translated at 100.0% (410 of 410 strings)

commit 56422c2d9ec3de0401793a7e0767c376925cc88f
Author: Sérgio Marques <smarquespt@gmail.com>
Date:   Tue Feb 6 11:56:27 2018 +0000

    Translated using Weblate (Portuguese (Portugal))

    Currently translated at 98.0% (402 of 410 strings)

commit cd4ab7fdb3844f39c2f686b2ce0571b6de622cbb
Author: Licaon Kter <licaon.kter@protonmail.com>
Date:   Tue Feb 6 09:05:10 2018 +0000

    Translated using Weblate (Romanian)

    Currently translated at 95.8% (393 of 410 strings)

commit ca68defd60db953419364758502b9a330b43598f
Author: Ldm Public <ldmpub@gmail.com>
Date:   Tue Feb 6 07:38:41 2018 +0000

    Translated using Weblate (French)

    Currently translated at 98.2% (403 of 410 strings)

commit d0931b98aae70cfefee5e4b13f460aa7156c4270
Author: Verdulo <tomek@disroot.org>
Date:   Tue Feb 6 19:35:39 2018 +0000

    Translated using Weblate (Esperanto)

    Currently translated at 100.0% (410 of 410 strings)

commit bf7173ca6ba9c7b3d9b6f361c2614827ee887e81
Author: Nathan Follens <nathan@email.is>
Date:   Tue Feb 6 11:29:34 2018 +0000

    Translated using Weblate (Dutch)

    Currently translated at 100.0% (410 of 410 strings)

commit cdb4adc18c5ac818a16cb287624226093fe70a47
Author: Yaron Shahrabani <sh.yaron@gmail.com>
Date:   Tue Feb 6 09:06:28 2018 +0000

    Translated using Weblate (Hebrew)

    Currently translated at 100.0% (410 of 410 strings)

commit 93dcc2a0ad171ab4b846e032756ca14c7bd04f04
Author: Sveinn í Felli <sv1@fellsnet.is>
Date:   Tue Feb 6 07:41:40 2018 +0000

    Translated using Weblate (Icelandic)

    Currently translated at 100.0% (410 of 410 strings)

commit 5b359ea0fd1a5d8a5c3f67c2b448cf61c6c57424
Author: ezjerry liao <ezjerry@gmail.com>
Date:   Tue Feb 6 01:45:45 2018 +0000

    Translated using Weblate (Chinese (Traditional))

    Currently translated at 100.0% (410 of 410 strings)

commit 254dc5f0ad07349ba3f6e39fce37fc4cb17c88d1
Author: anonymous <>
Date:   Fri Feb 2 16:09:15 2018 +0000

    Translated using Weblate (German)

    Currently translated at 100.0% (402 of 402 strings)

commit 44b823af4261f4a24b1fde8dc6bc662894583e2f
Author: Licaon Kter <licaon.kter@protonmail.com>
Date:   Fri Feb 2 07:34:53 2018 +0000

    Translated using Weblate (Romanian)

    Currently translated at 96.7% (389 of 402 strings)

commit 0069bef97bcb4d5e87d8fd50c5023dcbe2ae563e
Author: Viktar Vauchkevich <victorenator@gmail.com>
Date:   Wed Jan 31 19:20:15 2018 +0000

    Translated using Weblate (Belarusian)

    Currently translated at 100.0% (402 of 402 strings)

commit 92042d49087f950908a2d312a027976f44554205
Author: Марс Ямбар <mjambarmeta@gmail.com>
Date:   Tue Jan 30 17:04:37 2018 +0000

    Translated using Weblate (Ukrainian)

    Currently translated at 97.7% (393 of 402 strings)

commit 0555d776876940629b1fc1f5fb99b98c139c5a98
Author: Xuacu Saturio <xuacusk8@gmail.com>
Date:   Tue Jan 30 20:22:42 2018 +0000

    Translated using Weblate (Asturian)

    Currently translated at 100.0% (402 of 402 strings)

commit 2e9a284da728fc530f09640f0e33bcdf91947bce
Author: Luca D'Amico <damico.luca91@live.it>
Date:   Mon Jan 29 16:40:19 2018 +0000

    Translated using Weblate (Italian)

    Currently translated at 100.0% (402 of 402 strings)

commit 7640aa3613cbf1d73093ee5445a21be699bfb178
Author: yamabiko <dragonfly@cryptolab.net>
Date:   Mon Jan 29 16:38:41 2018 +0000

    Translated using Weblate (Italian)

    Currently translated at 100.0% (402 of 402 strings)

commit ffc447abaf1af07114b039c028805549e662894d
Author: Luca D'Amico <damico.luca91@live.it>
Date:   Mon Jan 29 16:38:27 2018 +0000

    Translated using Weblate (Italian)

    Currently translated at 99.7% (401 of 402 strings)

commit 248e7df90d2aac7b3d189de0b241a44522202be0
Author: yamabiko <dragonfly@cryptolab.net>
Date:   Mon Jan 29 16:38:20 2018 +0000

    Translated using Weblate (Italian)

    Currently translated at 99.7% (401 of 402 strings)

commit ce561bd4eff83280816322f0a74d6cf1695dd249
Author: Luca D'Amico <damico.luca91@live.it>
Date:   Mon Jan 29 16:36:47 2018 +0000

    Translated using Weblate (Italian)

    Currently translated at 99.2% (399 of 402 strings)

commit 06d21c188e263b74fb5b1e200d207373418de1c7
Author: yamabiko <dragonfly@cryptolab.net>
Date:   Mon Jan 29 16:36:14 2018 +0000

    Translated using Weblate (Italian)

    Currently translated at 99.2% (399 of 402 strings)

commit 2afc5deb08c8e5c41820f4a99cf82d8381eaec82
Author: リー <meluten@gmail.com>
Date:   Sun Jan 28 12:15:27 2018 +0000

    Translated using Weblate (German)

    Currently translated at 100.0% (402 of 402 strings)

commit 28ebd01fbade7bf960a69e3cbfd88e1d32fb6b2c
Author: Yunyang Liu <ensigma96@gmail.com>
Date:   Fri Jan 26 14:58:52 2018 +0000

    Translated using Weblate (Chinese (Simplified))

    Currently translated at 98.2% (395 of 402 strings)
2018-02-13 17:01:20 +01:00
hotlittlewhitedog
93885371cc add-sorting-redo-c3
modified:   app/src/main/java/org/fdroid/fdroid/views/apps/AppListActivity.java
	modified:   app/src/main/res/layout/activity_app_list.xml
2018-02-12 18:59:27 +01:00
hotlittlewhitedog
e72348b2d9 add-sorting-redo-c2
modified:   app/src/main/java/org/fdroid/fdroid/views/apps/AppListActivity.java
	modified:   app/src/main/res/layout/activity_app_list.xml
2018-02-12 18:32:15 +01:00
Hans-Christoph Steiner
0159020c2e whitespace code format changes for AndroidManifest.xml
This moves towards the standard Android Studio Ctrl-Alt-L code format with
only whitespace changes.  This just removes this one kind of space, since
its widespread, and easy to track.  I did this using:

sed -i 's," />,"/>,g' app/src/main/AndroidManifest.xml
2018-02-08 23:47:53 +01:00
Hans-Christoph Steiner
0f98e1e125 ACRA: add more fields to crash reports, but no user identifying info
extended info on things we already have:
* PRODUCT is another name for BRAND/PHONE_MODEL
* TOTAL_MEM_SIZE can be derived from hardware name
* DISPLAY is also available by looking up the hardware
* STACK_TRACE_HASH should make automated sorting easier

new info:
* PACKAGE_NAME is only new info if the user is using a whitelabel app
* AVAILABLE_MEM_SIZE can be used to track users, but only when provided at
  high resolution, e.g. once per second or higher.  Most users only send a
  single crash report.  High frequency reporters send under 100, which is
  still orders of magnatude below what is needed to track users.
2018-02-08 23:41:31 +01:00
hotlittlewhitedog
333d0a5ea3 add_sorting_redo_c1
new file:   app/src/main/res/drawable-hdpi/ic_az_white.png
	modified:   app/src/main/res/drawable-hdpi/ic_last_updated_black.png
	new file:   app/src/main/res/drawable-hdpi/ic_last_updated_white.png
	new file:   app/src/main/res/drawable-mdpi/ic_az_white.png
	modified:   app/src/main/res/drawable-mdpi/ic_last_updated_black.png
	new file:   app/src/main/res/drawable-mdpi/ic_last_updated_white.png
	new file:   app/src/main/res/drawable-xhdpi/ic_az_white.png
	modified:   app/src/main/res/drawable-xhdpi/ic_last_updated_black.png
	new file:   app/src/main/res/drawable-xhdpi/ic_last_updated_white.png
	new file:   app/src/main/res/drawable-xxhdpi/ic_az_white.png
	modified:   app/src/main/res/drawable-xxhdpi/ic_last_updated_black.png
	new file:   app/src/main/res/drawable-xxhdpi/ic_last_updated_white.png
	new file:   app/src/main/res/drawable-xxxhdpi/ic_az_white.png
	modified:   app/src/main/res/drawable-xxxhdpi/ic_last_updated_black.png
	new file:   app/src/main/res/drawable-xxxhdpi/ic_last_updated_white.png
	modified:   app/src/main/res/layout/activity_app_list.xml
2018-02-07 19:09:35 +01:00
Hans-Christoph Steiner
b11cc6ab28 checkstyle fixes: LineLength 2018-02-06 00:17:43 +01:00
Hans-Christoph Steiner
bb37a013a8 checkstyle: do not include URLs in line length checks 2018-02-06 00:17:43 +01:00
Hans-Christoph Steiner
c95c2ed283 gitlab-ci: order "tests" job so most important are run first
This means that we can decide whether to ignore the style tests if the
rest of the more meaningful tests pass.
2018-02-06 00:17:43 +01:00
Hans-Christoph Steiner
82f5e4ff31 add standard pre-push hook that runs basic gradle checks 2018-02-06 00:17:43 +01:00
Hans-Christoph Steiner
1e0200fa30 add standard pre-commit hook that does quick checks, e.g. l18n scripts 2018-02-06 00:17:43 +01:00
Hans-Christoph Steiner
2daf741c4a versionCode 1001002 2018-02-06 00:17:43 +01:00
Hans-Christoph Steiner
3fa90e4666 update CHANGELOG 2018-02-06 00:17:43 +01:00
Hans-Christoph Steiner
606ef45bcd Merge branch 'force-updates' into 'master'
force updates after OS update and system locale changes

Closes #780 and #225

See merge request fdroid/fdroidclient!636
2018-02-05 23:13:53 +00:00
hotlittlewhitedog
54ed573070 add-sorting-newic-redo
new file:   app/src/main/res/drawable-hdpi/ic_az_black.png
	new file:   app/src/main/res/drawable-hdpi/ic_last_updated_black.png
	new file:   app/src/main/res/drawable-mdpi/ic_az_black.png
	new file:   app/src/main/res/drawable-mdpi/ic_last_updated_black.png
	new file:   app/src/main/res/drawable-xhdpi/ic_az_black.png
	new file:   app/src/main/res/drawable-xhdpi/ic_last_updated_black.png
	new file:   app/src/main/res/drawable-xxhdpi/ic_az_black.png
	new file:   app/src/main/res/drawable-xxhdpi/ic_last_updated_black.png
	new file:   app/src/main/res/drawable-xxxhdpi/ic_az_black.png
	new file:   app/src/main/res/drawable-xxxhdpi/ic_last_updated_black.png
2018-02-04 22:15:46 +01:00
hotlittlewhitedog
b79c6a9780 add-sorting-redo
modified:   app/src/main/java/org/fdroid/fdroid/views/apps/AppListActivity.java
	modified:   app/src/main/res/layout/activity_app_list.xml
	modified:   app/src/main/res/values/strings.xml
	app/src/main/res/drawable-hdpi/ic_az_black.png
	app/src/main/res/drawable-hdpi/ic_last_updated_black.png
	app/src/main/res/drawable-mdpi/ic_az_black.png
	app/src/main/res/drawable-mdpi/ic_last_updated_black.png
	app/src/main/res/drawable-xhdpi/ic_az_black.png
	app/src/main/res/drawable-xhdpi/ic_last_updated_black.png
	app/src/main/res/drawable-xxhdpi/ic_az_black.png
	app/src/main/res/drawable-xxhdpi/ic_last_updated_black.png
	app/src/main/res/drawable-xxxhdpi/ic_az_black.png
	app/src/main/res/drawable-xxxhdpi/ic_last_updated_black.png
2018-02-04 22:13:20 +01:00
Hans-Christoph Steiner
29658259fa force clean index update when underlying OS is upgraded
Things like permission support, locales, etc. can change when Android is
updated.  So the database should be rebuilt from scratch with a fresh
download of the indexes.

closes #780
2018-01-31 16:20:24 +01:00
Hans-Christoph Steiner
887c55247a force full index update when system locale changes
The database currently only stores the active language.  So if the
user changes the system language of the phone, then the language of
all the app descriptions will be out of sync until the next update.
This forces an update when the locale is changed.  This functionality
is also needed for events like OS upgrades.

closes #225
2018-01-31 16:20:24 +01:00
Hans-Christoph Steiner
6448491751 WifiStateChangeService: exit after trying for 2 minutes
It was tried until it got an IP address, but that will only happen if there
is a wifi device configured.  Since WifiStateChangeService is started when
F-Droid starts, WifiStateChangeService could run for days if someone never
connected to WiFi in that time.

WifiStateChangeService is also started by NETWORK_STATE_CHANGED_ACTION so
it should start each time there is a change to the WiFi connection.
2018-01-31 16:20:23 +01:00
Hans-Christoph Steiner
8a8ca2e6f7 WifiStateChangeService: use Intent static start method pattern
This is the standard pattern for starting IntentServices.  It also makes
it really easy to trace what is starting this Service.
2018-01-31 16:20:23 +01:00
Hans-Christoph Steiner
6d011c3895 use triedEmptyUpdate methods in Preferences throughout the codebase
We have these methods, they should be used!
2018-01-31 16:20:23 +01:00
Hans-Christoph Steiner
d8879dd425 make DBHelper follow the Java Singleton pattern
It was already behaving like a singleton, but the code was spread around in
other classes.  DBHelper does not use a private constructor though since
the tests prevent it.
2018-01-31 16:20:23 +01:00
Hans-Christoph Steiner
2fe7faed6e convert panic preferences to standard Preferences code style
Yes, this is an ugly and old style, but mixing styles only makes it worse.
Plus it breaks the tests in some cases, since it makes Preferences depend
on Resources.
2018-01-31 15:04:14 +01:00
Torsten Grote
a639edb59c
Style NoPanicApp icon depending on theme 2018-01-30 19:07:37 -02:00
Andrew Gaul
d3cb775101 Configure error prone
Disable a few noisy warnings.
2018-01-30 09:03:29 -08:00
Hans-Christoph Steiner
6260c11efc Merge branch 'static-inner-class' into 'master'
Make some inner classes static

See merge request fdroid/fdroidclient!633
2018-01-30 15:11:55 +00:00
Torsten Grote
95b138b5d5
Fix background of AlertDialogs for DialogPreferences 2018-01-29 17:26:32 -02:00
Hans-Christoph Steiner
f83094d9fe Merge branch 'app-hiding' into 'master'
Implement App Hiding

See merge request fdroid/fdroidclient!629
2018-01-29 19:18:09 +00:00
Andrew Gaul
94c4374bf7 Make some inner classes static
This avoids an implicit this field and can help GC.  Found via
error-prone.
2018-01-28 16:28:56 -08:00
Torsten Grote
6067c15085
Implement App Hiding
This commit allows F-Droid to hide itself from the laucher.
It can be hidden either as response to a panic trigger
or as a manual action by long pressing the floating search button.
The latter needs to be explicitly enabled in the settings.

Once hidden, a semi-functional fake calculator app appears in the
launcher that can be used to bring F-Droid back by entering a
pre-defined PIN.
2018-01-27 16:42:59 -02:00
Hans-Christoph Steiner
3b65cd38e7 update CHANGELOG 2018-01-26 22:58:48 +01:00
Hans-Christoph Steiner
34c17c7e74 versionCode 1001001 2018-01-26 22:58:48 +01:00
dkanada
b5e6db76a7 rename strings and preferences
!617
2018-01-26 19:24:55 +01:00
Hans-Christoph Steiner
6fe1fa581f Merge branch 'provisioning' into 'master'
file based provisioning + authentication support in add repo Intents

See merge request fdroid/fdroidclient!630
2018-01-26 18:24:21 +00:00
Hans-Christoph Steiner
d6ab0ddde1 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!631
2018-01-26 16:58:59 +00:00
Hans-Christoph Steiner
e3d47fbe81 Weblate 2018-01-26 16:58:53 +00:00
Michael Pöhn
c60c606dcf remove outdated comments; use File concatenation instead of separators 2018-01-26 17:56:06 +01:00
Hans-Christoph Steiner
1959657092 Merge branch 'issue-1295' into 'master'
Fixes the behaviour of cancel button

Closes #1295

See merge request fdroid/fdroidclient!628
2018-01-26 12:39:08 +00:00
Hans-Christoph Steiner
c61024e070 Merge branch 'add-padding-to-last-app-redo' into 'master'
Add padding to last app in Category

See merge request fdroid/fdroidclient!625
2018-01-26 13:30:26 +01:00
Hans-Christoph Steiner
720822e260 keep category count at original number: 20 2018-01-26 13:29:29 +01:00
Michael Pöhn
aab46c8ab2 implemented provisioning routine 2018-01-25 23:28:15 +01:00
Michael Pöhn
bb1292586b fix lint for ManageRepoActivity 2018-01-25 23:28:15 +01:00
Michael Pöhn
0f64fd30c6 fix lint for NewRepoConfig 2018-01-25 23:28:15 +01:00
Michael Pöhn
b13e27f759 trigger provisions on app start 2018-01-25 23:28:15 +01:00
Michael Pöhn
9786fd2550 added authentication parsing support to add-repo dialog 2018-01-25 23:28:15 +01:00
Michael Pöhn
96def8adca added parsing for repository signing key property to provisioning files 2018-01-25 23:28:15 +01:00
Michael Pöhn
4a5ad0a33d implemented parser for (repository) provisioning 2018-01-25 23:28:15 +01:00
Shobhit Agarwal
88e567354e Fixes the behaviour of cancel button 2018-01-24 00:09:35 +05:30
Hans-Christoph Steiner
dd0f791e3f Merge branch 'android-app-links' into 'master'
set up "Android App Links" handling aka "Digital Asset Links"

See merge request fdroid/fdroidclient!626
2018-01-17 13:23:57 +00:00
Hans-Christoph Steiner
b1c435d3a4 Merge branch '1277-fix-screenshot-prevention' into 'master'
Make sure FLAG_SECURE is set on all activities when activated

Closes #1277

See merge request fdroid/fdroidclient!627
2018-01-15 15:27:44 +00:00
Torsten Grote
0922953bca
Make sure FLAG_SECURE is set on all activities when activated 2018-01-15 11:36:25 -02:00
Hans-Christoph Steiner
3938146f93 set up "Android App Links" handling aka "Digital Asset Links"
Add all the new URL path possibilities with the new website to the filter,
and the possible, official host names.  This makes it more likely that
f-droid.org links go straight to F-Droid.

* https://developers.google.com/digital-asset-links/v1/getting-started
* https://developer.android.com/training/app-links/verify-site-associations.html

fdroid-website#165
2018-01-12 13:50:32 +01:00
Hans-Christoph Steiner
a09b1ecb58 gitlab-ci: the client image now provides fdroidserver 2018-01-12 13:50:32 +01:00
Hans-Christoph Steiner
f748d1e5fc review AppSecurityPermissions for new changes to sync 2018-01-12 13:50:32 +01:00
Hans-Christoph Steiner
55aa8e9aa6 use standard buffer size for Utils.getBinaryHash()
While a large buffer might make things slightly faster, the smaller buffer
size should play much nicer when F-Droid is doing things in the background.
Since calculating the hash is part of the update procedure, which can now
happen in the background, this method will be often running in the
background.

The tests showed no difference in time between the large and small buffer.
2018-01-12 13:50:32 +01:00
Hans-Christoph Steiner
69f6560ba8 gitlab-ci: replace clbin uploads with GitLab CI Artifacts
This gathers all files that are not tracked by git into a named ZIP file,
which is available for 1 week to download from the Pipelines page for the
fork that ran the build.
2018-01-12 13:50:28 +01:00
Hans-Christoph Steiner
eda48c09c7 Merge branch 'master' into 'master'
switch nightly repo to finalized `fdroid nightly` command

See merge request fdroid/fdroidclient!623
2018-01-11 22:45:46 +00:00
hotlittlewhitedog
ec2b82f827 add-padding-to-last-app-redo
modified:   app/src/main/java/org/fdroid/fdroid/views/categories/CategoryController.java
	modified:   app/src/main/res/layout/category_item.xml
	modified:   app/src/main/res/values/dimens.xml
2018-01-11 21:31:46 +01:00
Hans-Christoph Steiner
81f725f9f8 fix lint WrongConstant
Donno how that magic number slipped in, this is the actual flag.
/builds/eighthave/fdroidclient/app/src/main/java/org/fdroid/fdroid/acra/CrashReportSender.java:31: Error: Must be one or more of: Intent.FLAG_GRANT_READ_URI_PERMISSION, Intent.FLAG_GRANT_WRITE_URI_PERMISSION, Intent.FLAG_FROM_BACKGROUND, Intent.FLAG_DEBUG_LOG_RESOLUTION, Intent.FLAG_EXCLUDE_STOPPED_PACKAGES, Intent.FLAG_INCLUDE_STOPPED_PACKAGES, Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, Intent.FLAG_GRANT_PREFIX_URI_PERMISSION, Intent.FLAG_ACTIVITY_NO_HISTORY, Intent.FLAG_ACTIVITY_SINGLE_TOP, Intent.FLAG_ACTIVITY_NEW_TASK, Intent.FLAG_ACTIVITY_MULTIPLE_TASK, Intent.FLAG_ACTIVITY_CLEAR_TOP, Intent.FLAG_ACTIVITY_FORWARD_RESULT, Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP, Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS, Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT, Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED, Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, Intent.FLAG_ACTIVITY_NEW_DOCUMENT, Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, Intent.FLAG_ACTIVITY_NO_USER_ACTION, Intent.FLAG_ACTIVITY_REORDER_TO_FRONT, Intent.FLAG_ACTIVITY_NO_ANIMATION, Intent.FLAG_ACTIVITY_CLEAR_TASK, Intent.FLAG_ACTIVITY_TASK_ON_HOME, Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS, Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT, Intent.FLAG_RECEIVER_REGISTERED_ONLY, Intent.FLAG_RECEIVER_REPLACE_PENDING, Intent.FLAG_RECEIVER_FOREGROUND, Intent.FLAG_RECEIVER_NO_ABORT, Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS [WrongConstant]

MODE_APPEND is only for openFileOutput
/builds/eighthave/fdroidclient/app/src/main/java/org/fdroid/fdroid/localrepo/SwapService.java:105: Error: Must be one or more of: Context.MODE_PRIVATE, Context.MODE_WORLD_READABLE, Context.MODE_WORLD_WRITEABLE, Context.MODE_MULTI_PROCESS [WrongConstant]
2018-01-04 23:01:00 +01:00
Hans-Christoph Steiner
8f170ddb13 include screenshot of KnownVuln interaction in Updates tab 2018-01-04 23:01:00 +01:00
Hans-Christoph Steiner
8b074e3a30 gitlab-ci: set nightly build app name to "F-Nightly" 2018-01-04 23:01:00 +01:00
Hans-Christoph Steiner
91b67a9b39 gitlab-ci: add nightly repo to deploy builds as default enabled 2018-01-04 23:01:00 +01:00
Hans-Christoph Steiner
0983a6a0b0 gitlab-ci: nightly builds using fdroid nightly 2018-01-04 23:00:55 +01:00
Hans-Christoph Steiner
a170b054dd Merge branch '1258-panic-kit' into 'master'
Basic PanicKit Support with one default action

Closes #1258

See merge request fdroid/fdroidclient!621
2017-12-14 16:46:30 +00:00
Torsten Grote
512789aafa
Basic PanicKit Support with one default action
The default action closes F-Droid and removes it from the list of recent
apps.

Destructive action will be added later.
2017-12-06 16:25:01 -02:00
Hans-Christoph Steiner
5ddedcf486 update ChangeLog 2017-12-01 21:26:12 +01:00
Hans-Christoph Steiner
1ef92f55cd Merge branch 'html-with-saved-newlines' into 'master'
implement HTML with preserved newlines for app descriptions

Closes #1114

See merge request fdroid/fdroidclient!618
2017-12-01 19:59:40 +00:00
Hans-Christoph Steiner
2efdbfb007 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!619
2017-12-01 13:19:58 +00:00
Hans-Christoph Steiner
0c5ba631cf remove odd quoting 2017-12-01 14:00:39 +01:00
Hans-Christoph Steiner
1d4c6161dc fix plurals missing "other" 2017-12-01 14:00:39 +01:00
Hans-Christoph Steiner
a8e87c8f0a removed unused and blank 2017-12-01 14:00:39 +01:00
Hans-Christoph Steiner
0508dc25a3 remove odd quoting 2017-12-01 14:00:39 +01:00
Hans-Christoph Steiner
1095469cd0 implement HTML with preserved newlines for app descriptions
#1000
closes #1114
2017-12-01 13:40:37 +01:00
Myeongjin Lee
ed0ab169fb Translated using Weblate (Korean)
Currently translated at 100.0% (388 of 388 strings)
2017-12-01 12:17:25 +01:00
Takumi Shoji
8e729ce86b Translated using Weblate (Japanese)
Currently translated at 100.0% (388 of 388 strings)
2017-12-01 12:17:25 +01:00
BennyBeat
704456e18c Translated using Weblate (Catalan)
Currently translated at 100.0% (388 of 388 strings)
2017-12-01 12:17:25 +01:00
Viktar Vauchkevich
685cd4cfa2 Translated using Weblate (Belarusian)
Currently translated at 99.7% (387 of 388 strings)
2017-12-01 12:17:25 +01:00
Yaron Shahrabani
95487cdd74 Translated using Weblate (Hebrew)
Currently translated at 100.0% (388 of 388 strings)
2017-12-01 12:17:25 +01:00
Myeongjin Lee
b6820ecdf8 Translated using Weblate (Korean)
Currently translated at 100.0% (388 of 388 strings)
2017-12-01 12:17:25 +01:00
ezjerry liao
1c632199b3 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (388 of 388 strings)
2017-12-01 12:17:25 +01:00
BennyBeat
1295e9ff53 Translated using Weblate (Catalan)
Currently translated at 100.0% (388 of 388 strings)
2017-12-01 12:17:25 +01:00
Ldm Public
0e4b06fd1b Translated using Weblate (French)
Currently translated at 100.0% (388 of 388 strings)
2017-12-01 12:17:25 +01:00
Ajeje Brazorf
e83553dafa Translated using Weblate (Sardinian)
Currently translated at 100.0% (388 of 388 strings)
2017-12-01 12:17:25 +01:00
Allan Nordhøy
c8eeab200c Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
anonymous
5bc1f00f7c Translated using Weblate (German)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Kaveeta Vivatchai
2a0ffd4ed2 Translated using Weblate (Thai)
Currently translated at 69.8% (269 of 385 strings)
2017-12-01 12:17:25 +01:00
Claus Rüdinger
89480b0b57 Translated using Weblate (German)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
monolifed
f03de08201 Translated using Weblate (Turkish)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Lobsang
9b8eaec0fe Translated using Weblate (Tibetan)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
E T
ccd24acf2b Translated using Weblate (Turkish)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Tobias Bannert
65d98abaf0 Translated using Weblate (German)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
BennyBeat
fb219efaab Translated using Weblate (Catalan)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
ButterflyOfFire
8025004578 Translated using Weblate (Kabyle)
Currently translated at 51.9% (200 of 385 strings)
2017-12-01 12:17:25 +01:00
Claus Rüdinger
389beee6a2 Translated using Weblate (German)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Balázs Meskó
351712a836 Translated using Weblate (Hungarian)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Rafał Michalski
46e286df96 Translated using Weblate (Polish)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Ldm Public
76050de2f4 Translated using Weblate (French)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
omar anwar aglan
7ae2aac589 Translated using Weblate (Arabic)
Currently translated at 98.7% (380 of 385 strings)
2017-12-01 12:17:25 +01:00
xin
100e1c03db Translated using Weblate (French)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Milen Vanchev
b8caa06979 Translated using Weblate (Bulgarian)
Currently translated at 92.2% (355 of 385 strings)
2017-12-01 12:17:25 +01:00
Allan Nordhøy
eccae1aa8f Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Anton Shestakov
d98b6c3077 Translated using Weblate (Russian)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
mesnevi
f61ee5edfa Translated using Weblate (Russian)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Pavel Kolotnev
d74d640388 Translated using Weblate (Russian)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Борис Тимофеев
61ebef9e79 Translated using Weblate (Russian)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
mesnevi
9384b6904e Translated using Weblate (Russian)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Solonix
7a313262e9 Translated using Weblate (Russian)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
mesnevi
f1a8f7c0d4 Translated using Weblate (Russian)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
mesnevi
5001356f7f Translated using Weblate (Russian)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Allan Nordhøy
945c51bd80 Translated using Weblate (Norwegian Bokmål)
Currently translated at 99.7% (384 of 385 strings)
2017-12-01 12:17:25 +01:00
Myeongjin Lee
012cf26fc2 Translated using Weblate (Korean)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
anonymous
24e0db226d Translated using Weblate (German)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Claus Rüdinger
7f209f4994 Translated using Weblate (German)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
jan madsen
ccb34538af Translated using Weblate (Danish)
Currently translated at 99.2% (382 of 385 strings)
2017-12-01 12:17:25 +01:00
Jonatan Nyberg
abf01ba42d Translated using Weblate (Swedish)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Slimane Amiri
b682b337ed Translated using Weblate (Kabyle)
Currently translated at 52.2% (201 of 385 strings)
2017-12-01 12:17:25 +01:00
R
143469cc8b Translated using Weblate (French)
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Marcus Vinicius Santos
94be88c2ff Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (385 of 385 strings)
2017-12-01 12:17:25 +01:00
Muḥend Belqasem
1129234341 Translated using Weblate (Kabyle)
Currently translated at 51.6% (199 of 385 strings)
2017-12-01 12:17:25 +01:00
Muḥend Belqasem
5056f612ad Translated using Weblate (Kabyle)
Currently translated at 39.7% (153 of 385 strings)
2017-12-01 12:17:25 +01:00
Hans-Christoph Steiner
92f94ef195 Merge branch 'trim-names-and-summaries' into 'master'
Trim names and summaries

See merge request fdroid/fdroidclient!613
2017-12-01 11:17:12 +00:00
Hans-Christoph Steiner
a2c436fd65 Merge branch 'fix-1203--unknown-loader-id' into 'master'
Correctly re-initialize loaders in updates screen.

Closes #1203

See merge request fdroid/fdroidclient!616
2017-12-01 11:00:23 +00:00
Peter Serwylo
50b4aac263 Correctly re-initialize loaders in updates screen.
There used to be a single loader which would get all apps which have
updates available. This was restarted when we were notified about new
apps requiring updates.

Then, in 7424220 I introduced a second loader responsible for getting
apps with known vulnerabilities. This change caused the bug in #1203,
because it changed the loaders from a single loader with ID = 0, to two
different loaders with arbitrary IDs. However, there was still a line of
code responding to when repo updates completed and we learn about new
updateable apps, and this was asking for a loader with an ID of 0 like
before. This crashed when the loader was completed and we tried to pase
the results.

This is fixed ensuring that both loaders are restarted upon learning of
new updateable apps. To prevent this disconnect in the future, they are
also extracted into the same method.
2017-11-30 08:12:51 +11:00
Hans-Christoph Steiner
810533cb1f Merge branch '1257-screenshot-protection' into 'master'
Add a setting to prevent screenshots from being taken (off by default)

Closes #1257

See merge request fdroid/fdroidclient!615
2017-11-29 12:36:51 +00:00
Torsten Grote
cdc0b8b1ea
Add a setting to prevent screenshots from being taken (off by default) 2017-11-28 16:13:43 -02:00
Hans-Christoph Steiner
3fbf77c276 Merge branch 'debug-build-tricks' into 'master'
debug build tricks: set applicationId, versionName, versionCode

See merge request fdroid/fdroidclient!609
2017-11-23 19:09:11 +00:00
Hans-Christoph Steiner
d4d9707631 on debug builds, set versionCode using DB_VERSION + commit count
This provides an automatic way to generate updates from each new debug
build, it is build from the developer's machine or via the nightly repo.
2017-11-23 10:55:13 +01:00
Hans-Christoph Steiner
427d0d0aa0 add 'debug' to applicationId and versionName for debug builds 2017-11-23 10:55:13 +01:00
Hans-Christoph Steiner
4265b45f18 Merge branch '1089-whitelabel-applicationid' into 'master'
Remove dependence on "org.fdroid.fdroid" to make whitelabel clients easier

Closes #1089

See merge request fdroid/fdroidclient!614
2017-11-22 22:55:11 +00:00
Torsten Grote
4149cf7e8c
Remove dependence on "org.fdroid.fdroid" to make whitelabel clients easier 2017-11-22 13:21:06 -02:00
Jonas Kalderstam
44d984786f Trim names and summaries on database insert
When metadata is read from localized files such as
Fastlane/Triple-Play the names/summaries get stored on the server with
a trailing newline. This is not a problem when displaying as HTML as
in a browser but causes unwanted whitespace in the app.

See also https://gitlab.com/fdroid/fdroidserver/merge_requests/375,
and https://gitlab.com/fdroid/fdroidclient/issues/1114
2017-11-20 00:36:12 +01:00
Peter Serwylo
ac7169262e Merge branch 'animate-search-view' into 'master'
Animate search view

See merge request fdroid/fdroidclient!610
2017-11-19 20:36:18 +00:00
Peter Serwylo
4c6dd8d5ac Merge branch 'uninstall-button' into 'master'
uninstall-button (wrap)

See merge request fdroid/fdroidclient!600
2017-11-19 20:33:19 +00:00
Christine Emrich
cd5ba9d8f2 Give search item stable ids to animate rows during search 2017-11-13 20:37:40 +01:00
Peter Serwylo
b86723be44 Merge branch 'permission-group-icon-color' into 'master'
Change color of permission group icons in alert dialog according to theme

See merge request fdroid/fdroidclient!611
2017-11-11 21:33:48 +00:00
Christine Emrich
6970f4a94a Change color of permission group icons in alert dialog according to theme 2017-11-11 11:11:37 +01:00
Hans-Christoph Steiner
2a6c700648 update CHANGELOG 2017-11-09 23:59:25 +01:00
Hans-Christoph Steiner
bcc29ef6c9 versionCode 1001000 2017-11-09 23:59:25 +01:00
Hans-Christoph Steiner
540bd4741f Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!608
2017-11-09 22:43:11 +00:00
Hans-Christoph Steiner
c8aac78321 Weblate 2017-11-09 22:43:11 +00:00
Hans-Christoph Steiner
75d3e47572 Merge branch '#936-view-screenshots-in-full-screen' into 'master'
See merge request fdroid/fdroidclient!606
2017-11-09 23:19:16 +01:00
Hans-Christoph Steiner
89a933cd84 convert to standard Build.VERSION.SDK_INT test style 2017-11-09 23:18:18 +01:00
Hans-Christoph Steiner
6be865f910 Merge branch 'cleanup-predex-disable' into 'master'
auto-disable preDexLibraries on CI systems

See merge request fdroid/fdroidclient!605
2017-11-09 19:57:58 +00:00
Hans-Christoph Steiner
3ebb64b120 Merge branch 'permission-icon-color' into 'master'
Match color of permission icons with other icon colors

See merge request fdroid/fdroidclient!607
2017-11-09 19:57:00 +00:00
Christine Emrich
257c3da9b4 Match color of permission icons with other icon colors 2017-11-09 19:32:26 +01:00
Christine Emrich
dd87ba9efc Fix checkstyle errors 2017-11-08 13:58:25 +01:00
Christine Emrich
61fb63d0f9 Apply current theme to ScreenShotsActivity 2017-11-08 13:58:24 +01:00
Christine Emrich
1d51385fc6 Add simple animation while swiping through screenshots 2017-11-08 13:58:24 +01:00
Christine Emrich
e38d02a59c Add full screen detail view to swipe through screenshots 2017-11-08 13:58:24 +01:00
Hans-Christoph Steiner
30e498b049 README: add Weblate badge for translation status 2017-11-01 19:53:25 +01:00
Peter Serwylo
f3a58980f4 Merge branch 'card-covered' into 'master'
Fix: card-covered

See merge request fdroid/fdroidclient!595
2017-10-29 21:44:29 +00:00
Hans-Christoph Steiner
5f26a78527 auto-disable preDexLibraries on CI systems
preDexing helps repeat builds run faster, but slows down builds that do
not have any caching.  CI builds start from scratch each time.  Turns
out that GitLab CI, Travis CI, Circle CI, and probably many others all
define the "CI" environment variable, so its easy to detect when running
in a CI environment.  This makes things a lot cleaner.

* https://docs.gitlab.com/ce/ci/variables/README.html
* https://docs.travis-ci.com/user/environment-variables/
* https://circleci.com/docs/2.0/env-vars/
* https://github.com/codepath/android_guides/wiki/Setting-up-Travis-CI
* https://stackoverflow.com/questions/23137764/building-a-debug-apk
2017-10-27 10:54:20 +02:00
Hans-Christoph Steiner
c3f46bb5fb versionCode 1000011 2017-10-24 14:09:08 +02:00
Hans-Christoph Steiner
dc46a22f67 update CHANGELOG 2017-10-24 14:09:02 +02:00
Marcus
7e767d0f44 Merge branch 'fix-1014' into 'master'
force all Android 5.0 devices to use the old index v0 XML format

Closes #1014, #1202, and #1208

See merge request fdroid/fdroidclient!602
2017-10-23 20:49:17 +00:00
Pavel Borecki
7eb304cfec Translated using Weblate (Czech)
Currently translated at 100.0% (385 of 385 strings)
2017-10-23 22:43:39 +02:00
Suvi-Tuuli Allan
6d8f29f8da Translated using Weblate (Finnish)
Currently translated at 86.2% (332 of 385 strings)
2017-10-23 22:41:00 +02:00
Hans-Christoph Steiner
41ae4867d9 Merge branch 'patch-1' into 'master'
For Tor connections, Orbot is required

See merge request fdroid/fdroidclient!601
2017-10-23 20:39:52 +00:00
Hans-Christoph Steiner
e0dafd0d7c Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!603
2017-10-23 20:33:13 +00:00
Hans-Christoph Steiner
da9f8724cd Weblate 2017-10-23 20:33:09 +00:00
Hans-Christoph Steiner
8576a22705 Merge branch 'sourceDeps_build' into 'master'
Source deps build

See merge request fdroid/fdroidclient!599
2017-10-23 20:15:39 +00:00
Hans-Christoph Steiner
4b0eb32d30 force all Android 5.0 devices to use the old index v0 XML format
The workaround is fugly, so we really don't want to include it in the
modern code.  Luckily, we have old index support there :-D

closes #1014
closes #1202
closes #1208
#111
2017-10-23 21:59:23 +02:00
Licaon_Kter
d2e96f8b55 For Tor connections, Orbot is required 2017-10-23 15:50:16 +00:00
hotlittlewhitedog
f579eecfb3 uninstall-button 2017-10-20 19:44:14 +02:00
Marcus Hoffmann
b71173392d extern: always use java version 1.7
This is required because the fdroidclient app also explicitly sets java
version to 1.7 and the modules need to be compiled for the same version.
2017-10-20 14:48:39 +02:00
Marcus Hoffmann
5e612a67ff extern: support-v4-preferencefragment: switch to jcenter()
This fixes the android gradle plugin not being found.
2017-10-20 14:08:31 +02:00
Hans-Christoph Steiner
0f05e95b2a Merge branch 'patch-1' into 'master'
Spelling fixes throughout the changelog

See merge request fdroid/fdroidclient!597
2017-10-19 09:43:51 +00:00
Allan Nordhøy
bf2e04cd2a Spelling fixes throughout the changelog 2017-10-19 09:43:51 +00:00
hotlittlewhitedog
f17eace301 Fix: card-covered 2017-10-14 20:22:28 +02:00
Hans-Christoph Steiner
be87ac7293 Merge branch 'nightly' into 'master'
gitlab-ci: push nightly builds to fdroid repo on gitlab

Closes fdroidserver#256

See merge request fdroid/fdroidclient!594
2017-10-12 11:22:24 +00:00
Hans-Christoph Steiner
f0438a67b1 gitlab-ci: push nightly builds to fdroid repo on gitlab
If a repo is set with the gitlab-ci Secret Variable DEBUG_KEYSTORE and
there is a repo named the same as this repo with -nightly appended,
then this will automatically generate an fdroid repo of each build
produced by gitlab-ci runs on the master branch.

closes fdroidserver#256
2017-10-11 23:48:12 +02:00
Hans-Christoph Steiner
5e91bb7892 Merge branch 'mirrors' into 'master'
Mirror support for the index and apps

Closes #35

See merge request fdroid/fdroidclient!578
2017-10-10 15:01:49 +00:00
Hans-Christoph Steiner
245b918d6e versionCode 1000010 2017-10-10 14:46:16 +02:00
Hans-Christoph Steiner
e064bdda56 update ChangeLog for 1.0
closes #1100
2017-10-10 14:42:20 +02:00
Hans-Christoph Steiner
02707e9a4b add a quick stock photo feature graphic
original CC0 licensed source:
https://www.pexels.com/photo/blue-grid-mosaic-pool-195547/

#1100
2017-10-10 14:42:20 +02:00
Hans-Christoph Steiner
87064e771f add three screenshots to launch with #1100 2017-10-10 14:42:20 +02:00
Chirayu Desai
a160476a14 Mirror support for the index and app downloads
* App and index downloads fall back to a list of mirrors defined
  by the repository.
* The changes have been made trying to keep the original download
  code untouched, and only using the mirror logic when the download
  fails due to a connection error / timeout.
* The mirrors are tried in a randomized manner, and with proper
  timeouts. The download is aborted after the tries exceed the
  number of mirrors, times 3 for a total of 3 different timeout
  values (10s, 30s, and 1m)
* The mirror code isn't used for any images yet, most of which is
  handled by an external library.

Closes: #35
2017-10-09 21:52:15 +05:30
Hans-Christoph Steiner
fba11b8aaf move changelog file from fdroiddata to here 2017-10-09 15:57:05 +02:00
Allan Nordhøy
2a577af5a2 Translated using Weblate (Swedish)
Currently translated at 100.0% (385 of 385 strings)
2017-10-09 15:57:05 +02:00
Hadrián Candela
b3c3527b04 Translated using Weblate (Galician)
Currently translated at 100.0% (385 of 385 strings)
2017-10-09 15:57:05 +02:00
Hans-Christoph Steiner
bb7bb2c4fe Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!593
2017-10-09 12:33:47 +00:00
Hans-Christoph Steiner
dfcb4a15f4 Weblate 2017-10-09 12:33:45 +00:00
Hans-Christoph Steiner
e310810f22 gitlab-ci: require connected10 to pass
The connected10 test runner has been at least as reliable as connected24,
and provides valuable coverage, especially for localization related
crashers.
2017-10-05 09:37:22 +02:00
Hans-Christoph Steiner
4a35e48ae7 Merge branch 'issue-1181--db-crash-anti-feature-join' into 'master'
Bump db version to force early adopters to upgrade db again.

Closes #1181

See merge request fdroid/fdroidclient!590
2017-10-05 07:35:09 +00:00
Peter Serwylo
de75c1fef5 Bump db version to force early adopters to upgrade db again.
Also does this with the additional field for ignoring vuln apps.
This should be safe, because there is a check for if (columnExists())
which will only pass if people don't already have this column.

Fixes #1181.
2017-10-05 17:06:11 +11:00
Hans-Christoph Steiner
fe626e3fd8 versionCode 1000005 2017-10-04 23:33:21 +02:00
Hans-Christoph Steiner
18270aba86 update ChangeLog for 1.0-alpha5 2017-10-04 23:32:57 +02:00
Hans-Christoph Steiner
24512f6465 fix lint "DefaultLocale: Implied default locale in case conversion" 2017-10-04 23:29:36 +02:00
Hans-Christoph Steiner
58a10a9ab6 fix db upgrade from 1.0-alpha3 --> 1.0-alpha4
This should have been set to 75 in the original commit that added this:
caa1ead689eedd2023fa5b6b29bde40517d84668

#1181
2017-10-04 23:29:36 +02:00
Hans-Christoph Steiner
461fe4292b LocaleList is not properly sorted, so do our own best approx.
It seems that LocaleList does not necessarily return the "Language
Priority List" in the order that the user has prioritized things. So
we have to kind of fake it by first adding the default locale, then
adding the locales from LocaleList based on longest order first (e.g.
de-AT then de).

#987
2017-10-04 23:29:36 +02:00
Hans-Christoph Steiner
669e9f6573 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!589
2017-10-04 21:30:34 +00:00
Hans-Christoph Steiner
b4938879d0 Weblate 2017-10-04 21:30:32 +00:00
Hans-Christoph Steiner
859357368c Merge branch 'master' into 'master'
Science and education category bgcolor

See merge request fdroid/fdroidclient!587
2017-10-04 20:36:57 +00:00
hotlittlewhitedog
a86b0657ff science and education category bgcolor 2017-10-03 19:39:11 +02:00
Peter Serwylo
314e55057f Merge branch 'issue-1172--file-not-found-in-cache' into 'master'
Be more defensive when checking cached downloads.

Closes #1172

See merge request fdroid/fdroidclient!585
2017-09-28 02:49:13 +00:00
Peter Serwylo
ecd70c94b8 Be more defensive when checking cached downloads.
Attempt to fix #1172, but couldn't reproduce it. So instead made sure to
document in detail why such a defensive check was put in place.
2017-09-28 12:34:58 +10:00
Hans-Christoph Steiner
fa859466da versionCode 1000004 2017-09-27 23:03:11 +02:00
Hans-Christoph Steiner
a35ee4df30 update ChangeLog for 1.0-alpha4 2017-09-27 23:02:36 +02:00
Hans-Christoph Steiner
695394fe71 Merge branch 'issue-1131--swipe-to-dismiss-updates' into 'master'
Swipe to dismiss updates

Closes #1131

See merge request fdroid/fdroidclient!584
2017-09-27 20:59:09 +00:00
Hans-Christoph Steiner
85349fb59b Merge branch 'issue-1079--swipe-to-refresh-updates' into 'master'
Allow swipe-to-refresh on categories and updates tab.

Closes #1079

See merge request fdroid/fdroidclient!586
2017-09-27 20:37:08 +00:00
Peter Serwylo
b69a26463c Allow swipe-to-refresh on categories and updates tab.
The swipe-to-refresh from the latest tab is now also implemented
for the categories and updates tab. It was a bit weird before how
you could swipe to refresh on the first tab, which would show
"Updating repos" at the top. It would then also show the same
message on the categories tab, but you couldn't swipe-to-refresh
that tab. Additionally, several people have requested this on the
updates tab, the tab where it probably makes the most sense.

Fix #1079.
2017-09-28 00:44:24 +10:00
Peter Serwylo
784733cd76 Show 'download cancelled' message when dismissing downloading app 2017-09-28 00:03:58 +10:00
Peter Serwylo
b5ae78cf4d Specify whether dismissing an item requires a list rebuild or not.
The controller in charge of dismissing an item will have an insight into
whether it will cause a re-query for an existing cursor or not. If a re-query
will occur in response to a `ContentResolver#notifyChange()` invokation (in this
case in response to updating `AppPrefs`), then the `UpdatesAdapter` doesn't
need to rebuild itself yet. If it is a status update, then it should update
the adapter right away.

Seeing as the controller was already returning one thing (a message to be
displayed in a `Toast` and now it also needs to return an opinion on whether
to rebuild the adapter or not, this has been extracted into a value object
which has a message and a rebuild adapter flag.
2017-09-27 23:48:43 +10:00
Peter Serwylo
25897df85b Update the badge on the bottom nav when dismissing 'ready to install' apps 2017-09-27 23:31:20 +10:00
Peter Serwylo
1d4f4ce01d Correctly handle swiping to dismiss items in updates tab.
Items which can be updated (but have not yet been downloaded or queued for download)
will act as if the user selected "Ignore this update" from the app details view.

Items which represent app statuses (e.g. downloading, downloaded ready to install,
installed ready to run) will have the status removed. If required, we will also
forget that they are ready to install, so they wont be there next time.
2017-09-27 23:31:20 +10:00
Peter Serwylo
32c17e5f72 Initial framework to allow for dismissing apps in updates tab. 2017-09-27 23:31:20 +10:00
Peter Serwylo
13e2eddb6a Static import of inner class to improve readability 2017-09-27 23:31:17 +10:00
Hans-Christoph Steiner
8bececfa58 Merge branch 'issue-1070--known-vuln--ui' into 'master'
Show apps with known vulnerabilities in the updates tab.

Closes #1070

See merge request fdroid/fdroidclient!558
2017-09-27 12:46:59 +00:00
Hans-Christoph Steiner
dc61360824 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!583
2017-09-27 09:08:21 +00:00
Hans-Christoph Steiner
fd298d26fb Weblate 2017-09-27 09:08:20 +00:00
Peter Serwylo
2bd70fc6b5 Fixed query for known vulns.
Used to work, then the default join from `fdroid_app` to `fdroid_apk`
was removed for performance reasons. This adds the join back, but requires
queries to explicitly opt in to the join if they require it. The specific
query for known vulns is not a performance problem, because sqlite is able
to narrow the result set quite substantially before requiring a join onto the
fdroid_apk table anyway (e.g. by using the "installed app" table).
2017-09-27 15:37:09 +10:00
Peter Serwylo
382ee652b8 STILL-UNTESTED: Fix for upgrading app to newer, non vuln version.
Prior to this it was just trying to uninstall the app instead.
2017-09-27 15:03:03 +10:00
Peter Serwylo
63cf0742b7 Fixes after rebasing. 2017-09-27 15:03:03 +10:00
Peter Serwylo
0551b0d1fc Allow user to ignore messages about vulnerable apps 2017-09-27 15:03:03 +10:00
Peter Serwylo
5f64985b34 Added 'ignore vuln' preference for apps 2017-09-27 15:03:03 +10:00
Peter Serwylo
4e544e61fb UNTESTED: Prompt the user to update an app with a known vulnerability.
Untested because there are no apps in current repos which exhibit this
behaviour which have newer versions. Right now I'm testing with com.waze
from testy.at.or.at which only has the one version.

I'm also unsure of how important this is seeing as most the time it will
prompt people to update anyway.
2017-09-27 15:03:03 +10:00
Peter Serwylo
7424220c02 Add apps with known vulnerabilities to updates tab.
Currently only supports "Uninstall", but will soon also support "Upgrade
to a newer version".
2017-09-27 15:03:03 +10:00
Peter Serwylo
9b20142fd9 Extract getInstalledApk() from AppDetails2 to App 2017-09-27 15:03:02 +10:00
Peter Serwylo
073cb199fc Move comment to correct field. 2017-09-27 15:03:02 +10:00
Peter Serwylo
504854547b Add query to get installed apps with known vuln + tests.
Note that I don't think the query will work correctly across multiple repos,
because it is currently only querying the app with the "preferred
metadata".
2017-09-27 15:03:02 +10:00
Peter Serwylo
1fc8828122 Save per-apk anti features to join table + tests.
Also use a newer version of testy.at.or.at index for the index-v1 test,
because it includes apks with "KnownVuln" anti features whereas the
older version did not.
2017-09-27 15:03:02 +10:00
Peter Serwylo
caa1ead689 Added anti-feature table + join onto apk.
Not used yet, but will be used soon for known vulnerability anti
features.
2017-09-27 15:03:01 +10:00
Hans-Christoph Steiner
5d17676a01 Merge branch 'issues-1171--fdroidrepos-regardless-of-path' into 'master'
Allow any path when adding fdroidrepo(s):// intents.

Closes #1171

See merge request fdroid/fdroidclient!582
2017-09-25 12:13:12 +00:00
Peter Serwylo
91a03be6f4 Allow any path when adding fdroidrepo(s):// intents.
When explicitly given an fdroidrepo(s) intent, it seems silly to restrict it based on
a path of /fdroid/repo, because it is plainly obvious it is an F-Droid repo.
Manifest and NewRepoConfig both had to be amended to allow this behaviour.

Fixes #1171.
2017-09-25 15:43:32 +10:00
Peter Serwylo
3a79a9b07f Merge branch 'dark-ui-fixes'
Closes !571 (Manually resolved merge conflicts by rebasing locally first).
2017-09-25 10:05:45 +10:00
Christine Emrich
bd796136f7 Set sane colors for night and dark themes 2017-09-25 09:48:08 +10:00
Christine Emrich
a5caea24e7 Change dark theme ripple color from green to default gray 2017-09-25 09:48:05 +10:00
Christine Emrich
1906dd2f67 Document how themes should roughly look 2017-09-25 09:46:22 +10:00
Christine Emrich
eed9effb0e Make list divider for searches look good in dark theme too 2017-09-25 09:46:22 +10:00
Hans-Christoph Steiner
e1743c70f6 versionCode 1000003 2017-09-12 22:38:43 +02:00
Hans-Christoph Steiner
7db7cca716 update CHANGELOG for 1.0-alpha3 2017-09-12 22:38:00 +02:00
Hans-Christoph Steiner
445c275abe Merge branch 'fix-855--fs-corruption' into 'master'
Ignore errors that are likely due to filesystem corruption (rebase with added Toast)

Closes #855

See merge request !581
2017-09-12 20:25:58 +00:00
Hans-Christoph Steiner
9cc66e035a show Toast if InstalledAppProviderService encounters EIO errors
A notification would be better, but a Toast is better than nothing.
2017-09-12 21:44:48 +02:00
Peter Serwylo
dacebceff6 Ignore errors that are likely due to filesystem corruption.
There is a specific POSIX error "EIO" which seems to be the "general
purpose we don't know what went wrong but its probably bad" exception.
Our investigations in #855 resulted in the conclusion that it is likely
due to some sort of filesystem corruption or something like that.

Either way, it is annoying many people, so we need to prevent it or
ignore it, rather than prompting the user to submit a bug report.
After much investigation it was unable to be reproduced other than by
one of the original bug reporters. As such, this change ignores it.

Unfortunately Java `IOException`s don't have an API for getting the
errno of a POSIX IO error. Thus, this change results to parsing the
exception message instead :(

Fixes #855.
2017-09-12 21:35:08 +02:00
Hans-Christoph Steiner
42fa371e1b Merge branch 'weblate' into 'master'
Weblate

See merge request !580
2017-09-12 16:07:50 +00:00
Hans-Christoph Steiner
d65273cdb9 Weblate 2017-09-12 16:07:50 +00:00
Hans-Christoph Steiner
f4766a93c5 translation tools: detect missing "other" <item> from <plurals>
"other" is the only <item> that is required, or crashes are possible.
2017-09-12 17:38:59 +02:00
Hans-Christoph Steiner
6cb3cf1627 Merge branch 'issue-1143--performance' into 'master'
performance refactor for isApp --> isApk

Closes #1143 and #1156

See merge request !579
2017-09-12 15:34:52 +00:00
Peter Serwylo
71337a49b3 Added doc comment clarifying unsigned media 2017-09-12 16:51:44 +02:00
Peter Serwylo
3a3c170781 Fix CI failures (checkstyle/pmd) 2017-09-12 16:51:44 +02:00
Peter Serwylo
595f72d5b2 Calculate whether an app is an APK or not when updating repos.
This improves performance when we need to decide whether or not apps are
installed or not while scrolling through large lists.

Fixes #1143.

Also change Jackson tests to properly ignore App#isApk.
2017-09-12 16:51:44 +02:00
Peter Serwylo
ac1dce24d2 Don't assume all apps have a preferred signer, as media apps don't
Fixes #1156.
2017-09-12 16:38:33 +02:00
Peter Serwylo
620affa239 Remove unneeded join onto apk which was causing performance problems.
This join resulted in one row for each apk in the result set (before
doing a GROUP BY), instead of one row for each apk. That is a large
difference in number of rows and resulted in much more work for sqlite.
Turns out this join wasn't required.
2017-09-12 16:38:33 +02:00
Peter Serwylo
80259d00ba More precise (and correct) logging of slow queries in debug mode.
Some queries are deferred, and then forced to run by Android by invoking
`getCount()`. Under these circumstances, the measured speed of the query
execution is 1ms.

This adds speed logging around `getCount()` in case that is the first time
the query is run.
2017-09-12 16:38:33 +02:00
Hans-Christoph Steiner
d42d83321b gitlab-ci: don't fail build if clbin fails
clbin is just for making the logs easy to read, if it fails, the build
should not be marked as failed, especially since the logs are probably
not needed if the rest of the job succeeded.
2017-09-06 17:00:14 +02:00
Hans-Christoph Steiner
5144aedec9 Merge branch 'issue-1115--no-versions-multisig' into 'master'
Be more helpful when no versions available due to mismatching signatures.

Closes #1115

See merge request !577
2017-09-05 10:10:14 +00:00
Peter Serwylo
ba96819e40 Prompt user to go to settings to help with incompatible versions 2017-09-05 17:02:04 +10:00
Peter Serwylo
dd93df9ef2 Show mismatching sig apks when incompatible versions enabled.
This is in the spirit of the setting, where users can see which apks are
available even though they are not installable.

Adds a message explaining why it is incompatible (i.e. because the
signature doesn't match the installed version).
2017-09-05 17:02:01 +10:00
Peter Serwylo
ef717437a9 Explain multi-sig problems to user in app details. 2017-09-05 16:33:22 +10:00
Peter Serwylo
68e0f16b7c Minor simplification to view binding for app details.
Instead of casting to more specific view holders, all to call the
similarly named/behaved "bindModel()" method, push this to a base class.
2017-09-05 16:33:22 +10:00
Peter Serwylo
fc2093a9a6 Merge branch 'animation-fixes' into 'master'
Animation fixes

See merge request !566
2017-09-05 02:18:30 +00:00
Hans-Christoph Steiner
5739706cdd Build to 1000002 2017-09-04 23:13:35 +02:00
Hans-Christoph Steiner
5e4095f3f1 update CHANGELOG for 1.0-alpha2 2017-09-04 23:13:24 +02:00
Hans-Christoph Steiner
15b27ef1f6 fix lint TypographyEllipsis programmatically 2017-09-04 23:12:35 +02:00
Mladen Pejaković
3ad8467135 Translated using Weblate (Serbian)
Currently translated at 100.0% (372 of 372 strings)
2017-09-04 22:53:16 +02:00
Gaman Gabriel
679e933bfd Translated using Weblate (Romanian)
Currently translated at 96.5% (359 of 372 strings)
2017-09-04 22:53:16 +02:00
Peter Serwylo
eb8af46a94 Merge branch 'fixes-for-1.0-alpha2' into 'master'
Fixes for 1.0 alpha2

Closes #1149

See merge request !573
2017-09-04 20:53:08 +00:00
Peter Serwylo
aa2d791531 Merge branch 'etag-fix' into 'master'
switch etag cache check to purely client-side

Closes #562

See merge request !574
2017-09-04 20:22:02 +00:00
Hans-Christoph Steiner
709919ada6 Merge branch 'weblate' into 'master'
Weblate

See merge request !575
2017-09-04 20:21:16 +00:00
Hans-Christoph Steiner
2bfa642046 Weblate 2017-09-04 20:21:15 +00:00
Hans-Christoph Steiner
a27d2804f3 manually use aapt singleCrunch for reproducible builds
PNG crunching is not a deterministic process, especially the way aapt does
it.  This makes the F-Droid builds not reproducible.  The easy solution to
this is to pre-crunch the PNGs and commit them to git.  It also makes the
final APK a tiny amount smaller, for whatever reason.

https://medium.com/@duhroach/smaller-pngs-and-android-s-aapt-tool-4ce38a24019d
2017-09-04 22:20:55 +02:00
Hans-Christoph Steiner
75d13d60ae move swap webpage's F-Droid.apk link so it doesn't get cleaned up
This is because of the previous commit.
2017-09-04 22:20:55 +02:00
Hans-Christoph Steiner
6651117f90 fix cleaning of temp install APKs
When the filenaming was changed in 91eb408 !514 this was not updated. So
now it is keeping these files forever, which gets large fast.

closes #1149
2017-09-04 22:20:55 +02:00
Hans-Christoph Steiner
0730d3c676 set App.preferredSigner when using index v0 #1086
This was an oversight when we added this functionality, though there was
a related TODO.

41f85f3c9df934daba0ee0d60c4c01bb071fa6e7
2017-09-04 22:20:55 +02:00
Hans-Christoph Steiner
312bc9f503 Merge branch 'swap-crash-serving-fdroid' into 'master'
Fix crash when trying to swap.

See merge request !563
2017-09-04 20:08:53 +00:00
Hans-Christoph Steiner
2550329ab5 switch etag cache check to purely client-side
Instead of including the etag in the HTTP GET request and letting the
server set the Response Code depending on whether the etag machines, this
makes the client first issue a HEAD request, which is uses to get the etag
and the file size.  We need to do the HEAD beforehand anyway to get the
file size for resumable downloads, and this approach prevents the server
from using the etag as a form of tracking cookie:
http://lucb1e.com/rp/cookielesscookies/

closes #562
2017-09-04 20:56:12 +02:00
Hans-Christoph Steiner
4dd27ef727 all <plurals> translations must have at least the "other" string
closes #1129
2017-09-04 20:44:53 +02:00
Hans-Christoph Steiner
2dbeb60666 Merge branch 'issue-995--installing-after-disabling-repo' into 'master'
Ensure apps are not kept in "Updates" when their repo is disabled.

Closes #995

See merge request !568
2017-09-01 14:00:00 +00:00
Hans-Christoph Steiner
fdd2a18199 Merge branch 'about-dialog' into 'master'
Apply selected theme to about dialog and dismiss it on touch outside

See merge request !572
2017-09-01 09:59:22 +00:00
Christine Emrich
0d874a7ee8 Dismiss about dialog on touch outside #1082 2017-08-30 22:24:04 +02:00
Christine Emrich
f8c81a47d9 Apply selected theme to about dialog in settings #1083 2017-08-30 22:21:09 +02:00
ByteHamster
8bfecc89fb Animation fixes
- Icon transition is no longer jumping in first frame (caused by different padding)
- Icon is no longer cropped at start of transition (caused by missing changeImageTransform)
- Toolbar icons are no longer animated. Introduced in !561 by changing the icons programmatically
2017-08-29 16:07:13 +02:00
Hans-Christoph Steiner
a48a92385e Merge branch 'issue-1117--empty-state-search' into 'master'
Empty search results now shows message (as in 0.102.3)

Closes #1117

See merge request !567
2017-08-29 14:00:39 +00:00
Peter Serwylo
d65d64f6f8 Merge branch 'screenshots-layout' into 'master'
Improve screenshots layout

See merge request !569
2017-08-28 23:05:09 +00:00
Chirayu Desai
7d95f80608 Merge branch 'antiFeatureWarningDark' into 'master'
Fix anti feature warning drawable in dark mode

Closes #1148

See merge request !570
2017-08-28 05:47:23 +00:00
Chirayu Desai
6b1bb92282 Fix anti feature warning drawable in dark mode 2017-08-28 10:40:26 +05:30
Christine Emrich
3250603000 Make screenshots bigger 2017-08-27 17:40:48 +02:00
Christine Emrich
e77281b99b Give screenshots some margin
This way the card views elevation can be displayed
properly and multiple screenshots don't merge together.
2017-08-27 17:35:39 +02:00
Christine Emrich
e9cdc5e952 Remove highlight from snapped screenshot #1068 2017-08-27 17:24:53 +02:00
Christine Emrich
9be13fd2ab Center screenshots when they don't fill screen width 2017-08-27 17:15:34 +02:00
Peter Serwylo
f3c48f8d6b Ensure apps are not kept in "Updates" when their repo is disabled.
This caused problems when users then tried to action the pending
install, where it would no longer have enough information to install the
app. Although it may be technically possible to keep enough information
around in memory to make the app installable, but it is not worth the
effort. If a user intentionally disables a repo, we should no longer be
responsible for keeping information about its apps around.

Fixes #995.
2017-08-08 21:12:59 +10:00
Peter Serwylo
393db2ba86 Reinstated old translation for 'no apps found' 2017-08-08 13:35:09 +10:00
Peter Serwylo
0f8bec59e1 Show message when no search results are found.
Fixes #1117.
2017-08-08 11:35:23 +10:00
Peter Serwylo
a3a0c0a15d More verbose logging
There are some ACRA reports with this IllegalStateException getting hit.
It used to be that it was only ever because we forgot to request the
correct fields from the database. However now I'm not sure that this is
the only source. Perhaps it is also possible in response to parcelling
apk instances, or maybe something else? Either way, this should provide
further info about whether the apk doesn't belong to a repo for some
reason.
2017-08-01 13:04:08 +10:00
Peter Serwylo
3b41287cf7 Remove unused methods.
There are two methods which allow callers to choose which fields to
return. These were originally added for performance, so you only ask for
what you need. However empirically the performance gain doesn't mean
anything, because it is dwarfed by the query that was just executed.
However, it does open the code up to bugs because we forget to ask for
the right fields. So now it just returns all fields when querying for
apks.
2017-08-01 13:02:36 +10:00
Peter Serwylo
618f83bb23 Formatting 2017-08-01 11:59:44 +10:00
Peter Serwylo
2d377453d9 Ensure swapping doesn't get confused by apks in different repos.
While investigating #1086 which was about swap being busted, I
discovered that we recently introduced a worse bug when working with
multi sig stuff. The swap process, when installing an app (or even when
listening for if a user started installing - before they even did
anything), would ask for an apk from any repo. This is wrong, because we
should only ask for the apks from the swap repo when presented with a
swap dialog.

By fixing this so that it asks for a specific apk, this may also
fix the issue in #1086, because that was about us not asking for enough
info from the database for each Apk which was returned. Now we just
return all columns, because the performance overhead should be minimal,
but it prevents this class of bugs, where we didn't fully populate
our value object. However, I'm not confident that it is fixed, because I
was unable to reproduce it due to the other crash fixed in this change.

Relevant crash:

```
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.fdroid.fdroid.data.Apk.getUrl()' on a null object reference
  at org.fdroid.fdroid.views.swap.SwapAppsView$AppListAdapter$ViewHolder.setApp(SwapAppsView.java:311)
  at org.fdroid.fdroid.views.swap.SwapAppsView$AppListAdapter.bindView(SwapAppsView.java:422)
  at org.fdroid.fdroid.views.swap.SwapAppsView$AppListAdapter.newView(SwapAppsView.java:414)
  at android.support.v4.widget.CursorAdapter.getView(CursorAdapter.java:269)
  at android.widget.AbsListView.obtainView(AbsListView.java:2349)
  at android.widget.ListView.makeAndAddView(ListView.java:1864)
  at android.widget.ListView.fillDown(ListView.java:698)
...
```
2017-08-01 11:59:41 +10:00
Hans-Christoph Steiner
a71eb243fa remove unused imports 2017-07-18 10:09:34 +02:00
Hans-Christoph Steiner
c93cd5a3e6 Build to 1000001 2017-07-18 10:01:41 +02:00
Hans-Christoph Steiner
2d89f8665a update CHANGELOG 2017-07-18 10:01:27 +02:00
Hans-Christoph Steiner
f30b73ed17 remove unused imports 2017-07-18 09:40:40 +02:00
Hans-Christoph Steiner
c6a1e15bc7 Merge branch 'merge-weblate' into 'master'
Merge weblate

See merge request !565
2017-07-18 07:39:19 +00:00
Hans-Christoph Steiner
6dc49eef0f fix blank plurals items in he 2017-07-18 08:14:59 +02:00
Hans-Christoph Steiner
419c48a234 remove bad translation with missing format 2017-07-18 00:48:45 +02:00
Hans-Christoph Steiner
166171eb32 fix format strings 2017-07-18 00:39:20 +02:00
Lobsang
e331913f6d Translated using Weblate (Tibetan)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:38 +02:00
Allan Nordhøy
5f94beb25d Translated using Weblate (Norwegian Bokmål)
Currently translated at 91.1% (339 of 372 strings)
2017-07-17 23:24:38 +02:00
Yaron Shahrabani
c69df9fb8c Translated using Weblate (Hebrew)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:38 +02:00
Green Lunar
11152925c5 Translated using Weblate (Hebrew)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:38 +02:00
Luiz Carlos de Oliveira
c5f837f8ab Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:38 +02:00
Claus Rüdinger
31a52c3d48 Translated using Weblate (German)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:38 +02:00
Licaon Kter
a07e2b2db3 Translated using Weblate (Romanian)
Currently translated at 93.5% (348 of 372 strings)
2017-07-17 23:24:38 +02:00
Luca D'Amico
45d130f072 Translated using Weblate (Italian)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:38 +02:00
Yaron Shahrabani
5091366b2d Translated using Weblate (Hebrew)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:38 +02:00
Nathan Follens
dcfeb47bc6 Translated using Weblate (Dutch)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
ezjerry liao
fbd7a7cfb0 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
Nine Lima
d4b04c187d Translated using Weblate (Afrikaans)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
José Rodrigo Baires Quezada
8497b76a21 Translated using Weblate (Spanish)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
Osoitz
2bc8c3ee36 Translated using Weblate (Basque)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
Ajeje Brazorf
9049418e8d Translated using Weblate (Sardinian)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
tonghuix
e6d77460b7 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
Viktar Vauchkevich
5a4ffa7cac Translated using Weblate (Belarusian)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
tenzin tselek
8e830ed102 Translated using Weblate (Tibetan)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
José Rodrigo Baires Quezada
745bd5bc38 Translated using Weblate (Spanish)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
zmni
972869f27d Translated using Weblate (Indonesian)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
naofum
9392878b02 Translated using Weblate (Japanese)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
Verdulo
555352e947 Translated using Weblate (Polish)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
Verdulo
f41104a306 Translated using Weblate (Esperanto)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
eghbalmohsen
bad714d60e Translated using Weblate (Persian)
Currently translated at 100.0% (372 of 372 strings)
2017-07-17 23:24:37 +02:00
Hans-Christoph Steiner
78f35db060 Merge branch 'issue-568--removing-apks' into 'master'
Issue 568  removing apks

Closes #568

See merge request !564
2017-07-17 21:24:03 +00:00
Peter Serwylo
1bd9a73dbc Cache results of category-id query.
Each app insert required asking the database for the ID of each
category an app is in. Given the categories don't change (ever)
but are only appended to, we can cache the results in a static
Java variable for increased performance.

This reduced the "repo persister" logic for me from 50 seconds
for main F-Droid and 100 seconds for Archive, down to 15 seconds
and 30 seconds respectively.
2017-07-17 14:34:34 +10:00
Peter Serwylo
e26748e0e0 Remove now-unneccesary "update" code from repo updater.
Now that we need only "insert" new apps rather than"
 * Identify if an app exists
 * If so, update
 * If not, insert

There is much less code required for all of this stuff.
2017-07-17 14:33:16 +10:00
Peter Serwylo
5bde27daa8 Only copy the apps/apks for the current repo to temp tables.
When preparing a temp database to write to, don't copy all apps/apks.
Instead, only copy those _not_ belonging to the repo we are updating.
In an ideal world, we'd not even need to copy them, but we need
their IDs to be in the temp database so that we don't accidentally
use the same auto-generated ID as the main database.

This also means that we can drop the check for "does this app exist,
and hence should we UPDATE it instead of INSERTing it?" and always
just insert it.

Then, when copying the temp table back to disk, first delete all
apps/apks _belonging to the repo being updated_. Then, copy back the
apks/apps we found in the repo. This again improves performance because
we no longer need to bopy back and forth data which we know
wont change (as evidenced by the fact it belongs to a differen trepo).

I don't think this was possible earlier before we did the work to
support repo priorities properly. That is because we had a single app
which was serviced by several repositories. Now, we have multiple
entries in the `fdroid_app` table, for each repo which supports
that app.
2017-07-17 14:27:43 +10:00
Peter Serwylo
8c3441939f Pass through the ID of the repo being updated to the temp tables.
This will allow for more intelligent and efficient copying of data back
and forth from temp to persistent tables.
2017-07-17 12:45:55 +10:00
Hans-Christoph Steiner
571e05398f gitlab-ci: use eighthave image while gitlab fixes things 2017-07-14 21:55:33 +02:00
Hans-Christoph Steiner
488b9b02f9 update Issue763MultiRepo test to work with valid signatures
The test files used in Issue763MultiRepo.java are signed using MD5, which
is now considered invalid.  So if that test is run on any recent Java, it
will fail with a signature error.  This updates the test files to be signed
with SHA1 instead.

* index.microg.jar is a new version fetched from https://microg.org
* index.antox.jar was resigned with the testy.at.or.at key, since antox
  website doesn't exist anymore.
2017-07-14 21:55:33 +02:00
Hans-Christoph Steiner
99f4ae9864 Merge branch 'issue-1105--preferred-signer-field' into 'master'
Force refresh of repos so that preferred signer is present.

Closes #1105

See merge request !562
2017-07-13 20:25:03 +00:00
Peter Serwylo
e62f695a48 Force refresh of repos so that preferred signer is present.
It is a bit harsh to do this, but the rationale is explained in #1105.

Fixes #1105.
2017-07-12 17:12:46 +10:00
Hans-Christoph Steiner
18057abdb1 Merge branch 'issue-1097--toolbar-button-shadow' into 'master'
Add drop shadow to toolbar items in AppDetails.

Closes #1097

See merge request !561
2017-07-10 14:19:26 +00:00
Peter Serwylo
2523134485 Add drop shadow to toolbar items in AppDetails.
This is so that feature images with white backgrounds to not completely
obscure the icons.

Fixes #1097.
2017-07-10 12:59:52 +10:00
Hans-Christoph Steiner
300677fb9c Bump to 1000000 2017-07-08 00:10:59 +02:00
Hans-Christoph Steiner
57664eb086 stop using 'v' prefix for release tags 2017-07-08 00:10:45 +02:00
Hans-Christoph Steiner
7e7835c182 update CHANGELOG for 1.0-alpha0 2017-07-08 00:08:51 +02:00
Hans-Christoph Steiner
2b24c810fa Merge branch 'merge-weblate' into 'master'
Merge weblate

See merge request !560
2017-07-07 21:44:11 +00:00
Hans-Christoph Steiner
490b757113 Merge weblate 2017-07-07 21:44:09 +00:00
Hans-Christoph Steiner
86e8df852e Merge branch 'fix-index-v1-repo-commiting' into 'master'
Fix index-v1 repo commiting

Closes #1016

See merge request !559
2017-07-07 19:00:14 +00:00
Hans-Christoph Steiner
dcf395ad9a add test to update index.xml using index-v1.json 2017-07-07 18:06:49 +02:00
Hans-Christoph Steiner
6c247e3201 Jackson gives us {"repo": {"mirrors": ["foo", "bar"] as ArrayList
I was optimistic and guessed it was a String[], since that's what is needed.

Found by @cde while working on #35
2017-07-07 18:06:49 +02:00
Hans-Christoph Steiner
2a7fe78483 split IndexV1Updater's repo saving into working code
RepoUpdater.prepareRepoDetailsForSaving() was broken here because the Repo
properties were being set before calling it, and then the Repo instance was
passed to it for comparison.  So the comparison was always saying the value
was unchanged.  In IndexV1Updater, the flow doesn't need those checks.

This also fixes the bug where added repos never had their name/description/
icon/etc show up in ManageRepos and RepoDetails.

@cde found this bug working on mirror support, thanks!

related to #35
closes #1016
2017-07-07 18:06:49 +02:00
Hans-Christoph Steiner
0180e754fe remove needlessly scary sentence from otherwise friendly Updates screen
This is not really a useful way to tell the user that the index might be
out of date.  It just adds confusion and makes people think that F-Droid
isn't quite smart enough to know what's going on.
2017-07-07 18:05:53 +02:00
Hans-Christoph Steiner
a430c17950 Merge branch 'non-apk' into 'master'
Add support for non-apk files

Closes #1023

See merge request !541
2017-07-07 12:12:17 +00:00
Hans-Christoph Steiner
7dbf03c435 Apk.isMediaInstalled() needs to check using sanitized file names
The install process automatically sanitizes filenames to avoid exploits
that put attack code in the filename.  Media files are also installed using
this logic, so the installed check needs to use sanitized file names to be
accurate.
2017-07-07 17:09:14 +05:30
Hans-Christoph Steiner
c5a1b11315 allow spaces in file names
This will be more important as people work with media, since it is quite
common to use spaces in filenames generated by humans.  Media files will
not be built by fdroid, so most likely, they will have human-generated
names.
2017-07-07 12:10:52 +05:30
Hans-Christoph Steiner
06bcf75f9b put the faster check first in App.isInstalled()
A > is much faster than all the stuff that isMediaInstalled() has to do,
so put > first, so that if it is true, isMediaInstalled() is not executed.
2017-07-07 12:10:51 +05:30
Chirayu Desai
0d8b0c7fd4 Introduce FileInstaller, a way to handle media files from F-Droid
* This installer is invoked when for non-apk/media files, and
  copies them to an appropriate folder on the sdcard.
* We also introduce a FileInstallerActivity to ask for storage
  permissions at runtime, as needed by Android 6.0 and above,
  and handle the install/uninstall process.
* A toast is shown with the install path after installation.

TODO:
* Manage Installed Apps screen doesn't show media files.
2017-07-07 12:10:48 +05:30
Chirayu Desai
cbf3133e43 AppProvider: Use IS instead of = for suggestedApk calculation
* For non apk files, the signature column would be NULL always,
and in SQLite NULL = NULL is false, but NULL IS NULL is true.

See http://www.sqlite.org/lang_expr.html Operators
2017-07-07 11:41:02 +05:30
Hans-Christoph Steiner
339deb97d9 Merge branch 'issue-1093--reduce-ci-verbosity' into 'master'
Reduce verbosity of CI logging

See merge request !557
2017-07-06 22:19:56 +00:00
Hans-Christoph Steiner
8f680bc1aa Merge branch 'improve-updates-tab-stability' into 'master'
Refactor `AppListItemController` to improve updates tab stability

See merge request !549
2017-07-06 22:15:41 +00:00
Hans-Christoph Steiner
89001ac1f5 Merge branch 'fix-fdroid-notifying-itself' into 'master'
Don't try to notify the user for apks which are already installed.

See merge request !547
2017-07-06 09:51:38 +00:00
Peter Serwylo
2fc8060a5d Check file size first before checking hash to save cycles. 2017-07-06 14:09:17 +10:00
Peter Serwylo
2a40e082e6 Don't try to notify the user for apks which are already installed.
If an app is downloaded into our cache, but an app with the same hash is
already installed, don't bother notifying people about it.

Extracted the logic for finding the path to an apk on disk (given a
PackageInfo object) to also be used by AppUpdateStatusSerice.

Change logging so that if we discard a downloaded file we Log.i instead
of Utils.debugLog. This is so that when debugging a release build we can
see what is happening, because this specific problem was easier to debug
with release builds (rather than setting up a custom fdroid repo).
2017-07-06 13:56:01 +10:00
Peter Serwylo
acbf563724 Reduce verbosity of logging 2017-07-06 11:25:17 +10:00
Peter Serwylo
d37e25db21 Merge branch 'issue-1059--preferred-sig' into 'master'
Support for " preferred sig"

See merge request !552
2017-07-05 23:58:18 +00:00
Peter Serwylo
9acc5a2310 Make pre-multi-sig tests work again.
Before mult-signature support, the process of marking an app as
installed in the `InstalledAppProvider` didn't have any side effects
beyond its own table. Now, it is also responsible for calculating the
`suggestedVersionCode` of the associated app as well.

This means old tests around suggested versions no longer work. This is
because they would insert an App, and set the
`Cols.SUGGESTED_VERSION_CODE` using a `ContentValues`. This was then
overwritten by the `InstalledAppProvider` asking for the real
calculation for suggested versions. That is - it would check for
relevant apks and figure out which was best.

To make the old tests correct, they need:
 * To be able to "install" apps with the correct signature.
 * To insert the relevant apks into the database, not just depend on the
   presence  of an `app`.
2017-07-06 09:22:23 +10:00
Peter Serwylo
bf4b0d89a1 Ensure that the suggestedVersionCode is updated after [un]installing.
Previously, it was only done on repo update.

Now it is done whenever an app is installed or unisntalled. The query to
update the suggested version for each app is quite slow when run at the
end of a repo update. However in this change, we are limiting the query
to only update a single app, which means that performance should not be
a problem.
2017-07-06 09:22:23 +10:00
Peter Serwylo
677fd3a522 Use signature as well as version code in app details for suggested apk. 2017-07-06 09:22:23 +10:00
Peter Serwylo
41f85f3c9d Correctly check for 'suggestedApk' in app details.
Take into account the preferred/installed signature instead of just the
version code.
2017-07-06 09:22:23 +10:00
Peter Serwylo
caac895442 Add "preferredSigner" field to App.
At present, this is chosen from the first package in the index-v1
metadata.
2017-07-06 09:22:21 +10:00
Peter Serwylo
6b42b802b3 Tests for preferred multi sig choice.
When a single repo provides apks with multiple signatures, then we need
to be able to select the preferred one. This adds tests for this which
fail, because that feature has not yet been implemented.
2017-07-06 09:20:45 +10:00
Peter Serwylo
b7b8865325 Extract useful test functions into TestUtils
These will be used by a "preferred sig" test soon.
2017-07-06 09:20:45 +10:00
Hans-Christoph Steiner
ba84bbb9ea reduce massive verbosity of org.fdroid.fdroid.data.AppProviderTest 2017-07-05 17:42:18 +02:00
Hans-Christoph Steiner
ee398167bb fix LocalizationTest for new format pattern: (%1$d/%2$d) from %3$s
added in df20d2df8d5bf15f03df4797caf07502422ced36
2017-07-05 17:42:18 +02:00
Hans-Christoph Steiner
8ba7882a98 Merge branch 'issue-1054--index-v1-progress-via-broadcasts' into 'master'
Add progress reporting for index-v1 (using `LocalBroadcastManager`)

Closes #1054

See merge request !550
2017-07-05 15:41:33 +00:00
Hans-Christoph Steiner
b9277f52e7 Merge branch 'issue-938--feature-graphic-priority' into 'master'
Order apps in main screen by date, new, then presence of feature graphic

Closes #938

See merge request !555
2017-07-04 20:48:02 +00:00
Peter Serwylo
5b52835097 Order apps in main screen by date, new, then presence of feature graphic
This is a conservative fix. If we wanted to really highlight the
feature graphic functionality and reward upstream devs for keeping
metadata up to date, then we could also take apps which were recently
updated, and prioritise them over new apps if they have a feature
graphic.

Fixes #938.

Also fixed display of feature graphic in main screen by getting full
path to image, not the relative path (e.g. "en-US/featureGraphic.png").
2017-07-04 13:09:22 +10:00
Hans-Christoph Steiner
4096c1e1b6 Merge branch 'merge-weblate' into 'master'
Merge weblate

See merge request !554
2017-07-03 19:02:05 +00:00
Hans-Christoph Steiner
b9334e4507 Merge weblate 2017-07-03 19:02:04 +00:00
Peter Serwylo
3d195c9dc0 Report progress correctly
Was previously sending an indeterminate progress event, when we actually knew
how long was remaining.
2017-07-03 15:41:08 +10:00
Peter Serwylo
b7a20bbf01 Remove one layer of indirection in LocalBraodcasts for updating repo.
This creates a hard dependence between `RepoUpdater` and
`UpdateService`. However this could be trivially extracted by moving the
helper methods from `UpdateService` to `RepoUpdater`, and making the
broadcasts more "repo updater" oriented. That would also require
changing the broadcasts which `UpdateService` listens for.
2017-07-03 15:41:05 +10:00
Peter Serwylo
df20d2df8d Add progress reporting for index-v1.
Reuses the "commiting" message to indicate how many apps have been
processed so far.

Refactors existing progress handling between `RepoUpdater` and
`UpdateService` to use `LocalBroadcastManager` in preference to
`ProgressListener`. Still needs to use `ProgressListener` to talk
between `RepoUpdater` and the `Downloader` +
`ProgressBufferedInputStream`.

The only change that is related to something more important than
notifications is the fact that now `IndexV1Updater` makes use of the
`indexUrl`. To do so, because it is final, the base class constructor
delegates to `getIndexUrl()` which is overriden by the v1 updater.
This is required because we want to differentiate between broadcasts
coming from different repo update processes.

Fixes #1054.
2017-07-03 09:31:48 +10:00
Peter Serwylo
827235b6d7 Merge branch 'merge-weblate' into 'master'
Merge weblate

See merge request !553
2017-07-02 22:20:29 +00:00
Hans-Christoph Steiner
66d3a50564 Merge weblate 2017-07-02 22:20:23 +00:00
Hans-Christoph Steiner
5de66eae15 Merge branch 'fix-1028--update-ui-when-db-changes' into 'master'
Don't show apps/categories after disabling repo.

Closes #1028

See merge request !551
2017-06-30 14:17:12 +00:00
Peter Serwylo
b658c0b44e Don't show apps/categories after disabling repo.
This was setup to work correctly, but for two problems:

 * The `cursor.close()` in `CategoriesViewBinder` stops the cursor from
   being requeried when required.

 * The `AppProvider` was not notifying correctly after deleting apps
   belonging to a repo.

Fixes #1028.
2017-06-29 17:33:52 +10:00
Peter Serwylo
945c6f24e6 Formatting, comments, checkstyle.
Moved methods around so the class is more coherent when reading from top
to bottom.

Added some comments.

Formatted lines to be under 120 chars. No longer suppress line length checkstyle messages.
2017-06-29 11:33:42 +10:00
Peter Serwylo
427d7bcbfa Further refactor the AppListItemController for readability and predictability.
This breaks out subclasses for each specific type of app list item,
allowing for code reuse, but also letting the specific business logic
belonging to each different app list item to be separate.

This is particularly helpful in the following situation:

 * In the search results, it is great to be able to render "App
   downloaded, ready to install" in the same manner as the update tab.

 * In the installed app list, this is not desired. Indeed, the status
   text which should be shown should reference the currently installed
   version and whether the user has ignored any updates.

By separating the AppListItemController into subclasses, it reduced the
need to handle several different types of text view (e.g.
"installedStatus", "status", "ignoredStatus", "downloadReady"), and
replace them all with a "status" and "secondaryStatus" TextView. What is
displayed in status and secondaryStatus is up to the individual
subclasses of AppListItemController.
2017-06-29 11:14:57 +10:00
Peter Serwylo
ef230f749c Added "Successfully Installed" status text to updates tab.
Also:
 * Extracted common styles into `@Style/AppListItemStatusText`.
 * Fixed left margin on older devices (where `layout_marginStart` doesn't
   exist).
2017-06-28 17:29:54 +10:00
Peter Serwylo
d0cf621314 Refactor the AppListItemControler to be more predictable.
Previously, there were different pieces of business logic, invoked at
different times, which would touch subsets of the UI.

This change rips that out, and replaces it with a single place where the
UI is setup. This can always be called safely, and it will render the
correct data for the current state of the app (e.g. downloading, waiting
for install, etc).

The AppListItemState class is a dumb object which keeps track of what is
supposed to be displayed in the UI. The AppListItemController now
creates a different AppListItemState depending on what state the list
item is in. This AppListItemState is then used to bind the values of
each UI widget.

All of the binding code is now in the single `resetView()` method, but
all of the business logic for what the view should look like is
separated into different `getViewState*()` methods.

This separation should make it easier to make sense of the UI code, and
hopefully should be testable should somebody choose to write tests for
it in the future.
2017-06-28 17:08:16 +10:00
Hans-Christoph Steiner
61ab88f8ea Merge branch 'acra-fixes' into 'master'
ACRA fixes

Closes #1074

See merge request !544
2017-06-26 10:13:54 +00:00
Hans-Christoph Steiner
2fbb102f62 Merge branch 'add-ml-locale' into 'master'
Add Malayalam (ml) to language list

Closes #1077

See merge request !545
2017-06-26 07:34:37 +00:00
Shanavas
1b75a4fd3a Add Malayalam (ml) to language list 2017-06-23 23:19:57 +00:00
Peter Serwylo
b1ac0ff351 Prevent crash on categories screen when rotating.
The docs say that initLoader tries to reuse existing cursors.
The error message was "IllegalStateException: attempt to re-open an
already-closed object: SQLiteQuery: ...".
2017-06-23 17:06:45 +10:00
Peter Serwylo
79ede18259 Fix crash due to unknown suggested version.
There may be a bigger problem around suggested versions being null at
all, but that is getting looked at in a different feature set (i.e.
multi signature support) and will come in time. This fixes the immediate
problem some people were having and sending crash reports for in 0.104.

STACK_TRACE=java.lang.NullPointerException: Attempt to read from field 'java.lang.String org.fdroid.fdroid.data.Apk.versionName' on a null object reference
	at org.fdroid.fdroid.views.AppDetailsRecyclerViewAdapter$HeaderViewHolder.bindModel(AppDetailsRecyclerViewAdapter.java:425)
	at org.fdroid.fdroid.views.AppDetailsRecyclerViewAdapter.onBindViewHolder(AppDetailsRecyclerViewAdapter.java:244)
	at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6310)
	at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6343)
	...

Introduced in 97fd3f0.
2017-06-23 16:14:09 +10:00
Hans-Christoph Steiner
41d7e830d3 Merge branch 'new-ui/uninstall-fixes' into 'master'
System app uninstall prevention, fixes crash.

See merge request !478
2017-06-22 12:21:42 +00:00
Chirayu Desai
7ac3ff293e Don't allow uninstalling system apps.
* F-Droid cannnot uninstall system apps, only their updates,
  but even with the privileged extension, that can get complicated.
* Let's just not allow uninstalling system apps, the phone's settings
  app can happily disable/re-enable system apps, and also uninstalls
  their updates on disabling.
2017-06-22 15:04:23 +05:30
Peter Serwylo
a67393f65f Merge branch 'remove-update-time' into 'master'
Remove update time

See merge request !542
2017-06-22 05:54:15 +00:00
Felix Ableitner
02fad57f0b Remove update time 2017-06-22 05:54:11 +00:00
Peter Serwylo
93d5fc171e Merge branch 'fix-relative-time-formatting' into 'master'
Fix formatting for "Updated x time ago" (fixes #1064)

Closes #1064

See merge request !540
2017-06-19 04:57:18 +00:00
Felix Ableitner
31473c4395 Fix formatting for "Updated x time ago" (fixes #1064) 2017-06-19 11:25:36 +09:00
Hans-Christoph Steiner
eabec87a4c Bump to 0.104 2017-06-16 23:20:28 +02:00
Hans-Christoph Steiner
6eaf0360d8 update CHANGELOG for 0.104 2017-06-16 23:20:28 +02:00
Hans-Christoph Steiner
3d5d20e082 index-v1's suggestedVersionCode goes into client's upstreamVersionCode
closes #1052
refs #1063
2017-06-16 23:20:28 +02:00
Hans-Christoph Steiner
b4d22bb4ce Merge branch 'category-tweaks-further' into 'master'
Category colours and sorting.

Closes #1058

See merge request !539
2017-06-16 08:07:21 +00:00
Peter Serwylo
b28057a6ee Sort 'top x apps in category' in descending last updated order.
See #754. Doesn't fix it, because that requests the entire list to be
sorted, but this just sorts the category overview screen.
2017-06-16 11:53:03 +10:00
Peter Serwylo
963996b412 Use white or black text for category chip, depending on brighness of background 2017-06-16 11:01:37 +10:00
Peter Serwylo
444ba43ac0 Adjust category colours to match repomaker designs
Fixes #1058.
2017-06-16 10:47:36 +10:00
Peter Serwylo
3484d6f1dd Merge branch 'last-0.104-fixes' into 'master'
failsafe preference for index-v1.jar

See merge request !537
2017-06-15 23:57:42 +00:00
monolifed
f5810073ea Translated using Weblate (Turkish)
Currently translated at 100.0% (375 of 375 strings)
2017-06-16 00:20:36 +02:00
Hans-Christoph Steiner
bb47d1e41e better report failing plurals tests 2017-06-16 00:20:36 +02:00
Hans-Christoph Steiner
53a17e6146 add failsafe pref to disable using new index
If the client fails due to some bug in handling index-v1.jar, then it will
be totally stuck, even if index.jar would have worked.  This creates a new,
temporary "expert" preference to force the client only use the old XML
index file.  Worst comes to worst, we can tell people to enable this to
upgrade.

Once everything proves stable, we can remove this.
2017-06-16 00:20:36 +02:00
Hans-Christoph Steiner
ee1871f07e clean up English source strings
This started with the work of @kingu, it cleans up some of the language,
including:

* upgrade --> update
* application --> app
* internet --> Internet

closes !508
2017-06-16 00:20:36 +02:00
Hans-Christoph Steiner
7b737b7ba6 Merge branch 'merge-weblate' into 'master'
Merge weblate

See merge request !538
2017-06-15 22:02:26 +00:00
Hans-Christoph Steiner
ab66bfa78b Merge weblate 2017-06-15 22:02:25 +00:00
Hans-Christoph Steiner
e40ce864ce Merge branch 'installer-fallback-N' into 'master'
PrivExt API >= 24 uninstall fixes.

See merge request !486
2017-06-15 18:05:42 +00:00
Hans-Christoph Steiner
e6ba0de8b2 Merge branch 'multi-sig--install' into 'master'
Multi signature improvements for AppDetails + install workflow

See merge request !536
2017-06-15 17:56:55 +00:00
Hans-Christoph Steiner
d54788aafa Merge branch 'multi-sig-tests' into 'master'
Tests and slight improvements for multi-sig support when calculating suggested versions.

See merge request !534
2017-06-15 17:43:47 +00:00
Chirayu Desai
c095a85c3d Installer: Fallback to DefaultInstaller on API >= 24 for uninstall,
... when PackageInstaller is the installer (privext).

* In the case where the Privileged Extension is installed,
  but the installation happens through DefaultInstaller still
  due to something like a permission mismatch,
  that is set as the installer package name.
* We cannot install packages installed by that via the system methods,
  so fallback to DefualtInstaller for uninstalling as well when the
  app is installed by PackageInstaller
2017-06-15 01:15:31 +05:30
Chirayu Desai
204ac3cca9 PackageManagerCompat: Handle exceptions better
* Don't catch all exceptions, only what we expect.
* Also re-format comments as javadoc
2017-06-14 17:45:12 +05:30
Peter Serwylo
edf84c533d Added more explicit test for UpdateService and its can update notification 2017-06-13 12:52:17 +10:00
Peter Serwylo
5a292b8e77 Cleanup tests by extracting common code, and test canUpdate query. 2017-06-13 12:52:16 +10:00
Peter Serwylo
0409a7dcd6 Use provider helper methods instead of manually invoking.
The fact that Cursors are used with the apk provider is more of an
implementation detail (to some extent). It is a crappy, leaky
implementation right now, but still an implementation detail.
2017-06-13 12:52:16 +10:00
Peter Serwylo
28b7d69e60 Don't show versions with a different sig if installed.
This should probably be done on the database level, if purely for the
fact that we have a good set of unit tests for that. However it is still
quite clean to do so here.
2017-06-13 12:52:16 +10:00
Peter Serwylo
189b2277ba Refactor ApkProvider.getApkFromAnyRepo to getSuggestedApk(Apk).
This is really the intention of the method, given it used to accept
a version code and a package name. Now it optionally accepts a sig
also. If present, it will restrict the query to apks with that sig.

Also added to the multi-sig tests to ensure this method takes it into
consideration.
2017-06-13 12:52:16 +10:00
Peter Serwylo
b092d52403 Find better way to detach DB which doesn't pollute test output 2017-06-13 12:49:35 +10:00
Peter Serwylo
655a30c309 Use integer instead of boolean.
There is some magic conversions going on so that booleans get
converted into integers, but they are only on Android. Under
robolectric, it throws a class cast exception instead.
2017-06-13 12:49:35 +10:00
Peter Serwylo
f7d9be9cd5 Remove System.out.print's. Replace with Logs where appropriate.
Some were removed and left removed if they were run during tests,
because the tests are supposed to be automated and the noise they added
would not have helped diagnose a failure.

Also removed the dead code around "uses-feature" which will never
get implemented, especially as it is in the XML index.
2017-06-13 12:49:15 +10:00
Peter Serwylo
de149cf589 Remove subselect and use better index.
The main problem is that we were using an index on fdroid_apk.vercode,
when it should have been using an index on fdroid_apk.appId. There are
thousands of apks which would match based on vercode, but only two or
three which match based on appId. This improves performance of the
calculate-suggested-vercode query from 25,000ms to 100ms.
2017-06-13 09:05:37 +10:00
Peter Serwylo
bb96cdeff9 Refactor join between installed apps and packages. 2017-06-13 09:05:37 +10:00
Peter Serwylo
b729f4dc84 Add slow query logging to updateSuggestedFrom* methods.
Produces the following output:

D  Explain:
D    SCAN TABLE fdroid_app
D    EXECUTE CORRELATED SCALAR SUBQUERY 0
D    SEARCH TABLE fdroid_apk USING INDEX apk_vercode
D    EXECUTE CORRELATED SCALAR SUBQUERY 1
D    SEARCH TABLE fdroid_app AS innerAppName USING INTEGER PRIMARY KEY (rowid=?)
D    EXECUTE CORRELATED SCALAR SUBQUERY 2
D    SEARCH TABLE fdroid_package AS pkg USING INTEGER PRIMARY KEY (rowid=?)
D    SEARCH TABLE fdroid_installedApp AS installed USING INDEX sqlite_autoindex_fdroid_installedApp_1 (appId=?)

There are two possibilities here, one is the number of correlated sub
queries (three seems a bit excessive). Alterantively, it could be the
fact that one of the inner queries is using a string index (appId=?)
instead of an integer primary key.
2017-06-13 09:05:31 +10:00
Peter Serwylo
d0444dafca Clarify comments in response to CR. 2017-06-12 14:22:07 +10:00
Peter Serwylo
82eb50c2fe Add test for multi-repo multi-sig apps 2017-06-12 14:22:05 +10:00
Peter Serwylo
aa472ba764 Drop the composite vercode + repo primary key from apk table
We expect repos to serve multiple apks with the same version code but
different signing certificates in the future.
2017-06-12 13:48:36 +10:00
Peter Serwylo
b95a330ccf Restrict suggested versions to those with the same sig as installed.
Only if there is actually a version installed.
2017-06-12 13:48:36 +10:00
Peter Serwylo
44ffaa37d6 Add suggested version tests.
Some are failing as expected, but should define the correct behaviour.

Still needs support for multi-repo tests.
2017-06-12 13:48:35 +10:00
Peter Serwylo
aae0a57dfe Improve performance of suggested version calculation.
The history of this is that #974 identified a problem, which was fixed
in !497. That MR added test coverage for the bug.

However, the fix for it actually added a huge performance hit, on the
order of 30 seconds or so when calculating the suggested version.

This fixes that performance problem by removing the need for a sub
query. The end goal is to take the following query:

```
UPDATE app
SET suggestedVersion = (
  SELECT MAX(apk.version)
  FROM apk
  WHERE ...
)
```

and the `WHERE` clause needs to somehow join the outer `app` table with
the inner `apk` table, such that the repo in question does not matter.
It can't just join directly from `apk.appId -> app.rowid`, because the
`app` is specific to a given repository, but we want to select the
`MAX(apk.version)` from every related apk, regardless of repo.

This commit solves it by joining the inner `apk` table onto an
intermediate `app` table, which is used purely so that we can select
apks where their `packageId` is the same as the `packageId` of the app
being updated.
2017-06-12 13:47:41 +10:00
Peter Serwylo
833ae329e4 Merge branch 'enforce-max-length-118' into 'master'
enforce max line length set by Android Studio, gitlab, etc.

See merge request !532
2017-06-11 20:53:44 +00:00
Hans-Christoph Steiner
72d7d902e0 Merge branch 'fix-fdroid-update-prompt' into 'master'
Fix incorrect persistent + annoying notification to update F-Droid.

Closes #1027 and #776

See merge request !530
2017-06-08 10:46:45 +00:00
Hans-Christoph Steiner
318bbfc140 Merge branch 'category-tweaks' into 'master'
Add final artwork and correctly read colours.

Closes #1039

See merge request !535
2017-06-08 10:18:56 +00:00
Peter Serwylo
5b6e515a06 Add final artwork and correctly read colours.
Carrie specified colours earlier, and they were added to the code.
However they were not being read correctly. This changes that so that
lowercase resource names (e.g. "category_games") are used instead.

It also adds the final category artwork, for "Games" which was
missed prior.

The rest still generate colours and patterns if they don't have a colour
or an image specified.
2017-06-08 17:24:12 +10:00
Peter Serwylo
5b182ef38d Merge branch 'master' into 'master'
Made app_details2_header text selectable. This addresses #1032.

See merge request !533
2017-06-08 03:28:16 +00:00
Peter Serwylo
9e33dcf0db Wait 3 seconds before refreshing the view.
With a 1 second debounce, I was getting the view to refresh
several times in response to large apps being processed (e.g.
Firefox, OSMAnd, etc). This was on a (relatively) recent Moto X
2nd Gen, so it would be even more visible on an older device.

The side effect of updating frequently is that the main list
of apps flashes regularly in front of the user (see #986).

This "update the view" is only in response to a background
task that is expected to take several seconds (e.g. 30 seconds)
anyway, so waiting 3 seconds instead of 1 is not particularly
problematic.
2017-06-08 09:12:52 +10:00
Peter Serwylo
1dbf5704b6 Don't remove ourselves from the installed app cache.
If F-Droid was actually removed, then we wouldn't even
have an installed app cache (we aren't even on the device
any more). As such, ignore all requests to remove F-Droid
because it complicates the installed apk cache. Specifically,
there is a race condition between the "compare apk cache to
package manager" and the "package removed receiver", where
the later was overriding the former.
2017-06-08 08:59:07 +10:00
Peter Serwylo
116cb88b81 Fix incorrect persistent + annoying notification to update F-Droid.
There is a persistent shared preference which dictates whether apps
have been successfully downloaded and are ready to install. When
the `InstallManagerService` used to receive an `ACTION_INSTALL_COMPLETE`
broadcast, it would update this preference to no longer be installing.
However, this never got received in the case of F-Droid updating itself.
In that case, we need to instead wait for the system to broadcast an
`Intent.ACTION_PACKAGE_ADDED` intent. This change waits until that
point before removing the preference.

Fixes #1027.
2017-06-08 08:59:05 +10:00
Hans-Christoph Steiner
48fd6d287d enforce max line length at 118
gitlab's diff views wrap badly when lines are longer than 118.  Android
Studio places a grey line in the UI at 120.

@SuppressWarnings("LineLength") is added to a bunch of files to prevent
making this commit huge.  People can remove that as they work on those
files, and fix the issues then.

I also ran Android Studio's default Ctrl-Alt-L code formatter, where it was
easy to do, and I was already in the file.
2017-06-06 16:12:23 +02:00
Hans-Christoph Steiner
a0015cda32 correct method name: getLocalizedListEntry()
This gets the data, it does not set it.  And it matches the other
getLocalized*() methods.
2017-06-06 16:12:23 +02:00
Steffan Byrne
63cad0d754 Made app_details2_header text selectable. This addresses #1032. 2017-06-05 22:07:40 -04:00
Peter Serwylo
701d927e7a Merge branch 'dark-theme-color' into 'master'
Improved font color in dark theme

Closes #1029

See merge request !529
2017-06-05 04:25:18 +00:00
ByteHamster
f66781eac6 Improved font color in dark theme 2017-06-03 09:58:53 +02:00
Hans-Christoph Steiner
9967ed9923 Bump to 0.103.2 2017-05-31 19:38:06 +02:00
Hans-Christoph Steiner
4fd84a57d0 update CHANGELOG for release 2017-05-31 19:38:06 +02:00
Hans-Christoph Steiner
37a2856a1d Merge branch 'translation-fixes-for-0.103.2' into 'master'
Translation fixes for 0.103.2

See merge request !528
2017-05-31 16:19:26 +00:00
Hans-Christoph Steiner
db120c0f1f lint: make UnusedResources an error
!520
2017-05-31 17:29:40 +02:00
Hans-Christoph Steiner
feeb8c17ad remove unused string: installDowngrade
If this is needed in the future, this commit can be reverted in git.
2017-05-31 12:31:11 +02:00
Hans-Christoph Steiner
76fca35c2e remove unused string: menu_send_apk_bt
If this is needed in the future, this commit can be reverted in git.
2017-05-31 12:31:10 +02:00
Hans-Christoph Steiner
f6c669783d remove unused string: empty_search_available_app_list
If this is needed in the future, this commit can be reverted in git.
2017-05-31 12:31:10 +02:00
Hans-Christoph Steiner
edc9941e8b make LocalizationTest log the troublesome string locale and key 2017-05-31 12:29:25 +02:00
Hans-Christoph Steiner
dc6eccc218 workaround Weblate bug for languages with no plurals
https://github.com/WeblateOrg/weblate/issues/520
2017-05-31 12:29:25 +02:00
Hans-Christoph Steiner
4621de34f8 Merge branch 'weblate' into 'master'
Weblate

See merge request !527
2017-05-31 09:50:29 +00:00
Hans-Christoph Steiner
793b62878b Weblate 2017-05-31 09:50:25 +00:00
Hans-Christoph Steiner
087e86b312 Merge branch 'fix-notifications' into 'master'
Fix notification problems

Closes #1013

See merge request !523
2017-05-31 09:09:08 +00:00
Hans-Christoph Steiner
d70d597d81 Merge branch 'delete-unused-resources' into 'master'
Delete unused resources

See merge request !520
2017-05-31 07:58:40 +00:00
Hans-Christoph Steiner
dfadffd65b Merge branch 'fix-1039--category-images' into 'master'
Fix missing category images.

Closes #1039

See merge request !526
2017-05-31 07:49:27 +00:00
Felix Ableitner
07cd5e82fc Remove unused resources 2017-05-31 12:22:47 +09:00
Peter Serwylo
f617402f32 Remove PendingDownload in favour of Downloading
The response to receiving PendingDownload was always a more specific
case of the Downloading event. By removing it, the code which was listening
for Downloading events is capable of doing everything that the PendingDownloading
listeners were doing.
2017-05-31 11:47:10 +10:00
Peter Serwylo
a656e8e133 Remove dead code.
Fixes #1013.
2017-05-31 11:47:10 +10:00
Peter Serwylo
b3ed64ddaf Simplify and clean up updates view logic.
Same as how AppDetails2 was recently cleaned up to depend more on
AppUpdateStatusManager.

In addition, it also removes items from the "X apps can be updated"
lower part of the "Updates" view when they are present in the upper half
(i.e. the half showing feedback about the current download/install
progress).
2017-05-31 11:47:10 +10:00
Peter Serwylo
2a9fefd54e Simplify logic in UpdatesAdapter.
No longer do we try to nicely maintain the state of the adapter in "Updates"
in order to notify the recycler view about changes to its underlying data.
Instead, we just rebuild the entire structure each time a new thing needs
to be shown/removed.

This means no more smooth scrolling to the relevant item after it is
changed, but it results in a far less buggy interface.
2017-05-31 11:47:10 +10:00
Peter Serwylo
b69587ca65 Make contract about nullable currentApp explicit.
This identified a couple of places where it needed to be guarded
against.
2017-05-31 11:47:10 +10:00
Peter Serwylo
7d1fac2729 Extract isDownloading check into method of status class.
This is also going to be used elsewhere.
2017-05-31 11:47:10 +10:00
Peter Serwylo
8e2a099e51 Make app status updates include parcelized version of status.
This means that we no longer need to receive an APK_URL and then
directly ask the status manager for the relevant status object.
This causes problems when consecutive updates happen in the same event
loop, e.g. download started + download complete. In this case, the
receiver will receive two events for the same app. When it asks for the
associated status object for the first (download started) event, it will
receive a status that says "download complete ready to install". This is
because the status object has already been updated by the second event.

Furthermore, the broadcast manager must receive a copy of the status
object, not the original object. This is because the broadcast manager
doesn't parcel the relevant extras until the end of the event loop. This
means that if the status is changed twice in one frame, then both
parcels will end up looking the same. By sending through a copy instead,
this ensures that any listener receives the statuses in the correct
order, rather than two parceled versions of the same status
notification.
2017-05-31 11:47:10 +10:00
Peter Serwylo
ee7055e118 Listen to AppUpdateStatusManager events instead of DownloadManager events.
Also, make sure to correctly update the app details view when te user
leaves then returns to the view. Prior to this, the user would need to
wait for a download event to be received. However even that was broken,
because the download listener was not being added correctly once the
user returned to the app details screen.
2017-05-31 11:47:10 +10:00
Peter Serwylo
be727ae7c0 Fix missing category images.
Even though the categoyr mage loader explicitly says not to cache
images on disk (because they are not coming from the network anyway),
UIL still uses the `FilenameGenerator` to come up with a disk cache name.

Because the file name generator takes the "path" of the URL being
downloaded, and the categories are loaded like "drawable://2134234",
there is no path. As such, the file name ends up being meaningless.

This results in the image loader testing for the existance of the file
on disk (even though we asked not to cache on disk), and then failing
with an IOException (that gets swallowed).

By providing a meaningful name from the file name generator, it now
works as expected.

Fixes #1039.
2017-05-31 09:27:29 +10:00
Hans-Christoph Steiner
7c0c5b2490 Merge branch 'weblate' into 'master'
Weblate

See merge request !525
2017-05-30 16:03:04 +00:00
Hans-Christoph Steiner
702cf2dec8 Weblate 2017-05-30 16:02:59 +00:00
Hans-Christoph Steiner
c5f5eb6a05 Merge branch 'transitions' into 'master'
Fixed shared element transitions

See merge request !524
2017-05-29 18:55:48 +00:00
ByteHamster
ecf0b88c65 Fixed shared element transitions 2017-05-29 18:02:31 +02:00
Peter Serwylo
e46fccce95 Merge branch 'text-all-caps' into 'master'
Use proper way to set text all caps on old api

See merge request !521
2017-05-26 02:57:05 +00:00
Felix Ableitner
05b4a55c0a Use proper way to set text all caps on old api 2017-05-26 11:32:29 +09:00
Peter Serwylo
18bf71a149 Merge branch 'updates-tab' into 'master'
Displaying background in updates fragment

See merge request !522
2017-05-26 01:50:37 +00:00
Hans-Christoph Steiner
35df6afa53 move "by AuthorName" to a proper format for translations
The string was forcing English grammar on other languages.
2017-05-25 19:16:11 +02:00
ByteHamster
2c31b9f793 Displaying background in updates fragment 2017-05-24 20:06:14 +02:00
Hans-Christoph Steiner
7cf5f2496c Merge branch 'last-updated-time' into 'master'
Improve display of last updated time

See merge request !519
2017-05-22 18:59:10 +00:00
Felix Ableitner
371d8ede77 Improve display of last updated time 2017-05-22 18:59:09 +00:00
Hans-Christoph Steiner
d688831cf5 gitlab-ci: make blank/unused translate output clearer
This test now shows the actual blank/unused translations, so it should
be a lot clearer why this test is failing.

!519
2017-05-19 23:39:06 +02:00
Peter Serwylo
0506fd4d79 Merge branch 'ever-more-l18n' into 'master'
convert all relevant <string> to <plurals>

Closes #883

See merge request !516
2017-05-16 22:13:25 +00:00
Hans-Christoph Steiner
3f125b8e36 For "sk" (Slovak) "many" is not a relevant quantity 2017-05-16 10:39:16 +02:00
Hans-Christoph Steiner
e07e4fc223 convert strings to plurals, and make lint enforces this
Lots of languages really need the <plurals> tags to make sense, so
this also makes lint exit with an error when it finds strings that
should be <plurals>

closes #883
2017-05-16 10:39:16 +02:00
Hans-Christoph Steiner
d71514d628 Merge branch 'fix-1011-stacked-update-notifications' into 'master'
Force each stacked notification to have a different `requestCode`

Closes #1021

See merge request !518
2017-05-16 08:38:20 +00:00
Hans-Christoph Steiner
23e6539589 Merge branch 'use-apk-name-and-version-when-bluetoothing' into 'master'
Use apk name and version when bluetoothing

See merge request !514
2017-05-16 08:34:36 +00:00
Peter Serwylo
91eb408280 Use app name and version when bluetoothing to peer.
Previously, it would either send "base.apk" (in earlier versions of
F-Droid when bluetoothing an apk from the /data/app/... dirs), or
"install-[random].apk" (if recent F-Droid when copying file to a safe
place to expose via a FileProvider.

This now writes the file to, e.g. "F-Droid-0.103.1.apk" before sending.

Note that this means files are more likely to be overridden when being
sent, if the same apk from two different repositories is either:
 * Sent via bluetooth
 * Prompted to install via the system package manager

However this should still never let malicious people write to that
folder.
2017-05-16 08:40:54 +10:00
Peter Serwylo
e965e97623 Force each stacked notification to have a different requestCode.
This ensures that the `PendingIntent.FLAG_UPDATE_CURRENT` doesn't
continually override earlier intents with the last app to be notified.
This could probably equally be done by leaving the request code as 0 and
removing the FLAG_UPDATE_CURRENT out, however it seems much more
semantic to have a separate request code for each different pending
intent.

Fixes #1021.
2017-05-16 07:58:38 +10:00
Peter Serwylo
6002a97a03 Merge branch 'master' into 'master'
Change title and remove refresh action from repo management screen

See merge request !517
2017-05-15 21:57:04 +00:00
Stephen Michel
876f94e7ca Update repo management screen title 2017-05-15 12:02:02 -04:00
Stephen Michel
1f3271d72d remove refresh action from repo management screen 2017-05-15 11:52:28 -04:00
Hans-Christoph Steiner
0fb65d2cfd Bump to 0.103.1 2017-05-13 00:10:20 +02:00
Hans-Christoph Steiner
94e4ded672 Merge branch 'master' into 'master'
last fixes for 0.103.1

Closes #1018, #943, and #1010

See merge request !515
2017-05-12 21:58:34 +00:00
Hans-Christoph Steiner
7c34c60a41 update CHANGELOG for release
closes #1018
2017-05-12 23:33:10 +02:00
Hans-Christoph Steiner
b848766436 remove translation auto-detect hack, it is too hacky
The hack that goes through and checks whether a language is present in
the APK seems to cause random strings to switch to English when the
app is running.  So this removes that hack, and instead switches the
Languages menu to a hard-coded list.  Languages that are not present
or close to complete were removed from the old list.

closes #943
closes #1010
2017-05-12 23:33:10 +02:00
Hans-Christoph Steiner
2d9e1ecd4f remove unused arguments to Languages.setLanguage() 2017-05-12 23:33:10 +02:00
Hans-Christoph Steiner
064be9482d Merge branch 'fix-837--file-provider-uri' into 'master'
Use file provider when bluetoothing apks

See merge request !511
2017-05-12 20:19:47 +00:00
Peter Serwylo
0df1f765e9 Don't die when failing to bluetooth apk. 2017-05-12 09:23:01 +10:00
Peter Serwylo
09ad7fe3d0 Use FileProvider when bluetoothing apks on API >= 24.
Reuses the code that the installer uses, when it broadcasts to
the relevant installer that an Apk is available for install.

This used to do the following:
 * Copy file to a private directory
 * Make the file world readable (so that PM can access it)
 * Send a file:// URI to the installer

The file:// URI is no longer supported for reasons explained in
the support lib FileProvider class. Now a content:// URI is required,
and that must explicitly grant permission to certain packages.

The existing code here used to grant permission to
org.fdroid.fdroid.privileged, and this code now also grants it to
com.android.bluetooth. I see no security threat with exposing these
files to both applications, because the .apk files only ever:
 * Were downloaded from the public internet into a (potentially public)
   cache dir.
 * Were sourced from an `ApplicationInfo#publicSourceDir, in which
   case any app can access that anyway.

Fises #837.
2017-05-12 09:22:57 +10:00
Peter Serwylo
2f4b00dc75 Formatting 2017-05-12 09:16:58 +10:00
Peter Serwylo
bf8aedd79c Merge branch '0.103.1-fixes' into 'master'
0.103.1 fixes

Closes #943 and #1012

See merge request !513
2017-05-11 22:40:30 +00:00
Hans-Christoph Steiner
7c2125c248 only remove incomplete translations if saved in a git remote 2017-05-11 09:39:00 +02:00
Hans-Christoph Steiner
1b390cceca clear language setting if it matches the system-wide setting
If the user can set the language using the Setting app, then there is
not reason to use the Languages hack.  This then clears the preference
if it matches the language of the system-wide locale.  This also
removes the current system-wide language from the Languages menu.

closes #943
2017-05-11 09:39:00 +02:00
Hans-Christoph Steiner
6456f56ced hide some lint warnings that cannot be fixed 2017-05-11 09:38:59 +02:00
Hans-Christoph Steiner
d1014f7b1f fix "Number formatting does not take into account locale settings."
lint says "Consider using String.format instead."
2017-05-11 09:38:59 +02:00
Hans-Christoph Steiner
186d1dbabb fix SetTextI18n lint warnings and set as error 2017-05-11 09:38:59 +02:00
Hans-Christoph Steiner
7702e72acb move lint config to lint.xml to enable ignoring specific files 2017-05-11 09:38:59 +02:00
Hans-Christoph Steiner
151c83218c do not crash if there are no cached APKs
closes #1012
2017-05-11 09:38:59 +02:00
Hans-Christoph Steiner
eff483d73e gitlab-ci: fail if translation strings need corrections
Since we have all these lovely scripts for cleaning up the
translations, gitlab-ci is a handy way to enforce that they get used.
Since weblate merges happen via merge requests, this will work nicely
now.  I can't think of any false positives that will arise, but we
shall find out!
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
2ef9b279a8 remove all blank items from plurals 2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
38403338da remove xmlns tools:ignore from translations
XML namespaces are a massive pain to deal with in, and they are totally
unneeded in the translation files.  xmlns:tools is only needed in the
source file to ignore some lint warnings.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
3df626aed1 sync up translation scripts to use the same code
To keep these scripts simple and readible, it makes sense to keep them
as separate scripts.  But they should use the same approach as much as
possible.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
082b6091fc move all translation scripts to tools/
I think we should just move all the scripts to tools/, app/tools is
confusing, not very visible, and non-standard.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
b99e95304e remove pull-trans.sh, weblate is merged via merge requests now
gitlab handles the squashing, then we have a publicly available history
of the unsquashed commits in the merge request.
2017-05-10 23:18:28 +02:00
monolifed
924f192d97 Translated using Weblate (Turkish)
Currently translated at 100.0% (388 of 388 strings)
2017-05-10 23:18:03 +02:00
Jonatan Nyberg
4200d997a2 Translated using Weblate (Swedish)
Currently translated at 100.0% (388 of 388 strings)
2017-05-10 23:18:03 +02:00
Nine Lima
c2545aee88 Translated using Weblate (Afrikaans)
Currently translated at 100.0% (388 of 388 strings)
2017-05-10 23:18:03 +02:00
Hans-Christoph Steiner
e19cfd2831 Merge branch 'weblate' into 'master'
Weblate

See merge request !512
2017-05-10 18:25:29 +00:00
Hans-Christoph Steiner
3cd4abb510 Weblate 2017-05-10 18:25:27 +00:00
Hans-Christoph Steiner
6c9d4f899e Merge branch 'fix-feature-image' into 'master'
Fix feature images from only displaying the first one loaded.

See merge request !510
2017-05-09 12:02:14 +00:00
Peter Serwylo
67a29bae8f Include an images full URL in the cache path.
All feature graphics are called `featureGraphic.png`, and so our cache
was presuming all feature graphics were the same image. By including
the full path from the server in the cached name, we don't overwrite
images any more.
2017-05-09 16:03:27 +10:00
Peter Serwylo
bd5503b4cd Rename method as icons are no longer the only thing stored here. 2017-05-09 16:02:08 +10:00
Peter Serwylo
ca4e1c24a3 Merge branch 'fix-1006' into 'master'
prevent crash if installing app without icon

Closes #1006

See merge request !509
2017-05-09 06:01:40 +00:00
Hans-Christoph Steiner
4e375ca7f8 prevent crash if installing app without icon (closes #1006)
Right now, org.fdroid.fdroid.privileged.ota and FFupdater do not
provide any icons and it seems that that triggers this crash:

ACRA caught a NullPointerException for org.fdroid.fdroid
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.lastIndexOf(int)' on a null object reference
    at org.fdroid.fdroid.FDroidApp$5.generate(FDroidApp.java:282)
    at com.nostra13.universalimageloader.cache.disc.impl.BaseDiskCache.getFile(BaseDiskCache.java:167)
    at com.nostra13.universalimageloader.cache.disc.impl.BaseDiskCache.get(BaseDiskCache.java:98)
    at com.nostra13.universalimageloader.cache.disc.impl.LimitedAgeDiskCache.get(LimitedAgeDiskCache.java:74)
    at com.nostra13.universalimageloader.utils.DiskCacheUtils.findInCache(DiskCacheUtils.java:36)
    at org.fdroid.fdroid.NotificationHelper.getLargeIconForEntry(NotificationHelper.java:506)
    at org.fdroid.fdroid.NotificationHelper.createUpdateNotification(NotificationHelper.java:300)
    at org.fdroid.fdroid.NotificationHelper.createNotification(NotificationHelper.java:191)
    at org.fdroid.fdroid.NotificationHelper.access$400(NotificationHelper.java:37)
    at org.fdroid.fdroid.NotificationHelper$1.onReceive(NotificationHelper.java:106)
    at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297)
    at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46)
    at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5254)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
2017-05-08 20:16:39 +02:00
Hans-Christoph Steiner
5e031a5ac1 Merge branch 'patch-1' into 'master'
Delete duplicate text in update screen

See merge request !507
2017-05-04 20:01:53 +00:00
Licaon_Kter
3558117e3c Delete duplicate text 2017-05-04 12:20:35 +00:00
Hans-Christoph Steiner
fe8ce530fe Merge branch 'final-localization-cleanup' into 'master'
Final localization cleanup

See merge request !506
2017-05-02 20:53:09 +00:00
Hans-Christoph Steiner
7135cdef48 Bump to 0.103 2017-05-02 22:03:08 +02:00
Hans-Christoph Steiner
2e2a6bd419 show Toast when file type cannot be installed
This is just a placeholder until we implement proper "installing" for
non-APK files.

!504
#982
2017-05-02 22:00:48 +02:00
Hans-Christoph Steiner
a12d8e0c6d remove comment from <plurals>, its finding its way into translations 2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
7e12ae45e3 remove odd quoting from strings 2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
62a670ba3a tools: check strings for odd quoting detritus
I don't know where this is coming from, and I can't see anyway that it
would be helpful
2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
1222a9b4c7 tools: allow check-string-format to be called from anywhere 2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
676b2b9093 correct SPDX links when the License: tag contains a +
The "+" is syntax on top of the license name:
https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60
2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
27453855b2 Merge branch 'nonapk' into 'master'
Add a DummyInstaller to handle non apk files

See merge request !504
2017-05-02 19:52:07 +00:00
Hans-Christoph Steiner
0f5aa55dab Merge branch 'weblate' into 'master'
0.103 weblate import

See merge request !505
2017-05-02 19:50:22 +00:00
Hans-Christoph Steiner
a3c5e9631b 0.103 weblate import 2017-05-02 19:50:22 +00:00
Chirayu Desai
bbd77c5b79 Add a DummyInstaller to handle non apk files
* Avoids crashes when trying to treat non apk files, such as
  privileged extension ota update.zip as apks
* Doesn't do anything at all for now.

One issue with this is the app is always in the not installed state,
so what would be appropriate here would be to change the text of the
install button to download, and update that accrodingly.
However that is outside of the scope of this change.

TODO:
Add toast indicating the user that they need to install
manually, in case of OTA update.zip
2017-05-03 00:29:03 +05:30
Hans-Christoph Steiner
66612e906c Merge branch 'fix-986--too-many-change-notifications' into 'master'
Bunch together notifications to prevent flickering in UI.

Closes #986

See merge request !502
2017-05-02 14:29:20 +00:00
Hans-Christoph Steiner
16ddcbd5d8 Merge branch 'wipe-etag-on-language-change' into 'master'
Force repo update after changing language.

See merge request !503
2017-05-02 11:18:11 +00:00
Peter Serwylo
b7fc904a6a Merge branch '0.103-fixes' into 'master'
0.103 fixes

Closes #991, #943, and #960

See merge request !501
2017-05-02 11:12:54 +00:00
Peter Serwylo
18f8817388 Force repo update after changing language.
This zeros out the etag in the fdroid_repo table and then asks
the update service to perform an update.

The end result is that changing the language will result in the metadata
being shown in that language.

Note: This doesn't immediately work due to pending changes around
Locale.setDefault() and the change in case from Summary to summary in
the server metadata.
2017-05-02 16:24:04 +10:00
Peter Serwylo
a9d817441f Bunch together notifications to prevent flickering in UI.
This reverts to the previous behaviour before 8faf151.
Then, the InstalledAppProviderService would queue up a series of
changes, and only notify after 1 second of nothing being added to
the queue. This was good because CursorAdapters and LoaderManagers
would not continually requery the database several times a second (only
once at the end), but it meant there was a lag in the AppDetails screen
getting updated after installing/upgrading/deleting packages.

This restores that behaviour where general events (e.g. "some misc apps
in the database were changed") are "debounced" for 1 second. However it
also emits a more specific "package org.blah.com was changed" instantly.

In the long term, it would be good to remove any dependency on
ContentObservers and `notifyChange()` altogether, in preference of
either LocalBroadcastManager or RxJava. However this will depend on how
we go about changing the database layer in the future. The fact we now
depend on ContentProviders means that it would be a big change to move
away from LoaderManager + notifyChange().

Fixes #986.
2017-05-02 11:09:00 +10:00
Peter Serwylo
b7bdd40ab4 Merge branch 'gitlab-ci-tests' into 'master'
troubleshoot flaky connected24 gitlab-ci test

See merge request !498
2017-05-02 01:06:46 +00:00
Hans-Christoph Steiner
c7e4a0f3df gitlab-ci: provide debug info for connected24 failures
connected24 tests are frequently failing saying that while an emulator
is running, its not compatible.  This is bizarre. This just adds debug
output to help troubleshoot that.
2017-05-01 23:46:13 +02:00
Hans-Christoph Steiner
c7d9235951 update gradle to 3.2.1, the version included in Debian/stretch 2017-05-01 23:46:13 +02:00
Hans-Christoph Steiner
1f8330fd06 use gradle android plugin v2.2.2
Starting with v2.2.2, it zeroes out timestamps in the APK's ZIP header
https://android-developers.googleblog.com/2016/11/understanding-apk-packaging-in-android-studio-2-2.html

This version is also the version that is included in Debian/stretch.
2017-05-01 23:46:13 +02:00
Hans-Christoph Steiner
6c64e1943a fix formats in Persian translation 2017-05-01 23:40:41 +02:00
Danial Behzadi
3e7b549f48 Translated using Weblate (Persian)
Currently translated at 100.0% (386 of 386 strings)
2017-05-01 23:32:16 +02:00
Hans-Christoph Steiner
653f577bf9 re-add Sardinian to the Language menu list
closes #991
2017-05-01 23:31:14 +02:00
Hans-Christoph Steiner
2eaf00f9f1 include magic method for setting local via Languages menu
I have found no explanation of what should work and why, but language
choosers seem to always include this line.  This also seems to fix the
bug:

closes #943
2017-05-01 23:31:14 +02:00
Hans-Christoph Steiner
de1cc566a1 show license in the links section
This makes the license a link to the spdx.org page for the app's
license.  I think this is an improvement over the way the license was
displayed before 0.103 since it provides a direct link to the actual
text of the license.

The license icon is a modified version of the public domain icon:
https://commons.wikimedia.org/wiki/File:Cc-sa_white.svg

closes #960
2017-05-01 23:31:14 +02:00
Hans-Christoph Steiner
e02c0cb555 Merge branch 'new-ui/getInstalledApk' into 'master'
AppDetails2: bring back getInstalledApk() from AppDetails

Closes #985

See merge request !500
2017-05-01 19:33:30 +00:00
Hans-Christoph Steiner
39e382b810 Merge branch 'weblate' into 'master'
weblate import for 0.103-alpha4

See merge request !499
2017-05-01 19:30:24 +00:00
Hans-Christoph Steiner
53417955c9 weblate import for 0.103-alpha4 2017-05-01 19:30:22 +00:00
Chirayu Desai
ef6c03c45d AppDetails2: bring back getInstalledApk() from AppDetails
* Addition: Try to get apk details via InstalledAppProvider too.
 * In certain cases, such as the "UnifiedNlp (no GAPPS)" app on a device
   with actualy GAPPS / GMS installed, apk can be null which leads
   to a crash
 * Ask InstalledAppProvider for the app's details too, like it
   was done in the old UX AppDetails.
 * Also seen when uninstalling app with a signing key different,
   fixes #985
2017-05-02 00:47:08 +05:30
Peter Serwylo
11c42f6a2f Merge branch 'pre-0.103-alpha4-rename' into 'master'
nail down language pref handling for localized index metadata

See merge request !496
2017-04-30 12:20:18 +00:00
Hans-Christoph Steiner
0a59c5c6e5 fully write up locale choosing for the 'localized' block
This is how locales are handled when parsing the index from the server.
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
d946678568 remove redundant "About" header in Settings view 2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
4d785bd6bd use better variable name for the set of available locales 2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
03168ff99e separate index locale preference handling on >= android-24
In android-24 and newer, the user can specify multiple languages in a
priority list. Therefore, the locale chooser logic here does not need
to work so hard to find a language match.  For example, if the user
wanted to see country-specific variants, they would add them to the
preference list.

With older versions of Android, the pref is only a single locale. So
chances are that someone who specified de_AT would rather see de or
de_DE than en_US.  Same goes for es_AR, ar_EG, etc.  This could annoy
Chinese speakers, since someone who sets zh_TW could potentially see
zh_CN, which are written pretty differently.
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
dc57fd712b rename index-v1 'localized' key names to match fdroidserver
This makes the key names standardized across fdroidclient,
fdroidserver, and index-v1.json.

fdroidserver!261
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
bdc9a14c2a use android-24+ LocaleList when choosing localized index data
When choosing localized data from the index, this includes the new
LocaleList feature that represents the user's preferred locale ranking

https://developer.android.com/reference/android/os/LocaleList.html
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
add570ab4b hide Languages pref on >= android-24
Android 24 and later provides tons of languages, and a way to rank
multiple languages instead of choosing one.  The Languages pref is a
big hack and can be problematic, so its better to disable it when its
not needed.  This will make it so it is no longer possible to set
F-Droid to a language that the system does not support.

#943
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
50982060ac support index locales that do not include country (e.g. 'en') 2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
2586e87524 clear Languages pref when using System Default
Keeps things clean if System Default clears out the pref entirely.
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
5febedebd6 fix mispelled Languages.getLanguages() 2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
561a18ad2b Merge branch 'fix-962--notify-of-downloaded' into 'master'
Show downloaded + not installed apps in "Updates"

Closes #962

See merge request !488
2017-04-28 08:38:12 +00:00
Hans-Christoph Steiner
7199e829f3 Merge branch 'fix-974--repo-priorities-and-suggested-vercode' into 'master'
Don't suggest lower versions, despite repository priorities.

Closes #974

See merge request !497
2017-04-28 08:34:10 +00:00
Peter Serwylo
6c08e054f5 Calc suggested versioncode properly, regardless of repo priorities.
There was a bug where the repo with the highest priority would be
responsible for specifying the suggested version code. When doing so, it
would only select from the list of apks available in that repo. This
improves the calculation so that when any given repos app gets a
suggested version code assigned, it selects from _all_ available apks,
not just those from the repository in question.

Fixes #974.
2017-04-28 11:50:08 +10:00
Peter Serwylo
294e1d2821 Simulate armeabi as the architecture during multi-repo test
This allows us to test "installing" Adaway, which has a native code
dependency that the default Robolectric setup doesn't support (defaults
to armeabi-v7a).
2017-04-28 11:50:05 +10:00
Peter Serwylo
b1a1c68ad7 Improved tests to catch incorrect suggested versions with multi repos.
This is the bug outlined in #974. This commit just adds a test which
catches the problem, but does not fix it yet.
2017-04-28 10:17:27 +10:00
Peter Serwylo
69816b5b82 Only and if there are any there. 2017-04-28 09:12:53 +10:00
Peter Serwylo
25edfffcbe Remove version check, allow version downgrades to appear in Updates tab correctly.
The version check guarded against downgrades, and would not notify the
user if it found a downgrade in the apk cache. However this was from
before we could ask `AppUpdateStatusManager#isPendingInstall(hash)`. Now
we don't need to care whether it is an upgrade or a downgrade, because
there is a more authoritative source as to whether this apk is
interesting to us or not.
2017-04-28 09:12:33 +10:00
Peter Serwylo
0d1e00b6cf Don't accidentally return Apk instances from the wrong repo
There may be multiple apk files with the same hash. Although it is not a
security issue to install one or the other (they are exactly the same
binary), they may have different metadata to display in the client.
Thus, it may result in weirdness if one has a different
name/description/summary etc).

This change takes each of the matching Apk objects from the database,
then asks them where they expect to be downloaded. It matches this
against the File that we are looking at and only returns if they match.
2017-04-28 08:34:00 +10:00
Hans-Christoph Steiner
f8c9d7ec8e Merge branch '0.103-alpha3--ui-fixes' into 'master'
0.103-alpha3  UI fixes

Closes #981, #967, and #965

See merge request !490
2017-04-26 10:34:02 +00:00
Peter Serwylo
06088e2b35 Send acra report about crash we are getting, but don't crash F-Droid 2017-04-26 19:39:26 +10:00
Hans-Christoph Steiner
8e168b46a7 Merge branch '0.103-fixes--pre-21-crashes' into 'master'
Don't use attr for color value in drawables.

Closes #979

See merge request !493
2017-04-26 07:20:10 +00:00
Peter Serwylo
1b6dc02513 Merge branch 'privext-installconfirm' into 'master'
Set app theme for Privileged Extension's Install Confirm Activity

See merge request !491
2017-04-26 06:07:42 +00:00
Peter Serwylo
74795d2f7a Don't use attr for color value in drawables.
According to the following this is not supported:

 * http://stackoverflow.com/a/13471695/2391921

This uses the approach in that SO answer, by extracting the attribute to
instead point at a drawable, and have one drawable for each theme.

Fixes #979.
2017-04-26 10:06:00 +10:00
Peter Serwylo
7375e09d19 Fail softly, notifying user of failure rather than crashing, 2017-04-26 08:38:41 +10:00
Peter Serwylo
e6c6c28f5f Formatting + PMD fix in response to CR
PMD does not like manually throwing NPEs, even if they have more verbose
information than the default NPE. As such, use an
`IllegalArgumentException` instead.
2017-04-26 08:38:03 +10:00
Peter Serwylo
4b70d81e5c Make install/uninstall/run/upgrade buttons not overlap last updated text
Instead of showing them below the icon, it now puts the icon + name +
author + last updated into a single layout which can grow if the app
name or author wraps to a second line. The buttons are now below this
additional layout.
2017-04-26 08:28:25 +10:00
Peter Serwylo
2a6dcb63bb Check for null in App#iconUrl.
Although I'm unsure of exactly why this is `null`, it seems sensible
that there is a possibility of null icons (e.g. for .zip files or other
media). As such, this just adds a guard condition to ensure that the
`iconUrl` is not null.

Fixes #981.
2017-04-26 08:28:25 +10:00
Peter Serwylo
6a0b16fc7d Increase verbosity around crash site for better ACRA reports.
Received the following crash report, where the user said it crashed
while trying to install the priviledged extension:

```
java.lang.NullPointerException: Attempt to read from field 'android.content.pm.Signature[] android.content.pm.PackageInfo.signatures' on a null object reference
at org.fdroid.fdroid.installer.ApkSignatureVerifier.getApkSignature(ApkSignatureVerifier.java:70)
at org.fdroid.fdroid.installer.ApkSignatureVerifier.hasFDroidSignature(ApkSignatureVerifier.java:54)
at org.fdroid.fdroid.installer.ExtensionInstaller.installPackageInternal(ExtensionInstaller.java:53)
at org.fdroid.fdroid.installer.Installer.installPackage(Installer.java:265)
at org.fdroid.fdroid.installer.InstallerService.onHandleIntent(InstallerService.java:77)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.os.HandlerThread.run(HandlerThread.java:61)
```

Not sure how to address it yet, so adding more specific excetpion for
if it happens in the future.
2017-04-26 08:28:24 +10:00
Peter Serwylo
1eb224fc5e Don't show run button for apps which cannot be launched.
The feedback from ACRA was:

> tried to run an app that doesn't have a launcher (termux api)
2017-04-26 08:28:24 +10:00
Peter Serwylo
4cc6e5bc89 Sort categories alphabetically by name.
This pulls all the categories out of the database at once for sorting,
rather than sorting in SQLite. This is to prevent having to store the
localized category names in the database (and hence having to update
them when the locale is changed).

Fixes #967.
2017-04-26 08:28:24 +10:00
Peter Serwylo
e2c82d2943 Accessibility tweaks in app details.
* Correctly read out "Cancel download"
 * Allow users to hear download progress correctly.
2017-04-26 08:28:24 +10:00
Peter Serwylo
bae5bdb1f4 Force apps in "Installed" list to sort by name.
Previously they were left to be sorted however SQLite parsed the query.
This turned out to result in them beign sorted by repos first, then
names. For example, all of the GP apps would be at the bottom of the
list.

Fixes #965.
2017-04-26 08:28:24 +10:00
Peter Serwylo
96a9681fd1 Merge branch 'colorfix' into 'master'
lighten app card background in category view for #907

See merge request !492
2017-04-25 22:18:25 +00:00
Stephen Michel
2272e441c6 lighten app card background in category view for #907 2017-04-25 15:05:19 -04:00
Chirayu Desai
86ba3bb6c6 Set app theme for Privileged Extension's Install Confirm Activity
* This applies the dark theme correctly.
2017-04-25 19:05:43 +05:30
Peter Serwylo
671589d1d6 Merge branch 'master' into 'master'
Pressing back button brings back where it sould

See merge request !489
2017-04-25 00:29:02 +00:00
Peter Serwylo
ccdd8a168c Don't prompt user to install, if apk is in cache from a previous install
Use SharedPreferences to keep track of whether we are in the middle of
an install for a particular apk or not. If sothen the presence of an
.apk file in the cache means we need to tell the user (in the updates
tab) that a file is ready to install.
2017-04-25 10:20:56 +10:00
Peter Serwylo
79d526ead1 Correctly notify user of downloaded but not installed apks
Previously this only worked for apps which were being upgraded to the
latest available version. Now it works for apks being upgraded from an
old version to a newer-but-not-newest version. Perhaps more importantly,
it also now works for newly installed apps.

This has a problem where if a user installs, then uninstalls an app,
they are still notified about installing it. This is because the apk
is in the cache and the code doesn't know whether it is there from
the initial install, or because it has been redownloaded by the user
to install some time after uninstalling.
2017-04-25 10:18:16 +10:00
Maestus
07bc33d391 Pressing back button in toolbar (in AppDetails) brings back where it sould 2017-04-23 23:16:19 +02:00
Peter Serwylo
c4fd369feb Merge branch 'dark-mode-fixes' into 'master'
More dark more fixes

See merge request !487
2017-04-20 22:44:31 +00:00
Chirayu Desai
9f50bef04f More dark more fixes
Fixes some leftover items missed in the previous major update.
* Donate view in AppDetails
* What's new view in AppDetails
* The search view
2017-04-21 01:39:39 +05:30
Hans-Christoph Steiner
cb241a23ef Merge branch 'explicit-pending-intents' into 'master'
Ensure PendingIntents use explicit Intents

See merge request !485
2017-04-20 16:55:46 +00:00
Peter Serwylo
b0803432d8 Ensure PendingIntents use explicit Intents.
The only pending intents that were not explicit were the four from
the NotificationHelper class. These now explicitly specify the
NotificationBroadcastReceiver as their destination, which is not
exported. That then forwards the intents onto relevant methods of
AppUpdateStatusManager.
2017-04-20 17:03:37 +10:00
Hans-Christoph Steiner
9703589950 update meeting time in README 2017-04-19 10:48:13 +02:00
Hans-Christoph Steiner
471083b8f4 Bump to 0.103-alpha3 2017-04-19 00:19:10 +02:00
Hans-Christoph Steiner
f224483e1b when checking language support, reset locale back to original
With this, it was leaving the app's locale set to the last language on
the LOCALES_TO_TEST list, which is 'zu' (Zulu).  For some dialogs, it
was actually using that locale, so showing OK/Cancel in Zulu despite
the app being in a different language.

#943
2017-04-19 00:19:10 +02:00
Hans-Christoph Steiner
b2d89ec665 Merge branch 'localization-fixes' into 'master'
localization fixes

Closes #923

See merge request !484
2017-04-18 20:04:22 +00:00
Hans-Christoph Steiner
67f40367cd use Languages class as source of locales to test 2017-04-18 21:37:59 +02:00
Hans-Christoph Steiner
3a194026fa test all formats in all languages
We've had a number of crashes due to bad formats in various
translated strings.  This test runs through all of the translated
strings and tests them with the same format values that the
source strings expect.  This is to ensure that the formats in the
translations are correct in number and in type (e.g. {@code s} or
{@code s}.  It reads the source formats and then builds {@code
formats} to represent the position and type of the formats.  Then
it runs through all of the translations with formats of the
correct number and type.

I couldn't get the Resources stuff working in Robolectric, so I
made this an emulator test.

The change to the Swedish translation included in this commit are
fixes for issues that these tests found.

closes #923
2017-04-18 21:26:58 +02:00
Hans-Christoph Steiner
670e6be39a fix fallthrough setting of localized metadata entries
Java's Map.get() returns null if there is no match, so this was always
setting each entry to whatever value was in the highest priority
locale, whether it had contents or what null.  Now, this will fall
through the priority list of locales until it finds actually contents.
2017-04-18 21:26:58 +02:00
Hans-Christoph Steiner
4bb7050725 add Video to Links section of App Details 2017-04-18 21:26:58 +02:00
Hans-Christoph Steiner
6fae74b36d actually use phone's locale when picking descriptive metadata
A TreeSet apparently does not really maintain insertion order, while a
LinkedHashSet does.  This ensures that the insertion order of locales
is preserved in localesToUse so that the prioritization is correct.
2017-04-18 21:26:58 +02:00
Hans-Christoph Steiner
148d69d9b4 Merge branch 'installer-fallback-N' into 'master'
Installer (and uninstall) fallback fixes for API >= 24

See merge request !482
2017-04-18 21:23:02 +02:00
Hans-Christoph Steiner
06dff8184b no need to catch an exception, only to throw it
Just let the SecurityException be throwing where it originated.

From PMD: "A catch statement that catches an exception only to wrap it
in a new instance of the same type of exception and throw it should be
avoided".

This cleans up a little from !482.  Ctrl-Alt-L and Ctrl-Alt-O before
committing! :-)
2017-04-18 21:07:16 +02:00
Chirayu Desai
432f45254b PrivilegedInstaller: fallback to default installer for uninstall
* On API >= 24, in cases when the installer package name is not set
  to privext, the system won't let us uninstall.
* Fallback to the DefaultInstaller so that uninstall still works.
2017-04-18 23:59:19 +05:30
Chirayu Desai
db4aa3b519 Installer: Use content URI on API >= 24 for DefaultInstaller fallback
* When there's a permission mismatch (#951, #890), the fallback
  DefaultInstaller is invoked, which enforces file and content schemes
  for API < 24 and >= 24 respectively.
* Use content URI in that case, which allows the fallback to work.
2017-04-18 23:50:05 +05:30
Hans-Christoph Steiner
d844541f6e Merge branch 'big-translation-cleanup' into 'master'
Big translation cleanup

See merge request !481
2017-04-18 17:58:46 +00:00
Hans-Christoph Steiner
15d11f6d44 reformat all strings.xml using Android Studio 2.2.3 defaults
This should make dealing with merge conflicts a lot easier, since there
should be less conflicts on things like tabs vs spaces for indenting.
2017-04-18 19:29:50 +02:00
Hans-Christoph Steiner
dfff412dfe remove odd quoting from button_view_all_apps_in_category 2017-04-18 19:29:50 +02:00
Hans-Christoph Steiner
de15f7d5bb remove <plurals> with dev help string in it 2017-04-18 19:29:50 +02:00
Hans-Christoph Steiner
164dc2740c purge translations to deleted 'my_apps_header_number_of_updateable' 2017-04-18 19:29:50 +02:00
Peter Serwylo
b7ef0bd4e1 Also check for misformated plurals, not just regular strings.
The script checks for `<string/>` elements which have misformated
arguments in them. It Now also checks for `<plural><item /></plural>`
elements too.

closes !472
2017-04-18 19:29:50 +02:00
Hans-Christoph Steiner
cfabd2a2c3 properly handle <plurals>
<plurals> handles the grammar needed for numbers/quantities in various
languages.  Like in a number of slavic languages, numbers ending in 0,
1 or others have separate grammar.  In English, there is just 1 and
then all the rest (0 days, 2 days, 3 days, etc). <plurals> does not
handle multiple strings for different quantities, like having a
different string for each number case.  For that, we have to do it in
Java and have multiple <strings>

!472
2017-04-18 19:29:50 +02:00
Hans-Christoph Steiner
77e3d6a6f1 Merge branch 'even-even-more-ui-fixes' into 'master'
More misc UI fixes for 0.103

Closes #949, #937, and #927

See merge request !477
2017-04-18 17:28:35 +00:00
Hans-Christoph Steiner
e9cb347642 gitlab-ci: switch to current 'client-latest' image tag
'client' is no longer generated.
2017-04-18 19:22:29 +02:00
Hans-Christoph Steiner
6fae06375e Merge branch 'weblate' into 'master'
Weblate fix sync for 0.10.3

See merge request !479
2017-04-18 15:16:37 +00:00
Hans-Christoph Steiner
4920b5f75f Weblate fix sync for 0.103 2017-04-18 15:16:35 +00:00
Hans-Christoph Steiner
143e5ccc74 Merge branch 'weblate' into 'master'
Weblate pull for 0.103-alpha3

See merge request !476
2017-04-17 22:59:49 +00:00
Hans-Christoph Steiner
0119138f38 Weblate pull for 0.103-alpha3 2017-04-17 22:59:48 +00:00
Peter Serwylo
131eece46c Fix issue with some cards not displaying in "Latest" view.
But in constraint layout which was fixed in 1.0.2.

Fixes #949.
2017-04-17 17:32:14 +10:00
Peter Serwylo
2fbfcb66b0 Make categories read out correctly by screenreader. 2017-04-17 17:31:32 +10:00
Peter Serwylo
93e39d895c Fix for API 15- having really busted navigation 2017-04-17 17:31:32 +10:00
Peter Serwylo
17ad6167a3 Fix broken padding in AppDetails2 on older devices.
Right + Left in addition to End + Start for support on older devices.
2017-04-17 17:31:32 +10:00
Peter Serwylo
6c12707720 Update AppDetails buttons after upgrading app to latest version.
Prior to this, it would only update the "Uninstall"/"Run"/"Upgrade"
buttons after a fresh install, or an uninstall.

This change is a bit more liberal in how often we try to update the
view, due to a race condition with PackageManager and AppDetails2.
AppDetails2 listens for InstalledAppProviderService in onResume, but
sometimes that is too late (the notification has already fired).
2017-04-17 17:31:32 +10:00
Peter Serwylo
a9b2ac9388 Don't clip the shadows underneath app details buttons.
Minor UI quirk, it was cutting off the drop shadow for these buttons.
2017-04-17 17:31:32 +10:00
Peter Serwylo
3c1b66dcd1 Let buttons go all the way to the left, not just to the icon.
On languages with longer translations, there is not enough space to fit
the relevant translations on a single line of the button.

Fixes #937.
2017-04-17 17:31:32 +10:00
Peter Serwylo
c73a65656a Merge branch 'whatsnew-n-stuff' into 'master'
support new WhatsNew fields in index-v1 (+ l18n fixes)

Closes #910 and #941

See merge request !474
2017-04-17 06:32:04 +00:00
Hans-Christoph Steiner
97fd3f0bad support "What's New" and "Video" fields from index-v1
fdroidserver currently only supports a single WhatsNew field that
comes from the CurrentVersionCode of the app.  Google Play and
fastlane supply support a WhatsNew field per-release, but we don't use
that data anywhere, and implementing that in the data structures would
add a lot of complexity since Apk would then need to have its own
"localized" section like App does.

The "Video" field is just a URL pointing to a video.

closes #910
2017-04-14 01:31:33 +02:00
Hans-Christoph Steiner
656b3185b2 added Esperanto and Shqip back to the language chooser
I added Esperanto because someone asked, and Shqip since it is not
available in Android 5.1 and people who speak Shqip would be likely to
open the language menu to switch away from English, then they'd see
Shqip as an option.  This still won't take effect until those
languages are fully translated.

closes #941
2017-04-14 01:09:33 +02:00
Hans-Christoph Steiner
8cb277e90d AppDetails2: add missing paddingEnd to match paddingRight 2017-04-14 01:09:33 +02:00
Hans-Christoph Steiner
3121a106e0 fix "DefaultLocale: Implied default locale in case conversion"
The point here is to use the English work all lowercase, so make sure
that the English lowercasing rules are always active, regardless of
the system's locale.
2017-04-14 01:09:33 +02:00
Hans-Christoph Steiner
e6844a5f4f do not override original description with nulls
The original single language description gets stuck straight into
App.description by Jackson.  getLocalizedEntry() might return a null,
in which case it was overriding the original description.  This only
overrides the original description if there is actually a localized
description.
2017-04-14 01:09:33 +02:00
Hans-Christoph Steiner
a89323b183 Merge branch 'new-ui/dark-mode' into 'master'
Fixes for dark mode, needed after the UX Overhaul

Closes #907

See merge request !473
2017-04-13 16:11:44 +00:00
Chirayu Desai
c2685bf14e Fixes for dark mode, needed after the UX Overhaul
* Replace hardcoded color values with references to style.xml,
  which in turn has different values for light and dark theme.
* Force reload the activity to get the theme applied.

TODO:
* Swap uses it's own theme, need to figure out a way to
  handle that. Currently the main Nearby screen which you get
  to from the bottom navigation is ok, but anything after
  that is light / custom themed.
2017-04-13 19:34:18 +05:30
Hans-Christoph Steiner
46adf47fdf Merge branch 'even-more-ui-fixes' into 'master'
Even more ui fixes

Closes #931

See merge request !471
2017-04-11 21:07:02 +00:00
Hans-Christoph Steiner
ecaf2362f2 Revert "Merge branch 'replicant-fsdg-compliance' into 'master'"
This reverts merge request !452
2017-04-11 14:50:40 +00:00
Peter Serwylo
b9129e8a35 Provide feedback to user when installing previous version.
Given the only feedback available to the user that they initiated a
download once clicking the version from the list is up top, this scrolls
the recycler view to the top to show that feedback.

Also shows the selectable background when they touch the version list
items.
2017-04-11 15:37:42 +10:00
Peter Serwylo
6891752672 Added empty state text to updates/installed apps.
Both of these reuse the text that was used in 0.102.
2017-04-11 15:37:42 +10:00
Peter Serwylo
854b19eee6 Correct handling of localized metadata representing images.
Previously, it assumed that featureGraphic et al. were always present if
the localised entry was present. This is not the case, so we only return
a URL if we can actually find the entry we are looking for.
2017-04-11 15:37:42 +10:00
Peter Serwylo
3d7a4ef8dc Show F-Droid blue in feature image place when loading icons.
Prior to this it was black, which looked broken. This also ensures that
the blue is shown behind the dynamic colour when it is time to ease in
that colour.
2017-04-11 15:37:40 +10:00
Peter Serwylo
46da776c2c Fix first item in Latest not being clickable
It was clickable if you clicked anywhere on that item other than the
card (e.g. the background feature image).
2017-04-11 15:37:40 +10:00
Peter Serwylo
8e7096b2a8 Merge branch 'replicant-fsdg-compliance' into 'master'
Skip non-FSDG-compliant apps on Replicant during repo data parsing

See merge request !452
2017-04-10 22:30:47 +00:00
Hans-Christoph Steiner
16880c638c Bump to 0.103-alpha2 2017-04-07 19:27:03 +02:00
Hans-Christoph Steiner
cfd31e9086 Merge branch 'weblate' into 'master'
Weblate

See merge request !470
2017-04-07 17:25:51 +00:00
Hans-Christoph Steiner
c1af914df8 Weblate 2017-04-07 17:25:48 +00:00
Hans-Christoph Steiner
c43877eed1 demote lint ImpliedQuantity to warning
This is hitting a lot of plurals, causing the CI builds to fail.  But
unfortunately, its getting it wrong.  Its actually for a format in a string
like "Updated today" in languages like pt that need special cases for 0/1
items.  In this case, it makes no sense to say "Updated 0 days ago".
2017-04-07 19:09:19 +02:00
Hans-Christoph Steiner
78ecba646c Merge branch 'system-language-names' into 'master'
get language names from system, instead of hard coded list

Closes #908 and #858

See merge request !461
2017-04-07 16:51:56 +00:00
Hans-Christoph Steiner
49f7248d45 Merge branch 'improvements-to-update-workflow' into 'master'
Improvements to update workflow

Closes #922

See merge request !468
2017-04-07 16:46:50 +00:00
Hans-Christoph Steiner
eefb2eb8a6 Merge branch 'screenshot-placeholder' into 'master'
Use screenshot placeholder instead of app icon placeholder.

See merge request !469
2017-04-07 16:35:18 +00:00
Peter Serwylo
2353a4e82d Use screenshot placeholder instead of app icon placeholder. 2017-04-07 22:53:10 +10:00
Hans-Christoph Steiner
6d0bde716e fully replace language pref handling with Languages class
closes #908
2017-04-07 14:50:53 +02:00
Hans-Christoph Steiner
019964387a get language names from system, instead of hard coded list
closes #858
2017-04-07 14:50:53 +02:00
Hans-Christoph Steiner
7f261b339a add release checklist, to remember what all needs to happen
!460
admin#13
2017-04-07 14:50:53 +02:00
Hans-Christoph Steiner
9d2e981d5e add script to remove incomplete translations
closes #858
2017-04-07 14:50:53 +02:00
Hans-Christoph Steiner
60241f3ae4 Merge branch 'new-ui--empty-state-text' into 'master'
Feedback about empty lists

Closes #879

See merge request !463
2017-04-07 12:47:59 +00:00
Peter Serwylo
9521b9a72c Add guard contidion to prevent notifying when inappropriate.
Although the adapter tries to keep in sync with the app status update
manager, there may be times when this is not successful. In such
circumstances, it seems safe to just guard against invalid situations,
rather than trying to assert an error or fall over.

Fixes #922.
2017-04-07 22:40:29 +10:00
Peter Serwylo
42965701a3 Show "Run" button next to a successfully installed app.
There was some confusion in the user tests about how to launch an app
once it was installed. Hopefully this small change goes towards fixing
some of that confusion. Instead of just showing "X installed
successfully" in the app list, it now shows a "Run" button next to it.
2017-04-07 22:40:29 +10:00
Peter Serwylo
f830d4745d Replace mysterious tick icon with "Update" or "Install" button in main list of apps.
There is plenty of real estate in this main app list, and the tick
causes confusion as identified in the user tests.
2017-04-07 22:40:29 +10:00
Peter Serwylo
34c741f835 Clear up confusion around "Tick" icon when updating app.
When navigating to Updates -> Show Apps and then downloading an item, it
shows the download progress inline for that item. After this is
complete, it then shows a tick icon next to the item. The long term goal
should be to remove the list item from under "Show Apps" so that it is
only shown at the top of the "Updates" view. However this will require
more work. In the meantime, we can alleviate some confusion by replacing
the "Tick" icon with a button that says "Update" (like the other buttons
in the Update view).
2017-04-07 22:40:29 +10:00
Peter Serwylo
1f035a9696 Don't re-use existing pending intents.
When dismissing an "X installed successfully" intent, it should also
dismiss the relevant item from the "Updates" screen. This was not
happening. Upon investigation, I noticed that when I dismissed a
notification, it was passing through the Apk which I installed over a
day ago. This is because it was reusing a previous pending intent rather
than creating a new one.
2017-04-07 22:40:29 +10:00
Peter Serwylo
05d6929eb6 Remove unused preference "Update History".
Now that we've moved the first screen to "Latest", we always want to do
our best to show something there. This preference is pretty redundant in
light of this.
2017-04-07 22:08:29 +10:00
Peter Serwylo
d41b0d330f Only show "New" next to apps added in the last two weeks.
Previously, the definition of "New" was whether or not the added and
last updated dates were the same. This made sense, because we only
showed apps from the past few weeks (depending on preferences) as new.

Now that we show up to 200 apps in the first screen, regardless of age,
this check is no longer helpful.
2017-04-07 22:02:16 +10:00
Peter Serwylo
c5051e8813 Extract "days since date" to Utils 2017-04-07 22:02:16 +10:00
Peter Serwylo
3b9f841117 Try to always show something in "Latest"
It seems pointless to only restrict "Latest" to items within the last X
days. When you only have the GP repo enabled, or other repos with less
apps that are updated less frequently than the main repo, this screen
always ends up empty. This change shows the last 200 updated items
instead of those updated in the last X days.
2017-04-07 22:02:16 +10:00
Peter Serwylo
ab5ea39f7c Show empty state feedback for latest + categories
The text is more comprehensive on the main screen than on categories,
because this is the view that all users will see when they first open
F-Droid.

Fixes #879.
2017-04-07 22:02:14 +10:00
Peter Serwylo
510ec5f7c7 Adding ability to query last repo update and number of repos.
This will be used to improve the empty state handling of the main list
of latest apps.
2017-04-07 21:58:30 +10:00
Peter Serwylo
d83c15d0d4 Show "Updating repositories" banner in main UI.
Previously this was only shown in the notifications.
This does not show the full progress of the update, but at least it
provides a rudimentary level of feedback. In the future it can be
modified to show more substantial feedback if required.
2017-04-07 21:56:42 +10:00
Hans-Christoph Steiner
01f27ac404 Merge branch 'weblate' into 'master'
weblate pull for 0.103-alpha2

See merge request !467
2017-04-07 10:05:05 +00:00
Hans-Christoph Steiner
830fd5e375 weblate pull for 0.103-alpha2 2017-04-07 10:05:04 +00:00
Hans-Christoph Steiner
1054d57b02 Merge branch 'new-ui--more-fixes' into 'master'
More misc UI fixes, mainly for older devices.

Closes #906 and #866

See merge request !465
2017-04-07 07:47:42 +00:00
Hans-Christoph Steiner
a710eeef3a Merge branch 'fix-913--vector-issues' into 'master'
Force the build tools to generate .pngs for each vector.

Closes #913

See merge request !466
2017-04-07 07:41:37 +00:00
Hans-Christoph Steiner
8c2d922019 Merge branch 'remove-old-ui-dead-code' into 'master'
Remove old ui dead code

See merge request !456
2017-04-07 07:37:39 +00:00
Peter Serwylo
9be1936e03 Correctly mirror the "Back" button on RTL locales.
Previously depended on the `autoMirror` attribute, but that is not
supported when build-tools generates .pngs for us.
2017-04-07 15:56:20 +10:00
Peter Serwylo
481b96ef17 Fix misc lint issues 2017-04-07 15:56:20 +10:00
Peter Serwylo
432eee0f83 Force the build tools to generate .pngs for each vector.
This results in a slightly larger apk (e.g. 500KiB), but it reduces the
scope for bugs greatly. We still get all the benefits of only having to
maintain a single density-independent vector (rather than several
density dependent PNGs and all the work that involves).

The class of bugs that it solves is that there are several places where
vectors cannot be used, and you wont notice when developing on a device
newer than 5.0. For example, notification icons, `TextView`
and its `android:drawableStart` attribute.

Fixes #913.
2017-04-07 15:56:16 +10:00
Peter Serwylo
655c4bfdd3 Reinstate the About dialog.
Currently available as the first entry in Preferences. Used to be
available in the main action bar menu.

Fixes #906.
2017-04-07 09:55:14 +10:00
Peter Serwylo
5ef5288e3a Prevent preferences fragment from crashing when resuming.
It was assuming there is always a priv ext preference. However, we
remove the priv ext preference the first time the fragment is opened. In
these circumstances, the preference no longer exists, resulting in a
NPE.
2017-04-07 09:55:14 +10:00
Peter Serwylo
05f6f08832 Add Profiler class for diagnosing performance problems.
Unused for now, but like with the `LoggingQuery`, it is helpful to
be used for debugging purposes. For example, used this to quickly
figure out that it took 7 seconds to fix the PRNG stuff in FDroidApp
onCreate().
2017-04-07 09:55:14 +10:00
Peter Serwylo
62247b867f Fix padding on 2.3 devices.
The CardView extends FrameLayout. This layout has some problems with
margins: http://stackoverflow.com/questions/5401952/framelayout-margin-not-working.
These can be overcome in most situations by swithcing from a margin to
some padding on the child view. The reason it is okay to do this in
most cases is because the child view is usually a layout such as a
ConstraintLayout anyway. For such cases, the difference between margin
and padding is not much different, because there are usually not any
background colours or borders applied (where padding vs margin would
usually make a difference).
2017-04-07 09:55:14 +10:00
Peter Serwylo
37e608dbad Use textAlignment + gravity. TextAlignment was only added in API 17. 2017-04-07 09:55:13 +10:00
Peter Serwylo
f83adbef44 Repeat grid pattern every 5 items
Previously it would show a grid patter for the first five items, and
then resort to list items. This continues the grid pattern indefinetly.

Fixes #866.
2017-04-07 09:55:13 +10:00
Peter Serwylo
74f4883ffc Remove strings which are clearly associated with the old 3 tab layout.
Left some more unused strings which are a bit more general purpose and
perhaps should wait until after a stable release to remove. The
rationale for this is that we may want to revert to part of the old
terminology in certain places, and don't want to have to ask everyone to
translate everything again.
2017-04-07 08:34:41 +10:00
Peter Serwylo
1a799a7dcc Suppress lint warnings for unused category colours/names.
These are loaded dynamically at runtime based on a sanitized version
of the category names. Thus, the static lint tool cannot pick up that
they are indeed used.
2017-04-07 08:34:41 +10:00
Peter Serwylo
f099ae52bf Remove unused resources (layouts/dimens/etc)
Leaving strings to a separate commit to make it clearer when they were
removed, in case they need to be reinstated.
2017-04-07 08:34:41 +10:00
Peter Serwylo
fada693ac9 Remove AppDetails (in preference to AppDetails2).
Also removed associated layouts which are no longer required.
2017-04-07 08:34:41 +10:00
Peter Serwylo
3efb3a3043 Remove category provider stuff specific to old 3 tab layout.
We no longer prefix the list of categories with "Whats New", "Recently
Updated", and "All". The new UI doesn't require this. The only place
they were being used now were in the tests.
2017-04-07 08:34:40 +10:00
Peter Serwylo
c2d5f57fbd Remove now-unused queries from AppProvider. 2017-04-07 08:30:31 +10:00
Peter Serwylo
a8e6daadc3 Removed now-unused ArrayAdapterCompat class. 2017-04-07 08:30:31 +10:00
Peter Serwylo
d7fbd868b9 Remove app list adapters from old 3 tab layout. 2017-04-07 08:30:31 +10:00
Peter Serwylo
65afc83b16 Removed app list fragments from old 3 tab layout. 2017-04-07 08:30:31 +10:00
Peter Serwylo
6f80fbd945 Removed PreferencesActivity.
This is now a top level view inside MainActivity.
2017-04-07 08:30:31 +10:00
Peter Serwylo
4db31ef975 Removed FDroid.java, no longer used. 2017-04-07 08:30:31 +10:00
Peter Serwylo
7b9219e701 Removed TabManager
Only used in old FDroid activity which is about to be removed.
2017-04-07 08:30:30 +10:00
Peter Serwylo
4dc18f0a88 Removed AppListFragmentPageAdapter
Only used in old FDroid activity which is about to be removed.
2017-04-07 08:30:30 +10:00
Peter Serwylo
5ebe3b2420 Remove references to unused classes in AndroidManifest.xml 2017-04-07 08:30:30 +10:00
Hans-Christoph Steiner
e28e29455e Merge branch 'new-ui--feedback-from-alpha' into 'master'
Implement a handful of UX tweaks in response to alpha feedback

Closes #879

See merge request !464
2017-04-06 10:39:49 +00:00
Hans-Christoph Steiner
8ca795e307 Merge branch 'fix-909--repo-priorities' into 'master'
Repos added later should take higher priority.

Closes #909

See merge request !462
2017-04-06 10:26:19 +00:00
Peter Serwylo
8faf151c90 Remove 1 second pause between installing and updating UI.
This was implemented before because the main screen of the three tab
layout needed to update in response to the list of installed apps being
installed. When we scan the list of installed apps upon starting
F-Droid, we didn't want to have to requery for the list of installed
apps every time we found a new installed app. For this reason, we
"debounced" these requests (accumulated them for 1 second, and then let
go of a notification only after 1 second of inactivity).

This is no longer a feature, and so we can afford to fire the
notification instantly.
2017-04-05 16:44:53 +10:00
Peter Serwylo
24a6e9590d Wait until installed app service is ready before updating app details.
We were jumping the gun before, and asking to refresh the app details
adapter before the installed app service was able to notify us of a
change to the apps installed version.

This should be refactored to use broadcast receivers instead of
content observers (which are tied to the implementation of a content
provider). However this is currently a straight port from app details 1
to app details 2.
2017-04-05 16:37:55 +10:00
Peter Serwylo
50044629ab Remove placeholder whatsNew text completely.
Now that we are releasing this, we need to remove the "Whats New"
placeholder text.
2017-04-05 15:50:18 +10:00
Peter Serwylo
b0afa3e2fe Using custom icon for notification rather than the launcher icon.
On newer devices, it takes the icon, removes colour, and uses that. This
looks weird because:

 * The head and body look too close together once you remove the shading
   from the launcher icon.

 * The eyes dissapear because they are white (not transparent) in the
   launcher icon.
2017-04-05 15:41:57 +10:00
Peter Serwylo
2ab5c6a1c6 Correctly update the list item in updates view after install.
Prior to this, it would still show the "Ready to update" list item.
Now it updatpes the description to say "successfully installed" and
removes the "Update" button.
2017-04-05 15:23:28 +10:00
Peter Serwylo
8a69816648 Only automatically redirect to package manager when viewing app.
If you open AppDetails, initiate a download + install, and then navigate
away, it still pops open the install dialog for you. This is because it
never deregisters the broadcast receiver.

This change maintains the behaviour of always having the broadcast
receiver. This is because it is only added when the download
completes, and would require further refactoring to change that.
Instead, we listen for the receiver, but we ask if the AppDetails view
for the apk in question is actually visible to the user. If not, we
don't try to initiate the package manager.
2017-04-05 15:09:44 +10:00
Peter Serwylo
be11a785e5 Make the "Updates" badge only show number of items needing action.
Previously it showed the number of things which were eligible for
update. This will become less and less important the more people we can
switch over to automatic updates. However, given the privext vs unknown
sources thing, we will always have a lot of users who need to be
notified that they need to take further action to complete an install.
2017-04-05 15:01:55 +10:00
Peter Serwylo
0b7dc64fb6 Show apps in name order.
Prior to this, they were in whatever order they came from the metadata.
This resulted in weidrness because the repo which was updated last will
have its apps shown last. We are trying to move away from the repo
update order being important.

In the future, this sort order should take into account better
heuristics, but for now this is at least deterministic.
2017-04-05 13:26:56 +10:00
Peter Serwylo
b5341efff9 Don't padd the left/right of the category apps
Doing so makes it appear like they scroll from somewhere which isn't
quite the edge of the screen, which is weird.
2017-04-05 13:17:21 +10:00
Peter Serwylo
89625ac355 Add selectable background to list items and cards. 2017-04-05 13:12:51 +10:00
Peter Serwylo
1aea1c9302 Updated tests to work with flipped repo priorities. 2017-04-05 09:09:51 +10:00
Peter Serwylo
c6efdbb20c Repos added later should take higher priority.
The database still treats repos with a _low_ number as _low_ priority.
This means it sounds weird when you say "Repo with priority 1 is the
least important", but other than that, everything works as expected now.

Technically we could recreate the query to update the repo metadata
within DBHelper, but that is difficult because it is sort of build into
the content providers. Unfortunately, we are unable to access content
providers from the DBHelper.

In the future if we are able to migrate away from content providers to a
more dumb data access layer, then we could reuse the query to update the
metadata priorities in the DBHelper. However that is a tomorrow problem.
2017-04-04 16:26:42 +10:00
Hans-Christoph Steiner
89e103fc23 Bump to 0.103-alpha1 2017-04-01 21:15:18 +02:00
Hans-Christoph Steiner
cebf5ed915 Merge branch 'weblate' into 'master'
pull weblate for v0.103-alpha1

See merge request !460
2017-04-01 19:10:16 +00:00
Hans-Christoph Steiner
fb0e453fce pull weblate for v0.103-alpha1 2017-04-01 19:10:15 +00:00
Hans-Christoph Steiner
5971533b09 changelog for 0.102.3
closes #898
2017-04-01 17:30:41 +02:00
Hans-Christoph Steiner
bcb2894d4c update CHANGELOG for 0.102.x 2017-04-01 16:28:45 +02:00
Hans-Christoph Steiner
21fd522e95 only set installer to privext on versions where its required
To limit the possible oddness of having the installer package being
something different than F-Droid, only set it to priv ext on android-24
and newer, since its required there.
2017-03-31 20:07:56 +02:00
Hans-Christoph Steiner
a9a37747cb Merge branch 'uninstall' into 'master'
Set installer package name to privext if using that

See merge request !454
2017-03-31 18:00:41 +00:00
Hans-Christoph Steiner
e2ab447315 Merge branch 'privext-updates' into 'master'
InstallerFactory: Check for privext before checking if apk to be installed is privext

Closes #911

See merge request !459
2017-03-31 17:45:11 +00:00
Hans-Christoph Steiner
c69f443506 Merge branch 'add-new-index-format' into 'master'
Add new index format to support localization and graphics

See merge request !422
2017-03-31 17:44:07 +00:00
Peter Serwylo
c3424f9ff3 Update AppDetailsAdapterTest for apps that don't have screenshots.
While here, also added a couple of new test cases to better ensure the
adapter plays nicely with its items when receiving an app with specific
states.
2017-03-31 12:12:19 +02:00
Peter Serwylo
e34f289246 Setup and teardown preferences singleton for new tests.
Depending on the order the tests are run, this may have resulted in an
exception due to the singleton being setup multiple times.
2017-03-31 12:12:16 +02:00
Peter Serwylo
fb6f61c226 Instructions for getting tests to run in AS again. 2017-03-31 12:12:12 +02:00
Hans-Christoph Steiner
b08dfdcb80 move "What's New" placeholder to where its used
There is still quite a bit to figure out in the data format of the
per-package "What's New" entries, and its breaking the tests, so move
the placeholder code to the one spot where the placeholder whatsNew
entry is used.
2017-03-31 12:11:56 +02:00
Hans-Christoph Steiner
d90c773161 do not show screenshots view in AppDetails if none are available
App.getAllScreenshots() works nicely here, but its probably a temporary
measure until we figure out how to handle the various kinds of
screenshots (TV, Wear, etc).
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
28bcbc548a use central method to setup Jackson in locked down setup
This is based on @pserwlyo's work.  The App and Apk classes currently
need just the public instance variables auto-filled by Jackson, so
everything else is considered opt-in, via @JsonProperty declarations.
This is currently only used for setLocalized(), setUsesPermission(),
and setUsesPermissionSdk23().

# Conflicts:
#	app/src/test/java/org/fdroid/fdroid/updater/IndexV1UpdaterTest.java
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
2a2e475bdc index-v1 future proof test for uses-permission
The parser should accept additional elements to each
uses-permission entry, in case more XML attributes is added to
<uses-permission>.  <uses-permission> has had two attributes
since the beginning.

Other changes to this JSON data structure are bad index-v1
format, and will cause crashes:

* Removing an element e.g. null from a uses-permission entry
  would be invalid index-v1 JSON, since that structure mirrors
  the uses-permission AndroidManifest.xml element, which has a
  long standing fixed definition of name/maxSdkVersion.  That
  should crash so that fdroidserver authors know they are
  generating invalid index-v1.

* setting versionCode to anything but an int is invalid index-v1
  JSON, and should crash.  versionCode has been defined as an
  32-bit signed integer value since the beginning of Android.

* <uses-permission android:name=""> has been defined as a string
  since the beginning of Android.

https://developer.android.com/guide/topics/manifest/uses-permission-element.html
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
9d026bbdbc use string name for JacksonInject to make it easy to read
java
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
f86b65e12a rename Apk.repo to match App.repoId and Repo.id
Somehow, the Apk class has its Repo ID variable confusingly named just
"repo", which throughout the code is used to represent an instance of
Repo.
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
6f58c2a13d make Jackson inject repoId rather than looping later to add it
repoId is used in Repo, App, and Apk instances to point to the Repo data
in the database.  It does not come from the index files, but rather the
client database.
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
38d21cd178 check timestamp with index-v1
An important security protection is erroring when the index-v1.jar is
older than what is currently in the database.  If the current or older
jar is allowed to be parsed, then a malicious server or
Man-In-The-Middle could replay old version of the index-v1.jar to
prevent the clients from learning about updates that fix security issues
2017-03-31 09:09:31 +11:00
Peter Serwylo
8cfe1d3584 Correctly populate FeatureImage with app.featureGraphic.
Fall back to extracting the colour from the apps icon if that
is all that is available.
2017-03-31 09:09:31 +11:00
Peter Serwylo
5aa44a4d74 Handle icon 404s without crashing. Resume settings without crashing on API > 17.
The image loading code for the app cards was presuming that the icon
returned did indeed exist. In this case, it crashed due to trying to
decode a `null` image.

I noticed that when returning to the settings fragment (e.g. by closing
then reopening F-Droid while viewing), it will attempt to re-remove the
priviledged preference. This causes a crash, so we check to see that we
still have the preference before deciding to remove it.
2017-03-31 09:09:31 +11:00
Peter Serwylo
517321356d the database does not support null Description
index-v1 does not send empty values.  The description was historically
set to "No description available" on the server side, and in
index.xml.  The database then inherited this behavior, and does not
support no description.  In the long run, it would be good to sync up
the database with the index-v1 metadata, but perhasp then we'd have to
add a million null guards, which wouldn't be worth it.
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
40643855c4 do not let Jackson set instance vars that never come from index
Tell the Jackson JSON parser to ignore App/Apk fields that should never
come from the index, but instead are set locally to keep track of the
current state of things on the device.

There are two forms of tests to enforce that the proper things get
ignored.  It is not possible to do this with decorators alone, so I
chose to use @JsonIgnore and leave the variables we want filled in
undecorated.  Also, all of the instance variables in Apk/App/Repo
should come directly from the index metadata so that they are pure
data classes.  Currently some state info is stored in them, those are
decorated with @JsonIgnore.

The tests then include lists of accepted and ignored properties, and
anything that is not in those lists will cause the tests to fail.  So
if someone is adding a new instance variable, they will get a fail
until the tests are updated.  One set of tests actually writes blank
instances out as JSON since that's the easiest test to write, and
Jackson treats @JsonIgnore the same in both directions.  Then there is
another test that reads a JSON file with added, unsupported values to
make sure that they are properly ignored.
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
281dd435e7 ignore unknown fields in index-v1 JSON data
Having Jackson set to ignore unknown fields in the incoming JSON data,
instead of throwing an Exception, means that we can add any fields to the
JSON without having to rev the index version, and older clients will still
parse it fine.  This is basically the same as in index.xml.
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
9d97546c4f support localized text and graphics in index-v1 metadata
This sets the App instance variables using the localized index-v1 fields.
It trys to fill as many fields as possible, falling back to locales of the
same language, then finally English.

This is based on the Jackson JSON parser's ability to map a JSON key to a
method, e.g. @JsonProperty("localized")
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
d769dcfc60 support new index-v1 format using Jackson parser
This adds support for parsing the new index-v1.json data as defined in
fdroidserver!221.  This new index metadata format is required to
support localization, graphics, screenshots, etc.

refs #15
2017-03-31 09:09:31 +11:00
Hans-Christoph Steiner
7e0ae10e84 uses-permission fields as Apk instance vars
This adds support for the index fields: uses-permission and
uses-permission-sdk-23.  For most index fields, Jackson handles directly
mapping the incoming data to the instance vars based on the matching
field/var names.  For uses-permission*, methods are declared for
handling those properties in the incoming index.

These fields will be ignored when using the v0 index.xml format.
2017-03-31 09:09:31 +11:00
Chirayu Desai
0bce5cebe6 InstallerFactory: Check for privext before checking if apk to be installed is privext
* Move the privileged extension installed check above
  the check whether the apk to be installed is privext.
* This lets privext updates work when it is already installed.
2017-03-29 15:11:28 +05:30
Chirayu Desai
2be79c35e7 Set installer package name to privext if using that
* The new PackageInstaller APIs, being used by the privext on Android
  7.0 and above aren't happy with uninstall being done by an app
  other than the original installer.
* Set it to the privileged extension if that is enabled and being used,
  to make uninstalling work
2017-03-27 19:28:11 +05:30
Peter Serwylo
befdc4a850 Merge branch 'new-ui--minor-ui-tweaks' into 'master'
Minor ui tweaks

Closes #896, #894, and #839

See merge request !453
2017-03-26 07:32:16 +00:00
Peter Serwylo
61d7ba9f29 Start auto downloads once preference is enabled.
Fixes issue #896.
2017-03-26 10:50:26 +11:00
Peter Serwylo
8ed62d22e1 Correctly listen for "Install complete" for previously downloaded apks.
This ensures that if the user has downloaded an update (manually or via
auto updates), then the UI will respond correctly once it is installed.
2017-03-26 10:50:26 +11:00
Peter Serwylo
b9c429d22d Add "App X successfully installed" to updates tab.
This notification is kind of weird, because the only ways it can be
dismissed is by:
 * Swiping a notification away from the notification drawer.
 * Closing and reopening F-Droid.

However I think the UX is still pretty nice:
 * Tells the user that it worked.
 * Allows them to navigate to it if desired.
2017-03-26 10:50:26 +11:00
Peter Serwylo
b179aaecff Remove final dependency on AppDetails (the old one).
In a future MR I will remove this class completely, but this just
ensures that touching a notification will not send the user to the old
AppDetails (instead sending them to AppDetails2).
2017-03-26 10:50:26 +11:00
Peter Serwylo
bf8a61765d Fix padding on bottom navigation.
Default padding specified is 12dp which is not very generous.
This reduces it to 2dp for seemingly good effect. Yet to see what it
looks like with longer translations of other languages, but time will
tell.
2017-03-26 10:50:25 +11:00
Peter Serwylo
bb7fca7382 Remember search input after hitting "Back" from app details.
Move logic which parses intent and forceably sets the text of our search
input to onCreate(), not onResume(). onCreate() is invoked each time a
new intent is sent to open up this activity. That is, each time a new
category is opened or a new search request is received. onResume() is
called much more often than this, including when the user is directed to
a new activity and then returns to the search screen after hitting back.
In this case we don't want to remove the search query the user had and
replace it with the data in the original intent.
2017-03-26 10:49:56 +11:00
Peter Serwylo
ba503812e4 Don't listen for the same broadcast events twice.
Caused crashes when we incorrectly provided info to the recyler view
about which items had been added/removed.
2017-03-26 10:49:56 +11:00
Peter Serwylo
d4584083af Refactor button styles for clearer distinction between large/small.
Small ones are used in the "Updates" screen, whereas large are used
elsewhere (e.g. in the app details, but also the "Start swap" screen).
2017-03-26 10:49:56 +11:00
Peter Serwylo
15be01ada9 Ignore UI dumps from Android Studio/DDMS.
These are useful for debugging things like padding/margin issues, but
they get dumped to the source dir by default.
2017-03-26 10:49:55 +11:00
Peter Serwylo
b177dc2cda Update "Nearby" splash screen to new UI.
Be sure to not hardcode "F-Droid" to ensure it is easier to rebadge
F-Droid if creating a whitelabel version.

Fixes #894.
2017-03-23 22:19:22 +11:00
Peter Serwylo
53bed0f2e1 Change language to clarify auto download preference
The previous language hinted at the fact we auto download and install
updates like Google Play. This is not the case (unless you have
priv-ext). To clarify, now we "Automatically _fetch_ updates", ready to
install when the user initiates the install.

Fixes #839.
2017-03-23 22:19:22 +11:00
Mikael
836d16393d Merge branch 'app_details_749_more_work' into 'master'
App details 749 more work

See merge request !451
2017-03-23 10:28:48 +00:00
mvp76
a32a534957 Fix test after adapter change 2017-03-23 11:12:59 +01:00
Peter Serwylo
31fdcba945 Remove xmlns from inner element 2017-03-23 09:42:46 +01:00
Peter Serwylo
80e0f84816 Use correct locale when uppercasing text.
Locale.getDefault() returns the default for the current JVM (or whatever
runtime Android calls it these days). By asking the configuration, we
will get the Locale that the user has selected from within the F-Droid
preferences.
2017-03-23 09:42:36 +01:00
mvp76
c059b83f2b Fix merge conflict 2017-03-23 09:37:33 +01:00
mvp76
622a1245dc Move "what's new" from its own section to the header section
Also, add some styling and placeholder text (randomly set or not set)
2017-03-23 09:32:58 +01:00
mvp76
2d27ba4086 Display anti-features
Issue #878.
2017-03-23 09:32:58 +01:00
mvp76
0689a39735 Add last updated under the title and author
Also, added styles for the title and the last updated text.
2017-03-23 09:32:58 +01:00
mvp76
d457a5ca0a Drop the "Summary" from the main header, and instead just go straight to the description 2017-03-23 09:29:50 +01:00
mvp76
03a8151875 Added OverscrollLinearLayoutManager to fix scrolling in AppDetails2 2017-03-23 09:29:50 +01:00
Peter Serwylo
343e91280a Merge branch 'new-ui--main-screens--v3' into 'master'
Updates tab + misc UI improvements.

Closes #840, #876, #838, and #892

See merge request !444
2017-03-22 00:20:44 +00:00
Wolfgang Wiedmeyer
8f8afdb10d
Skip non-FSDG-compliant apps on Replicant during repo data parsing
Replicant is committed to follow the GNU Free System Distribution
Guidelines (FSDG)[1]. Apps with certain anti-feature flags in F-Droid
violate these guidelines and thus shouldn't be available in the
F-Droid client on Replicant[2].

Issue #564 discusses this, although only the case of having apps with
anti-features optionally filtered. To be compliant with the FSDG
guidelines, all violating apps must not be accessible and there
shouldn't be a setting to make them visible. Not all anti-features in
F-Droid violate the FSDG guidelines, so no need to filter all of them.

Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>

[1]  https://www.gnu.org/distros/free-system-distribution-guidelines.html

[2]  https://redmine.replicant.us/issues/1629
2017-03-22 00:44:24 +01:00
Peter Serwylo
c59899cbff Ensure support lib 25.2.0
The default behaviour of gradle when encountering a transitive
dependency which is the same as an explicit dependency, but where the
transitive dependency has a higher version, is to bump the depdendency
which was explicitly added. This meant that the addition of the
bottom navigation library implicitly bumped our support lib to 25.3.0
due to its dependence on it.

The options are:
 * Change the 3rd party lib to support 25.2.0 instead of 25.3.0.
 * Explicitly exclude the transitive support lib dependency in our build
   script (what we have done in the past, e.g. with acra).
 * Bump our explicit dependency.

Given the nature of the changes from 25.2.0 and 25.3.0, it seemed like
it was simplest to bump our dep. However, there is a bug
https://code.google.com/p/android/issues/detail?id=251302 which causes
a function we depend on in SwitchCompat to require API 14. Therefore,
this change excludes the 25.3.0 transitive dependencies, allowing our
25.2.0 dep to get used.

In the process, I've noted that there were a few places we opted for
excluding the transitive dependency in the past. These have now been
removed because we have a higher version than they do, and thus they
will no longer drag our old version forward.
2017-03-22 09:47:12 +11:00
Peter Serwylo
c24ccae02c Use 3rd party bottom nav library which isn't based on support lib one.
The previous dependency extended the support library bottom nav. It did
this at the expense of lots of reflection. This is pretty brittle and
likely to break in future releases as the support lib gets updated. In
the mean time we need to have a fully working bottom nav, so this commit
includes a different dependency.

Most 3rd party bottom navigation panes look great. All that I found
require at least API 11, mostly API 14 (due to animations I suspect).
I've forked one of the most popular ones on GitHub and made it support
back down to API 10. My fork is added as a dependency until upstream
accepts the PR.

If they don't ever, then we can reconsider what our options are.

The two times I've swapped the bottom nav implementation have both been
trivial. The code generally only touches the MainActivity and its
layout.
2017-03-22 08:55:27 +11:00
Peter Serwylo
df25606a29 Correct button padding for category header 2017-03-22 08:55:27 +11:00
Peter Serwylo
d4dc0a1f90 Show the number of apps to update in the bottom nav.
Shows a red badge over the "Updates" menu item.

The updates badge is a bit hacky. There are indeed libraries which
implement a bottom nav which have support for badges built into
them. However they target API 14. There are also other badge
libraries which just deal with rendering, but for the cost of
another dependency, it is not particularly difficult to create a
`TextView` with a background and position it ourselves.
2017-03-22 08:55:27 +11:00
Peter Serwylo
d9cb2fc5da Show text on each bottom nav item, and tone down animations.
Fixes issue #892.
2017-03-22 08:55:27 +11:00
Peter Serwylo
d527b26814 Specify the last time an app was updated when showing update button 2017-03-22 08:55:27 +11:00
Peter Serwylo
60a2ebe9fa Make back behaviour work better for manage repos/installed apps/search. 2017-03-22 08:55:27 +11:00
Peter Serwylo
43a9a9d229 Add dependency to make bottom nav work better + bump support libs.
Right now, it will allow us to set the selected item more nicely.
In the near future, we will use this dependency to control the visual
display of the bottom nav better (e.g. icons/text appearance/animation).

Note that there is a bit of development going on at the Android team,
and the official bottom navigation view may oneday support all of these
features. In that case, we should probably switch back.
2017-03-22 08:55:27 +11:00
Peter Serwylo
385a16448c Stop listening for broadcasts when view not shown. 2017-03-22 08:55:27 +11:00
Peter Serwylo
7b77919432 Correctly navigate to the Updates view from notification. 2017-03-22 08:55:27 +11:00
Peter Serwylo
77f3a5feff Tweaks to UI of updates tab.
* Show selectable background behind "Show/Hide apps" button.
 * Scroll to the relevant place in the list when showing/hiding apps.
 * Only show one line (ellipsized) of the apps to update in header.
2017-03-22 08:55:27 +11:00
Peter Serwylo
0826533d40 Describe the status of an update, rather than showing the app summary. 2017-03-22 08:55:26 +11:00
Peter Serwylo
c275fae9b7 Switch to rounded buttons. 2017-03-22 08:55:26 +11:00
Peter Serwylo
df5db32451 Check downloaded apks on F-Droid first start.
This will read downloaded .apk files from the disk cache in the background.
For each apk that corresponds to an app which can be updated, the status
manager is notified.
2017-03-22 08:55:26 +11:00
Peter Serwylo
4f73b10230 Prefer start/end over left/right
Even though it doesn't matter here because it is going from one side of
the parent all the way to the other. I hope it makes it easier if we
completely avoid right/left and only ever use start/end. Then searching
for RTL problems will be easier.
2017-03-22 08:55:26 +11:00
Peter Serwylo
ce2ac71206 Add support for linear progress bar to installed app layout. 2017-03-22 08:55:26 +11:00
Peter Serwylo
40cc328e98 Updates: Implemented new UI for "Updates" screen.
Alows for more flexibility in what we are able to display, including:
 * Prompting users to donate to frequently updated apps
 * Showing messages from package maintainers to users
 * Marking apps for later installation when offline

Most of these are not yet implemented, but will be able to when
required, whereas they were not able to in the previous UI.
2017-03-22 08:55:26 +11:00
Peter Serwylo
7659c3a33f Renaming 'My Apps' to 'Updates'.
This doesn't change the `MyAppsAdapter` and friends, because they will
be gutted in a subsequent commit.
2017-03-22 08:55:26 +11:00
Peter Serwylo
d4716e6387 Added comments to further explain broadcasts. 2017-03-22 08:55:26 +11:00
Peter Serwylo
23d40dbca0 Added dependency to make working with complex RecyclerViews more manageable.
There were a few different options around, but some of the best ones
which provided the most flexibility when adding diverse/complex
viewTypes to a recycler view target a minsdk above 10.

The "adapterdelegates" library still offers a big improvement on vanila
adapters, especially for the Updates view.
2017-03-22 08:55:26 +11:00
Peter Serwylo
9e2f7edff4 Updated icons in bottom nav to newest versions.
Fixes issue #838.
2017-03-22 08:55:26 +11:00
Peter Serwylo
c1cf153852 Merge branch 'new-ui--categories-imagery' into 'master'
Categories artwork

Closes #851

See merge request !448
2017-03-21 21:53:49 +00:00
Peter Serwylo
f93a1ba6e4 Correctly select categories for app based on highest priority metadata. 2017-03-22 08:00:20 +11:00
Peter Serwylo
bded83d8a3 Added test to ensure repo priority plays nice with categories
This is in response to identifying a bug with the way priorities work
with categories. Two repos may both specify different categories for
the same package. In this case, F-Droid should only select the
categories from the highest priority repo. Well, it is not to say that
this is the most preferable option, but it is consistent with other ways
that repo priorities are used.
2017-03-22 08:00:20 +11:00
Peter Serwylo
bc1ff7d8c8 Show abstract art behind categories without predefined images.
In the process refactored the FeatureImage class to not be dependant on
an instance of Palette for its colours.
2017-03-22 08:00:20 +11:00
Peter Serwylo
1776b1e2c3 Make 'view all' category button have ripple background. 2017-03-22 08:00:20 +11:00
Peter Serwylo
e4766645eb Improve image loading performance by using UniversalImageLoader to background the task
Doing this required tweaking our `IconDownloader` which we give to the
UIL init method in FDroidApp. It only knew how to load from HTTP, but we
needed it to fetch `drawable://` images too (which the library
supports). In addition, it has been renamed `ImageDownloader` as it also
is now used for screenshots/feature images.
2017-03-22 08:00:20 +11:00
Peter Serwylo
7796a3f374 Category images and colours added.
Note that the category images are not scaled for each drawable
directory (would like to move to vectors).
2017-03-22 07:51:07 +11:00
Peter Serwylo
ff946f6a7d Translate category names. 2017-03-22 07:51:07 +11:00
Mikael
a7828bcb9e Merge branch 'new-ui--app-deatils-scroll' into 'master'
Scroll app details appropriately when expanding sections.

Closes #875

See merge request !445
2017-03-21 14:11:34 +00:00
Hans-Christoph Steiner
61e219a02e Merge branch 'placeholder_images_for_screenshots_897' into 'master'
Placeholder images for screenshots 897

See merge request !450
2017-03-20 18:29:02 +00:00
mvp76
34efdf1822 Use the screenshot placeholder image from assets 2017-03-20 12:10:51 +01:00
mvp76
3f04606fcc Extend IconDownloader to handle asset:// protocol
This is currently needed for screenshot placeholders, but might be
useful in the future as well. Note that the default BaseImageDownloaded
supports this, as well as content:// and drawable:// protocols.
2017-03-20 12:10:13 +01:00
Peter Serwylo
b01a871d9d Move app details view up when expanding links/permissions 2017-03-20 19:48:25 +11:00
Peter Serwylo
c65029ae8d Extract functionality to show correct expand/collapse icon
This was not updating the versions expand icon correctly when the user
clicked on it. It was working when they scrolled away and returned to
the versions list. Now it works for both.
2017-03-20 19:48:25 +11:00
Peter Serwylo
b72c418f11 Scroll appropriately when expanding versions 2017-03-20 19:48:25 +11:00
Peter Serwylo
dcf41bcdf2 Merge branch 'gitlab-ci-update' into 'master'
Gitlab ci update

See merge request !449
2017-03-20 07:05:13 +00:00
Hans-Christoph Steiner
655030d1b6 gitlab-ci: require connected24 check now that its fixed
* new docker image: ci-images/client
* switched back to ARM emulator, now that gitlab doesn't allow KVM
2017-03-17 14:02:38 +01:00
Hans-Christoph Steiner
e69c04458f gitlab-ci: build before starting emulator to speed things up
The emulator will grab a bunch of RAM, so run assemble before
connectedCheck so that the app is mostly built before starting the
emulator.
2017-03-17 12:42:59 +01:00
Hans-Christoph Steiner
2c7489508f gitlab-ci: ensure compile platform is installed
Avoid broken builds when fdroidclient gets out of sync with
ci-images/client.

`emulator -no-skin` no longer does anything, but give a warning.
2017-03-17 12:29:45 +01:00
Hans-Christoph Steiner
09ab4b0051 Merge branch 'ci-arm' into 'master'
gitlab-ci: Use ARM emulator for API 24 as well

See merge request !447
2017-03-16 12:03:31 +00:00
Chirayu Desai
0c4059d053 gitlab-ci: Use ARM emulator for API 24 as well
* x86 emulator requires kvm which isn't always available on the
  GitLab CI runners.
2017-03-16 16:35:19 +05:30
Peter Serwylo
c6f7eefddd Merge branch 'new-ui--main-screens--v2' into 'master'
Improved UI for new main screens

Closes #734, #867, and #882

See merge request !434
2017-03-13 23:55:23 +00:00
Peter Serwylo
e8b24bc994 Bumped robolectric target to the same as our compile target
When we first bumped to v24, robolectric didn't support it. Now it does.
2017-03-14 09:49:55 +11:00
Peter Serwylo
ce946f4257 Bump robolectric version
There were troubles with the particular version of gradle plugin and
gradle that we were using, which has since been fixed by robolectric.
2017-03-14 09:49:55 +11:00
Peter Serwylo
259dd38ae9 Extracted triedEmptyUpdate preference. 2017-03-14 09:49:52 +11:00
mvp76
a3de43ff7a Adjust width of toolbar 2017-03-13 11:10:29 +01:00
mvp76
84f844109a Fix typo 2017-03-13 09:25:02 +01:00
mvp76
3139415172 Get WIFI_SERVICE using application context to avoid leaks.
Linting complains about this issue.
2017-03-13 09:14:43 +01:00
Peter Serwylo
8fbf67c03c Let connected-24 tests fail.
Although these didn't used to fail at all, they now _always_ fail due to
the Docker setup we run on GitLab. Until we get that fixed, the CI is
not very helpful if it fails every time, and we merge anyway. This
allows us to at least correctly use the "Merge when succeeds" behaviour.
2017-03-08 10:46:08 +11:00
Peter Serwylo
13362aad2e Redo litecoin icon to prevent crash
Fixes #882.

Couldn't figure out the exact cause of going from Inkscape .svg to
Android VectorDrawable, so redrew it in inkscape and this time it works.
*shrug*.
2017-03-08 10:34:23 +11:00
Peter Serwylo
045dd7a94c Fix constraint on search box.
The layout width should be 0dp if you want it to be set to whatever the
constraint layout wants to calculate.
2017-03-08 10:34:23 +11:00
Peter Serwylo
c3b8134be7 Update langs-list-check
Was failing with `sw720dp-v21` directory that contained a `dimens.xml`
file. Also sorted output to make it easier to compare while here.
2017-03-08 10:34:23 +11:00
Peter Serwylo
2eab1d0e6d Replace "Recently updated" and "Whats new" with "New" tag.
As per the newer design iteration.

Also re-order the items on the main page so new items always come before
recently updated ones from the same day.
2017-03-08 10:34:23 +11:00
Peter Serwylo
a1a7427cd2 Added "Installed Apps" activity to top of settings.
This is as per the mockup in issue #840, and does the following:

 * Adds a new `PreferencesCategory` of "My Apps" at the top of the
   preferences screen.
 * Adds a "Manage Installed Apps" preference, and moves the
   "Repositories" preference into this category.
 * Repeals an existing change which prevented "updateable" apps from
   appearing in the list of "installed" apps. This is because the two
   lists of apps are no longer displayed alongside eachother.
 * Enhances the `AppListItemController` to also be able to display
   whether or not the currently installed version is the recommended
   version or not.
 * Also adds option to display whether the user has asked to ignore any
   updates for any specific apps.
2017-03-08 10:34:22 +11:00
Peter Serwylo
92943ebdf3 Port intent which handles incoming fdroid repos from NFC.
Moved intent-filter from FDroid to MainActivity. Can test from the
command line with:

```
adb shell am start -a android.nfc.action.NDEF_DISCOVERED \
 -d fdroidrepo://10.0.1.10:8888/fdroid/repo
```
2017-03-08 10:33:32 +11:00
Peter Serwylo
5e6eed9963 Ported 'Add repo' intents from FDroid to MainActivity 2017-03-08 10:33:32 +11:00
Peter Serwylo
3bc97d931b Ported 'View App' and 'Search' intents from FDroid to MainActivity 2017-03-08 10:33:32 +11:00
Peter Serwylo
b8de545179 Port NFC + Tor bootstrap code from FDroid to MainActivity 2017-03-08 10:33:32 +11:00
Peter Serwylo
02dae30a1b Allow apps to be installed after download is completed.
Show an install button after the download is complete so the user can
click it to initiate an install. This is in preference to popping up
install manager activities on their behalf, because they may have queued
up several apps to update.
2017-03-08 10:32:43 +11:00
Peter Serwylo
9acc34c9ba Tweak accessibility so that visually impaird people can use F-Droid well.
Things that are still not right:

 * BottomNavigationView doesn't read out the title of items when selected.
   Created this issue: https://code.google.com/p/android/issues/detail?id=230595&thanks=230595&ts=1482125499
 * TTS reader combines the app name and summary without a pause which is jarring.
 * Touching the background of the recycler view in the categories view reads all category names.
 * Likely other problems too.
2017-03-08 09:42:32 +11:00
Peter Serwylo
6ad1f0faef More concise management of the main recycler view.
No longer bind the views as they become visible. This resulted in
the same view being bound multiple times, but that was unneccesary.
Given that there is only five types of view, and each view type only
ever gets used once, the binding can happen when the view holder is
created, rather than each time it is shown. This fixed a few bugs to
do with views being inflated multiple times.
2017-03-08 09:42:32 +11:00
Peter Serwylo
952024768a Initial work to support inline Download+Install button in app lists
Shows progress and download complete now, but left a few TODOs
lying around. These are mainly around the ability to then deal with
installing an app once download is complete.
2017-03-08 09:42:32 +11:00
Peter Serwylo
405279c0ff Added drawables for various states of downloading an app. 2017-03-08 09:42:32 +11:00
Peter Serwylo
2164a2662a Update repository on first run of F-Droid. 2017-03-08 09:42:32 +11:00
Peter Serwylo
09af5402e8 Reference MainActivity instead of FDroid where appropriate.
Left old references to FDroid from within classes that are only part
of the old UI. These are to be removed once the new UI is done.
2017-03-08 09:42:32 +11:00
Peter Serwylo
f9a860e00c Show search button on keyboard when searching. 2017-03-08 09:42:32 +11:00
Peter Serwylo
908d5f3a05 Added search floating action button to Overview and Categories screen.
Both times it launches the AppListActivity with an empty search box
focussed.
2017-03-08 09:42:32 +11:00
Peter Serwylo
7209ab87f5 Tweak some button styles with those added in !419.
The styles used by the app details showed good padding on either
side of the buttons text. This was because they had a certain amount
of screen space to fill up which resulted in nice empty space on either
side of the text. Other buttons do not have this type of layout, so
need to have a minimum amount of padding thrust upon them.

Required breaking out into values-v17 too, so refactored common styles
into base style to make this easier.
2017-03-08 09:42:10 +11:00
Peter Serwylo
ffa3a8dbf3 Until feature images are properly supported, use abstract art instead.
As per the main screens feature image behind the "Recently added"
items, also use the same abstract artwork as a placeholder for the
feature image in app details.
2017-03-07 22:16:32 +11:00
Peter Serwylo
b2d11091a7 Added funky artwork to feature image when not present
Draws two rows of triangles, each coloured randomly according to
the dominant colour in the apps icon.

Given that the colour is probably assigned to the FeatureImage in response to
a network request finally downloading an image, there is a period of no feature
image. After the colour is provided, then if it is set instantly it tends to
look jerky. This eases in the colouring of the feature image.
2017-03-07 22:16:32 +11:00
Peter Serwylo
d67f23b60c Merge branch 'new-ui--main-screens--v1' into 'master'
Initial UI for new main screens

See merge request !433
2017-03-07 08:59:29 +00:00
Peter Serwylo
a954b1cd76 Switch CI image to one hosted on GitLab. 2017-03-07 18:21:18 +11:00
mvp76
258064d495 Use item decorator in preference to inline ImageView.
This eliminates the need to include the drawable in the
app_list_item layout.
2017-03-07 18:21:18 +11:00
mvp76
6e613ad952 Don't use deprecated method 2017-03-07 18:21:18 +11:00
mvp76
fd22ee01e0 Let the adapter handle the decorator
This should remove the hackiness of decorator being added several times.
2017-03-07 18:21:18 +11:00
mvp76
48b21626e4 Remove static mapping arrays
@pserwylo Not sure if you like this change. I think it's slightly more
elegant, but don't have a strong opinion.
2017-03-07 18:21:17 +11:00
mvp76
89fa83c8c7 Set BottomNavigationView background
Otherwise we'll have white "padding" on large screens, e.g. Nexus 7.
2017-03-07 18:21:17 +11:00
mvp76
083339f60e No need for custom attribute
From what I know, actionBarTheme and actionBarPopupTheme will do the
job.
2017-03-07 18:21:17 +11:00
mvp76
a814792594 Break out library version for easier updates in the future 2017-03-07 18:21:17 +11:00
mvp76
bfd5c525b0 Remove unused import 2017-03-07 18:21:17 +11:00
Peter Serwylo
34e176539b Add swipe-down-to-refresh-repos on main overview screen.
Happy to discuss whether this is a good idea or not, but right now
there is no way to update repositories so often you are left with
an empty first screen.

This doesn't worry about state management (e.g. remembering
whether we are refreshing or not and showing this when we resume the
activity). Instead, it listens for the refresh listener, and when
triggered it will set the refreshing state to not refreshing. For now
the notification can act as the feedback that something is happening.
2017-03-07 18:21:17 +11:00
Peter Serwylo
26b9e09f2f Launch AppDetails2 instead of AppDetails in most places. 2017-03-07 18:21:17 +11:00
Peter Serwylo
55824a491b Settings: Added preference fragment to the last tab in the main view.
This is a little bit flakey at this point, because the weird asynchronous nature of
adding fragments. If swiping to the second-to-last entry on the bottom navigation view,
it will populate the settings fragment in the UI and then it will dissapear. Need to
fix this.
2017-03-07 18:21:17 +11:00
Peter Serwylo
fff7999aac App List: Category "chip" and free text searching of apps
Show a "Chip" in the search box whcih indicates the user is viewing
a particular category. This chip:
 * Gets remtoved when the user presses backspace from in front of it.
 * Can be re-added by typing the name of a category and then a colon.
 * Follows the material design guidelines.
 * Has an accessibility hint that tells screen readers it is a category name.
2017-03-07 18:21:17 +11:00
Peter Serwylo
9bc72ff102 App list: Show a list of apps matching a particular category.
This populates a search box with the category name and shows a
clear button to the right and a back button to the left of the
text input.
2017-03-07 18:21:17 +11:00
Peter Serwylo
f5e6d73999 Categories: Show list of all categories in the main view.
This is different to the old categories drop down, because that also
included meta-categories of "Whats New" and "Recently Updated". Given
we now show them on the first page, this categories screen can do away
with them.

Each category entry loads a few apps to show to the user.

Note: The "View all" button next to each category doesn't currently
go anywhere. It will soon be hooked up to an app list that is filtered
to the selected category.
2017-03-07 18:21:17 +11:00
Peter Serwylo
53df5473f5 My Apps: Added the list of updateable apps to the main view.
Not fully featured yet, because it doesn't listen for broadcasts
from the installers, but it is shows the correct list of apps and
allows users to queue up downloads of all updateable apps.
2017-03-07 18:21:12 +11:00
Peter Serwylo
69b58c7646 Whats New: Added list of recently updated apps to the main view.
Smooshes the recently updated and recently added lists into one,
and adds a status line under each app saying which of the two it
is (i.e. "Recnelty Updated" or "Whats New".
2017-03-03 13:14:05 +11:00
Peter Serwylo
517301194b Swap: Added splash screen to "Nearby" tab on main screen.
It doesn't load up the entire swap activity at this point. Instead it
is an entry point to direct the user to that activity.

Also added stubs for the remaining screens which need to be implemented
to the MainAdapter and MainController.
2017-03-03 13:14:05 +11:00
Peter Serwylo
b151374a6c Introduce new main activity, currently mostly empty.
This activity so far has a bottom navigation bar with 5 tabs.
The tabs can be changed, but no content is shown.
2017-03-03 13:14:05 +11:00
Peter Serwylo
f0d4f8f01a Make autoDownloadUpdatesUpdateService part of the public API of UpdateService.
This will be a requirement for an 'Update All' button in the UI.
2017-03-03 13:14:05 +11:00
Peter Serwylo
226554c026 Toolbar instead of ActionBar in RepoDetailsActivity. 2017-03-03 13:14:05 +11:00
Peter Serwylo
d8dc1698d6 Toolbar instead of ActionBar in ManageReposActivity. Remove need for Fragment in manage repos.
The fragment was quite straightforward to roll into the activity. Most
of the code moved across almost exactly as is.

Also added a theme for the toolbar so that in the future it will be
easier to support dark/night themes as well.
2017-03-03 13:14:05 +11:00
Peter Serwylo
30701ff9ac Change theme to not have an action bar.
This will temporarily break activities which depend on the action bar until
the following commits replace their dependencies with a Toolbar instead.
2017-03-03 13:14:04 +11:00
Peter Serwylo
1bb82fa077 No longer limit VectorDrawables to AppDetails2.
It was recently added to FDroidApp, so no longer neccesary in
AppDetails2.
2017-03-03 13:14:04 +11:00
Peter Serwylo
ba82cfcfc5 Bumped support lib versions. Added dependencies for new UI.
The following official Android support libraries were added:
 * recyclerview-v7
 * cardview-v7
 * design
 * support-vector-drawable
 * constraint-layout
 * palette
2017-03-03 13:14:01 +11:00
Peter Serwylo
04182b64aa Merge branch 'mvp76--notifications_742' into 'master'
Notification improvements from mvp76

See merge request !443
2017-03-01 03:42:39 +00:00
Peter Serwylo
eb3c6e6e0b Fix lint warnings.
Removed unused translations from values-* folders.
Used `app:srcCompat` instead of android:src for some `ImageView`s
2017-03-01 13:41:48 +11:00
mvp76
d43b31a701 Fix checkstyle errors 2017-02-28 23:43:23 +01:00
mvp76
0b53f69427 Remove static from appMapping 2017-02-28 23:15:31 +01:00
mvp76
238dff5c10 Update download progress for OBB files 2017-02-28 22:45:41 +01:00
mvp76
1418a419ea Remove "InstallError" entries when clearing notification
I.e. either the user "swiped" the notification away or clicked on it to
view the error message (and thus the notification was auto canceled)
2017-02-28 22:24:26 +01:00
mvp76
a8509ae833 Added a comment about the key being the downloadUrl 2017-02-28 22:07:40 +01:00
mvp76
7b446daf3f Make AppUpdateStatusManager a singleton 2017-02-28 21:57:51 +01:00
mvp76
a4c187f3e1 Add strings for first time installs 2017-02-28 20:56:35 +01:00
mvp76
04d2d004a3 Add logic to show/hide notifications based on appdetails screen
Also, add code to AppDetails2 to match AppDetails, keeping track of
currently viewed app. Moved the nulling of this info to onStop instead
of onPause, since alerts may be shown on top of the details page, while
still visible.
2017-02-28 20:56:35 +01:00
mvp76
d2cc4fcb05 Set blue color on notifications 2017-02-28 20:56:35 +01:00
mvp76
40a061ae73 Fix for old devices
They can't use vector drawables in notifications. Also, groups can not
be used, see http://stackoverflow.com/a/34953411.
2017-02-28 20:56:35 +01:00
Peter Serwylo
583ea96816 Clarify that the pendingIntent arg can be null. 2017-02-28 20:56:35 +01:00
Peter Serwylo
2ad61a4eb7 Replace setApkInternal with more specific functions.
The `setApkInternal` method had to infer the intent of the caller
based on the arguments which were passed on, and then do specific
things depending on the input. Instead, this change has three
distinct actions which can happen (add/remove/update). Each of
these methods does only one thing, and doesn't have to guess
the intent of the caller. The only exception may be "add", which
will (for convenience) delegate to "update" if it already knows
about the apk in question.
2017-02-28 20:56:35 +01:00
Peter Serwylo
d00de69974 Extract "remove apk" code to simplify setApkInternal().
The only time `status == null` was when coming from `removeApk()`. By
moving the logic out of `setApkInternal()` into `removeApk()` it makes
it easier to reason about `setApkInternal()` as it now does less. Also,
it was doubling up on the `syncrhonized (appMapping)` and `if (entry !=
null)` logic which is no longer required, because `removeApk()` was
already doing that.

While here, also make explicit the fact that `status` can no longer be
`null`.
2017-02-28 20:56:35 +01:00
Peter Serwylo
30d3f8efcc Make "batchUpdates" mode an implementation detail of the AddUpdateStatusManager class.
Because of the way that this can be misused without the compiler knowing
(e.g. by forgetting to call `endBatchUpdates()`) it may be safer to move
it to an internal implementation detail of the class.

It could probably be done away with completely if the `notify*` methods
were moved out of the respective `*ApkInternal()` methods, but that
requires more significant refactoring to get right without code
duplication.
2017-02-28 20:56:35 +01:00
Peter Serwylo
aa945367c9 Pass potentially nullable argument instead of guarding.
It seems that `setContentIntent()` will do fine if we pass it a null
argument. The default value is `null` anyway, and it doesn't mandate
a non-null argument.
2017-02-28 20:56:35 +01:00
Peter Serwylo
d2ef357403 Invert if statement to bail early. 2017-02-28 20:56:35 +01:00
Peter Serwylo
7329dc5d8d Return notification instead of builder.
Given that none of the callers need the functionality of the builder,
lets make it explicit that we don't expect the builder to be further
customized once it is returned. Instead, return a notification to hint
that no further customization is required/desired.
2017-02-28 20:56:35 +01:00
Peter Serwylo
ef7d8dfce9 Make updates/installed final to slightly simplify code. 2017-02-28 20:56:35 +01:00
Peter Serwylo
a2997747af Clarify the unused status of notificationManager 2017-02-28 20:56:35 +01:00
Peter Serwylo
0b1940c4bf Make it explicit that it may return null.
Given that some places where this method is invoked does a null check,
it seems reasonable to make this assumption explicit. That way if devs
use the method in the future, then they will be aware of the contract.
2017-02-28 20:56:35 +01:00
Peter Serwylo
875b0d091f Replace if/else with switch
This is common throughout the F-Droid code base.
2017-02-28 20:56:35 +01:00
Peter Serwylo
49f20f64b3 Added documentation. 2017-02-28 20:56:35 +01:00
Peter Serwylo
1a9f5d60bf Remove dead code 2017-02-28 20:56:35 +01:00
Peter Serwylo
c81b2c7fe4 Minor formatting.
Neither pmd/checkstyle/many-devs are particularly precious about
hard rules of when to wrap a line. In this case we could've brought the
`ErrorDialogActivity` onto the same line as `putExtra`, but instead
opted to chain the method calls as per the `getAppDetailsIntent` method.
2017-02-28 20:56:35 +01:00
mvp76
f7e12b4f25 Icon fixes and general tweaks 2017-02-28 20:56:35 +01:00
mvp76
28d683e16a Add intent for "installed" state 2017-02-28 20:56:35 +01:00
mvp76
0461860479 Removed "installed" notification when entering Details screen. 2017-02-28 20:56:35 +01:00
mvp76
7efa62891d Use strings, async image loading, "unknown" status added. 2017-02-28 20:56:35 +01:00
mvp76
55c7a21c90 Move app status handling to new AppUpdateStatusManager 2017-02-28 20:56:34 +01:00
mvp76
10cbf1ef7a Create notification helper class 2017-02-28 20:56:34 +01:00
Hans-Christoph Steiner
9e1458f41e Merge branch 'nougat' into 'master'
Support for PrivilegedExtension on Nougat

Closes privileged-extension#17

See merge request !442
2017-02-28 18:38:46 +00:00
Chirayu Desai
1a586511cf ApkFileProvider: Explicitly grant read permission to PrivExt 2017-02-28 17:47:36 +05:30
Chirayu Desai
c004f1ce10 PrivilegedInstaller: Use ContentUri on Nougat (24) and above 2017-02-28 17:47:29 +05:30
Peter Serwylo
3ca3a6d699 Merge branch 'preperation-for-new-ui' into 'master'
Some groundwork for the main screens new UI

See merge request !432
2017-02-28 02:40:14 +00:00
Peter Serwylo
6ac62d791a Merge branch 'prep-for-new-index' into 'master'
prep for new index-v1

Closes #819

See merge request !439
2017-02-28 02:35:15 +00:00
Peter Serwylo
a93904d907 Added preference to manage repositories
As this is no longer a top level menu item, it is now the first item
in the settings, under "Updates".
2017-02-28 08:29:38 +11:00
Peter Serwylo
bdde162f56 Notify when new categories are available, old ones are no longer available.
Whether a category is "available" or not is not a function of whether it
is in the category table or not. Rather, it is a function of whether there
are any active apps/apks which are in that category. Thus, don't notify
after inserting a category (the notification was wrong anyway as it was
trying to notify the AppProvider Uri instead of the ContentProvider one).
Instead, do it after a repo update is complete.
2017-02-28 08:29:38 +11:00
Peter Serwylo
f4c03c6baa Make category searching case insensitive. Only works for ASCII :( 2017-02-28 08:29:38 +11:00
Peter Serwylo
25d2659b93 Be more explicit about searching categories with free form text. 2017-02-28 08:29:38 +11:00
Peter Serwylo
a8d8e65698 Added query for 'top X apps in category' and associated test 2017-02-28 08:29:38 +11:00
Hans-Christoph Steiner
601c85103e fields as instance vars: icon, mirrors for Repo; antiFeatures for Apk
This adds support for the index fields: icon, mirrors, and antiFeatures.
icon and mirrors are for Repo, they've been around a while on the server
side, but just never used on the client side.

For Apk, this adds a new per-APK antiFeatures field so that each APK can
be individually marked.  For example, when tracking is added or removed,
vulnerabilities are discovered and fixed, etc.

These fields will be ignored when using the v0 index.xml format, they
will be used by the upcoming index-v1 format: !422
2017-02-27 22:20:44 +01:00
Hans-Christoph Steiner
bc0db92c50 ensure that App description is never null
In the v0 index format, empty descriptions were filled in with boilerplate
text.  The v1 index format instead leaves empty descriptions empty, and
lets the various consumers (fdroidclient, web interfaces, etc) decide what
to show.  The database and code still assume that the description will not
be null, so instead this ensures there is something in the database, but it
will be an empty string instead of a null.  In the future, it would
probably make sense to standardize empty values on null or something.
2017-02-27 14:15:31 +01:00
Hans-Christoph Steiner
611fd6e5e3 rename App instance vars to match fdroidserver field names
This makes the name of the instance variables in the App class match the
names of the metadata fields in the new fdroidserver .yml YAML format. This
means that the Jackson parser can automatically instantiate instances for
us, which will be more efficient and maintainable.

These names aren't great, but it would a ton of work to rename the field
names in all of the metadata files, the docs, fdroidserver code, etc.
2017-02-27 14:15:15 +01:00
Hans-Christoph Steiner
199ab44ec3 deprecate App.requirements[], was only used for RequiresRoot
RequiresRoot is obsolete as a metadata field since there is the SUPER_USER
permission.  This `requirements` array was set up to handle other things,
but that was never implemented.
2017-02-27 14:15:15 +01:00
Hans-Christoph Steiner
6fb1207ae6 always refresh APKs in DB at start with timestamps < 2010-01-01
APKs installed in /system} will often have zeroed out timestamps, like
2008-01-01 (ziptime) or 2009-01-01.  So instead anything older than 2010
every time since we have no way to know whether an APK wasn't changed as
part of an OTA update.  An OTA update could change the APK without changing
the versionCode or lastUpdateTime.

closes #819
2017-02-27 14:15:15 +01:00
Hans-Christoph Steiner
34dbf49f6c gitlab-ci: put all the static tests into test job
gitlab-ci used to run all of our jobs in parallel, now it mostly seems
to run them sequentially.  So splitting up the various parts of the CI
suite into separate jobs mostly slows things down.  This combines the
static tests into one job (lint, pmd, checkstyle, tools) with the JVM
tests aka Robolectric.  That makes three jobs from the previous six.
2017-02-27 14:15:15 +01:00
Hans-Christoph Steiner
6f43d4eb18 make checkstyle happy with instance variable names
[ant:checkstyle] [ERROR]
/export/share/code/fdroid/client/app/src/main/java/com/geecko/QuickLyric/view/AppCompatListPreference.java:35:29:
Name 'mDialog' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. [MemberName]

Introduced in 79ecffc91c8856e7ceb6a65441d19a6272195426
2017-02-24 21:23:13 +01:00
Hans-Christoph Steiner
bfc1060bfb Merge branch 'new-ui--app-details-2' into 'master'
Tweak some styles in AppDetails2

See merge request !426
2017-02-24 15:27:29 +00:00
Hans-Christoph Steiner
bb4409457b Merge branch 'old-perm' into 'master'
Remove unused permission org.fdroid.fdroid.privileged.USE_SERVICE

Closes #861

See merge request !438
2017-02-24 15:14:01 +00:00
Hans-Christoph Steiner
064af8c94c remove empty Kurdish strings.xml that breaks 'tools' test 2017-02-24 16:02:16 +01:00
Hans-Christoph Steiner
e27ce21b65 Merge branch 'fix-817--info-why-priv-extension-disabled' into master
Remove Privileged Installer preference when appropriate

See merge request !430
2017-02-24 15:56:32 +01:00
Hans-Christoph Steiner
0ee14800c3 Merge branch 'fix-750--white-background-on-popup' into master
Fix white background on preference dialogs.

See merge request !431
2017-02-24 15:28:33 +01:00
Chirayu Desai
5e59138082 Remove unused permission org.fdroid.fdroid.privileged.USE_SERVICE
* This was removed by [1] and a whitelist is being used instead
  of this signature protected permission
* Closes #861

[1]: 80452dec24
2017-02-23 22:46:20 +05:30
Peter Serwylo
75eb72c50b Show material-design-ripple in background when touching list item.
Also ensure it shows this animation correctly when expanding "Versions".
This is done by changing from `notifyDataSetChanged()` to the more
specific `notifyItemRange(Inserted|Removed)`, which ensures the
"Versions" item doesn't get rebuilt midway through an animation.
2017-02-22 10:31:40 +11:00
Peter Serwylo
2101ec4bbc Remove Privileged Installer preference when appropriate.
Fixes #817.

As discussed in #817, this preference is not useful on Android >= 5.0.
As such, the preference should just be removed. However, it should stay
if the privileged installer is already installed (e.g. via update.zip or
included as part of the ROM).
2017-02-22 08:41:41 +11:00
F-Droid Translatebot
109c795dd1 Pull translation updates from Weblate
Translators:

Ahmad Zafrullah  Indonesian
Allan Nordhøy    Norwegian Bokmål
Balázs Úr        Hungarian
Hasan İlingi     Kurdish
Jonatan Nyberg   Swedish
Juraj Harasta    Czech
Michalis         Greek
Michalis         Spanish
Nick Bishop      Greek
Verdulo          Esperanto
yiannakis        Greek
2017-02-20 16:00:03 +11:00
Peter Serwylo
81aacac592 Make 3rd party AppCompatListPreference adhere to our checkstyle rules.
Added braces around one line if statements.
2017-02-20 08:47:59 +11:00
Peter Serwylo
79ecffc91c Use AppCompatListPreference from QuickLyric to fix dialog themes.
Fixes Issue #750.

This new class makes sure to use the correct `AlertDialog.Builder` from
the support lib. This in turn ensures the correct styles get applied to
the result alert dialog.
2017-02-20 08:42:25 +11:00
Peter Serwylo
2c1a059da9 Use AppCompatActivity instead of deprecated ActionBarActivity
Doesn't change anything, just removes a deprecation warning.
AppCompatActivity currently extends ActionBarActivity and doesn't
provide any further imnplementation.
2017-02-20 08:41:52 +11:00
F-Droid Translatebot
2db46e0794 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz      Catalan
Ajeje Brazorf              Sardinian
Alaa Issa                  Arabic
Alberto Moshpirit          Spanish
Alexander Georgievskiy     Russian
András Lengyel-Nagy        Hungarian
André Marcelo Alvarenga    Portuguese (Brazil)
Anteri                     Finnish
Athmane MOKRAOUI           Arabic
Claus Rüdinger             German
Cyxae Dexyc                French
dark159123                 Danish
Dmitriy Bogdanov           Russian
Enol P                     Asturian
ezjerry liao               Chinese (Traditional)
Gregor Santner             German
Hsiu-Ming Chang            Chinese (Traditional)
Jean-Baptiste              French
John Doe                   Turkish
Jonatan Nyberg             Swedish
Kheireddine Mkh            Arabic
Lari Oesch                 Finnish
Luca Bianchi               Italian
Marcelo Santana            Portuguese (Brazil)
Marian Hanzel              Slovak
Michael                    German
Mladen Pejaković           Serbian
msrn                       Finnish
naofum                     Japanese
Olexandr Nesterenko        Ukrainian
Osoitz                     Basque
Raphaël Barman             French
Sveinn í Felli             Icelandic
Sylvia van Os              Dutch
Tobias Bannert             German
Verdulo                    Esperanto
Verdulo                    Polish
Yaron Shahrabani           Hebrew
zmni                       Indonesian
2017-01-04 12:01:10 +00:00
Daniel Martí
56ccc09f90 Merge branch 'ci-update' into 'master'
Update CI image and build-tools to 25.0.2

See merge request !427
2016-12-23 16:35:16 +00:00
Daniel Martí
3d20a07c8a Update CI image and build-tools to 25.0.2
The new CI image also contains the support repo r41, with the support
libs version 25.1.0.
2016-12-23 12:55:28 +01:00
Peter Serwylo
6a6cede4de More specific paddings round the "collapsable lists" at the bottom of app details.
Also tried a more specific naming scheme for dimens to make it clearer where
they are to be used. This increased the padding on the left/right of the collapsable
lists. It also decreased the padding above/below.
2016-12-21 23:05:15 +11:00
Peter Serwylo
d54c138a1d Work on the "Donate" styles.
Still needs some better assets for the actual donate buttons, but now it includes
the relevant text about donating to developers. It also puts the donation options
in a grid layout and lets them flow across so that if there is more than three, they
will end up on the second line.
2016-12-21 23:05:08 +11:00
Daniel Martí
7997024a18 Adjust 0.102 release date in changelog
Forgot to do this when tagging.
2016-12-13 18:39:41 +00:00
Peter Serwylo
f9f0a0f91c Merge branch 'app_details_749' into 'master'
App details 749

The new App Details screen (issue #749), now accessible by long-clicking on an app in the application list.

See merge request !419
2016-12-08 01:19:49 +00:00
Daniel Martí
2b088bc438 README: clarify AM/PM meeting time via 24h format 2016-12-07 22:31:27 +00:00
mvp76
2c0a5fcb21 Checkstyle fixes 2016-12-07 23:25:34 +01:00
Daniel Martí
42b188a005 Merge branch 'correct-meeting-time' into 'master'
Correct meeting time

With the discussion on IRC [starting here](https://botbot.me/freenode/fdroid-dev/2016-11-14/?msg=76442333&page=1), the time in `README.md` is wrong.

> We are on `#fdroid` and `#fdroid-dev` on Freenode. We hold weekly dev meetings on `#fdroid-dev` on Tuesdays at 20h UTC, which usually last half an hour.

[It should be](https://botbot.me/freenode/fdroid-dev/2016-11-15/?msg=76516527&page=1) be:

> We are on `#fdroid` and `#fdroid-dev` on Freenode. We hold weekly dev meetings on `#fdroid-dev` on Thursdays at 8:30h UTC, which usually last half an hour.

See merge request !424
2016-12-07 21:39:28 +00:00
Nico Alt
2b98f5477b Correct meeting time
With the discussion on IRC [starting here](https://botbot.me/freenode/fdroid-dev/2016-11-14/?msg=76442333&page=1), the time in `README.md` is wrong.

> We are on `#fdroid` and `#fdroid-dev` on Freenode. We hold weekly dev meetings on `#fdroid-dev` on Tuesdays at 20h UTC, which usually last half an hour.

[It should be](https://botbot.me/freenode/fdroid-dev/2016-11-15/?msg=76516527&page=1) be:

> We are on `#fdroid` and `#fdroid-dev` on Freenode. We hold weekly dev meetings on `#fdroid-dev` on Thursdays at 8:30h UTC, which usually last half an hour.
2016-12-07 22:33:19 +01:00
mvp76
56575c3291 Bugfix, don't show "more" if we have MAX_LINES lines. 2016-12-06 09:45:35 +01:00
mvp76
65b16beb61 Make sure right view is selected as anchor on "more"-expansion 2016-12-06 09:44:46 +01:00
mvp76
734741c8f4 New implementation that is commented + easier to understand 2016-12-05 18:31:41 +01:00
Peter Serwylo
ccf763199f Replace if's with switches
Required changing some local variable names to prevent the same
`view` variable being declared multiple times. Otherwise it should
be a verbatim change from if statements to switch statements.
2016-12-05 22:56:27 +11:00
Peter Serwylo
a00534c7c7 Obey checkstyle rule preventing 'm' prefix for member variables
Required a couple of undesirable changes, such as:
 * sCollated -> collated
 * mFDroidApp -> fdroidApp (note the lower case 'd')

Otherwise it was relatively minor given how many member variables there are
in the code base.
2016-12-05 22:56:27 +11:00
Peter Serwylo
4f7116fcfb Add checkstyle rule to catch usage of member variables prefixed with 'm' 2016-12-05 22:56:26 +11:00
Peter Serwylo
22d9f55afb Move business logic from onBindViewHolder logic into respective ViewHolder subclasses. 2016-12-01 12:32:39 +11:00
Peter Serwylo
c50c9f2ea0 Appease pmd
Can be run via `gradle pmd`.

Mostly making fields final where appropriate.
2016-12-01 12:15:36 +11:00
Peter Serwylo
1f83cf1eca Appease checkstyle
Can be run via `gradle checkstyle`.

Mostly:
 * Removing one line if statements in favour of braces.
 * Whitespace between typecast and expression.
2016-12-01 12:15:36 +11:00
Peter Serwylo
539455bd16 Remove unnesseary class prefix 2016-12-01 12:15:36 +11:00
Peter Serwylo
0847bb6008 Inline check for 'isInstalled()'.
The adapter has its own copy of the `App`, and so can ask directly
instead of delegating to the activity.
2016-12-01 12:15:36 +11:00
Peter Serwylo
6e0ea68bab Push notifyDataSetChanged invocation into adapter.
That is probably the place most responsible for knowing if the dataset has changed
and broadcasting that fact.
2016-12-01 12:15:36 +11:00
Peter Serwylo
17c97e577e Format comments 2016-12-01 12:15:36 +11:00
Peter Serwylo
598d604ca5 Ported code for handling 'ignore this/all' from AppDetails
Allows the two menu items "Ignore All Updates" and "Ignore This Update"
to be checked and save the relevant preferences to the database in response.

The old code waited until the activity was paused before saving the
preferences to the database. This code does not, and as such incurs
a database write on the main UI thread as soon as the user checks the
menu items. However that database code has recently been refactored so
it should be much more performant. If it turns out to still be problematic
then we can revert to the old behaviour of hodling onto any state changes until
onPause then persisting to the database.
2016-12-01 12:15:36 +11:00
Peter Serwylo
9f758c4f86 Prefer Javadoc where possible 2016-12-01 12:15:36 +11:00
Peter Serwylo
003b9459da Removed need for upcast by parameterising mIntents over ResolveInfo instead of Object
Allows the type checking to be done by the compiler rather than the developer.
It was possible here because there is only two types of view, and the first type
will only have one or zero entries in the adapter. Thus, I've swapped the usage
of a `String` type for a `null` and checked for null instead of `instanceof String`.
2016-12-01 12:15:36 +11:00
Peter Serwylo
0b09d591ea Clarifying comment 2016-12-01 12:15:36 +11:00
Peter Serwylo
4e664c3d92 ints to Constants for viewtypes 2016-12-01 12:15:36 +11:00
Peter Serwylo
d0a326aa2c Lowercase stray N 2016-12-01 12:15:36 +11:00
Peter Serwylo
d2787d8d09 Add annotation as per the parent class. 2016-12-01 12:15:36 +11:00
Peter Serwylo
65f2c0eac7 Extracted string literals into constants. 2016-12-01 12:15:36 +11:00
Peter Serwylo
88661757f6 Added clarifying comment. 2016-12-01 12:15:36 +11:00
Peter Serwylo
a67ef806d2 Finalised property which is calculated once during construction 2016-12-01 12:15:36 +11:00
Peter Serwylo
ab72797a41 Added test for trailing newline stripping. Renamed method for clarity. Doccomments.
Changed the helpful comments to a Javadoc comment, as tooling such as editors
will be more likely to make use of it like that.

Renamed to emphasise that only trailing new lines are stripped.

Added a basic test for this function to ensure it only strips trailing,
and also that it does actually strip trailing slashes.
2016-12-01 12:15:36 +11:00
Peter Serwylo
ab917b6272 Remove need for setTag and (String) getTag()
Can use the argument passed to addLinkItemView() instead. Requires making
it final so that the anonymous inner class can read it.
2016-12-01 12:15:35 +11:00
Peter Serwylo
2709d00b70 Point to R.id.information, not R.id.text
Although the `textView` in `DonateViewHolder is currently not used, it was
pointing to an id which was not in the layout. This has been fixed in case
future devs choose to use this text view. Alternatively, we could remove it
completely if we don't think it is going to be used in this upcoming UI work.
2016-12-01 12:15:35 +11:00
Peter Serwylo
5f09c80914 Make constants static.
Not any need at this point for them to be object properties.
2016-12-01 12:15:35 +11:00
Peter Serwylo
2e1484bcb2 Correctly check whether mailto: links can be handled
Similar to the litecoin/bitcoin/flattr stuff, we need to check that a
proper URI can be handled via an intent. This previously just checked
whether the email address could be handled without the mailto: prefix.
2016-12-01 12:15:35 +11:00
Peter Serwylo
a0c40bcaae Remove some commented out code 2016-12-01 12:15:35 +11:00
Peter Serwylo
920e6499ab Minor formatting 2016-12-01 12:15:35 +11:00
Peter Serwylo
4a92a37df2 Use TextUtils.isEmpty instead of null and length check 2016-12-01 12:15:35 +11:00
Peter Serwylo
46eb6ee3b4 Added initial test for AppDetailsRecyclerViewAdapter.
Doesn't do anything except create an app with no versions,
no donate links, anything like that, and ensure that the adapter
is able to create the view holders for each resulting item.

In the future we can beef this up to check more exotic conditions,
such as calling `updateItems(App)` with different apps, each
with different combinations of versions, donation links, permissions,
etc.
2016-12-01 12:15:31 +11:00
Peter Serwylo
774ca02d22 Use correct URIs when attempting to show donate links.
This extracts the functionality from the old AppDetails which prefixes
donation links with the relevant scheme (bitcoin: or litecoin:) or URL
(https://flattr.com/thing/) into the App class.
2016-12-01 12:15:31 +11:00
Peter Serwylo
190cf40ff9 Make assumption that app is non-null explicit
The adapter has a hard coded assumption that mApp is never null.
This documents it as such by making the member variable @NonNull.
This is not perfect, because the consumer of this class doesn't quite
seem to check this constraing properly, however at least within the
class it adds some explicit documentation that is understood by editors
and lint that this is a non-nullable field.
2016-12-01 12:15:31 +11:00
Peter Serwylo
1eb7d389f2 Refactor setProgress code for the header view.
Each call site of the `getHeaderView()` method needed to do a null
check and then it would call `setProgress()`. This has been replaced
with two methods `setProgress()` and `clearProgress()` to make it a
bit less repetative and harder to accidentally get a NPE in the future
by invoking `getHeaderView()` incorrectly.
2016-12-01 12:15:31 +11:00
Peter Serwylo
7d2d22cf96 Extracted variable, made code fit on single lines. 2016-12-01 12:15:31 +11:00
Peter Serwylo
4c42e73243 Removed unused imports 2016-12-01 12:15:31 +11:00
Daniel Martí
af24db2d14 Bump to 0.102 2016-11-28 12:15:30 +00:00
Daniel Martí
a8b84ff815 Add two new languages to list 2016-11-28 12:11:51 +00:00
F-Droid Translatebot
f566a53efb Pull translation updates from Weblate
Translators:

Ajeje Brazorf          Sardinian
Alberto Moshpirit      Spanish
Andreas Nordal         Norwegian Bokmål
Clara Chido            Shona
Enol P                 Asturian
E T                    Turkish
ezjerry liao           Chinese (Traditional)
Licaon Kter            Romanian
naofum                 Japanese
Nebojsa Tausanov       Macedonian
Nutchanon Wetchasit    Thai
Osoitz                 Basque
Sylvia van Os          Dutch
Tawanda Mugari         Shona
Verdulo                Esperanto
Verdulo                Polish
Yaron Shahrabani       Hebrew
YFdyh000               Chinese (Simplified)
zmni                   Indonesian
2016-11-28 11:59:17 +00:00
mvp76
3b23ea019b Reset build files to release 2016-11-25 10:07:56 +01:00
mvp76
e1af82c5f8 Adjust margins 2016-11-25 09:46:35 +01:00
Hans-Christoph Steiner
7f49c82b62 Merge branch 'fix-806--categories-remaining-when-they-shouldnt' into 'master'
Ensure categories are not shown unless there are apps in them

**Note: To be hot fixed into 0.102.1 also when merged.**

Fixes #806. Also adds tests to hopefully prevent this from regressing in the future.

Ensure app-category join table is cleared out properly upon disabling repo.
    
There are certain things we can leave in the database even when they are not being used. The criteria for this is:
     * Could it be used again in the future?
     * Can it be excluded from queries easily while it is unused?
    
Examples are entries in the package table, and entries in the category table.
    
This fixes a problem where entries in the category-app join table stayed in the database, causing categories to be considered as "in use" when really there were no apps in those categories. These rows need to be removed, because when new apps are added again in the future, they will have different primary keys. These different primary keys mean that the rows in the category-app table will never be useful again, and thus should be removed.

See merge request !418
2016-11-24 09:55:28 +00:00
Hans-Christoph Steiner
019e73eb13 gitlab-ci: remove android update sdk, it just breaks things
Unfortunately, something in the way that the docker image is created is
making it impossible to run `android update sdk`. Even though it runs as
root, it cannot upgrade things, and in the process, it seems to break the
Android SDK bits that are there.

  Installing Android Support Repository, revision 40
  Failed to rename directory /android-sdk/extras/android/m2repository to /android-sdk/temp/ExtraPackage.old01.
  Failed to create directory /android-sdk/extras/android/m2repository
  Done. Nothing was installed.

A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
   > You have not accepted the license agreements of the following SDK components:
     [Android Support Repository].
     Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
     Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
   > Could not resolve all dependencies for configuration ':app:compile'.
      > Could not find com.android.support:support-v4:24.2.1.
        Required by:
            project :app
      > Could not find com.android.support:appcompat-v7:24.2.1.
        Required by:
            project :app
      > Could not find com.android.support:support-annotations:24.2.1.
        Required by:
            project :app
2016-11-24 10:47:38 +01:00
Peter Serwylo
18885a66c2 Ensure app-category join table is cleared out properly upon disabling repo.
There are certain things we can leave in the database even when they
are not being used. The criteria for this is:
 * Could it be used again in the future?
 * Can it be excluded from queries easily while it is unused?

Examples are entries in the package table, and entries in the category table.

This fixes a problem where entries in the category-app join table stayed in
the database, causing categories to be considered as "in use" when really there
were no apps in those categories. These rows need to be removed, because when
new apps are added again in the future, they will have different primary keys.
These different primary keys mean that the rows in the category-app table will
never be useful again, and thus should be removed.

Fixes #806.
2016-11-24 15:18:19 +11:00
Peter Serwylo
99ad9752c8 Use repo foreign key from app rather than apk table.
Since recently, app metadata now knows which repo it comes from.
As such, we no longer need to ask the apk table for this info.
2016-11-24 15:18:19 +11:00
Peter Serwylo
5be23b793e Added test to ensure categories are remoed when a repo is disabled.
This will help diagnose, test, and prevent regressions of #806.
2016-11-24 15:18:19 +11:00
mvp76
05f13df17a Separate adapter from rest of activity 2016-11-23 12:37:26 +01:00
mvp76
b36e581480 Fix snap helper 2016-11-23 12:37:06 +01:00
mvp76
d02ea05865 Add the download/install progress bar 2016-11-21 17:01:03 +01:00
mvp76
b2d363b947 Add new Nearby icon to share dialog 2016-11-21 14:39:15 +01:00
mvp76
4a25df8461 Add version items directly to RecyclerView 2016-11-21 10:48:51 +01:00
mvp76
0855c0affe Change icon for versions (and add string!) 2016-11-18 16:07:18 +01:00
mvp76
f3e88535f9 Load feature graphic (currently large icon) 2016-11-18 15:55:44 +01:00
mvp76
30bcad963e Move from ListView to LinearLayout temporarily
These need to go into t he recyclerview instead.
2016-11-18 15:39:53 +01:00
mvp76
7061e47a8c Fix toolbar icons 2016-11-18 15:39:53 +01:00
mvp76
5a0b625dc0 Add Nearby to share (if applicable) 2016-11-18 15:39:53 +01:00
mvp76
46308dcbde Added share to details view
TODO: still need to add Nearby
2016-11-18 15:39:53 +01:00
mvp76
d90cb040b1 Move some files and add donate section 2016-11-18 15:39:53 +01:00
mvp76
d3247b9cfd Post update, so all receivers have run 2016-11-18 15:39:53 +01:00
mvp76
be16137553 Install/Uninstall
Does not work yet, race condition on the listeners I guess.
2016-11-18 15:39:53 +01:00
mvp76
7469a1cdab Some layout and color fixes 2016-11-18 15:39:53 +01:00
mvp76
88c60b98f9 Added permissions section 2016-11-18 15:39:53 +01:00
mvp76
56f0505d4a Added versions section
TODO: need string and icon
2016-11-18 15:39:53 +01:00
mvp76
0898db3490 Add click handler to links 2016-11-18 15:39:53 +01:00
mvp76
3eb2a5eb96 Added the links section, cleanup some code 2016-11-18 15:39:53 +01:00
mvp76
34450569b3 Initial work on details view 2016-11-18 15:39:53 +01:00
mvp76
f355232bd5 Build changes 2016-11-18 15:39:53 +01:00
Daniel Martí
99216d923a Bump to 0.102-alpha3 2016-11-16 22:06:03 +00:00
Peter Serwylo
43303d17cc Merge branch 'master' into 'master'
Fixed long version overriding app name (issue #322)

Also, fixed deprecated "singleLine" property to "maxLines="1"".
Also removed reduntant (legacy) padding declarations, for the files used exclusively by newer APIs which override those declarations with new ones.

See merge request !417
2016-11-16 21:39:24 +00:00
Peter Serwylo
35996952ef Merge branch 'rework-net-for-0.102' into 'master'
Rework net for 0.102

This is a collection of targeted fixes for the %"0.102" release.  Most of them are quite narrowly targeted bug fixes.  I couldn't avoid reworking the update scheduling in order to fix some of the listed bugs.  This is the only part that seems possible to have regressions.  In any case, if there are regressions, they will be in a very limited chunk of the code, in `UpdateService`, which we have no plans to touch in %"0.103 - UX Overhaul" so it'll be easy to do a 0.102.1 release.

See merge request !415
2016-11-16 21:19:15 +00:00
aleksandar-stefanovic
e01ec5f3e8 Fixed long version overriding app name (issue #322)
Also, fixed deprecated "singleLine" property to "maxLines="1"".
Also removed reduntant (legacy) padding declarations, for the files
used exclusively by newer APIs which override those declarations with new ones.
2016-11-16 21:46:55 +01:00
Hans-Christoph Steiner
b799fe8494 follow "Only on WiFi" preference strictly
This is a tested version of pserwlyo's suggestion in !415
https://gitlab.com/fdroid/fdroidclient/merge_requests/415#note_18469122
2016-11-15 21:36:30 +01:00
F-Droid Translatebot
5925851f40 Pull translation updates from Weblate
Translators:

Anteri                  Finnish
Enol P                  Asturian
Jonatan Nyberg          Swedish
Mladen Pejaković        Serbian
Sami “6sto” Kuusisto    Finnish
Tacsipacsi              Hungarian
2016-11-15 20:27:30 +00:00
Hans-Christoph Steiner
7e7ec966ee improved internet state handling for updates, including metered
This introduces three network states:

1. completely disconnected
2. connected only via metered networks
3. connected via unlimited networks

This allows the update process to use bandwidth better, especially when the
user has enabled the "Only on WiFi" setting.  It also helps prevent silly,
cryptic error messages in the update process is triggered when there isn't
internet available.

I tested this with:

* 4G only, but not set up for internet
* 4G only, with internet
* 4G + WiFi
* WiFi only airplane mode
* no internet at all, full airplane mode

closes #793
closes #774
2016-11-14 16:03:37 +01:00
Hans-Christoph Steiner
e14cb9d16a treat ethernet as WiFi when checking updates
Its really easy to use USB Ethernet devices with ChromeOS and some Android
devices like Android TV.  ChromeOS now supports Android apps.  Since really
the goal is to avoid metered networks, and ethernet is very rarely metered,
this fits in with the user expectations around the preference.  And if it
doesn't, there are very few people using Ethernet with F-Droid right now,
so whatever harm does happen will affect an extremely limited number of
people.
2016-11-14 09:36:45 +01:00
Hans-Christoph Steiner
6545a26e31 set HTTP User Agent to "F-Droid"
First, this is more honest than just using the default since it is saying
what the actual software is.  Second, it protects identity, since the
default User Agent on Android can have a lot of info in it, for example:

"Dalvik/2.1.0 (Linux; U; Android 5.1; XT1039 Build/LPBS23.13-17.3-1)"
2016-11-14 09:36:45 +01:00
Hans-Christoph Steiner
ab1e869ebe use HEAD request when just checking the file size
This code will be changed again when implementing the client-side etag
check #562

closes #777
2016-11-10 20:44:53 +01:00
Hans-Christoph Steiner
096b7132c4 prevent AppDetailsHeaderFragment crash in startProgress()
The real solution would involve figuring out where to handle this in the
right spot in the lifecycle.  Since AppDetails is being totally replaced,
this is just to stop the crashing.

closes #802
2016-11-10 20:44:53 +01:00
Hans-Christoph Steiner
b9dad4bce6 handle dirs and I/O errors when parsing ACTION_PACKAGE_ADDED Intents
InstalledAppProviderService tries to keep a running log of what is actually
installed on the device.  It seems that ApplicationInfo.sourceDir and
related things sometimes returns a dir rather than an APK. So try to find
an APK in that folder.

closes #801
2016-11-10 20:44:53 +01:00
Hans-Christoph Steiner
b852c0dca0 Merge branch 'category-table' into 'master'
Store categories in separate category table

Currently, the category that an app is in is recorded in the database via the `fdroid_app.categories` column, containing a comma separated list of strings. This makes it hard to query. The existing code to get a list of categories was pretty bad as a result. 

This moves to a different data model whereby categories are stored in a separate table. Each repo is free to specify that an app is in arbitray caregories (as with before). This is represented by a join table between categories and app metadata.

The end result is that categories are much more a first class citizen than before, and they will be able to be queried easier - which is important for the new UI.

Note that the categories table need never be emptied, it can keep being appended to. The reason is that if there are no apps in a particular category (represented by no corresponding rows in the join table) then the category will not be shown to the user.

See merge request !409
2016-11-10 10:19:06 +00:00
Hans-Christoph Steiner
0c6ca09a7d Merge branch 'partially-fix-520--performance-when-changing-preference' into 'master'
Improve performance when changing "Unstable Updates" preference

This is only a partial solution to #520. 

It does as I suggested in the issue comments, by doing less work when the preference is checked. The proper solution is an `IntentService` which queues requests to update these details, but that is a (slightly) larger change for the future.

I also noticed it wasn't correctly notifying the UI of the change, so this now notifies the list of apps which can be updated. That was hard to test though, so not sure if it updates the UI correctly or not. It shouldn't do it _incorrectly_, but it may not work. The reason it should work is because the `AppListFragment` (baseclass of `CanUpdateAppsFragment`) uses a cursor loader with the `AppProvider.getCanUpdateUri()` URI. This `CursorLoader` should automatically attach an observer for that URI and requery if required.

See merge request !414
2016-11-10 10:17:03 +00:00
Hans-Christoph Steiner
b2b108c39e Merge branch 'fix-800--npe-uninstalling' into 'master'
Fall back to InstalledAppProvider when trying to identify the apk to uninstall.

Extracted `getInstalledApk()` method so that it could be better documented, and
makes the `uninstallApk()` more consise. It will now throw an `IllegalStateException`
if no apk is found, because as issue #800 shows we will end up with a NPE otherwise.

Fixes issue #800.

See merge request !413
2016-11-10 08:36:00 +00:00
Peter Serwylo
b2c497e5b9 Only update suggested versions, not other unneeded things.
Also, while we are here, lets notify the content observers that the suggested
versions have changed, so that the UI can update in response.
2016-11-10 12:57:49 +11:00
Peter Serwylo
fdc95c071d Rename from 'calc app details' to 'calc all details'
In preperation for a subsequent change to only calculate a subset of details
for performance reasons.
2016-11-10 12:25:55 +11:00
Peter Serwylo
f060efb7ba Remove outdated doc comment and simplify method. 2016-11-10 12:22:37 +11:00
Peter Serwylo
a7a52fbfba Fall back to InstalledAppProvider when trying to identify the apk to uninstall.
Extracted `getInstalledApk()` method so that it could be better documented, and
makes the `uninstallApk()` more consise. It will now throw an `IllegalStateException`
if no apk is found, because as issue #800 shows we will end up with a NPE otherwise.

Fixes issue #800.
2016-11-10 11:16:29 +11:00
Peter Serwylo
2263352ca4 Add test for miscellanious update from f-droid.org metadata
During development of a new feature, I noticed a bug occuring only after using
the new feature for several days. This was because the metadata only infrequently
changes in ways which cause certain code paths to be hit. By having the f-droid.org
metadata from several days apart in the test suite, it allows for testing more
of these cases. In the future, even later versions of the metadata can be added
to ensure that we can update happily from old to new metadata.
2016-11-10 09:09:47 +11:00
Peter Serwylo
9785536910 Use the Query object rather than the SQLiteDatabase#query() method.
This ensures that all of the relevant joins are in place, so that when
the updater asks to `queryPackageName()` then it can assume that we have
already joined onto the `Schema.PackageTable`.
2016-11-10 09:09:43 +11:00
Peter Serwylo
354f0a9b53 Make it explicit that the CATEGORIES column is not for selecting from.
Renamed the `Schema.AppMetadata.Categories.CATEGORIES` constant into the
`Schema.AppMetadata.ForWriting.Categories.CATEGORIES` constant. This is
to make it very clear that it is not for reading from the database.
2016-11-10 08:09:49 +11:00
Peter Serwylo
68f666685f Make category helper functions query new category table 2016-11-10 08:09:49 +11:00
Peter Serwylo
634fe1084a Move category helper functions to CategoryProvider
Don't change anything yet, just move them.
2016-11-10 08:09:49 +11:00
Peter Serwylo
a7a7f77b42 Refactored categories field from column in metadata table to join table.
When updating existing apps or inserting new apps, instead of splatting
a comma separated list into a single sqlite3 column, we now put it into
several rows in the `CatJoinTable`. This is done after deleting existing
categories, to make sure that if the app has been removed from a category,
then this is reflected during the update.
2016-11-10 08:09:49 +11:00
Peter Serwylo
b2d5bcc94a When querying based on category, use join table. 2016-11-10 08:09:49 +11:00
Peter Serwylo
3e3fdd5c07 Added category to keyword search. 2016-11-10 08:09:49 +11:00
Peter Serwylo
8757acca1a Added category provider.
Not used by anything yet.
2016-11-10 08:09:49 +11:00
Peter Serwylo
99f7cab62e Added "category" table and "category to app metadata" join table.
Nothing uses these added tables yet.
2016-11-10 08:09:49 +11:00
Peter Serwylo
bb7cfc14cc Comments for the Schema.PackageTable. 2016-11-10 08:09:49 +11:00
Peter Serwylo
19ca68cb30 Removed unused category view in app details.
It was hidden some time ago, and nobody seems to miss it.
Also, we will be redoing this view soon anyway. In the meantime,
this category stuff is changing and this view should be removed.
2016-11-10 08:09:49 +11:00
Daniel Martí
6f0b33a092 Bump to 0.102-alpha2 2016-11-02 21:19:34 +00:00
F-Droid Translatebot
eae81b51ee Pull translation updates from Weblate
Translators:

Andy               Finnish
Buru Gher          Bulgarian
Matej Kolarević    Croatian
Sérgio Marques     Portuguese (Portugal)
Tobias Bannert     German
Verdulo            Esperanto
2016-11-02 21:19:18 +00:00
Hans-Christoph Steiner
dd5f84f226 Merge branch 'ci-bumps' into 'master'
ACRA and Checkstyle bumps

See merge request !412
2016-11-01 18:44:21 +00:00
Daniel Martí
04c7176a2a Bump checkstyle to 7.2 2016-10-31 14:19:30 +00:00
Daniel Martí
28853fb2ec Bump ACRA to 4.9.1
Changes: https://github.com/ACRA/acra/wiki/ChangeLog#acra-491-12-oct-2016
2016-10-31 14:07:41 +00:00
Hans-Christoph Steiner
8c68849e82 Merge branch 'clear-up-reset-transient' into 'master'
Be a little more concise about when we need to run migration for v64.

Before it is not apparant that the migration introduced for v64 is associated with that particular version. This is because the guard condition used to bail out from the upgrade is more closely related to a previous migration.

This is due to a flaw with the desigh of `resetTransient()`, whereby it always resets the database to the schema _of the current F-Droid version being run_, not of the tables as they stood at the time of the particular migration being introduced.

This clarifies the guard condition for v64 by allowing it to query whether the schema has been created fresh or not during this particular invocation of `onUpgrade()`

**Note:** this is less to do with the v64 migration, but rather I came across the exact same issue while working on category table related changes. At that point I realised I made a slight mistake with the `resetTransient()` method.

**Also:** I'm happy to entertain other designs if anybody is that interested. One other approach is to change the guard condition to:

```
if (version >= 64 || fieldExists(db, ApkTable.NAME, "...")) {
  ... add field ....
}
```

However that suffers a little bit when the migration is a little more complex and checking if a field exists may not be enough.

See merge request !408
2016-10-25 14:07:22 +00:00
Daniel Martí
6aba30fe7f Merge branch 'new-ci' into 'master'
Bump to new CI image, bump buildTools to 25

See merge request !410
2016-10-25 11:07:39 +00:00
Daniel Martí
3af5416f09 Bump to new CI image, bump buildTools to 25 2016-10-23 17:09:17 +01:00
F-Droid Translatebot
40665e335a Pull translation updates from Weblate
Translators:

Allan Nordhøy     Norwegian Bokmål
Enol P            Asturian
Ivan Krušlin      Croatian
Raphaël Barman    French
riotism           Chinese (Hong Kong)
2016-10-23 16:30:07 +01:00
Peter Serwylo
d65e72638b Reimplement columnExists using PRAGMA table_info.
For some reason, the existing approach of "select * and then see if the
column of interest is in the results set" didn't work as expected under
tests. Perhaps SQLite is caching the list of columns for the purpose of
`select *` even after running an `alter table add column` query?

Either way, I couldn't figure out why it wasn't working as expected.
This left us with two options:

 * Try to `select columnToCheck` and see if it throws an exception
 * Query columns using `PRAGMA table_info.

The exception thrown when a column doesn't exist is not specific enough
for our code to check that this is the exact exception that occured. It
is not possible to say: `try { ... } catch (SQLiteColumnNotFound e) { ...}`
unfotunately. Also, there is a cost associated with unwinding the stack
to process an exception, which means exceptions probably shouldn't be
used in unexceptional circumstances such as this.

This change instead uses `PRAGMA table_info(tableOfInterest)` and then
iterates over the cursor looking for the relevant column. Even if the
performance is worse than the stack unwinding of an exception, it is
more concise and less hacky.
2016-10-19 06:44:08 +11:00
Peter Serwylo
63a609fbab Moved methods away from top of DBHelper class.
The fact there are arbitrary migrations at the top of the file (between
`onCreate()` and `onUpdate()` makes it harder to scan this file.

This changeset moves these methods verbatim, without changing any of
the method bodies or signatures.
2016-10-18 18:00:36 +11:00
Peter Serwylo
a317877120 Be a little more concise about what to do when running migration for v64.
Before it is not apparant that the migration introduced for v64 is
associated with that particular version. This is because the guard
condition used to bail out from the upgrade is more closely related
to a previous migration.

This is due to a flaw with the desigh of `resetTransient()`, whereby
it always resets the database to the schema _of the current F-Droid
version being run_, not of the tables as they stood at the time of
the particular migration being introduced.

This clarifies the guard condition for v64 by instead explicitly asking
if the columns of interest exist yet in this particular invocation of
`onUpgrade()`.
2016-10-18 18:00:30 +11:00
Hans-Christoph Steiner
5d2c2bc6e6 Merge branch 'fix-npe-verifying-perms' into 'master'
Fix npe verifying perms

Fixed a NPE for apps with no permissions.

Here is an example of the logging output for a couple of apps too after my change:

```
D/ApkVerifier(10929): Checking permissions
D/ApkVerifier(10929): Actual:
D/ApkVerifier(10929):   None
D/ApkVerifier(10929): Expected:
D/ApkVerifier(10929):   None
```

and

```
D/ApkVerifier(10929): Checking permissions
D/ApkVerifier(10929): Actual:
D/ApkVerifier(10929):   android.permission.READ_EXTERNAL_STORAGE
D/ApkVerifier(10929):   android.permission.WRITE_EXTERNAL_STORAGE
D/ApkVerifier(10929):   android.permission.SET_WALLPAPER
D/ApkVerifier(10929):   android.permission.SET_WALLPAPER_HINTS
D/ApkVerifier(10929):   android.permission.WRITE_SETTINGS
D/ApkVerifier(10929): Expected:
D/ApkVerifier(10929):   android.permission.SET_WALLPAPER
D/ApkVerifier(10929):   android.permission.READ_EXTERNAL_STORAGE
D/ApkVerifier(10929):   android.permission.SET_WALLPAPER_HINTS
D/ApkVerifier(10929):   android.permission.WRITE_SETTINGS
D/ApkVerifier(10929):   android.permission.WRITE_EXTERNAL_STORAGE
```

See merge request !407
2016-10-17 14:42:23 +00:00
Peter Serwylo
2b2958f89c Added explicit test for null permissions.
This wouldn'tve actually found the problem in the previous commit,
due to the null happening before checking permissions while logging perms.
However, still seems like a nice test to have so that the method itself
handles nulls correctly.
2016-10-16 20:52:42 +11:00
Peter Serwylo
b72cdff522 Guard against null, and improve logging in ApkVerifier. 2016-10-16 20:28:19 +11:00
Daniel Martí
ad2059574e Merge branch 'category-tests' into 'master'
Improved category tests

In preparation for implementing the [new category UI](https://gitlab.com/fdroid/fdroidclient/uploads/01d865e65604c41b0a472f0d39e7f1a7/Categories.png) I will be refactoring the database so that categories get their own table. In preparation for that, this MR improves the categories tests so that they also test the ability to query apps based on their categories.

See merge request !406
2016-10-13 17:58:59 +00:00
Peter Serwylo
c771e9a394 Added test for querying apps based on category
The previous category tests only checked that certain categories
would indeed find their way into the database if certain app metadata
is saved. It didn't check the other direction, using these categories
in queries.
2016-10-13 08:52:17 +11:00
Peter Serwylo
8e2e14d703 Migrating category tests to their own class in preperation for giving them their own DB table 2016-10-13 08:41:51 +11:00
Hans-Christoph Steiner
189c8bd452 Merge branch 'fix-783--process-list-bug' into 'master'
Guard against null in getRunningAppProcesses

Fixes #783.

See merge request !405
2016-10-12 20:22:00 +00:00
Peter Serwylo
0e70495046 Guard against getRunningAppProcesses() returning null 2016-10-13 06:42:49 +11:00
Peter Serwylo
e2e1d3111c Extract code to check for ACRA process into method
Makes it easier to document the code and simplifies FDroidApp#onCreate().
2016-10-13 06:20:06 +11:00
F-Droid Translatebot
2428a89288 Pull translation updates from Weblate
Translators:

Alessandro “Acn0w” Cecchin    Italian
ezjerry liao                  Traditional Chinese
zmni                          Indonesian
2016-10-12 13:20:52 +01:00
Hans-Christoph Steiner
53e8061ef3 Merge branch 'support-extended-permissions' into 'master'
Support extended <uses-permissions/> tags

`<uses-permission-sdk-23>` is a new tag for requesting permissions on _android-23_ and above.  `<uses-permission/>` and `<uses-permission-sdk-23>` both can have optional _maxSdkVersion_ values, and these need to be fully supported in order for the Privileged Extension to be able to check the APK permissions against the index.xml permissions.  This is needed so that it can prompt the user once, then download and install the APK after that.  Its also needed for transparent background updates to check if the permissions have changed in the update.

This gets closer to the complete support, really the full permissions should be stored in the database.  Then the only
conversion would happen ewhen parsing the XML.  Right now, it still stores the old F-Droid permissions names, i.e. without
`android.permission.`.  Then those are converted when they are loaded from the DB into an Apk instance.

See merge request !402
2016-10-11 07:00:00 +00:00
Hans-Christoph Steiner
6f0c9ff88a support extended 'uses-permissions' tags in APKs
<uses-permissions/> tags can have min and max SDK to take effect.  This is
not supported currently, and it necessary especially with the privileged
installer so it can properly represent the permissions that an APK is
requesting.

For example:
<uses-permission
  android:name="android.permission.MANAGE_ACCOUNTS"
  android:maxSdkVersion="22" />
<uses-permission-sdk-23
  android:name="android.permission.CAMERA" />
<uses-permission-sdk-23
  android:name="android.permission.CALL_PHONE"
  android:maxSdkVersion="23" />
2016-10-11 08:44:51 +02:00
Hans-Christoph Steiner
2350b4e694 move shareable test classes into new separate section: testShared
This allows some of the mock classes to be shared across Robolectric and
emulator tests.
2016-10-11 08:44:51 +02:00
Hans-Christoph Steiner
d7022dd498 rename Apk.permissions to requestedPermissions like PackageInfo
android.content.pm.PackageInfo is the Android class for representing data
about an APK/package.  Since Apk.permission is the same thing, we should
use the same name.
2016-10-11 08:44:51 +02:00
Daniel Martí
43f380b6b6 Merge branch 'lint-fixes' into 'master'
lint fixes

This fixes a few lint warnings and promotes them to errors so that CI builds catch them in the future.

See merge request !404
2016-10-11 06:35:41 +00:00
Hans-Christoph Steiner
a5a90954bc fix lint UnsafeProtectedBroadcastReceiver
Android won't protect us from other apps sending other Intents to these
receivers, so at least check that the action string matches what its
looking for.  This is based on a lint recommendation.
2016-10-10 20:15:47 +02:00
Hans-Christoph Steiner
e2256d3d8c fix "Repeated word "en" in message: possible typo" 2016-10-10 20:15:47 +02:00
Hans-Christoph Steiner
a16589eab0 bump to errors: AppCompatMethod, NestedScrolling, StringFormatCount
These are things that we definitely want to be checking, and making them
lint errors rather than warnings means the CI build will fail.
2016-10-10 19:57:56 +02:00
Hans-Christoph Steiner
c71590c6fa fix lint StringFormatCount
app/src/main/res/values-nb/strings.xml:344:
  Conflicting number of arguments here
2016-10-10 19:57:56 +02:00
Hans-Christoph Steiner
15181d47f5 use apply() with all SharedPreferences
if the code does not check the result of commit() it should use apply()
since that runs in the background.
2016-10-10 19:57:55 +02:00
Daniel Martí
d8e83c7c9c Merge branch 'fix-778--migration-tests' into 'master'
Test all database migrations from db-version/42 onwards

While a bit arbitrary choosing 42, it is from more than two years ago. We can use this as our new baseline, in that this test will always check upgrades from 42 onwards, with each database bump.

Once the test was up and running, it immediately identified a bug in the database migration for v50 and v57. These have been fixed in this branch too.

Fixes #778.

See merge request !403
2016-10-10 13:57:22 +00:00
Peter Serwylo
72a88583d6 Only drop fdroid_installedApp if it exists 2016-10-11 00:15:38 +11:00
Peter Serwylo
0d4d160407 Fix migration for DB version 50.
The migration resulted in a query being run which was broken. The query
was broken because it was dynamically generated by Java code. This Java
code resulted in a valid migration when until very recently when the
query was refactored to deal with a new DB structure. Now the query is
no longer suitable to be run against a DB_VERSION 49 database.

To resolve this, the migration now hard codes the query to a string
which is executable when the DB_VERSION is 49.
2016-10-11 00:15:35 +11:00
Peter Serwylo
050d9974b7 Added a test which runs all DB migrations since DB version 42.
It was a little arbitrary to choose this date. However it was when the database
looked quite close to what it looks like now and it is from well over two years
ago. Going into the future, this test may as well always start out at 42 forever
more to ensure that database migrations from that point continue to work for
all future database migrations.
2016-10-10 23:42:05 +11:00
Daniel Martí
663d981c7a Bump to 0.102-alpha1 2016-10-06 22:37:09 +01:00
Hans-Christoph Steiner
4b2aec6d08 fix crash loop when upgrading from v0.101
For upgrades from DB version earlier than 63, the whole table is recreated
by resetTransient() in migrateToPackageTable() so the upgrade method for
the OBB tables only needs to run when the database is at exactly version 63

This was mistakenly added to cd9582c9902dd4ac9218acfd69872f3eebcd3d93 when
it was rebased on !375.
2016-10-06 23:22:56 +02:00
Daniel Martí
88ba2ef5eb Start off 0.102 changelog 2016-10-06 21:16:23 +01:00
Daniel Martí
6cc8e6143d Merge branch 'obb-support' into 'master'
support for APK Extension files aka "OBB"

OBB files are used by lots of apps like games and MAPS.ME to distribute large chunks of data.  This adds basic support for distributing OBB files via F-Droid.  The idea is that they are installed before the APK, so that once the APK is installed, the OBB files are already in place and ready to use.  This also provides an F-Droid-specific Intent method for apps to fetch the OBB download URLs in case the app itself needs to handle the OBB download/update.  That is similar to how it works in Google Play.

The fdroidserver changes are already merged: https://gitlab.com/fdroid/fdroidserver/merge_requests/143

https://developer.android.com/google/play/expansion-files.html

See merge request !383
2016-10-06 20:04:01 +00:00
Hans-Christoph Steiner
65c4087b05 improved Apk.toString() for easier debugging 2016-10-06 21:06:54 +02:00
Hans-Christoph Steiner
470145e611 remove unused ContentValuesCursor class
This was replaced entirely by making Apk implement Parcelable
2016-10-06 21:06:54 +02:00
Hans-Christoph Steiner
e1a6c931c6 make sure uninstall process has an Apk instance
If a user clicks install, then uninstall on AppDetails, then there was not
yet a chance to refresh the App instance, and therefore app.installedApk
will still be null.  This is really just a workaround for now, because
AppDetails needs a full refactoring.
2016-10-06 21:06:54 +02:00
Hans-Christoph Steiner
b8162a1a91 InstallManagerService.cancel() to handle all cancellation
Now that there are also OBB downloads, there needs to be a central cancel
method provided by InstallManagerService.
2016-10-06 21:06:54 +02:00
Hans-Christoph Steiner
8affa08d11 auto-download and -install any associated OBB files
This implements the APK Extension Files spec for finding, downloading, and
installing OBB files that are extension packs for APKs.

This needs WRITE_EXTERNAL_STORAGE since "installing" OBB files is just
copying them to a specific path on the external storage.

https://developer.android.com/google/play/expansion-files.html
2016-10-06 19:12:01 +02:00
Hans-Christoph Steiner
4c4aef5314 refactor into reusable static method for checking file hashes
This takes the APK file hash checker and turns it into a generic static
utility method for checking that a given file matches a given hash.  This
will be needed as F-Droid handles other file types, like OBB and media.
2016-10-06 18:00:25 +02:00
Hans-Christoph Steiner
a5e6dad9bf allow apps to request OBB download URLs from F-Droid
By sending an Intent to F-Droid, it will reply with the full download URL
to the OBB file, if one exists for the currently installed version of the
requesting app.
2016-10-06 18:00:25 +02:00
Hans-Christoph Steiner
bbac03b4d1 use ApkTable column names when parsing XML
This makes it easier to track the relationship between the index XML and
the database tables where that data is ultimately stored and used. There
are a few mismatches between the XML tag and database column names, so
those are just marked with a comment.

This makes it much easier to find all the spots in the code that need
changing when adding new columns/data to the APK table, like the OBB stuff.
In Android Studio, just Ctrl-Click on any table constant definition, and
then it lists all the places its used.  Any new data will need to be added
in all of those locations.
2016-10-06 18:00:25 +02:00
Hans-Christoph Steiner
cd9582c990 support "APK Extension" files aka .obb for large apps and games
OBB files are used in apps that need more than 100 megs to work well.  This
is apps like MAPS.ME or games that put map info, media, etc. into the OBB
file.  Also, OBB files provide a mechanism to deliver large data blobs that
do not need to be part of the APK.  For example, a game's assets do not
need to change often, so they can be shipped as an OBB, then APK updates do
not need to include all those assets for each update.

https://developer.android.com/google/play/expansion-files.html
2016-10-06 18:00:25 +02:00
Hans-Christoph Steiner
6eeaf8662a Merge branch 'fix-511--database-package-table' into 'master'
Properly support multiple repositories with the same app

Fixes #511.

Provides proper support for multiple repos in the database + updater (despite not being able to reorder them in the UI yet).

# Info

Previously, each app had only one row in the app table. This caused problems when its metadata was updated, because it would get overriden if two repositories provided the same app. This change:
 * Creates a new `package` table which acts as the table that includes one row for each app (like the `app` table did previously)
 * Re-purposes the existing `app` table as an `app_metadata` table, where each package can have multiple rows (one for each repository that provides that package)

This results in some queries which are slightly more complex, but the overall performance should not change too much. In the long term, it should have a net positive impact on performance, because we no longer need to join between tables based on a package name. Now we almost exclusively use integer IDs to join between tables. There are also appropriate indexes which make the queries avoid full table scans in all cases I'm aware of.

I realise this is a big MR, but it is as small as I could make it without submitting half finished stuff which breaks `master`. I've done my best to merge smaller MRs before hand, but I was unable to identify anything else to pull out of this MR as a separate thing.

## Migration

All app/apk metadata is dropped, and then the repos are asked to update themselves again next time F-Droid starts.

Additionally, existing repositories have their `priority` changed to something more meaningful. On current master, if you add two custom repositories in addition to the four default ones, you will get the following:

|rowid|address|priority|
|---------|-------|-------|
|1|https://f-droid.org/repo|10|
|2|https://f-droid.org/archive|20|
|3|https://guardianproject.info/fdroid/repo|10|
|4|https://guardianproject.info/fdroid/archive|20|
|5|http://10.0.0.6:8888/normal-repo/repo|10|
|6|http://10.0.0.6:8888/conflicting-repo/repo|10|

Note how the priority defaults to 10 for each additional repository which is added. This MR should change the priorities so they look like so:

|rowid|address|priority|
|-------|-------|--------|
|1|https://f-droid.org/repo|1|
|2|https://f-droid.org/archive|2|
|3|https://guardianproject.info/fdroid/repo|3|
|4|https://guardianproject.info/fdroid/archive|4|
|5|http://10.0.0.6:8888/normal-repo/repo|5|
|6|http://10.0.0.6:8888/conflicting-repo/repo|6|

Here is a snipped from the logcat from `DBHelper` during the migration:

```
Setting priority of repo https://f-droid.org/repo to 1
Setting priority of repo https://f-droid.org/archive to 2
Setting priority of repo https://guardianproject.info/fdroid/repo to 3
Setting priority of repo https://guardianproject.info/fdroid/archive to 4
Setting priority of repo http://10.0.0.6:8888/normal-repo/repo to 5
Setting priority of repo http://10.0.0.6:8888/conflicting-repo/repo to 6
```

All newly added repositories on this branch will get the next highest available priority.

# Future work

One thing which is not yet supported fully: Suggested version code.

Two repositories can end up with the same exact .apk file. If that .apk is the "suggested version", then we should eliminate the idea of "suggested version code" and instead have a "suggested apk" (which implicitly includes the repository it comes from, so we choose the one with the better priority). Right now, we kind of assume that it doesn't matter which repo provides the suggested apk, as long as one of them has an .apk with th ecorect version code and signing key.

I guess it doesn't _particularly_ matter from a security perspective, because a malicious repo wont be able to trick a user into installing an apk with a different signing key, but it would be good to iron this out.


See merge request !375
2016-10-05 20:05:07 +00:00
Daniel Martí
a118cf13f0 Merge branch 'clarify-teminology-and-cleanup' into 'master'
Clarify teminology (around providers) and misc cleanup

I extracted all of what I consider cosmetic changes from !375 into this changeset. There should be no behaviour change, except for:
 * Bug fix in `DBHelper`
 * Different handling of priorities for newly created repos

Everything else if method renames or other misc cleanups.

After this, I'll pull out a different set of changes from !375 and then rebase it on this again.

See merge request !400
2016-10-05 16:09:56 +00:00
Peter Serwylo
e0a1d2384d Appease checkstyle + pmd 2016-10-06 03:03:02 +11:00
Peter Serwylo
d062af0975 Clarify that sometimes we don't know which repos apk we are asking for.
Many times in the past, we would ask for an apk based on its package name
and its version code. However multiple repositories provide apks with the
same package name and version code, and such queries would (seemingly)
nondeterministically choose one of these matching apks. This clarifies the
wording in the code around when we explicitly ask for a given apk, and
when we kind of guess which one we want.

Most the time we have an `App` handy, which has a specific repo associated
with it. This allows us to be more specific about requesting `Apk`s.

The times we are kind of guessing is when we rely on the "suggested version
code" of an apk by clicking the misc "Install" or "Upgrade" button in
app details. In the future, we'll need to clear this up so that a more
specific apk is chosen when touching these buttons.
2016-10-06 03:03:02 +11:00
Peter Serwylo
3a24d21f59 WIP: Making correct apks get found when updating repo. 2016-10-06 03:03:02 +11:00
Peter Serwylo
2cc155355b Moved regression test to appropriate package. 2016-10-06 03:03:02 +11:00
Peter Serwylo
ab02058ece Precalculate the preferred metadata, rather than always at runtime
The  query which dynamically figured out the preferred metadata based on
repo priority ended up being quite slow (although it did work). On lower
end devices, it has the potential to make F-Droid quite sluggish. By
optimistically precalculating the preferred metadata where possible, we
don't need to ask the question during the usual usage of F-Droid, only
when:
 * Repo priorities are changed (there is not currently a UI for this, but
  there are tests)
 * Repos are enabled/disabled
 * Repo updates are performed
2016-10-06 03:03:02 +11:00
Peter Serwylo
01b8f7f4bf Clarify some of the database stuff around database providers.
Includes:
 * One of the functions querying for apps did not correctly specify
   the repository the repos came from.
 * Fix deletion code which refered to incorrect field.
 * Cleanup code style in some places.
2016-10-06 03:03:02 +11:00
Peter Serwylo
f2a58ad67f Update priorities for default repos to go from 1-4 instead of 10 + 20 2016-10-06 03:03:02 +11:00
Peter Serwylo
c08a2a7bdc Cleaning up/commenting AppProvider 2016-10-06 03:03:02 +11:00
Peter Serwylo
efdf328fd3 Clarify a limitation in the current implementation
Two repositories can (and always could) end up with the same exact .apk file.
If that .apk is the "suggested version", then we should eliminate the idea of
"suggested version code" and instead have a "suggested apk" (which implicitly
includes the repository it comes from, so we choose the one with the better
priority). Right now, we kind of assume that it doesn't matter which repo
provides the suggested apk, as long as one of them has an .apk with the correct
version code and signing key.

It shouldn't _particularly_ matter from a security perspective, because
a malicious repo wont be able to trick a user into installing an apk with a
different signing key, but it would be good to iron this out.

This commit adds a TODO explaining this for th ebenefit of any CRer.
2016-10-06 03:03:02 +11:00
Peter Serwylo
3ec64d6d82 Finalise tests for repo priorities + app metadata 2016-10-06 03:03:02 +11:00
Peter Serwylo
1d1c1ebb74 Add test for repo priorities + app metadata. Not passing yet. 2016-10-06 03:03:02 +11:00
Peter Serwylo
e25d26aca0 Moved tests into updater package, updated multiRepo.*.jar repos.
The tests are in the .updater packate to make them easier to run as
a suite in Android Studio. Now the package can be right clicked and
ran to run all the tests to do with updating.

The index jar files were updated so as to include info in most
metadata fields (e.g. URLs/descriptions/summary/etc) to show that
that particular part of metadata came from a specific repo. This
will allow more specific tests to show that we can indeed query for
an app with metadata provided by the repo with the highest priority.
2016-10-06 03:03:02 +11:00
Peter Serwylo
6d2fdb2843 Enable multirepo tests, make them pass.
Tests were failing because the repository of existing and new apks were not
considered when deciding whether to update or insert them.
2016-10-06 03:02:58 +11:00
Peter Serwylo
8ed884887a WIP: Making metadata table work. Requires significant refactorings throughout :( 2016-10-06 03:01:07 +11:00
Peter Serwylo
44a82c4af7 Migrate priorities safely. 2016-10-06 02:50:22 +11:00
Peter Serwylo
5efa53b466 Added package table.
Required for future work which will be better able to deal with multiple repos
providing the same app.
Instead of migrating data into that table, we will drop and recreate the tables.
This is because before this feature is out, we'll need to do that anyway.
2016-10-06 02:06:51 +11:00
Peter Serwylo
88c536efb4 Fix incorrect version check in db helper. 2016-10-05 23:54:28 +11:00
Peter Serwylo
486e8e699f Cleanup DBHelper in prep for package table in the future. 2016-10-05 23:54:28 +11:00
Peter Serwylo
45f9379fee Added helper function for debugging SQL queries during development
It is often helpful during debugging to be able to dump the contents
of an SQL result `Cursor` to the debug watch list. This is difficult
to do under normal circumstances. This adds a utility method really
only designed to be used during interactive debugging, which will do
its best to build a `Map` for each row in the `Cursor`. This can then
be used to test queries while the debugger is paused.
2016-10-05 23:54:28 +11:00
Peter Serwylo
97cf69341a When inserting a new repo, assign the priority appropriately.
Even though this is not used yet, it will be a requirement in the
near future for the `RepoProvider` to be the one who decides what
the priority of new repositories is. This will prevent clients of
this provider from specifying wrong priorities that result in gaps
For example, if we accidentally ended up with  priorities of
1, 2, 4, and then 5, this would cause problems if the user tried to
drag the second repo to the position of the 4th repo. It is easier
to do these priority shuffles if we can assume that the priorities
are contiguous.
2016-10-05 23:54:28 +11:00
Peter Serwylo
6c462713aa Renamed generic sounding methods to be more specific.
Originally, I hoped that the arguments a method took would help enough
to differentiate the intent of that method. This was the case for methods
such as `getContentUri()` and `find()`. However they are a little confusing
to work with, so this change renames a bunch of methods to be more specific.
In addition, it makes some renames from app -> package which will help with
the upcoming change to add a `package` table to the database.
2016-10-05 23:54:25 +11:00
F-Droid Translatebot
c8182d9c01 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz    Catalan
Ajeje Brazorf            Sardinian
Alberto Moshpirit        Spanish
Koen Glotzbach           Dutch
Licaon Kter              Romanian
Marcelo Santana          Portuguese (Brazil)
naofum                   Japanese
Nathan Follens           Dutch
Nutchanon Wetchasit      Thai
Osoitz                   Basque
Sérgio Marques           Portuguese (Portugal)
Sveinn í Felli           Icelandic
Sylvia van Os            Dutch
Verdulo                  Esperanto
Verdulo                  Polish
YFdyh000                 Simplified Chinese
2016-10-03 10:10:14 +01:00
Peter Serwylo
d35c84b2e1 Merge branch 'install-history' into 'master'
optionally keep install history

This adds the functionality for keeping the install/uninstall history along with a preference to enable it as a custom build option for allowing another app to read it.  Keeping the history has many uses, including:

* "popularity contest"
* displaying install history locally in F-Droid
* reporting to IT device manager for tracking activity for malware, etc.

This is ready to be merged, but it is based on !386, so its marked WIP.

@dschuermann this touches some of your architecture, please review :)

See merge request !392
2016-09-30 01:42:10 +00:00
Hans-Christoph Steiner
372b28a71a Installer methods no longer need to accept Apk as an argument
Since e69a6d5a8f24e7745516001f58bee49e05f2ea9e, the Apk instance is
provided in the constructor and is available as a final instance variable.
No need to pass it around.  Thanks to @pserwylo for spotting this.
2016-09-29 13:58:33 +02:00
Hans-Christoph Steiner
79df0a1f9b show complete link command in debug logging
Its helpful when debugging if the complete command is printed,
without omitting the last element.
2016-09-29 12:09:50 +02:00
Hans-Christoph Steiner
d2291b2134 send Installer.ACTION_INSTALL_STARTED consistently
ACTION_INSTALL_STARTED was being sent twice per transaction with the
default installer. Also, it should be sent as the first step of the install
process.
2016-09-29 12:09:50 +02:00
Hans-Christoph Steiner
a08a32020a add preference to control storing install history
For now, this is disabled by default and hidden in the expert preferences
since it doesn't do anything yet inside of F-Droid.  It is useful now for
whitelabel builds to fetch the install history from another app. #396
2016-09-29 12:09:50 +02:00
Hans-Christoph Steiner
f102ccff60 allow install history to be read from an ContentProvider
This allows a designated app to read the install history from F-Droid via a
ContentProvider.  The app is designated by the packageName defined in the
string install_history_reader_packageName.
2016-09-29 12:09:50 +02:00
Hans-Christoph Steiner
c02125db01 store install/uninstall history for later use
The install and uninstall history has lots of uses, including displaying
to the user in the app itself, reporting to the Device Administrator to
enable tracking of installs/uninstalls from the admin's app repo, etc.  It
can also be used as part of a "popularity contest" #396
2016-09-29 12:09:50 +02:00
Hans-Christoph Steiner
cb4edbed44 if updating notification, also try getting app name from DB
Now that the packageName is included in the Installer broadcast Intents,
it can be used to fetch the app name from the database, if all other ways
fail.
2016-09-29 12:09:50 +02:00
Hans-Christoph Steiner
e69a6d5a8f store Apk instance in Installer instance for fetching state
If F-Droid or InstallManagerService get killed while an install is in
progress, that install will ultimately broadcast back to
InstallManagerService to manage the notifications.  The state is gone
since things have been killed, so include the Apk instance in the
Intent that is included in the broadcasts so that
InstallManagerService can fetch all required info from the database.

closes #698
2016-09-29 10:59:16 +02:00
Hans-Christoph Steiner
fc5c41036d Merge branch 'gradle-updates' into 'master'
Gradle updates



See merge request !399
2016-09-29 08:46:16 +00:00
Daniel Martí
723be967ca Merge branch 'push-install-uninstall-requetss' into 'master'
Push requests for install/uninstall

This is the first basic implementation of the idea of "push requests" from the server.  This implements two requests that the server can ask of all clients: `install` and `uninstall`.  A default repository in the client can be marked to `ignore` or `always` accept push requests in this merge request.  There is also the sketch of a third option called `prompt` which gives the user the standard "Just Once/Always" choice; that is not yet implemented.

This allows central management of app installs/uninstalls for a pool of devices, as well as other ideas.

A use case for this feature is documented here:
https://f-droid.org/wiki/page/Whitelabel_Builds

See merge request !386
2016-09-28 22:40:07 +00:00
Hans-Christoph Steiner
b90cf7386c prevent crashing if push requests include bad packageNames
F-Droid shouldn't crash if a push request includes a bad package name. This
just makes it silently ignore those push requests.  If its a debug build,
it will send a message to logcat.  I'm not sure this is best way to handle
this, but this is better than crashing the app.  This will make it harder
for repo operators to debug issues with push requests.
2016-09-28 23:36:11 +02:00
Hans-Christoph Steiner
5c9dd1a11e basic support for repo push requests, configed in default_repos
This allows whitelabel versions of apps to specify built-in app repos that
have push requests accepted by default.  This is useful for the case where
there is a central manager of the core apps that are installed.

https://gitlab.com/fdroid/fdroidserver/issues/177
2016-09-28 23:36:11 +02:00
Daniel Martí
6c0a72369c gradle: bump version in wrapper to 3.1
Also re-run `gradle wrapper` from 3.1 to update the scripts and jar.
2016-09-28 22:15:00 +01:00
Daniel Martí
36378acc7b gradle: bump plugin version to 2.2.0
Also update the dependency declarations since the current ones break
with the new plugin/gradle version.

https://stackoverflow.com/questions/39602587/could-not-get-unknown-property-assemblerelease-for-project
2016-09-28 21:58:27 +01:00
Hans-Christoph Steiner
d34a1285e8 convert default_repo.xml to more flexible format
This is a step towards supporting easy whitelabeling, using gradle flavors.
This allows the whitelabel version to set the default repos just by making
their own default_repos.xml in app/src/whitelabel/res/values.  That one
will then override the built-in F-Droid one.
2016-09-28 22:07:34 +02:00
Hans-Christoph Steiner
28198dddb4 rename default_repo.xml to default_repos.xml, there are many
Just to make it clear that there can be and are multiple repos configured
in the file.
2016-09-28 22:07:34 +02:00
Daniel Martí
ae78042bda Bump versionCode to 0.102-alpha0
This enables upgrading from 0.101 to master until alpha1 is out.
2016-09-28 20:44:26 +01:00
Daniel Martí
85a8a7d743 Sync changelog with 0.101, add 0.102 2016-09-28 20:42:56 +01:00
Daniel Martí
ba8c39d3a9 Merge branch 'include-crash-in-acra-subject' into 'master'
Include crash in ACRA subject

This makes it so the first chunk of the crash is put in email subject.  This also lays the foundation for other ACRA customizations.

This is ready to be merged, but it is based on !386, so its marked WIP.

See merge request !391
2016-09-28 14:34:56 +00:00
Hans-Christoph Steiner
9848db7680 move CrashReportActivity into new .acra package
This isolates all the ACRA stuff in its own package.
2016-09-28 14:23:34 +02:00
Hans-Christoph Steiner
f24c5b6ac7 custom ACRA sender to put stacktrace title in email Subject:
This should hopefully make it easier to sort through the emails.
2016-09-28 14:23:34 +02:00
Daniel Martí
a5746c03f3 Merge branch 'tls-1.2-support' into 'master'
TLS 1.2 support

At long last, there is a tested version of NetCipher that supports SNI.  This uses that release to enable good TLS support and Tor for all repos.  This moves the HTTP tests to the emulator, so that things are tested on the actual OS.

See merge request !398
2016-09-28 12:00:51 +00:00
Hans-Christoph Steiner
4c7322d917 throw in extra test URLs for HttpDownloaderTest
These are commented out so that the tests aren't brittle when they run on
the CI builds.  But are easy to uncomment when testing locally.
2016-09-28 11:35:57 +02:00
Hans-Christoph Steiner
4598a78bfd support TLS 1.2 on all repos
Update to the latest NetCipher, which now fully supports SNI, in order to
support TLS 1.2 on all supported platform levels.  Without this, a repo
that is TLS 1.2 only will be unusable on all but the most recent versions
of Android.

#431
2016-09-28 11:35:57 +02:00
Hans-Christoph Steiner
bad613fbc1 move HttpDownloaderTest to emulator, AndroidOS has oddities
There are oddities with the way that Android has implemented the network
stack, as compared to OpenJDK or Oracle JDK.  So running the tests on the
local JVM, i.e. Robolectric, will not provide good test coverage for real
world use cases.
2016-09-28 11:35:57 +02:00
Hans-Christoph Steiner
0433f0eba5 update changelog for 0.101 2016-09-28 11:34:24 +02:00
Hans-Christoph Steiner
2773db8304 Merge branch 'latest-support' into 'master'
update to latest support lib bugfix version: v24.2.1

include the bugfix version of the support libs we are using since this is the last test before a stable release.

See merge request !397
2016-09-28 09:23:12 +00:00
Hans-Christoph Steiner
dd134c50bc update to latest support lib bugfix version: v24.2.1 2016-09-27 22:59:17 +02:00
Hans-Christoph Steiner
5e549193f1 gitlab-ci: ensure the SDK is fully updated before running
This makes sure that the latest version of the core SDK components are
all current before running, which means that the builds will keep
working even when the docker image gets out of date. Then we can
finish the task we are working on before having to deal with updating
the docker image. Without that update line, we have to drop everything
and update the docker image when things are out of date.

Disk space and bandwidth is cheap, developer time is very scarce. We
should aim to keep the tests working as much as possible so that we
waste less developer time. Updating everytime only means it downloads
a little bit of XML each time, that's nothing compared to what gradle
downloads on every build.
2016-09-27 22:59:17 +02:00
Hans-Christoph Steiner
f0d9675b55 gitlab-ci: use before and after script for reused chunks
It also reduces redundancy by using before_script and after_script blocks.
2016-09-27 16:19:45 +02:00
Hans-Christoph Steiner
a3b6185942 gitlab-ci: reduce connected10 from error to warning
connected10 is still flaky since the emulator crashes a lot.  Marking it
for "allow_failure" will still show a warning, but it won't fail the build.
2016-09-27 14:28:12 +02:00
Daniel Martí
3aad107b51 Add Icelandic to the list of languages
Added to weblate in the last commit.
2016-09-27 13:15:03 +01:00
F-Droid Translatebot
a29d2eb4f9 Pull translation updates from Weblate
Translators:

Ajeje Brazorf       Sardinian
Enol P              Asturian
Marian Hanzel       Slovak
Michael Moroni      Italian
Mladen Pejaković    Serbian
Sérgio Marques      Portuguese (Portugal)
Sveinn í Felli      Icelandic
Дмитрий Михирев     Russian
2016-09-27 13:11:44 +01:00
Hans-Christoph Steiner
ab7602c407 Merge branch 'fix-763--multi-repo-brokenness' into 'master'
Fix 763  multi repo brokenness

I've put a comment [here](https://gitlab.com/fdroid/fdroidclient/issues/763#note_15032709) explaining the problem.

This includes (in order of commits):
* A test case to reproduce (see my comment [here](https://gitlab.com/fdroid/fdroidclient/issues/763#note_15954822) about whether I should rename this)
* A brittle fix
* A more robust fix

See merge request !394
2016-09-27 10:20:15 +00:00
Hans-Christoph Steiner
e18164acbb Merge branch 'patch-1' into 'master'
Fixed link to privileged extension



See merge request !396
2016-09-27 07:23:11 +00:00
Felix Ableitner
8cd48bcbc4 Fixed link to privileged extension 2016-09-27 04:17:54 +00:00
Peter Serwylo
1678223cab More robust fix for #763, specifying column names to copy explicitly.
This is far less brittle at runtime, but slightly more work at dev time.
The following things are undesirable but make it much easier to write:
 * Use of `CREATE_TABLE_APP.replaceFirst(...)` to create the temp tables.
 * Having to specify a list fo columns twice in `Schema` (`ALL_COLS` + `COLS`).

The `replaceFirst` means we don't need to maintain two separate create table
statements. It is a little messy because there is no compile time guarantee
that we are creating a valid SQL statement at the end, just our knowledge
that a create table statment tends to have the table name first and it
probably wont cause problems.

The `ALL_COLS` + `COLS` is required so that we don't have to type out a list
of fields when copying data in `TempAppProvider`. Otherwise, whenever a new
column is added, developers would need to know that it also needs to be added
to this third place. Currently it is in the `Schema` and the `CREATE_TABLE_*`
statements where one needs to add a new column. These are both intuitive and
hopefully easily discoverable. Having to add it to the `TempAppProvider` is
less intuitive and likely to result in bugs.
2016-09-24 08:52:15 +10:00
Peter Serwylo
1ba6034e19 Fixed issue #763 by being more specific when creating temp table for update.
When performing the old style `CREATE TABLE ... AS SELECT ...` (CTAS) statement,
no indexes are added. In addition, rowid is not added. Even if manually
specifying an autoincrement column in the original schema, this autoincrement
column does not get recreated with the CTAS statement. So instead, this change
reuses the original `CREATE TABLE` statement which explicitly defines all of the
relevant columns. In addition, it explicitly adds an autoincrement integer primary
key. This has the same semantics as the existing implicit `rowid` column that
sqlite creates. From from https://sqlite.org/autoinc.html:

> In SQLite, a column with type INTEGER PRIMARY KEY is an alias for the ROWID
> (except in WITHOUT ROWID tables) which is always a 64-bit signed integer.

However, as it is explicit now, is copied when doing the
`INSERT INTO ... SELECT ...` statement to get data from the real table to the
temp table in preperation for updates (and back again after the update has
populated the temp table).

Note that this makes the `INSERT INTO ... SELECT ...` statements slightly more
brittle, because now we need the table definition used to create the temp table
(from `DBHelper.CREATE_APP_TABLE`) to have the same column order as those in the
real `fdroid_app` table. While this may sound like a silly comment to make, it
is important because database migrations can result in a database having the
correct set of columns, but in a different order to how they were specified
in the original create table statement.

If a database migration performs an `ALTER TABLE ... ADD COLUMN ...` the column
will be added at the end. If at the same time the `CREATE TABLE` is changed so
that the new column is specified as the second to last column in the list of
columns, then the `INSERT INTO ... SELECT ...` will not work as expected.
2016-09-24 08:52:15 +10:00
Peter Serwylo
9b13d98943 Use database constant instead of hard coded string literal 2016-09-24 08:52:15 +10:00
Peter Serwylo
cff209cd44 Replicated issue #763 in a test case 2016-09-24 08:52:12 +10:00
Daniel Martí
b5b5dd4ede Merge branch 'fix-android-10' into 'master'
fix emulator tests on android-10

We have to work harder to get writeable dirs in the android-10 emulator, that seems to be the old issue on android-10.

See merge request !390
2016-09-20 15:26:47 +00:00
Hans-Christoph Steiner
ecd98047da fix emulator tests on android-10, closes #769
We have to work harder to get writeable dirs in the android-10 emulator.
2016-09-19 14:56:07 +02:00
Daniel Martí
481468372e Merge branch 'master' into 'master'
Remove any whitespace from fingerprint EditText input so that copy pasting is easier for users.

Hey,

I just added a line to remove the whitespace from fingerprints when adding a new Repo. Some repositories like https://microg.org have their fingerprint separated with spaces so copy pasting directly from there is more cumbersome if fdroid doesn't remove the whitespace by itself.

Hope it's ok. :)

See merge request !389
2016-09-18 19:21:57 +00:00
uberspot
360f365227 Remove any whitespace from fingerprint EditText input so that copy pasting is easier for users. 2016-09-18 20:58:46 +02:00
Daniel Martí
fdc70b0f9d Bump build-tools and docker image version
The latter is simply to include the newer version.
2016-09-10 12:02:12 +02:00
Daniel Martí
012fe5e224 Add new Burmese/Myanmar language to the list
Rendering this on my computer is a pain, so patches welcome if I screwed
up the unicode since all I can see is squares.
2016-09-10 11:59:24 +02:00
F-Droid Translatebot
c4a3b579c4 Pull translation updates from Weblate
Translators:

Agus                      Galician
Ajeje Brazorf             Sardinian
Alberto Moshpirit         Spanish
El Virolo                 French
Koen Glotzbach            Dutch
Licaon Kter               Romanian
Michael                   German
Mohamad Hasan Al Banna    Indonesian
naofum                    Japanese
Olexandr Nesterenko       Ukrainian
Osoitz                    Basque
Pyae Sone                 Burmese
Verdulo                   Esperanto
Verdulo                   Polish
YFdyh000                  Simplified Chinese
2016-09-10 11:46:35 +02:00
Hans-Christoph Steiner
3657cf3256 Merge branch 'fix-ish-698' into 'master'
handle install broadcasts after InstallManagerService was killed

If InstallManagerService was killed, it'll forget all of its state.  If it is killed while an install process is running, and that install fails,
InstallManagerService will receive a broadcast about the error but then it can't find anything about the app in question besides its download URL.
That is enough to control the notification, but not enough to get the name of the app in question.  This is a workaround by showing the APK filename when the app name cannot be found. Ideally, the packageName would somehow magically be delivered to InstallManagerService in this case, but the
Installer stuff doesn't always have it to send.

With android-23, there is getActiveNotifications(), which we might be able to use to stash the packageName and fetch it as needed.

See merge request !387
2016-09-07 12:16:56 +00:00
F-Droid Translatebot
49db1a78d7 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz    Catalan
Ajeje Brazorf            Sardinian
Christophe CHAUVET       French
Enol P                   Asturian
Laura Arjona Reina       Spanish
Licaon Kter              Romanian
Michael                  German
Mladen Pejaković         Serbian
naofum                   Japanese
Osoitz                   Basque
Swyter                   Spanish
Sylvia van Os            Dutch
Tobias Bannert           German
Verdulo                  Esperanto
Verdulo                  Polish
Viktor Alojzije Coric    Croatian
Waqar Ahmed              Urdu
YFdyh000                 Simplified Chinese
2016-09-02 09:31:53 +09:00
Hans-Christoph Steiner
973174cc7b privileged mode means auto-downloads are actually installs
When the Privileged Extension is working, then enabling the preference
"Automatically download updates" will actually install those updates in the
background.  So the preference should communicate that to the user. So now
it serves as a global "allow background updates"

#16
closes #106
2016-09-01 17:49:52 +02:00
Hans-Christoph Steiner
530144bec6 don't show notification if the app name is unknown #720
This gets rid of the notifications that say "Tap to Install Unknown", and
instead just cancels the notification.  The downloaded APK will still be
cached, so when the user goes to click install or update again, it won't
need to download it again.

closes #758
2016-09-01 15:59:51 +02:00
Hans-Christoph Steiner
c9a6cc3051 handle install broadcasts after InstallManagerService was killed
If InstallManagerService was killed, it'll forget all of its state.  If it
is killed while an install process is running, and that install fails,
InstallManagerService will receive a broadcast about the error but then it
can't find anything about the app in question besides its download URL.
That is enough to control the notification, but not enough to get the name
of the app in question.  This is a workaround by showing the APK filename
when the app name cannot be found. Ideally, the packageName would somehow
magically be delivered to InstallManagerService in this case, but the
Installer stuff doesn't always have it to send.

With android-23, there is getActiveNotifications(), which we might be able
to use to stash the packageName and fetch it as needed.
2016-08-31 23:28:50 +02:00
Hans-Christoph Steiner
3aa58bc005 Merge branch 'add-option-to-hide-anti-feature-apps' into 'master'
Add option to hide anti feature apps

Added option under Setting to grey out apps requiring anti-features similar to ignoring rooted apps on a non-rooted device.

See merge request !384
2016-08-30 15:54:44 +00:00
Aditya Bharadwaj
5d58fc0199 Fix PMD issue. 2016-08-26 22:29:50 -04:00
Aditya Bharadwaj
632eeff611 Update naming convention as per review. Add antifeatures list length check to filter anti-feature apps. 2016-08-26 21:48:53 -04:00
Aditya Bharadwaj
1e95f57ef8 Fix checkstyle issue. 2016-08-26 21:48:53 -04:00
Aditya Bharadwaj
1f354a1b3f Add option to grey out apps requiring anti-features. 2016-08-26 21:48:53 -04:00
Daniel Martí
fde227e889 Bump to 0.101-alpha6 2016-08-27 08:37:34 +09:00
F-Droid Translatebot
b30a188498 Pull translation updates from Weblate
Translators:

Ajeje Brazorf    Sardinian
John Doe         Turkish
Nathan Follens   Dutch
2016-08-27 08:33:16 +09:00
Daniel Martí
1599b3c1ae Merge branch 'bugfix-for-699' into 'master'
final fixes for 0.101

I think we can release 0.101 after this bug fix for #699 and support update.  What do you think @mvdan @pserwylo @dschuermann ?

See merge request !385
2016-08-26 22:21:39 +00:00
Hans-Christoph Steiner
45b083546f get ACRA reports without crashing to debug #698
This should be reverted once #698 is fixed.  If execution has gotten this
far into InstallManagerService, there should always be App and Apk
instances.  That is enforced when Intents are received by this Service.
2016-08-26 11:55:14 +02:00
Hans-Christoph Steiner
b45f7ba27c remove confusing messages when Privileged Extension not installed
This was saying that the Privileged Extension is enabled but not properly
configured.  This is because the preference logic changed to default to on
unless the user explicitly disabled it.  So using the Privileged
Extension based on whether its installed and whether the user has disabled
it.

related to ea0700d406101b7ed6907b1dbd2918dbc214f435
2016-08-26 10:50:43 +02:00
Hans-Christoph Steiner
0577ecfc53 update support libs to latest (24.2.0) to hopefully fix crashes
Based on ACRA reports, there are some mystery UI related stacktraces that
do not have org.fdroid.fdroid lines in them.
2016-08-26 10:47:46 +02:00
Hans-Christoph Steiner
691545f065 use gradle-witness for all included libs
use the automatic method for generating the gradle-witness block so its
easy to keep it updated.
2016-08-26 10:47:46 +02:00
Hans-Christoph Steiner
3adfbc66aa sort gradle-witness lines so its easy to see changes 2016-08-26 10:42:39 +02:00
Hans-Christoph Steiner
53cbb26209 check whether installed APKs exist and are readable before hashing
I guess APKs could disappear, or perhaps not be readable.

closes #699

Here's the stacktrace:

java.io.FileNotFoundException:
 /system/priv-app/ATT_Ready2Go/ATT_Ready2Go.apk: open failed: ENOENT (No such file or directory)
 at org.fdroid.fdroid.Utils.getBinaryHash(Utils.java:405)
 at org.fdroid.fdroid.data.InstalledAppProviderService.onHandleIntent(InstalledAppProviderService.java:164)
 at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
 at android.os.Handler.dispatchMessage(Handler.java:102)
 at android.os.Looper.loop(Looper.java:135)
 at android.os.HandlerThread.run(HandlerThread.java:61)
2016-08-23 22:56:31 +02:00
Daniel Martí
fa112ed303 Merge branch 'enable-priv-ext-by-default' into 'master'
use Privileged Extension by default, when installed

Now that the 0.2 release of Privileged Extension is tagged, it is starting to be integrated into ROMS, and is easy to flash to ROMed devices, it is time to make F-Droid use the Privileged Extension by default, if it is installed.

See merge request !382
2016-08-23 07:55:20 +00:00
Hans-Christoph Steiner
3f53d1bad8 update changelog
closes #752
2016-08-22 22:17:38 +02:00
Hans-Christoph Steiner
ea0700d406 use Privileged Extension by default when it is installed
This totally changed the logic of the "Use Privileged Extension" preference
making it based on whether the Privileged Extension is installed and usable
rather than storing the user's selection.  This code now only stores when
the user manually disables using the Privileged Extension even when it is
installed.

closes #729
2016-08-22 22:16:32 +02:00
Hans-Christoph Steiner
91cac9fed4 only show "install Priv Ext" in Prefs when its supported
The root install method that is available via the "Expert" preferences does
not work on newer than android-19.  So when that's the case, this hides
that item from the preferences screen entirely.
2016-08-22 22:16:32 +02:00
Hans-Christoph Steiner
aa848b2617 gitlab-ci: require emulator tests pass on android-24 2016-08-22 21:38:01 +02:00
Hans-Christoph Steiner
a1ae08cd1e fix bug in cache cleanup on 21+ introduced in cbd6da5
!379 was merged without the emulator tests passing.  This fixes that.
2016-08-22 21:38:01 +02:00
Daniel Martí
9e10d46449 Merge branch 'gradle-bumps' into 'master'
Gradle version bumps

@eighthave I cannot reenable connected24 as it seems like a cache test is reliably failing there.

See merge request !381
2016-08-22 09:25:37 +00:00
Daniel Martí
a9944f7a22 Bump robolectric to 3.1.2 2016-08-21 11:07:47 +02:00
Daniel Martí
cbccb910a2 gradle: bump plugin and wrapper version
Since the new plugin requires 2.14.1 for security reasons.

Also re-run `gradle wrapper` to update the scripts and the jar.
2016-08-21 11:06:41 +02:00
Daniel Martí
5679880f88 CI: bump image 2016-08-21 11:02:21 +02:00
Daniel Martí
16170d6794 Bump to 0.101-alpha5 2016-08-20 19:07:25 +02:00
F-Droid Translatebot
6846d04751 Pull translation updates from Weblate
Translators:

Kristjan Räts    Estonian
Marko            Finnish
tacsipacsi       Hungarian
2016-08-20 19:06:28 +02:00
Daniel Martí
5a6aecad85 Merge branch 'fix-748--verify-error' into 'master'
Move code causing verify error into separate helper class

Fixes #748.

I'm not 100% sure on how the `@TargetApi` and `VerifyError` work
together. However it is something along the lines of:
 * Class loader needs `CleanCacheService`.
 * At this point, it loads the bytecode for that class and verifies
   that it all makes sense.
 * The bytecode within the method targeted at API 21 is not understood
   by earlier APIs, because the entire `Os` class was introduced in 21.
 * By putting it into a different class, that class is only loaded
   at runtime on devices with API of 21 or higher.

Previously, `@TargetApi` + the relevant guard condition to check
the build version at runtime suffices to prevent this. However it seems
that if the entire class does not even exist on earlier APIs, then it
is no longer good enough.

See merge request !379
2016-08-20 17:00:15 +00:00
Peter Serwylo
cbd6da5267 Move code causing verify error into separate helper class
I'm not 100% sure on how the `@TargetApi` and `VerifyError` work
together. However it is something along the lines of:
 * Class loader needs `CleanCacheService`.
 * At this point, it loads the bytecode for that class and verifies
   that it all makes sense.
 * The bytecode within the method targeted at API 21 is not understood
   by earlier APIs, because the entire `Os` class was introduced in 21.
 * By putting it into a different class, that class is only loaded
   at runtime on devices with API of 21 or higher.

Previously, `@TargetApi` + the relevant guard condition to check
the build version at runtime suffices to prevent this. However it seems
that if the entire class does not even exist on earlier APIs, then it
is no longer good enough.
2016-08-18 11:58:56 +10:00
Daniel Martí
252330fb86 Merge branch 'fix-739--empty-description' into 'master'
Ensure that description is not null when parsing index.

At time of writing (and for some time before), fdroidserver has forced
a description of "No description available" for apps which don't have
descriptions at all:

 * https://gitlab.com/fdroid/fdroidserver/blob/0.6.0/fdroidserver/metadata.py#L876

However, if the description is not set for whatever reason, it should not
crash the client.

Identified in the now closed #739.

See merge request !380
2016-08-17 16:29:21 +00:00
Peter Serwylo
b855c745e0 Ensure that description is not null when parsing index.
At time of writing (and for some time before), fdroidserver has forced
a description of "No description available" for apps which don't have
descriptions at all:

 * https://gitlab.com/fdroid/fdroidserver/blob/0.6.0/fdroidserver/metadata.py#L876

However, if the description is not set for whatever reason, it should not
crash the client.
2016-08-18 00:32:11 +10:00
Hans-Christoph Steiner
20a5f42359 Merge branch 'big-cache-update' into 'master'
Big cache update

So I messed up the caching a bit with my update in the past, so this is a big update to fix lots of bugs (hopefully) and add a couple of nice cache clean up features.  This should move us towards making F-Droid maintain itself more and more.  More comments in the commits.

See merge request !378
2016-08-16 17:02:45 +00:00
Hans-Christoph Steiner
4dc1415035 document processes in CleanCacheService
This breaks out each separate process into its own utility method, and adds
javadoc to describe them.
2016-08-16 16:50:04 +02:00
Hans-Christoph Steiner
0614213de0 delete cached icons that have not been accessed in over a year
The icon files are downloaded for each version of the app.  Over time, old
versions will pile up.  This cleans out the ones that have not been used in
over a year.

On < android-21, this will delete icons that were downloaded over a year
ago even if they are still in use because it is only possible to check
mtime, not atime.
2016-08-16 12:43:31 +02:00
Hans-Christoph Steiner
f6693ab1a1 avoid deleting cached files while they are being used
If CleanCacheService runs while an APK is being installed, it should not
delete the APK that is in the process of being installed.  This does that
by only deleting those files if they are older than an hour. Same goes for
the index files.

#738
2016-08-16 12:43:31 +02:00
Hans-Christoph Steiner
09829515e8 fix bug where files were never deleted from cache
It was passing the wrong time value in the recursion, which made for a
really old "olderThan" time.  This also then flipped the logic on the
next round through the recursion, causing files to be deleted even if
"Keep Cache Time" was set to "Forever".

closes #719
closes #736
2016-08-16 12:43:31 +02:00
Hans-Christoph Steiner
cbf5914460 if the "Keep Cache Time" pref changes, reschedule CleanCacheService
Before, CleanCacheService was only scheduled at app start for once a day.
If the user selects a time less than a day, then CleanCacheService should
run more frequently.

closes #719
2016-08-16 12:43:31 +02:00
Hans-Christoph Steiner
40541fadfe clearOldFiles() test must run on the emulator
It seems that Robolectric does not implement android.system.Os so the
atime checking code cannot be tested there.  Works fine on the emulator.
2016-08-16 12:43:31 +02:00
Hans-Christoph Steiner
c9e3643712 switch "Keep Cache Time" units to milliseconds
Both the Android task scheduler and the Java File operations want millis.
For "Forever", Long.MAX_VALUE is used.
2016-08-16 11:22:25 +02:00
Hans-Christoph Steiner
fc98820c93 move clearOldFiles() to CleanCacheService to be used on other files
Now that there is the ability to remove files based on last access time, it
makes sense to use this on all cached files, including icons, etc.
2016-08-16 11:22:25 +02:00
Hans-Christoph Steiner
28dfe970da use access time to remove old cache files >= android-21
In android-21, they exposed the formerly internal method for getting stat
structs of files.  From that, we can get the last access time, which is a
much better way to determine which files to delete rather than last
modified time.

closes #644
2016-08-16 00:03:11 +02:00
Hans-Christoph Steiner
6204a16024 set default for "keep cached apps"
There was no default set in the XML, so it just showed the default as blank

closes #719
2016-08-16 00:03:11 +02:00
Daniel Martí
cd465aae2b values-et: fix format errors from weblate 2016-08-15 16:49:16 +02:00
F-Droid Translatebot
b1df9bba01 Pull translation updates from Weblate
Translators:

Danial Behzadi    Persian
Kristjan Räts     Estonian
tacsipacsi        Hungarian
2016-08-15 16:46:12 +02:00
Peter Serwylo
943e0d0a1c Merge branch 'hash-fixes' into 'master'
Hash fixes

Two semi-related commits about hashes.  This standardizes all APK hashes to be all lowercase like in the _fdroidserver index.xml_.  The other then stops swallowing hash-related exceptions so we have a chance of debugging the issue.  @pserwylo we discussed a0f716c0db705f137749eef3d4964b8ba1050b18 in relation to #699.

See merge request !377
2016-08-12 22:40:11 +00:00
Hans-Christoph Steiner
4907e0b289 Utils.getBinaryHash() should not catch exceptions
By catching the exception here and returning null, the problem is then
passed on further down the line where it is harder to debug.  The hash is
required wherever this method is called, so this should fail immediately.

#699
2016-08-12 14:39:33 +02:00
Hans-Christoph Steiner
e77bde2cfa standardize on lowercase SHA-256 hashes
fdroidserver produces lowercase hashes, so its easiest to just mimic
that.  This makes hash comparisons easy.
2016-08-12 14:39:33 +02:00
Hans-Christoph Steiner
fdec402837 Merge branch 'apk-tests' into 'master'
ApkVerifier Tests

This are some tests for ApkVerifier. More will follow when we merge https://gitlab.com/fdroid/fdroidserver/merge_requests/150 and implement parsing of permissions with min and max sdk versions.

NOTE: This androidTest cannot run as a Robolectric test because the required methods from PackageManger are not included in Robolectric's Android API.

The corresponding exception by robolectric:
```
org.fdroid.fdroid.installer.ApkVerifierTest > testVerifier FAILED
00:31:18.241 [DEBUG] [TestEventLogger]     java.lang.NoClassDefFoundError: java/util/jar/StrictJarFile
00:31:18.241 [DEBUG] [TestEventLogger]         at java.lang.Class.getDeclaredMethods0(Native Method)
00:31:18.241 [DEBUG] [TestEventLogger]         at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
00:31:18.241 [DEBUG] [TestEventLogger]         at java.lang.Class.getDeclaredMethod(Class.java:2128)
00:31:18.241 [DEBUG] [TestEventLogger]         at org.robolectric.util.ReflectionHelpers.callStaticMethod(ReflectionHelpers.java:224)
00:31:18.241 [DEBUG] [TestEventLogger]         at org.robolectric.internal.bytecode.RobolectricInternals.performStaticInitialization(RobolectricInternals.java:54)
00:31:18.241 [DEBUG] [TestEventLogger]         at org.robolectric.internal.bytecode.ShadowWrangler.classInitializing(ShadowWrangler.java:119)
00:31:18.241 [DEBUG] [TestEventLogger]         at org.robolectric.internal.bytecode.RobolectricInternals.classInitializing(RobolectricInternals.java:18)
00:31:18.241 [DEBUG] [TestEventLogger]         at android.content.pm.PackageParser.<clinit>(PackageParser.java)
00:31:18.241 [DEBUG] [TestEventLogger]         at android.content.pm.PackageManager.getPackageArchiveInfo(PackageManager.java:3545)
00:31:18.241 [DEBUG] [TestEventLogger]         at org.fdroid.fdroid.installer.ApkVerifier.verifyApk(ApkVerifier.java:56)
00:31:18.241 [DEBUG] [TestEventLogger]         at org.fdroid.fdroid.installer.ApkVerifierTest.testVerifier(ApkVerifierTest.java:78)
00:31:18.242 [DEBUG] [TestEventLogger]         at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
[...]
00:31:18.244 [DEBUG] [TestEventLogger] 
00:31:18.244 [DEBUG] [TestEventLogger]         Caused by:
00:31:18.245 [DEBUG] [TestEventLogger]         java.lang.ClassNotFoundException: java.util.jar.StrictJarFile
00:31:18.245 [DEBUG] [TestEventLogger]             at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
00:31:18.245 [DEBUG] [TestEventLogger]             at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
00:31:18.245 [DEBUG] [TestEventLogger]             at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
00:31:18.245 [DEBUG] [TestEventLogger]             at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
00:31:18.245 [DEBUG] [TestEventLogger]             at org.robolectric.internal.bytecode.InstrumentingClassLoader.loadClass(InstrumentingClassLoader.java:124)
00:31:18.245 [DEBUG] [TestEventLogger]             at java.lang.Class.getDeclaredMethods0(Native Method)
00:31:18.245 [DEBUG] [TestEventLogger]             at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
00:31:18.245 [DEBUG] [TestEventLogger]             at java.lang.Class.getDeclaredMethod(Class.java:2128)
00:31:18.245 [DEBUG] [TestEventLogger]             at org.robolectric.util.ReflectionHelpers.callStaticMethod(ReflectionHelpers.java:224)
00:31:18.245 [DEBUG] [TestEventLogger]             at org.robolectric.internal.bytecode.RobolectricInternals.performStaticInitialization(RobolectricInternals.java:54)
00:31:18.245 [DEBUG] [TestEventLogger]             at org.robolectric.internal.bytecode.ShadowWrangler.classInitializing(ShadowWrangler.java:119)
00:31:18.245 [DEBUG] [TestEventLogger]             at org.robolectric.internal.bytecode.RobolectricInternals.classInitializing(RobolectricInternals.java:18)
00:31:18.245 [DEBUG] [TestEventLogger]             at android.content.pm.PackageParser.<clinit>(PackageParser.java)
00:31:18.245 [DEBUG] [TestEventLogger]             at android.content.pm.PackageManager.$$robo$$getPackageArchiveInfo(PackageManager.java:3545)
00:31:18.245 [DEBUG] [TestEventLogger]             at android.content.pm.PackageManager.getPackageArchiveInfo(PackageManager.java)
00:31:18.245 [DEBUG] [TestEventLogger]             at org.fdroid.fdroid.installer.ApkVerifier.verifyApk(ApkVerifier.java:56)
00:31:18.246 [DEBUG] [TestEventLogger]             at org.fdroid.fdroid.installer.ApkVerifierTest.testVerifier(ApkVerifierTest.java:78)
00:31:18.246 [DEBUG] [TestEventLogger]             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[...]
```

See merge request !367
2016-08-12 12:38:24 +00:00
Hans-Christoph Steiner
ef21bf973c Merge branch 'fix-511--remove-dead-code' into 'master'
More misc code cleanup around database code

I'm pulling out the final bit of unrelated code from my database refactor branch in the hope of making the final diff easier. This cleans up a few switch statements with only one option, closes some cursors, and removes some dead code. Comments in the commits explain the dead code.

See merge request !374
2016-08-12 10:21:09 +00:00
Hans-Christoph Steiner
c6faeea14e Merge branch 'fdroid-privileged-extension-fixes' into 'master'
F-Droid Privileged Extension fixes

A couple of small fixes related to the process of finalizing the new Privileged Extension for a real release!  @dschuermann hopefully just renaming is enough when installing FPE via the root method.  Or do you think we should handle removing existing installs in the old location?

See merge request !376
2016-08-12 09:53:02 +00:00
Hans-Christoph Steiner
7afee40d8f standardize priv-app install name as FDroidPrivilegedExtension
This syncs up the name the root install method uses with what is used by
the ROM integration and update.zip.  It also uses the full name for
consistency, with non-alpha and spaces removed following priv-app naming
conventions.

https://gitlab.com/fdroid/privileged-extension/merge_requests/3
https://gitlab.com/fdroid/privileged-extension/merge_requests/5
2016-08-12 11:28:36 +02:00
Hans-Christoph Steiner
1192410d87 remove scripts for creating update.zip, moved to priv-ext
https://gitlab.com/fdroid/privileged-extension/merge_requests/5
2016-08-11 16:59:59 +02:00
Hans-Christoph Steiner
c94d2a1395 gitlab-ci: another gradle bit to delete for good caching
recommended here, seems like it can't hurt:
https://docs.travis-ci.com/user/languages/java/#Caching
2016-08-11 16:38:16 +02:00
Peter Serwylo
ebb6d43cbb Remove dead code
AS picked up that the statement is always false, so the body of the if is
never executed. This is indeed the case, because the constructor assigns
the object which is being checked for null.
2016-08-11 23:16:28 +10:00
Peter Serwylo
6c1b277cab Close cursors which previously were left dangling. 2016-08-11 23:10:54 +10:00
Peter Serwylo
005d109818 Clean up switch statements with only a single option. 2016-08-11 23:10:11 +10:00
Peter Serwylo
fd50a2c730 Remove unused code.
The code only existed so that it could be used in a test. Subsequently,
a further test was written to test this code (used by the first test).
Since none of the code is actually used in the app, it has been removed.
2016-08-11 23:02:59 +10:00
Daniel Martí
3f352ae83f Merge branch 'fix-511--rename-app-table' into 'master'
Renamed AppTable to AppMetadataTable

See #511 for details. This is in prep ration for having an even more normalized `fdroid_package` table. That table will be the authoritative reference of what "packages" are known about in the client. The "app" table (now "metadata") will be specific to each repository which provides different metadata about that app.

This is a fairly straightforward "Rename Interface" refactoring from Android Studio" and is done so as to minimize the diff in a forthcoming MR.

See merge request !373
2016-08-11 11:28:06 +00:00
Peter Serwylo
626f55b43b Renamed AppTable to AppMetadataTable
See #511 for details. This is in prepration for having an even more normalized
`fdroid_package` table. That table will be the authoritative reference of what
"packages" are known about in the client. The "app" table (now thought of as "app metadata") will
be specific to each repository which provides different metadata about that app.
2016-08-11 16:34:26 +10:00
Dominik Schürmann
9235462e34 Tests for ApkVerifier 2016-08-09 22:26:39 +02:00
Hans-Christoph Steiner
2837a235b4 Merge branch 'fix-511--move-user-specified-data-to-separate-table' into 'master'
Move user specified data to separate table

Right now, the "Ignore update for version X" and "Ignore all updates for this app" are stored in `fdroid_app`. This means that if a repo is disabled then re-enabled, these preferences are lost. This MR separates out the user specified metadata from the metadata provided by the repository, such that one can change without affecting the other.

For convenience sake, this drops the `fdroid_app` and `fdroid_apk` tables rather than migrating them, and then sets a flag in preferences that forces F-Droid to do an index update when started. This is done _after_ migrating already existing user preferences out of `fdroid_app` and into `fdroid_appPrefs`.

See merge request !372
2016-08-08 08:59:40 +00:00
Peter Serwylo
203bcda695 Cleanup in response to CR comments 2016-08-04 21:35:46 +10:00
Peter Serwylo
bb88be9403 Further tests for AppPrefs.equals() which is used by AppDetails. 2016-08-04 11:15:42 +10:00
Peter Serwylo
9637de5e4c Make ignored app tests actually test code in use.
The test was using a `findIgnored` method in `AppProvider`, which only
existed for the purpose of testing. The test has been changed to instead
check for apps which would end up in the "can update" list (which is really
where the "ignored" apps are useful).
2016-08-04 09:53:25 +10:00
Peter Serwylo
125acd6276 Migrate app preferences to different table.
In the process, realised that using appId as a foreign key is worse than
packageName, because appId can get removed and added again, but it will
be different when the same app is inserted a second time. In order to
maintain the association of which apps have preferences stored against
them, they need to be stored against something with a bit more semantic
meaning. Thus, join onto package name instead.
2016-08-04 09:53:25 +10:00
Peter Serwylo
4b5481b8f2 Appese checkstyle + pmd 2016-08-04 09:53:25 +10:00
Peter Serwylo
5e263c0e0f Use "COALESCE(x, 0)" instead of "x = 0 OR x IS NULL"
This is a more concise syntax to say the same thing, and avoids an
OR clause in the where - which is often the cause of slowness in
many queries. Not sure if it was problematic in these cases, however
this COALESCE syntax is still more consise.
2016-08-04 09:53:25 +10:00
Peter Serwylo
004c86bc42 Notify content observers correctly 2016-08-04 09:53:25 +10:00
Peter Serwylo
903048ffe4 Add covering indexes for main queries.
With no indexes at all, a join between X and Y tables would require a full
table scan of Y for each row in X. With an index on the relevant field in
Y, it would require an index lookup on the join field in Y for each row in
X, which contains a pointer to the row of interest in Y. This row is then
looked up and the relevant value extracted. By using a covering index (one
which includes all fields required to satisfy the query, with the first field
being the one which is looked up in the join), then once the index has been
searched, there is no need to then go to table Y because all the relevant
data is already in the index.

This offers a marginal performance improvement.
2016-08-04 09:53:25 +10:00
Peter Serwylo
3e3af3bbf3 Completely removed preferences from app table. 2016-08-04 09:53:25 +10:00
Peter Serwylo
d47967e03d Added new table to store user preferences.
Haven't yet migrated data from the old location in the app table yet.
2016-08-04 09:53:25 +10:00
Daniel Martí
3c5f8756f4 Bump to 0.101-alpha4 2016-08-02 11:25:30 +02:00
Daniel Martí
ba51536b88 Merge branch 'move-priv-extension' into 'master'
Move Privileged Extension to separate repo

Removes all files of the Privileged Extension app except the aidl files.

See merge request !371
2016-08-02 09:24:31 +00:00
Dominik Schürmann
0fd1d5ae4c Move Privileged Extension to separate repo 2016-08-01 23:02:57 +02:00
Daniel Martí
d24f1034f4 Merge branch 'bumps' into 'master'
Various minor version bumps



See merge request !370
2016-08-01 06:07:38 +00:00
Daniel Martí
3726b2b7fa gradle: bump support libs to 24.1.1
Minor bugfix release.

Also bump the CI image with the new stuff.
2016-08-01 00:59:24 +02:00
Daniel Martí
c61a055ea8 Merge branch 'install-receiver' into 'master'
Merge download broadcast receivers

Previously, for all 4 states broadcast receivers were registered separately. These have now been merged into one receiver. IMHO this makes the code more readable and structured.

See merge request !368
2016-07-31 17:08:56 +00:00
Daniel Martí
d41cfe85d6 gradle: bump buildToolsVersion to 24.0.1 2016-07-31 18:40:06 +02:00
Daniel Martí
217bde1290 gradle: bump checkstyle, robolectric and PMD versions
All minor bugfix releases.
2016-07-31 16:41:25 +02:00
Daniel Martí
59c25dd998 Merge branch 'fallback-install' into 'master'
Use AOSP Installer if permission check fails

If the old repo index is used and the permission check fails in ApkVerifier, this allows a fallback to the AOSP DefaultInstaller to show all permissions.
This has been discussed in https://gitlab.com/fdroid/fdroidclient/issues/704

Unfortunately, this shows our permission screen before download and then afterwards when the ``ApkVerifier`` fails the permission screen of the AOSP DefaultInstaller, i.e., the user sees two permission screen which she needs to acknowledge. This should only happen if an old repo format is used, thus I think this is okay. I don't know of any other solution to this problem.

See merge request !369
2016-07-31 14:20:00 +00:00
Dominik Schürmann
bfcc706167 Use AOSP Installer if permission check fails
If the old repo index is used and the
permission check fails in ApkVerifier
fallback to the AOSP DefaultInstaller
to show all permissions.
2016-07-29 18:16:00 +02:00
Dominik Schürmann
a442d539e4 Merge download broadcast receivers
Previously, for all 4 states broadcast receivers were registered
separately. These have now been merged into one receiver.
2016-07-29 01:56:49 +02:00
Dominik Schürmann
19a033db32 Use integers for SDK checks
More consistent with other checks as
introduced in e021eb5c
2016-07-29 01:30:52 +02:00
Peter Serwylo
a31fb068ae Merge remote-tracking branch 'dschuermann/fix-2.3-install' 2016-07-28 11:58:19 +10:00
Dominik Schürmann
318f95b51e Fix install on Android 2.3
Cause: setType clears previously setUri.

Fixes #718
2016-07-27 16:23:26 +02:00
Peter Serwylo
f4de353900 Merge branch 'fix-installer-NPE' into 'master'
Make App and Apk parcelable and fix related installer NPEs

Installations fails currently due to
```
  885                    ACRA  E  Caused by: java.lang.NullPointerException
  885                    ACRA  E  at org.fdroid.fdroid.installer.InstallManagerService.getAppName(InstallManagerService.java:327)
  885                    ACRA  E  at org.fdroid.fdroid.installer.InstallManagerService.createNotificationBuilder(InstallManagerService.java:318)
  885                    ACRA  E  at org.fdroid.fdroid.installer.InstallManagerService.onStartCommand(InstallManagerService.java:158)
  885                    ACRA  E  at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2039)
  885                    ACRA  E  ... 10 more
```

This bug has been introduced in https://gitlab.com/fdroid/fdroidclient/merge_requests/359 where the packageName has been removed from the toContentValues() method.

The usage of ContentValues to send App/Apk objects to services was an hack in my opinion.
Thus, this PRs introduces proper parceling of App and Apk classes.

@pserwylo @eighthave @mvdan 

See merge request !362
2016-07-26 21:27:53 +00:00
Dominik Schürmann
2e92dc941b Use App/Apk parceling instead of ContentVals
The usage of ContentValues to send App/Apk objects
to services was an hack in my opinion.
This hack broke in https://gitlab.com/fdroid/fdroidclient/merge_requests/359
where the packageName has been removed from the
toContentValues() method, which leads to NPEs in
the services.
2016-07-25 17:50:28 +02:00
Dominik Schürmann
321842836c Make App and Apk classes really Parcelable 2016-07-25 17:50:28 +02:00
Dominik
b58138d4a2 Merge branch 'fix-provider-test' into 'master'
Fix RepoProviderTest

Somehow RepoProviderTest was not targetting SDK 23

See merge request !363
2016-07-25 15:44:47 +00:00
Dominik Schürmann
ed76576a5c Fix RepoProviderTest
Somehow RepoProviderTest was not targetting SDK 23
2016-07-25 17:31:27 +02:00
Daniel Martí
7287acd822 Merge branch 'utils-7.0' into 'master'
Add 7.0 (24) to the versions list



See merge request !361
2016-07-25 13:17:10 +00:00
Daniel Martí
f9bfe2a877 Merge branch 'api-24' into 'master'
Api 24

Based on https://gitlab.com/fdroid/fdroidclient/merge_requests/352 with fixes for robolectric

See merge request !360
2016-07-25 12:58:46 +00:00
Daniel Martí
5f3448394c Add 7.0 (24) to the versions list 2016-07-25 14:55:56 +02:00
Dominik Schürmann
b37d07a829 Use Build.VERSION_CODES.N in installer classes 2016-07-25 14:45:34 +02:00
Dominik Schürmann
cbbc3ab60d Use sdk=23 for robolectric
* SDK 24 is currently not supported
2016-07-25 14:45:30 +02:00
Daniel Martí
53e812e198 Bump to 0.101-alpha3 2016-07-25 13:19:16 +02:00
F-Droid Translatebot
6a8729e607 Pull translation updates from Weblate
Translators:

Anders Jonsson    Swedish
Diadlo            Russian
2016-07-25 13:13:38 +02:00
Daniel Martí
dd9b1fc613 Merge branch 'fix-721--qrcode-generation' into 'master'
Don't upper case QR code that has a URL.

See comment in #721 or this commit for explanation.

Fixes #721.

See merge request !358
2016-07-25 11:11:05 +00:00
Daniel Martí
7e451c87c7 Merge branch 'fix-511--remove-packageName-from-apk' into 'master'
Remove now unused package name from apk table

The package name is only stored in the `fdroid_app` table now, so we need to remove it form the `fdroid_apk` table. Under normal circumstances, I'd normally just leave unused fields in the DDL (the SQL which defines the tables) and never use it from within the Java code. However in this case, the package name formed part of the primary key of this table. Seeing as we are not inserting into that column any more, it isn't okay to leave it there but instead it must be removed so that we can put a more appropriate primary key on the table. In this case, the new primary key is `appId` + `vercode` + `repoId`.

I think this is the final merge request before I submit a MR with repo priorities.

See merge request !359
2016-07-25 09:53:42 +00:00
Peter Serwylo
2804b56d13 Ensure appropriate indexes on the apk table 2016-07-24 19:48:59 +10:00
Peter Serwylo
485d5e82ed Remove Schema.ApkTable.Cols.PACKAGE_NAME completely.
Wherever the "package name" of an apk is required, it can be requested by
asking for `Schema.ApkTable.Cols.App.PACKAGE_NAME`. Note the `App` which
indicates that it is in fact pulling this data from the `fdroid_app` table rather
than the `fdroid_apk` table.
2016-07-24 19:48:56 +10:00
Daniel Martí
eb14d157db Merge branch 'fix-711--auth-basic' into 'master'
Correctly identify the repo for a given URL to fix HTTP Auth.

**NOTE: Based on !355 (If that one gets merged first, I can rebase this, or else we can merge this one for both commits)**

When downloading arbitrary URLs using F-Droid (e.g. icons, .apk files, indexes) then it may be the case that the repo requires authentication. As such, we try to infer the repository based purely on the URL.

The old code took the basename of the URL, which means remove the last fragment (e.g. "index.jar") and use the remaining portion of the URL to lookup the repo.
This is broken for many reasons, partly because of the presence of a query string, partly because there are other things which are not just in the root directory of the repo (e.g. "/icons/*.png").

This new method iteratively peels off the right most segment of the URLs path, then looks to see if a repo exists at that address.

Note that this breaks down if you have nested repositories on a server, where one of the repositories is nested inside a directory that F-Droid knows about, such as "icons". In such a case, the following repositories:

 * https://f-droid.org/repo (requires auth)
 * https://f-droid.org/repo/icons (doesn't require auth)

will break down. If requesting something from the repo requiring auth:

 * https://f-droid.org/repo/icons/org.fdroid.fdroid.png

Then it will lookup the database and find the repo which lives in "/icons" and doesn't require auth (or requires a different auth username/password). Not sure there is a lot that can be done about this without major refactoring. Such refactoring would require making sure a `Repo` is always given to a downloader for any HTTP request, and is probably a bit out of scope of this bug.

Also added tests for this behaviour.

Fixes #711.

See merge request !357
2016-07-23 12:09:35 +00:00
Peter Serwylo
10144f72c9 Don't upper case QR code that has a URL.
Firstly, this causes #721, possibly due to a bug in "Barcode
Scanner" whereby it seems to ignore the scheme when in caps,
assuming it is "http".

The relevant RFC is:

> RFC3986 (Uniform Resource Identifier (URI): Generic Syntax

In section 3.1, it describes the scheme:

> Although schemes are case-insensitive, the canonical form is
> lowercase and documents that specify schemes must do so with
> lowercase letters.  An implementation should accept uppercase
> letters as equivalent to lowercase in scheme names (e.g., allow
> "HTTP" as well as "http") for the sake of robustness but should
> only produce lowercase scheme names for consistency.

Secondly, it is not valid to uppercase URLs at will. Although it
seems that there is some sort of more-compact-QR-generating-logic
that doesn't justify this. Funnily enough, I can't find anything
in RFC3986 about the case-insensitivity of URI paths. However
consider the following:

 * https://i.imgur.com/fn33EcW.jpg

That is a valid path to an image. If we upper case it:

 * HTTPS://I.IMGUR.COM/FN33ECW.JPG

or lower case it:

 * https://i.imgur.com/fn33ecw.jpg

Then the server is entitled to treat it differently and indeed
it does. Both the upper case and lower case are no both 404's.
2016-07-22 07:48:26 +10:00
Peter Serwylo
9fbcc255ab More robust method to find repository from URLs
When downloading arbitrary URLs using F-Droid (e.g. icons, .apk files, indexes)
then it may be the case that the repo requires authentication. As such, we try
to infer the repository based purely on the URL.

The old code took the basename of the URL, which means remove the last fragment
(e.g. "index.jar") and use the remaining portion of the URL to lookup the repo.
This is broken for many reasons, partly because of the presence of a query string,
partly because there are other things which are not just in the root directory
of the repo (e.g. "/icons/*.png").

This new method iteratively peels off the right most segment of the URLs path,
then looks to see if a repo exists at that address.

Note that this breaks down if you have nested repositories on a server, where
one of the repositories is nested inside a directory that F-Droid knows about,
such as "icons". In such a case, the following repositories:

 * https://f-droid.org/repo (requires auth)
 * https://f-droid.org/repo/icons (doesn't require auth)

will break down. If requesting something from the repo requiring auth:

 * https://f-droid.org/repo/icons/org.fdroid.fdroid.png

Then it will lookup the database and find the repo which lives in "/icons"
and doesn't require auth (or requires a different auth username/password).
Not sure there is a lot that can be done about this without major refactoring.
Such refactoring would require making sure a `Repo` is always given to a downloader
for any HTTP request, and is probably a bit out of scope of this bug.

Also added tests for this behaviour.

Fixes #711.
2016-07-21 15:37:17 +10:00
Peter Serwylo
a686529ba5 Added tests for repo provider.
These tests would've prevented the problem in #717, by ensuring
that only a single repo is deleted at a time.
2016-07-21 15:36:12 +10:00
Daniel Martí
b3d88aa333 Merge branch 'always-keep-timestamp' into 'master'
Prevent crash for servers that don't send etags with repo indexes

While working on #711, I noticed this bug using my [Mock HTTP Auth server](https://f-droid.org/wiki/page/PHP_Mock_Repository).

This fix always captures timestamps during repo updates, even if it is the same as last time. This is because we are dependent on it later on in the repo update process. Specifically, when updating from a HTTP server that doesn't send out etags with its responses, it will trigger a full blown repo update every time, even if all the values in the index are the same (name, description, etc). This is as distinct from better behaving servers that send etags, in which case we will only do a partial update (i.e. persist the "last updated time"). In such a case, the remainder of the update process will proceed, and ask for this timestamp.

See merge request !356
2016-07-21 03:26:29 +00:00
Peter Serwylo
b9b3908dc3 Prevent crash for servers that don't send etags with repo indexes
Always capture timestamps, even if it is the same. This is because we are dependent
on it later on in the repo update process. Specifically, when updating from a HTTP
server that doesn't send out etags with its responses, it will trigger a full blown
repo update every time, even if all the values in the index are the same (name,
description, etc). This is as distinct from better behaving servers that send etags,
in which case we will only do a partial update (i.e. persist the "last updated time").
In such a case, the remainder of the update process will proceed, and ask for this
timestamp.
2016-07-21 11:19:58 +10:00
Daniel Martí
ae6fd96256 Merge branch 'fix-717--repo-deletion' into 'master'
Correctly delete single repo, not all repos.

In a recent commit, I cleaned up the code which deletes repo. At that point, instead of maybe concatenating strings together, sometimes with an `AND` statement,
it was changed to use the slightly better `QuerySelection`. This class is preferable because it doesn't need the developer to know whether there was
any previous constraints, and thus it knows whether to prepend an `AND`.

The problem arose because `QuerySelection` is effectively an immutable class. Calling `add()` on it returns a new copy with a different set of constraints.
The code which deleted the repo did not use this copy, and thus the resulting query had zero constraints.

The fix is to use the return value of `add()` correctly. It would've been easier to identify this bug if we had a lint check for "unused return values", though it is likely that that would get annoying very quickly.

Fixes #717.

See merge request !354
2016-07-20 08:37:09 +00:00
Peter Serwylo
52195bb3e9 Correctly delete single repo, not all repos.
In a recent commit, I cleaned up the code which deletes repo. At that point,
instead of maybe concatenating strings together, sometimes with an `AND` statement,
it was changed to use the slightly better `QuerySelection`. This class is
preferable because it doesn't need the developer to know whether there was
any previous constraints, and thus it knows whether to prepend an `AND`.

The problem arose because `QuerySelection` is effectively an immutable class.
Calling `add()` on it returns a new copy with a different set of constraints.
The code which deleted the repo did not use this copy, and thus the resulting
query had zero constraints.

The fix is to use the return value of `add()` correctly. It would've been
easier to identify this bug if we had a lint check for "unused return values",
though it is likely that that would get annoying very quickly.

Fixes #717.
2016-07-20 07:00:25 +10:00
Peter Serwylo
698c517508 Merge branch 'fix-511--database-integer-primary-keys' into 'master'
Use an integer primary key to join `fdroid_app` and `fdroid_apk` rather than the apps package name.

**Disclaimer:**

I realise this is a big change, but it needs to be done at some point, and it is not amenable to smaller changes, due to the fact that the app/apk relationship is so ingrained throughout F-Droid. Luckily, we have really quite comprehensive test coverage of the F-Droid `ContentProvider`s which helps to confirm that nothing should be majorly broken here.

**Some points of note:**

This is the first part of implementing #511, whereby the DB is refactored to better support multiple repositories.

Instead of joining `fdroid_app` and `fdroid_apk` tables using the package name, join based on an integer id autogenerated by sqlite. By default sqlite calls this `rowid` and it exists for every table, unless you've specified your own `NUMBER AUTO INCREMENT PRIMARY KEY` field. We have not done this for `fdroid_app`, so `rowid` is indeed the key we use in this MR. The package name was previously `id` in both the app and apk tables. Now `fdroid_app` makes use of `rowid` and `fdroid_apk` has a foreign key called `appId`.

The `ApkProvider` used to get away with only really querying the `fdroid_apk` table, and thus it didn't have to prefix any of the field names in the query with the table name. However now it always joins onto the `fdroid_app` table also, and as such, there are many places where field names needed to be prefixed with the table name (e.g. the `apk` alias or the `app` alias) to ensure the SQL is unambiguous when fields with the same name exist in both tables. The catch is, we want to reuse helper functions that build fragments of SQL, such as "Query based on package name". These helper functions are used both when updating and deleting apks (where field table prefixes are not allowed) and also in select statements (where they are required). Thus this changes comes with an `includeTableAlias` argument added to many of these methods (e.g. `ApkProvider.queryApp`).

There is still a package name column in the `fdroid_apk` table (the `id` field). This will be removed in future MRs and replaced with the package name from the joined `fdroid_app` table. 

The `RepoPersister` used to dump apps in the db, then dump apks into the db. Now it needs to be a bit more nuanced, and dump apps into the db, _then ask the db what `rowid` was assigned to the apps_. This is then used when dumping the apks into the db. This also required some changes to how the `TempAppProvider` and `AppProvider` interact. In the interests of reusing code, both of these are able to provide operations on a similarly structured table but one is an in memory table (`temp_fdroid_app`) and the other is on disk (`fdroid_app`). In the past this was simpler, because the only interaction with the `TempAppProvider` was by using lists of `ContentOperation`s. Whereas now that we need to ask more substantial questions of the `TempAppProvider` other than "Insert this thing" or "update that thing", we needed to implement the `query` method in `TempAppProvider` similar to how it is in the base class `AppProvider`. As such, the common code for the base class and subclass `query` methods was extracted into `AppProvider.runQuery()`.

I tried to minimize the changes to the test suite as much as possible, so that it is possible to verify that they pass under the same conditions as before this change. However some changes were required to support the notion that apks depend on an app and its rowid, whereas this was not the case before. Thus there is some more boilerplate in the tests to ensure that inserting an apk ensures an app entry is present in the db too.

See merge request !345
2016-07-19 20:54:51 +00:00
Peter Serwylo
666e853c5c Allow connected23 to fail, due to flakiness
Right now there is only one test in there anyway, so hopefully this is
a good tradeoff in terms of our time wasted vs not being able to run
those tests.
2016-07-20 06:35:45 +10:00
Peter Serwylo
3d182d8e14 Reinstate timestamp check as per CR comments 2016-07-20 06:16:51 +10:00
F-Droid Translatebot
c2855c1e8b Pull translation updates from Weblate
Translators:

Unknown Buckethead    Turkish
Verdulo               Esperanto
YFdyh000              Simplified Chinese
Zero King             Simplified Chinese
2016-07-19 22:12:55 +02:00
Peter Serwylo
1c8cba5692 Properly add indexes when migrating database.
Moved index adding to a helper function, so that the same mistake isn't made
again. That is, indexes should be the same whether upgrading or creating a
database. Thus, the code to add indexes should always be the same regardless
of the reason for an index being added. The `IF NOT EXISTS` syntax helps
to allow the same queries to add during creatin and migration of database.
2016-07-18 22:20:36 +10:00
Peter Serwylo
131e7f9dbd Make appId actually numeric on new database creations (was correct when migrating old databases) 2016-07-18 22:20:36 +10:00
Peter Serwylo
94c9114862 Made db migration more robust by wrapping in transaction. 2016-07-18 22:20:36 +10:00
Peter Serwylo
b4e0bde57f Cleanup for checkstyle 2016-07-18 22:20:36 +10:00
Peter Serwylo
81910bf749 Added tests for "orphaned apks" that must be removed after disabling a repo. 2016-07-18 22:20:36 +10:00
Peter Serwylo
d3f9cfbdfa Remove need for temorary b-tree for order by in most cases by introducing two indexes.
The fact that sqlite chose to do a "FULL TABLE SCAN" right off the bat when showing a list
of apps results in it having to do extra work at the end of the query to sort. If the scan
can be utilise an index, then the sorting is already done and a b-tree need not be constructed.
Thus, this introduces indexes for both the `name` column (used to sort most lists of apps)
and the `added` column (used to figure out the `Whats New` apps).
2016-07-18 22:20:36 +10:00
Peter Serwylo
ec36f2a1cd Remove some unused methods from providers. 2016-07-18 22:20:36 +10:00
Peter Serwylo
6e3b1fde86 Implement getLong for ContentValuesCursor.
This is required because SQLite "rowids" are 64 bit integers:

> all rows within SQLite tables have a 64-bit signed integer
> key that uniquely identifies the row within its table."

https://sqlite.org/lang_createtable.html#rowid
2016-07-18 22:19:26 +10:00
Peter Serwylo
2733081b3a Change join from app to apk table to auto increment integers rather than Android package name strings.
This is important for the ability to refactor the database for better performance in the future.

See #511 for details.

For those interested in the details, here is a query plan of selecting the "All" category of apps before
this commit:

 * `SCAN TABLE fdroid_app USING INDEX app_id`
 * `SEARCH TABLE fdroid_apk USING INDEX apk_id (id=?)`
 * `SEARCH TABLE fdroid_repo USING INTEGER PRIMARY KEY (rowid=?)`
 * `SEARCH TABLE fdroid_installedApp AS installed USING INDEX sqlite_autoindex_fdroid_installedApp_1 (appId=?)`
 * `SEARCH TABLE fdroid_apk AS suggestedApk USING INDEX sqlite_autoindex_fdroid_apk_1 (id=? AND vercode=?)`
 * `USE TEMP B-TREE FOR ORDER BY`

And here is a query plan of afterwards:

 * `SCAN TABLE fdroid_app`
 * `SEARCH TABLE fdroid_apk USING INDEX apk_appId (appId=?)`
 * `SEARCH TABLE fdroid_repo USING INTEGER PRIMARY KEY (rowid=?)`
 * `SEARCH TABLE fdroid_installedApp AS installed USING INDEX sqlite_autoindex_fdroid_installedApp_1 (appId=?)`
 * `SEARCH TABLE fdroid_apk AS suggestedApk USING INDEX apk_appId (appId=?)`
 * `USE TEMP B-TREE FOR ORDER BY`

The things of note are:
 * `SCAN TABLE` doesn't use an index, which means that it is really using the rowid index. Shouldn't behave much differently.
 * The second item now uses an integer primary key index rather than a package name index. Should increase search speed marginally which was the goal of this commit. As more apks exist, the speed improvement will also increase.
2016-07-18 22:19:24 +10:00
Daniel Martí
30334c3714 Merge branch 'fix-installer-on-gingerbread' into 'master'
Removed `TargetApi` annotation from class, pushing it to methods, and fix API problems.

Fixes #708.

On gingerbread (in my case, 2.3.4) F-Droid will reliably crash whenever it views `AppDetails` with the following error:

```
                         E  java.lang.NoSuchMethodError: android.content.Context.getDrawable
                         E      at org.fdroid.fdroid.privileged.views.AppSecurityPermissions$MyPermissionGroupInfo.loadGroupIcon(AppSecurityPermissions.java:111)
                         E      at org.fdroid.fdroid.privileged.views.AppSecurityPermissions$PermissionItemView.setPermission(AppSecurityPermissions.java:158)
                         E      at org.fdroid.fdroid.privileged.views.AppSecurityPermissions.getPermissionItemView(AppSecurityPermissions.java:396)
                         E      at org.fdroid.fdroid.privileged.views.AppSecurityPermissions.displayPermissions(AppSecurityPermissions.java:370)
                         E      at org.fdroid.fdroid.privileged.views.AppSecurityPermissions.getPermissionsView(AppSecurityPermissions.java:348)
                         E      at org.fdroid.fdroid.AppDetails$AppDetailsSummaryFragment.buildPermissionInfo(AppDetails.java:1381)
                         E      at org.fdroid.fdroid.AppDetails$AppDetailsSummaryFragment.setupView(AppDetails.java:1348)
                         E      at org.fdroid.fdroid.AppDetails$AppDetailsSummaryFragment.onCreateView(AppDetails.java:1095)
                         E      at android.support.v4.app.Fragment.performCreateView(Fragment.java:2074)
                         E      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
                         E      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1286)
                         E      at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:758)
                         E      at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1671)
                         E      at android.support.v4.app.Fragment.performStart(Fragment.java:2096)
                         E      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1142)
                         E      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1286)
                         E      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1268)
                         E      at android.support.v4.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:2148)
                         E      at android.support.v4.app.FragmentController.dispatchStart(FragmentController.java:212)
                         E      at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:625)
                         E      at org.fdroid.fdroid.AppDetails.onStart(AppDetails.java:424)
                         E      at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1129)
                         E      at android.app.Activity.performStart(Activity.java:3791)
                         E      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1620)
                         E      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
                         E      at android.app.ActivityThread.access$1500(ActivityThread.java:117)
                         E      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
                         E      at android.os.Handler.dispatchMessage(Handler.java:99)
                         E      at android.os.Looper.loop(Looper.java:130)
                         E      at android.app.ActivityThread.main(ActivityThread.java:3683)
                         E      at java.lang.reflect.Method.invokeNative(Native Method)
                         E      at java.lang.reflect.Method.invoke(Method.java:507)
                         E      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
                         E      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
                         E      at dalvik.system.NativeStart.main(Native Method)
```

This is because `AppSecurityPermissions` uses a method that was not added until a later API. This class is used by `AppDetails` without an API verison check around its access. Thus, we call methods on this that are unsupported when on gingerbread.

By removing `TargetApi` from the class, it unearthed a couple of locations where methods were being invoked without first guarding against the build version correctly. These two locations have been fixed and a `TargetApi` attached to the more narrowly defined method which requires it.

See merge request !353
2016-07-17 22:28:39 +00:00
Peter Serwylo
cd4700aeed Removed TargetApi annotation from class, push to methods and API problems.
This class is used by `AppDetails` without an API verison check around its access.
Thus, we call methods on this that are unsupported when on gingerbread.

By removing `TargetApi` from the class, it unearthed a couple of locations
where methods were being invoked without first guarding against the build version
correctly. These two locations have been fixed and a `TargetApi` attached to the
more narrowly defined method which requires it.
2016-07-18 07:34:54 +10:00
Daniel Martí
43c063d67e CI: switch to android-24 emulator 2016-07-13 16:08:55 +01:00
Daniel Martí
f17482f1eb Bump compile/target sdk versions to 24 2016-07-13 16:08:55 +01:00
Daniel Martí
8d60e70f5d Bump buildToolsVersion to 24.0.0 2016-07-13 14:59:14 +01:00
Daniel Martí
a4458b7cdf Add new language to the list: Croatian 2016-07-13 14:47:30 +01:00
F-Droid Translatebot
19d3d8a1fc Pull translation updates from Weblate
Translators:

ikmaak           Dutch
John Doe         Turkish
Kristjan Räts    Estonian
Lyrical Tumor    Croatian
2016-07-13 14:44:02 +01:00
Daniel Martí
0adca3ff2c Merge branch 'studio-fixes' into 'master'
Studio fixes



See merge request !351
2016-07-07 19:34:01 +00:00
Daniel Martí
cc7bf78ed1 studio: take Collections.addAll() suggestion 2016-07-07 16:55:52 +01:00
Daniel Martí
2dd053f76b studio: apply a bunch of weaker access suggestions 2016-07-07 16:55:52 +01:00
Daniel Martí
49e0561356 Drop unnecessary elses after returns 2016-07-07 10:11:31 +01:00
Daniel Martí
a6e2aaabd8 Merge branch 'log-slow-queries-in-debug-builds' into 'master'
Added LoggingQuery for diagnostics during debug mode.

While working on #511 and investigating database performance, I found myself really
wanting to understand the bits of F-Droid which were slow and those which were fast
due to the database. I created this thing, and thought I'd create a separate MR as it is
not directly related to the other stuff, but rather a general utility class that should be helpful.

SQLite has a very nice "EXPLAIN QUERY PLAN" command (https://sqlite.org/eqp.html).
It is not really meant to be used in production code, as per the docs, but it is
super helpful at diagnosing missing indexes or other performance problems with
databases. I find it much better than, for example, the MySQL alternative.

This commit routes queries from the `ApkProvider` and `AppProvider` through a
`LoggingQuery` which (in debug builds) times queries, and if they take longer
than a certain threshold, outputs them to logcat. In addition, it will then
ask sqlite to explain its query plan for that same query, and output that to
logcat too.

I created this as a separate class because it has zero dependence on any F-Droid related
stuff and might be helpful to other people too.

See merge request !350
2016-07-07 09:06:57 +00:00
Peter Serwylo
48ac66b315 Added LoggingQuery for diagnostics during debug mode.
SQLite has a very nice "EXPLAIN QUERY PLAN" command (https://sqlite.org/eqp.html).
It is not really meant to be used in production code, as per the docs, but it is
super helpful at diagnosing missing indexes or other performance problems with
databases. I find it much better than, for example, the MySQL alternative.

This commit routes queries from the `ApkProvider` and `AppProvider` through a
`LoggingQuery` which (in debug builds) times queries, and if they take longer
than a certain threshold, outputs them to logcat. In addition, it will then
ask sqlite to explain its query plan for that same query, and output that to
logcat too.
2016-07-07 17:13:53 +10:00
Daniel Martí
bd0efe8ffa Bump to 0.101-alpha2 2016-07-06 20:22:02 +01:00
Daniel Martí
f3fffd9f2e Merge branch 'tools-23' into 'master'
Revert to build-tools 23 until we can have 64-bit

As long as we're stuck with 32-bit on the buildserver, avoid both target
and build-tools 24. Necessary to do an alpha.

See merge request !349
2016-07-06 10:59:03 +00:00
Daniel Martí
6d52bc1022 Revert to build-tools 23 until we can have 64-bit
As long as we're stuck with 32-bit on the buildserver, avoid both target
and build-tools 24. Necessary to do an alpha.
2016-07-06 11:38:25 +01:00
Daniel Martí
e38624626c Merge branch 'fix-511--database-constants-everywhere' into 'master'
Ensure database fields referred to by `Schema.*Table.Cols.*` constants

**This is based on top of !346.** When that is merged, I'll rebase this again and then remove the WIP.

The goal of this is to ensure that all string literals which refer to database columns are replaced with constants from the relevant `Schema.*Table.Cols` interface.

The only exceptions are fields which no longer exist and are referred to in the `DBHelper` class (e.g. the `fdroid_repo` table had an `id` column but that is now `_id`).

This should not change **any** behaviour in the client app, all semantics should stay **exactly** the same.

See merge request !347
2016-07-04 12:50:09 +00:00
Peter Serwylo
88107cf94e Ensure constants always used for fields in remaining places. 2016-07-04 22:34:09 +10:00
Peter Serwylo
9135026362 Ensure constants always used for fields in InstalledAppProvider. 2016-07-04 22:34:09 +10:00
Peter Serwylo
c55a53ec69 Ensure constants always used for fields in DBHelper. 2016-07-04 22:34:09 +10:00
Peter Serwylo
131978ad02 Refactored create table statements to use constants from schema. 2016-07-04 22:34:09 +10:00
Peter Serwylo
2ffd4ae428 Ensure constants always used for fields in RepoProvider. 2016-07-04 22:34:09 +10:00
Peter Serwylo
a8d2b2aff3 Ensure constants always used for fields in AppProvider. 2016-07-04 22:34:09 +10:00
Peter Serwylo
47fa5a94b3 Ensure constants always used for fields in ApkProvider. 2016-07-04 22:34:09 +10:00
Peter Serwylo
942cfb59d6 Merge branch 'check-bumps' into 'master'
Check tools version bumps



See merge request !348
2016-07-04 12:31:30 +00:00
Daniel Martí
7fe15e6c7d PMD: bump to 5.5.0 2016-07-04 11:32:29 +01:00
Daniel Martí
8af44b1af5 checkstyle: bump to 7.0
Remove LITERAL_DO from the config in RightCurly as we want this:

        do {
            foo;
        } while (bar);

Not this:

        do {
            foo;
        }
        while (bar);

This went unnoticed as LITERAL_DO was broken in RightCurly in earlier
Checkstyle versions.
2016-07-04 11:31:41 +01:00
Daniel Martí
3fae57c360 Merge branch 'fix-511--database-constants' into 'master'
Refactor database schema constants

**Note:** When this is merged I'll rebase !347 and remove its WIP.

## Summary

In order to do the database changes required for #511, I've found that it is difficult due to my inclination to switch between referring to database columns by either a Java constant such as `AppProvider.DataColumns.NAME` and string literals such as `"name"`. All string literals should be migrated to constants, and that will happen in my next MR. In order to prepare for this, I've gathered together the constants into one common place: `org.fdroid.fdroid.data.Schema`. This is going to be the authoritative place for the schema to be stored going forward, and will help when reasoning about the database structure. 

Although it seems large, this change is a fairly straightforward find/replace job. It also passes all tests for which there is good test coverage in the content providers.

## Changes

Create `Schema` interface to make it simpler to replace string literals with constants.

Right now, table names are in `DBHelper.TABLE_*` constants, and each tables fields are
in `*Provider.DataColumns.*` constants. This brings them all into a predictable location.
In addition, it makes it easier to statically import `Schema` so that instead of, e.g.,

* `AppProvider.DataColumns.PACKAGE_NAME`

We can choose one of the following, based on our current context:

* `Schema.AppTable.Cols.PACKAGE_NAME`
* `AppTable.Cols.PACKAGE_NAME`
* `Cols.PACKAGE_NAME`

In the worst case, it isa couple of chars shorter than now. In the best case, if we are
writing a class that primarily deals with Apps (e.g. App.java or AppProvider.java) then
we get a big win with just `Cols.PACKAGE_NAME`.

Having these things slightly shorter may seem like it is pointless, but the length of
each constant probably contributed to my lack of willingness to use constants instead
of string literals when constructing queries.

In the future, this should be moved towards something more akin to:

> http://openhms.sourceforge.net/sqlbuilder/

and I hope that extracting all the schema stuff into one interface may help that.


See merge request !346
2016-07-03 22:47:16 +00:00
F-Droid Translatebot
b6b039aa49 Pull translation updates from Weblate
Translators:

ageru                  French
ezjerry liao           Traditional Chinese
Kristjan Räts          Estonian
Nutchanon Wetchasit    Thai
Osoitz                 Basque
2016-07-03 19:24:15 +01:00
Peter Serwylo
668cc27d29 Replaced DBHelper.TABLE_INSTALLED_APP with Schema.InstalledAppTable.NAME 2016-06-30 17:09:01 +10:00
Peter Serwylo
6fb23d2efa Extracted InstalledAppProvider.DataColumns to Schema.InstalledAppTable.Cols 2016-06-30 17:06:40 +10:00
Peter Serwylo
d1ceb84af4 Replaced DBHelper.TABLE_APP with Schema.AppTable.NAME 2016-06-30 14:14:18 +10:00
Peter Serwylo
14958d48e3 Replaced DBHelper.TABLE_APK with Schema.ApkTable.NAME 2016-06-30 14:14:18 +10:00
Peter Serwylo
d1c04de71a Replaced DBHelper.TABLE_REPO with Schema.RepoTable.NAME 2016-06-30 14:14:18 +10:00
Peter Serwylo
8a155aef89 Extracted RepoProvider.DataColumns to Schema.RepoTable.Cols 2016-06-30 14:14:15 +10:00
Peter Serwylo
0ea5325b81 Extracted ApkProvider.DataColumns to Schema.ApkTable.Cols 2016-06-30 14:11:35 +10:00
Peter Serwylo
315f20df0c Extracted AppProvider.DataColumns to Schema.AppTable.Cols 2016-06-30 13:36:27 +10:00
Peter Serwylo
7c13cc26fc Create Schema interface to make it simpler to replace string literals with constants.
Right now, table names are in `DBHelper.TABLE_*` constants, and each tables fields are
in `*Provider.DataColumns.*` constants. This brings them all into a predictable location.
In addition, it makes it easier to statically import `Schema` so that instead of, e.g.,

 * `AppProvider.DataColumns.PACKAGE_NAME`

We can choose one of the following, based on our current context:

 * `Schema.AppTable.Cols.PACKAGE_NAME`
 * `AppTable.Cols.PACKAGE_NAME`
 * `Cols.PACKAGE_NAME`

In the worst case, it isa couple of chars shorter than now. In the best case, if we are
writing a class that primarily deals with Apps (e.g. App.java or AppProvider.java) then
we get a big win with just `Cols.PACKAGE_NAME`.

Having these things slightly shorter may seem like it is pointless, but the length of
each constant probably contributed to my lack of willingness to use constants instead
of string literals when constructing queries.

In the future, this should be moved towards something more akin to:

> http://openhms.sourceforge.net/sqlbuilder/

and I hope that extracting all the schema stuff into one interface may help that.
2016-06-30 13:36:23 +10:00
Daniel Martí
72c6b86376 Merge branch 'permission-fix' into 'master'
Check that permissions are a subset of listed ones

* uses containsAll() instead of equals()

Fixes #703

See merge request !344
2016-06-27 06:40:48 +00:00
Dominik Schürmann
3162e93b35 Check that permissions are a subset of listed ones
* uses containsAll() instead of equals()

Fixes #703
2016-06-26 17:48:19 +02:00
F-Droid Translatebot
5dd95754cd Pull translation updates from Weblate
Translators:

Allan Nordhøy               Norwegian Bokmål
Allan Nordhøy               Swedish
ezjerry liao                Traditional Chinese
halcyonest                  Korean
Kristjan Räts               Estonian
Mikkel Kirkgaard Nielsen    Danish
riotism                     Chinese (Hong Kong)
Thomas Craig                Simplified Chinese
xinxinxinxinxin             French
YFdyh000                    Simplified Chinese
2016-06-25 20:51:06 +01:00
Daniel Martí
07a8b7a935 Merge branch 'emulator-v23' into 'master'
CI: replace v17 emulator with v23



See merge request !340
2016-06-23 11:02:37 +00:00
Daniel Martí
3b649138bd Bump buildToolsVersions
The new CI image has 24, not 23.0.3.
2016-06-23 11:42:53 +01:00
Daniel Martí
c7fd3f238d CI: replace v17 emulator with v23 2016-06-23 11:42:53 +01:00
Peter Serwylo
64bc13de8a Use symlink instead of hardlink, which was accidentally used on API < 19.
At the same time, also changed visibility of methods to package local
to remove need for test class.
2016-06-23 11:14:43 +10:00
Daniel Martí
95d8537187 Merge branch 'gradle-changes' into 'master'
Lint updates, update ACRA

This might fix #677, although hard to tell since I cannot reproduce the issue.

See merge request !343
2016-06-22 10:30:51 +00:00
Daniel Martí
a383c7a457 Sync changelog with stable branch 2016-06-21 17:02:10 +01:00
Daniel Martí
29689338f9 Merge branch 'master' into 'master'
two more crash fixes for 0.100.1

fixed two more from the ACRA reports

See merge request !342
2016-06-21 12:47:12 +00:00
Hans-Christoph Steiner
65cbc9dc10 do not crash if there are no cache files to delete
java.lang.NullPointerException
at org.fdroid.fdroid.Utils.clearOldFiles(Utils.java:347)
at org.fdroid.fdroid.CleanCacheService.onHandleIntent(CleanCacheService.java:51)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.os.HandlerThread.run(HandlerThread.java:60)
2016-06-21 14:37:01 +02:00
Daniel Martí
cd1f59fb29 Bump ACRA to 4.9.0
Also change the overrides from onCreate to init as suggested in the
changelog:

https://github.com/ACRA/acra/wiki/ChangeLog#acra-490-rc-1-2-may-2016

The behaviour should be very similar, although overriding the wrong
method (which we were doing) could cause all sorts of weird issues.
2016-06-21 13:35:29 +01:00
Daniel Martí
26f5286f97 lint: don't unnecessarily disable warnings
Those that are sometimes false positives but could still point out valid
issues should be warnings, not disabled entirely.

The first two are warnings already, the third is an error.
2016-06-21 13:26:56 +01:00
Daniel Martí
ae2def3e0d Merge branch 'master' into 'master'
a couple of fixes, including enabling lint errors to fail the CI build!

Three fixes, including enabling lint errors to fail the CI build!  Comments in the commit message. 09eea0d40bcf6b7a5612ef719177fd4ab2d2193b should be cherry-picked into stable-v0.100 for 0.100.1.  Its already in my repo as fb70aada63029e430f2b4f2fb68427e719b63753.

See merge request !341
2016-06-21 11:50:24 +00:00
Hans-Christoph Steiner
09eea0d40b ignore "java.lang.IllegalArgumentException: Could not parse [null/24]"
This is currently baffling me as to how it can happen.  This isn't a pretty
fix but it is better that letting F-Droid crash.  db9bdc31 was supposed to
make it so that only one thread at a time ever updated the static vars on
FDroidApp.

closes #690
2016-06-21 13:03:37 +02:00
Hans-Christoph Steiner
ba88bd7060 only show update notification if updates are going to happen
UpdateService.onHandleIntent() starts with a time check for whether an
update is actually scheduled.  Before, UpdateService put up a notification
when it started.  This changes it so that the notification is put up after
the check, so it should only show the notification if UpdateService is
actually going to run, and no longer when it is just waking up to check the
time.

!307 #662
2016-06-21 12:52:05 +02:00
Hans-Christoph Steiner
80b158e7d6 enable build fail on lint error to catch them in CI builds
The spongycastle issue is taking a long time to get resolved, has not yet
affected us, and would be a lot of work to fix in a different way. So the
'InvalidPackage' error is just disabled for now.
2016-06-21 12:52:05 +02:00
Daniel Martí
015343f9df Bump to 0.101-alpha1 2016-06-20 21:52:26 +01:00
F-Droid Translatebot
d718528466 Pull translation updates from Weblate
Translators:

Danial Behzadi     Persian
ezjerry liao       Traditional Chinese
Marian Hanzel      Slovak
xinxinxinxinxin    French
2016-06-20 21:51:32 +01:00
Daniel Martí
34aa8ab062 Merge branch 'apkfileprovider' into 'master'
Provide content Uris to downloaded apks via FileProvider

* moves apk verification back inside the Installer class
* uses support libs FileProvider for content Uris
* move apk file caching and storage methods into ApkFileProvider class

Some of the ugly version checks for Android N can be removed after Android N has been released. Unfortunately Google decided to keep SDK version at 23 for Android N dev preview and only change the CODENAME, thus ``Build.VERSION.SDK_INT <= Build.VERSION_CODES.M`` returns true on Android N preview :/ , see https://commonsware.com/blog/2016/03/17/backwards-compatibility-n-developer-preview.html

Tested on Android N dev preview 3 emulator, Android 6 stock and Android 5.1 rooted with priv extension.

See merge request !331
2016-06-20 15:44:26 +00:00
Daniel Martí
ef403928cf Merge branch 'issue-564--filter-anti-features--refactor-and-test-in-prep' into 'master'
Tests + Refactorings in preperation for #564  (Filter anti features)

As described in #564, there is a small amount of ground work to be done in order to support a UI for filtering anti features. This is the first stage of that. A subsequent MR will add a database migration to put anti features in their own table, and have a join table between apps and anti features. See commit messages for more detailed descriptions.

See merge request !339
2016-06-20 14:53:20 +00:00
Peter Serwylo
243bb1948f Added tests for two helper methods for comma separated string parsing. 2016-06-21 00:21:19 +10:00
Peter Serwylo
a192389318 Completely removed CommaSeparatedList class, replaced with two helper methods in Utils.
The two helper methods alleviate the need for copious null checks. They also provide
consistent behaviour when there are zero elements (i.e. they return null, rather than
an empty string or empty array, as was the case before).
2016-06-21 00:21:19 +10:00
Peter Serwylo
d99b357a1f Replace CommaSeparatedList with String[].
This is a combination of:
 * `String[].split(",")` and
 * `TextUtils.join(",", values)`

It seems a bit wastefull to have our own implementation of these two things
which lightly wrap this code, and produce a datastructure which is non standard
and foreign to Java developers.
2016-06-21 00:21:19 +10:00
Peter Serwylo
57c63a8e2a Test coverage of anti feature parsing in RepoUpdater. 2016-06-21 00:21:19 +10:00
Dominik Schürmann
5facd1b9a1 Proper SDK 24 version check
* not targetting SDK 24 due to
  https://gitlab.com/fdroid/fdroidserver/issues/185
2016-06-20 14:53:43 +02:00
Dominik Schürmann
16f97125d7 Provide content Uris via FileProvider
* moves apk verification back inside the Installer class
* uses support libs FileProvider for content Uris
* move apk file caching and storage methods into
ApkCache class
2016-06-20 11:07:06 +02:00
Daniel Martí
780c3968b5 Merge branch 'alpha1' into 'master'
version bumps before alpha1

The more we test these updates the better, so the best moment to update libs is now.

See merge request !338
2016-06-19 22:00:47 +00:00
Daniel Martí
4fbc327a91 Bump robolectric to 3.1 now that it's out
And remove the now unnecessary -rc justification comment.
2016-06-17 15:51:50 +01:00
Daniel Martí
3d59f4f192 Bump commons-net to 3.5 2016-06-17 15:51:50 +01:00
Daniel Martí
b71cb37cad Bump commons-io to 2.5 2016-06-17 15:51:50 +01:00
Daniel Martí
1ac53078ee Bump support libs to 24.0.0
Also bump the docker image since it contains the newer support m2 repo.
2016-06-17 15:51:25 +01:00
Daniel Martí
783d6d1ba6 Remove now unused ic_stat_notify
The code that used it got removed for good in f6cc716f.
2016-06-17 15:29:38 +01:00
F-Droid Translatebot
5dd1cd6ee6 Pull translation updates from Weblate
Translators:

Francesco Giordano    Italian
Jaroslav Lichtblau    Czech
Mutante Citta         Italian
2016-06-16 20:59:55 +01:00
Daniel Martí
95b7201868 Merge branch 'fix-582--lint-errors' into 'master'
Extracted new API styles dependent on API 16 and 17 into values-17.

This involved the typical Android design pattern of a "Base" style in
`values/styles.xml`, then the an empty normal style which uses that Base style
as a `parent` also in `values/styles.xml`, and finally any API specific
styles in another version of the normal style in a `values/styles-v17` folder.

Same was done for android:actionBarStyle moving it into into values-v11.
This time, didn't worry about the base style, because there was not much to be
gained. by doing so.

Fixes #582.

See merge request !335
2016-06-16 19:44:08 +00:00
Daniel Martí
4f67437bc9 Merge branch 'two-0.101-fixes' into 'master'
Two 0.101 fixes

This includes two fixes for 0.101.  One of them has already been included in stable-v0.100 for 0.100.1.

See merge request !337
2016-06-16 19:14:25 +00:00
Hans-Christoph Steiner
89e2c9948a fix off-by-one error in update check for db-version/56
We missed an off-by-one in my previous DB change:
90467bf8bf2f8e4a46cb1db563154df4035bf746

This causes the installed app parsing to happen on each start when on any
build that is on db-version/56.  Its not a big deal since the broken code
was not shipped at all, even in an alpha.
2016-06-16 16:50:29 +02:00
Hans-Christoph Steiner
5523a443f8 never have null Apks in InstallManagerService
In order to avoid having null guards making the code ugly, use a "blank"
instance of Apk which will work for the various comparisons.  This fixes
this crash:

fixes #688

java.lang.NullPointerException
	at org.fdroid.fdroid.installer.InstallManagerService$4.onReceive(InstallManagerService.java:243)
	at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297)
	at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46)
	at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:136)
	at android.app.ActivityThread.main(ActivityThread.java:5001)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:515)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
	at dalvik.system.NativeStart.main(Native Method)
2016-06-16 16:50:29 +02:00
Daniel Martí
e285fd6f38 Merge branch 'prep-providers-for-download-progress' into 'master'
Improve order by/selection logic for database layer.

This was extracted from the postponed !311.

The order by stuff previously only allowed specifying a particular field. We should also be able to sort based on arbitrary expressions, and such expressions will require the ability to bind arguments using the "?" syntax. This change provides a Java abstraction for the order by, and improves the handling of selection arguments that need to bind to "?" so that both the selection (i.e. `WHERE` clause) and the `ORDER BY` clause can provide arguments as required.

See merge request !329
2016-06-16 13:00:45 +00:00
Daniel Martí
81ff5f3cd2 Merge branch 'fix-686--install-npe' into 'master'
Make sure to query package manager for `PackageInfo` when required.

A previous commit accidentally pushed the code which queries the
`PackageManager` to a different method, but then still used the
`packageInfo` which was supposed to be populated by that code.

This change rectifies this, and in the process also clarifies/documents under
what circumstances the `PackageManager` needs to be queried, rather than
relying on the incoming intent.

Fixes #686.

See merge request !336
2016-06-16 10:24:24 +00:00
Peter Serwylo
3f9370371b Make sure to query package manager for PackageInfo when required.
A previous commit accidentally pushed the code which queries the
`PackageManager` to a different method, but then still used the
`packageInfo` which was supposed to be populated by that code.

This change rectifies this, and in the process also clarifies/documents under
what circumstances the `PackageManager` needs to be queried, rather than
relying on the incoming intent.

Fixes #686.
2016-06-16 16:26:23 +10:00
Peter Serwylo
aae87eb92e Extracted new API styles dependent on API 16 and 17 into values-17.
This involved the typical Android design pattern of a "Base" style in
`values/styles.xml`, then the an empty normal style which uses that Base style
as a `parent` also in `values/styles.xml`, and finally any API specific
styles in another version of the normal style in a `values/styles-v17` folder.

Same was done for android:actionBarStyle moving it into into values-v11.
This time, didn't worry about the base style, because there was not much to be
gained. by doing so.
2016-06-16 15:37:19 +10:00
Peter Serwylo
f023cd7757 Improve order by/selection logic.
The order by stuff previously only allowed specifying a particular field.
We should also be able to sort based on arbitrary expressions, and such
expressions will require the ability to bind arguments using the "?" syntax.
This changes provides a Java abstraction for the order by, and improves
the handling of selection arguments that need to bind to "?" so that both
the selection (i.e. WHERE clause) and the ORDER BY clause can provide
arguments as required.
2016-06-16 09:34:50 +10:00
Hans-Christoph Steiner
d47e87e53b Merge branch 'fix-685--downloading-unknown' into 'master'
Ask for all fields from the content provider.

**To be cherry-picked into `master` as well as this merge into `stable-v0.100`**

Fixes #684. 

![fixed](/uploads/dcef00026427778c9180b7da7ab0a9ee/fixed.png)

Ask for all fields from the `ContentProvider`.
    
It is not a particularly expensive operation in the scheme of things. When we are going to the database, the bottlneck is in disk access for the actual query of the database tables (looking up indexes, performing joins, etc). The difference between retrieving two columns or all the columns when the query is for a handful of apps is inconsequential. 
    
Thus, it is better to be safe than sorry and just ask for all the things so that our value objects are correctly populated. There are indeed suitable times to only request specific fields, but I'd suggest that they are probably only when we need to ask a question about thousands of apps at a time, and then the heap space becomes a concern.

See merge request !328
2016-06-14 21:40:17 +00:00
Peter Serwylo
f3cb1d5bd4 Ask for all fields from the content provider.
It is not a particularly expensive operation in the scheme of things. When we
are going to the database, the bottlneck is in disk access for the actual query
of the database tables. The difference between retrieving two columns or
all the columns when the query is for a handful of apps is inconsequential.

Thus, it is better to be safe than sorry and just ask for all the things so
that our value objects are correctly populated.
2016-06-15 06:12:17 +10:00
Daniel Martí
4685d82ee6 Remove a couple of unused strings
Updates #684.
2016-06-14 11:45:07 +01:00
F-Droid Translatebot
679fdb3fb1 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz    Catalan
Daniel Martí             Catalan
Enol Puente              Asturian
ezjerry liao             Traditional Chinese
Jonatan                  Swedish
Miss Min                 Persian
Nutchanon Wetchasit      Thai
Sergio Oller             Catalan
2016-06-14 11:35:45 +01:00
Daniel Martí
eac0df88af CI: bump image 2016-06-13 23:36:13 +01:00
Daniel Martí
05a5041971 Merge branch 'verify-target-sdk' into 'master'
ApkVerifier: check targetSdkVersion



See merge request !333
2016-06-13 21:19:32 +00:00
Dominik Schürmann
174b1d108f ApkVerifier: check targetSdkVersion 2016-06-13 20:42:08 +02:00
Daniel Martí
6b18ab4204 Merge branch 'permissions-ui' into 'master'
Permissions UI in AppDetails

* Removes the "m" prefix and some unnecessary TODOs
* Re-uses the permission list from the privileged installer for the list in AppDetails:

![device-2016-06-09-234253](/uploads/0f3807f05084e763c07c9b4b7c49c481/device-2016-06-09-234253.png)

See merge request !332
2016-06-13 18:37:33 +00:00
Hans-Christoph Steiner
d40c94ab11 Merge branch 'targetSdkVersion' into 'master'
include targetSdkVersion in Apk

In order to work well with the Android 6.0+ permissions, the client needs to know whether an APK has been built against android-23 or higher.

@pserwylo @dschuermann how does this look?

See merge request !323
2016-06-10 08:43:44 +00:00
Hans-Christoph Steiner
59688c7ff0 include targetSdkVersion in Apk
In order to work well with the Android 6.0+ permissions, the client needs
to know whether an APK has been built against android-23 or higher.

closes #682 https://gitlab.com/fdroid/fdroidclient/issues/682
2016-06-10 10:28:25 +02:00
Dominik Schürmann
c88afd0995 Reuse AppSecurityPermissions in AppDetails 2016-06-09 23:42:14 +02:00
Dominik Schürmann
f5db19eba8 Remove m prefix from variables, remove TODOs 2016-06-09 23:31:27 +02:00
Daniel Martí
7e27edc9b5 Merge branch 'check-perms-after-install' into 'master'
Check permissions for unattended installer

This PR introduces the class ``ApkVerifier`` which checks the permissions of the downloaded apk file against the expected permissions from the F-Droid listing (``Apk`` class).

* I removed ``AndroidXMLDecompress`` because everything which it has been used for can also be done with ``PackageManager.getPackageArchiveInfo()``, to the best of my knowledge. I even asked in at a similar project why ``PackageManager.getPackageArchiveInfo()``may not be enough: https://github.com/jaredrummler/APKParser/issues/3 It turns out in our case it should do everything we need.
* The code responsible for sanitizing the local apk file and making it world readable has also been moved into ``ApkVerifier`` for now. This can change in a later PR when I introduce the FileProvider for downloaded apks.

We still need to check the target sdk version (see TODO in ``ApkVerifier``). This depends on https://gitlab.com/fdroid/fdroidclient/merge_requests/323

See merge request !322
2016-06-09 18:56:12 +00:00
Daniel Martí
1f61259ae3 Add Thai to the languages list 2016-06-09 14:14:13 +01:00
Daniel Martí
471447fc10 Run tools/remove-unused-trans.py
After a few strings were removed in !330.
2016-06-09 14:05:17 +01:00
F-Droid Translatebot
66d309b848 Pull translation updates from Weblate
Translators:

Mohamad Hasan Al Banna    Indonesian
Nutchanon Wetchasit       Thai
Prasanna Venkadesh        Tamil
2016-06-09 14:04:51 +01:00
Daniel Martí
abb7db0bc2 Merge branch 'remove-first-run' into 'master'
Remove first-time dialogs for extension installer

The root mechanism will not be useful in 5.1 and later and has been shown to be error prone.

See merge request !330
2016-06-09 13:00:43 +00:00
Daniel Martí
345d735d8f Merge branch 'robolectric' into 'master'
Port most tests to JVM via Robolectric library

Fixes #607.

This ports all but one of the tests from `app/src/androidTest` to `app/src/test` to be run on the JVM.

I would've liked to port the final one, but it must be run on Android because we are testing the ability of an Android OS to perform symlinks. Also, it is not a bad thing in itself to have tests run on an emulator, just that those which _can_ be run on the host JVM should be. In the future, there will no doubt be other tests which are required to run on the JVM. At the very least, we should be able to run tests on faster emulators now because we are not constrained by the failing provider tests.

This branch required only very minimal changes to the client code, but resulted in the removal of a whole bunch of crappy mocking code that I had to add in order to support testing of the content providers (i.e. navigating around all of the final/hidden/etc apis in Android).

See merge request !327
2016-06-09 11:02:11 +00:00
Dominik Schürmann
c1abd09362 Remove AndroidXMLDecompressTest 2016-06-09 12:36:43 +02:00
Dominik Schürmann
f6cc716fac Remove first-time dialogs for extension installer
The root mechanism will not be useful in 5.1 and later and has been shown
to be error prone.

Fixes #636
2016-06-09 11:12:09 +02:00
Dominik Schürmann
739bd00257 Documentation and cleanup 2016-06-09 10:31:33 +02:00
Dominik Schürmann
4bed9d67c5 Verify permissions of downloaded apk 2016-06-09 10:25:57 +02:00
Dominik Schürmann
1652c32d51 Move permission getter in Apk class
Also fix permissions list based on the fact
that F-Droid deletes android.permission. prefix
only for default Android permissions, not custom ones.
2016-06-09 10:25:57 +02:00
Dominik Schürmann
24ed40bd34 Move Apk verification and file sanitizing into own class
* use getPackageArchiveInfo of AOSP instead of AndroidXMLDecompress
* verify in InstallManagerService instead of Installer subclasses
2016-06-09 10:25:57 +02:00
Peter Serwylo
182a63af41 Ensure tests for proper multirepo support are not run.
They are here so that when we support multiple repos in a more robust
manner, we can use these tests to show that it was successful.
2016-06-09 10:44:40 +10:00
Peter Serwylo
53e74dcdbd Appease checkstyle for test code.
Like PMD, we also had to add a concession to allow static imports.
This time, it was achieved by moving the assertions to a more generally
named `Assert` class, and then allowing static imports from that.
2016-06-09 10:44:40 +10:00
Peter Serwylo
4e73d1e5e6 Finish porting tests to Robolectric, and appease PMD.
To appease PMD, we now have a three rulesets in `config/pmd/*.xml`:

 * `rules.xml`: The bulk of the rules, used by both main and test code.
 * `rules-main.xml`: Rules specific to the andoid client code.
 * `rules-test.xml`: Rules specific to test code.

The rationale is because checkstyle by default checks for "too many static
imports", which is a fair call. However in JUnit4 code, it is common to
import many `assert*` static methods.
2016-06-09 10:44:40 +10:00
Peter Serwylo
253900e927 Multi-repo updater ported to robolectric.
The tests pass, but there is a lingering message that gets logged:

```
Jun 08, 2016 7:31:13 AM com.almworks.sqlite4java.Internal log
WARNING: [sqlite] [DETACH DATABASE temp_update_db]DB[1][C]: exception when clearing
com.almworks.sqlite4java.SQLiteException: [1] DB[1] reset [no such database: temp_update_db]
	at com.almworks.sqlite4java.SQLiteConnection.throwResult(SQLiteConnection.java:1309)
	at com.almworks.sqlite4java.SQLiteConnection.throwResult(SQLiteConnection.java:1282)
	at com.almworks.sqlite4java.SQLiteConnection.cacheStatementHandle(SQLiteConnection.java:1211)
	at com.almworks.sqlite4java.SQLiteConnection.access$900(SQLiteConnection.java:54)
	at com.almworks.sqlite4java.SQLiteConnection$CachedController.dispose(SQLiteConnection.java:1606)
	at com.almworks.sqlite4java.SQLiteStatement.dispose(SQLiteStatement.java:187)
	at org.robolectric.shadows.ShadowSQLiteConnection$Connections$4.call(ShadowSQLiteConnection.java:421)
	at org.robolectric.shadows.ShadowSQLiteConnection$Connections$6.call(ShadowSQLiteConnection.java:449)
	at org.robolectric.shadows.ShadowSQLiteConnection$Connections$6.call(ShadowSQLiteConnection.java:443)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
```

The `temp_update_db` is the one used for repo updates, but I thought that it
correctly gets dropped/detached by the `TempAppProvider` when required. In fact,
given the nature of the error message (no such database: temp_update_db), that
hints at the fact that it is indeed dropped. I'm struggling to figure out what
causes this, but it should not be harmful to the running of the tests. If a test
actually fails, then it is picked up correctly by JUnit.
2016-06-09 10:44:40 +10:00
Peter Serwylo
660ebc5ec8 Migrated to robolectric.
This required changing the SAX parser to be namespace aware, as it seems
that is the default in Android, but not the default in the OpenJDK.
2016-06-09 10:44:40 +10:00
Peter Serwylo
60451a050f Remove unused test code.
Many of the `Mock*` classes are there to deal with idiosyncrosies of
the Android SDK, including `final`/package local/`@Hide` annotations/etc.
They are no longer required with robolectric tests.
2016-06-09 10:44:40 +10:00
Peter Serwylo
839ebebd87 Migrated Apk tests to robolectric.
Relatively straightforward port, nothing particularly special here.
2016-06-09 10:44:40 +10:00
Peter Serwylo
4e66bb810f Ported AppProvider tests to Robolectric.
Get around silly `final` methods in `ContentResolver` with Mockito and `delegatesTo`.

The Robolectric library presumes that people always want to test content providers by
manually invoking the `query`/`update`/`delete` methods on the `ShadowContentResolver`.
While that is a great feature for testing, we have helper methods that require testing,
and these methods accept either a _real_ `ContentResolver` or `Context`. Robolectric
did some cool magic in terms of intercepting runtime calls to content resolvers and
forwarding them to the "shadow" verison, to deal with final/package private/etc methods.
However, as a side effect, the `ShadowContentProvider` _is not a `ContentProvider` as
far as the Java compiler is concerned.

By utilising Mockito + `delegatesTo` method, we are able to achieve what is required:
 * An actual `ContentProvider` instance.
 * It forwards calls to the `ShadowContentProvider` provided by Robolectric.
2016-06-09 10:44:40 +10:00
Peter Serwylo
09fd3d188c Robolectric testing support + InstallAppProvider testing now run in JVM.
Robolectric provides testing support for Android via the JVM, including testing
of content providers. In order to get these tests to work, we need to avoid
the default behaviour of starting up FDroidApp.onCreate(). This method has a lot
of static state which fails if set multiple times. Instead of trying to ensure
we correctly zero out that state each test, it is preferable to instead never
bother with that in the first place. Expecially when that is not what is under
test (as is the case with content provider tests).
2016-06-09 10:44:40 +10:00
Peter Serwylo
c7bb93f743 Inject hash + hashType into install method.
This makes testing of the function easier, as the method previously expected
a real file to exist on disk for which it could then hash. This instead allows
mock hash values to be inserted when under test.

Other than this, the semantics remain exactly the same as before, and the
expensive hashing is still done on a worker thread as part of the `IntentService`.
2016-06-09 10:44:40 +10:00
Daniel Martí
4c7217d796 Add Tamil (ta) to the languages list 2016-06-08 23:32:44 +01:00
Daniel Martí
a987dc0ce5 Run tools/remove-unused-trans.py
Fixes the many lint errors accumulated over the past few weeks.
2016-06-08 23:28:20 +01:00
F-Droid Translatebot
297208b255 Pull translation updates from Weblate
Translators:

Ab                         Arabic
Adrià García-Alzórriz      Catalan
Adrià García-Alzórriz      Spanish
ageru                      French
Ajeje Brazorf              Sardinian
ezjerry liao               Traditional Chinese
Francesco Giordano         Italian
Frank Ludviksson           Spanish
Helder Santana             Portuguese (Brazil)
Kristoffer Grundström      Swedish
Licaon Kter                Romanian
Marian Hanzel              Slovak
Massimiliano Caniparoli    Italian
Mladen Pejaković           Serbian
Mutante Citta              Italian
naofum                     Japanese
Olexandr Nesterenko        Ukrainian
Prasanna Venkadesh         Tamil
Sérgio Marques             Portuguese (Portugal)
Tobias Bannert             German
Verdulo                    Esperanto
Verdulo                    Polish
2016-06-08 23:27:40 +01:00
Daniel Martí
5052266450 pull-trans: fix "Added translation" commits
The weblate commits now take two forms:

	Translated using Weblate ($LANG)
	Added translation using Weblate ($LANG)

Adapt the regex to reflect both, avoiding the latter form from screwing
everything up.
2016-06-08 23:25:54 +01:00
Daniel Martí
99a488dc18 Merge branch 'studio-suggestions' into 'master'
Studio suggestions



See merge request !324
2016-06-08 20:10:38 +00:00
Daniel Martí
f779118d6b Merge branch 'remove-install-cancel' into 'master'
Remove cancel button for install

Remove cancel button for install/uninstall progress

See merge request !325
2016-06-08 13:01:56 +00:00
Dominik Schürmann
1bb35aced4 Remove cancel button for install
The install progress is not cancelable thus the cancel
button should not be displayed. This corresponds to the
behaviour of Google Play.
2016-06-08 14:18:30 +02:00
Daniel Martí
2c16ffdefe Remove redundant throw clauses found by Studio 2016-06-07 22:33:09 +01:00
Daniel Martí
d2ac7e6eba Remove some dead code found by Studio 2016-06-07 22:33:09 +01:00
Daniel Martí
649647497e Apply some "access can be weaker" Studio fixes 2016-06-07 22:33:09 +01:00
Daniel Martí
fef76eff89 gradle: bump android plugin version to 2.1.2
Bugfix release, no changelog on developer.android.com.
2016-06-07 22:05:46 +01:00
Daniel Martí
52e4548755 Sync changelog with 0.100 release
Also, bump versionCode to 0.101-alpha0 to allow upgrading from 0.100 to
master.
2016-06-07 21:44:22 +01:00
Daniel Martí
692c5e6917 Merge branch 'one-badge-per-line' into 'master'
One badge per line

It looks nicer in markdown and is still parallel: https://gitlab.com/NicoAlt/fdroidclient/blob/one-badge-per-line/README.md

See merge request !321
2016-06-03 16:08:21 +00:00
Nico Alt
946b017ab2 One badge per line 2016-06-03 18:02:16 +02:00
Daniel Martí
2b7a194831 Merge branch 'fix-badge' into 'master'
Fix GitLab CI badge



See merge request !320
2016-06-03 15:58:51 +00:00
Nico Alt
3116094b96 Fix GitLab CI badge 2016-06-03 17:55:30 +02:00
Daniel Martí
e2f5d97cb2 Merge branch 'crash-fixes' into 'master'
Service crash fixes

3 relatively simple crash fixes.  The two related to `WifiStateChangeService` have already be included in `stable-0.100`, 7385d320b42af960be63c9c179e1cbf186c1398a should be cherry-picked into `stable-0.100` after this is merged.

I already have 198ad843c1fabc8cf57ffe85c77230288cd6d7a4 ready in my stable-0.100 branch

See merge request !317
2016-06-02 13:20:14 +00:00
Peter Serwylo
4e9c8e9e5e Merge branch 'cr-of-299' into 'master'
Changes made during CR of 299

Here is a collection of small changes I implemented while CRing 299. The most interesting is probably the nice opportunity to use a little bit of RX. This is a good example of where it is a useful API, to "debounce" requests by 1 second (i.e. collect all requests but only respond to the last one after X time units). The `PublishSubject` sits there for the duration of the service, and passively receives events when required. However, it only emits events to the subscriber after one second because before subscribig we ask it to debounce events.

See merge request !319
2016-06-02 11:41:58 +00:00
Peter Serwylo
7c8ea5c5af Prevent InstalledAppProvider from notifying about changes.
Historically the providers were responsible for notifying about inserts/deletes
for this table. However this is no longer the case with the new service responsible
for throttling the rate with which these notifications occur.
2016-06-02 21:08:23 +10:00
Peter Serwylo
2d90a484df Move method only used by InstalledAppProviderService.
The method was only used here, so lets move the method here. May as well
make it private too until somebody else comes up with a use case for it.
2016-06-02 21:08:23 +10:00
Peter Serwylo
7076bb767d Clarify what needs to be passed into parseApp and make it private.
The `parseApp` method was previously accepting an `Intent`, which could
have been anything. Given it was only used once, this now pushed the
creation of that `Intent` into the `parseApp` method, and also reduced the
visibility of the method as it is only used once at time of writing.
2016-06-02 21:08:23 +10:00
Peter Serwylo
a74e951cdf Simplify code by creating the object when required rather than using singleton.
This should not be a particularly expensive opperation,. Also, at time of
writing it is only used in a background thread, and only used once in that
thread (i.e. not in a loop or anything like that).
2016-06-02 21:08:23 +10:00
Peter Serwylo
371312ef65 Replace rate limiting code with RX.
Now that we have RX as a dependency, it can be used as a nice concise way to
achieve certain tasks. Rate limiting is one thing it does well - via the
`debounce` mechanism:

  http://reactivex.io/documentation/operators/debounce.html

The semantics of this code is the same as before, limiting content change notifications
to one per second.
2016-06-02 21:08:18 +10:00
Peter Serwylo
fa7f57a18a Remove unused test code.
Since refactoring the installed app cache stuff, these methods are no longer
required for testing purposes. This is because the tests directly ask the
content provider to insert relevant apps, rather than testing the broadcast
receiving functionality.
2016-06-02 20:20:28 +10:00
Peter Serwylo
e80e445aa5 Merge branch 'master' into 'master'
InstalledAppProviderService

I worked a bunch to get the swap code to represent the lifecycle of things better.  This includes making `SwapService` stay alive as long as anything related to swap is running.  `SwapService` is then becomes the one thing that stores all the state of swap, then the state does not need to be stored in `SwapWorkflowActivity` or any of the swap views.

I would like to include this in 0.100, but only if y'all think it won't delay the release.  These changes are pretty much entirely contained in the swap stuff.  There is some changes to `App`, but those are in the `App(Context context, PackageManager pm, String packageName)`, which is the constructor that is only used for the swap stuff.  It also touches `RepoXMLHandler` but that change only adds `public` to the `IndexReceiver` interface.

See merge request !299
2016-06-02 10:18:49 +00:00
Hans-Christoph Steiner
cf4fedbe13 fix crash if an APK has a short embedded description
caught java.lang.StringIndexOutOfBoundsException:
  at java.lang.String.substring(String.java:1651)
  at java.lang.String.subSequence(String.java:2040)
  at org.fdroid.fdroid.data.App.setFromPackageInfo(App.java:298)
  at org.fdroid.fdroid.data.App.<init>(App.java:268)
  at org.fdroid.fdroid.localrepo.CacheSwapAppsService.onHandleIntent(CacheSwapAppsService.java:78)
  at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:130)
  at android.os.HandlerThread.run(HandlerThread.java:60)
2016-06-02 10:22:08 +02:00
Hans-Christoph Steiner
748352e5a1 do not update InstalledAppProvider if already current
This adds a check of whether the database has the current APK in it, based
on PackageInfo's lastUpdateTime field.  This avoids recalculating the hash
of the whole APK, which is quite time and resource intensive.
2016-06-02 10:22:07 +02:00
Hans-Christoph Steiner
90467bf8bf InstalledAppProvider: store APK hash and last update time
The APK hash is useful for comparing whether something is exactly the same
file as something else.  For example, to compare whether the installed APK
matches something that f-droid.org hosts.  The "last update time" is a fast
way to check whether the information is current.
2016-06-02 10:22:07 +02:00
Hans-Christoph Steiner
906a26414a rate limit InstallApp install/delete notifications to 1000ms
InstallAppProviderService now processes install and delete events one at a
time, where InstalledAppCacheUpdater made a batch of changes which it ran
all at once.  This means that InstallAppProviderService will send out a
flood of notifications when first initializing, since it will index every
single installed app and send a notification for each one.  This makes the
GUI lock up. This commit puts a rate limit on those notifications if they
start coming fast.  They are limited to one per second.
2016-06-02 08:36:31 +02:00
Hans-Christoph Steiner
d734e584f6 InstalledAppProviderService to replace InstalledAppCacheUpdater
InstalledAppCacheUpdater was a custom Service-like thing with some
threading issues.  InstalledAppProviderService is an IntentService that
relies on the built-in queue and threading of the IntentService to make
sure that things are processed nicely in the background and one at a time.

This changes the announcing so that each app added/changed/deleted triggers
a new annoucement.  This keeps the UI more updated, and makes the Installed
tab show something as soon as possible, rather than waiting for the all of
the install apps to be processed.  This becomes more important as more
stuff is added to InstalledAppProvider, like the hash of the APK.

This also strips down and simplifies the related BroadcastReceivers.
BroadcastReceivers work on the UI thread, so they should do as little work
as possible. PackageManagerReceiver just rebadges the incoming Intent and
sends it off to InstalledAppProviderService for processing.
2016-06-02 08:36:30 +02:00
Hans-Christoph Steiner
677db72bb3 Utils.getPackageUri() for creating Uris from packageNames
Since this is done a lot, might as well have a reusable method.
2016-06-02 08:36:30 +02:00
Hans-Christoph Steiner
ae3ea85355 SwapService should be running as long as anything swap is active
The SwapService is the central container for all things swap.  If anything
at all related to swap is active, then SwapService needs to be running.
That also means that stopping SwapService should stop all things related to
swapping, including any screens or notifications.

fixes #258 https://gitlab.com/fdroid/fdroidclient/issues/258
2016-06-02 08:36:30 +02:00
Hans-Christoph Steiner
335be87cf8 new CacheSwapAppsService for caching parsed apps to be swapped
Since it takes a chunk of time to generate and write the app index.jar when
swapping apps, this service starts running in the background immediately
when SwapService starts.  It first indexes the installed apps that were not
cached, then caches apps based PACKAGE_ADDED broadcasts.  It does not index
system apps, since there are many and they are rarely swapped.
2016-06-02 08:36:30 +02:00
Hans-Christoph Steiner
944d355e29 swap: skip writing index.xml, output straight to index.jar
This makes the index generation noticeably faster.  This also converts
IndexXmlBuilder to a singleton, since that's how it is used.
2016-06-02 08:36:30 +02:00
Hans-Christoph Steiner
3ec206b152 simplify local repo XML writing and remove dead code
This has a couple of things stuck in it that aren't really used at all,
like maxage.
2016-06-02 08:36:30 +02:00
Dominik
de238f3f5f Merge branch 'InstallManagerService-completion' into 'master'
InstallManagerService completion

This is a collection of fixes to finalize `InstallManagerService` now that !300 is merged.

See merge request !318
2016-06-01 22:23:50 +00:00
Hans-Christoph Steiner
43e902407f add some javadoc notes about the new installer stuff 2016-06-01 22:29:37 +02:00
Hans-Christoph Steiner
e95dec30b5 remove APK from active list if install process is interrupted
If the install process is interrupted, then InstallManagerService is no
longer managing it.  It will make the announcements and set the
notification, then forget about that APK.
2016-06-01 22:29:37 +02:00
Hans-Christoph Steiner
07cadd862a Installer IntentFilters must also match on host and port
Without this rule, two https:// URLs with the same path and APK name would
both match.  With multiple repo and swap support, this could easily happen.
2016-06-01 22:29:37 +02:00
Hans-Christoph Steiner
738a92f5d2 reduce visibility of installer extra constants
This should encourage devs to stick with the nice static methods that are
the "public" API.
2016-06-01 22:29:37 +02:00
Hans-Christoph Steiner
f949c5807f make swap install via InstallManagerService
Somehow, it ended up that there was a partial reimplementation of the
install in SwapWorkflowActivity.
2016-06-01 22:29:36 +02:00
Hans-Christoph Steiner
9d2fe4000d use download URL as unique ID through the whole install process
InstallManagerService and DownloaderService both use the download URL as
the unique ID to represent a given APK install through the whole lifecycle
of the install and download process.  This converts the installer stuff to
use the same semantics.  A Uri instance is mostly used there because its
the most useful format, but ultimately, the String, Uri, and int all derive
from the exact same URL.  This then removes the local APK URI from use in
the installer broadcasts.

While I normally think reusing terms from Android is the best thing to do,
"originating URI" drives me nuts because it is almost nonsense English.
"Originating" is a verb in the continuous form, meaning that it is an
action that is ongoing.  A URI is a static thing, and in this case, a URI
that points to a file that is completely downloaded.  I left the term in
place for DefaultInstaller because it wraps PackageManager, which is where
that term originates.

This handles "Use strings instead of Uris in InstallManagerService for
urlString" as listed in #680
2016-06-01 22:29:36 +02:00
Hans-Christoph Steiner
7385d320b4 fix crash when UpdateService receives null Intent
IntentServices can get a null Intent if they are restarted after being
killed.  So this should be properly handled.

"[The intent] may be null if the service is being restarted after its
process has gone away, and it had previously returned anything except
START_STICKY_COMPATIBILITY."
https://developer.android.com/reference/android/app/IntentService.html#onStartCommand(android.content.Intent,%20int,%20int)

ANDROID_VERSION=5.1.1
APP_VERSION_NAME=0.99.2
BRAND=samsung
PHONE_MODEL=SM-G901F
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getStringExtra(java.lang.String)' on a null object reference
	at org.fdroid.fdroid.UpdateService.onHandleIntent(UpdateService.java:342)
	at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:135)
	at android.os.HandlerThread.run(HandlerThread.java:61)
2016-06-01 21:00:10 +02:00
Hans-Christoph Steiner
6166d9afc9 fix random crash in WifiStateChangeService
Some of these devices do shitty things.

htc_europe HTC EVO 3D X515m

java.lang.RuntimeException: An error occured while executing doInBackground()
 at android.os.AsyncTask$3.done(AsyncTask.java:278)
 at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
 at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
 at java.util.concurrent.FutureTask.run(FutureTask.java:137)
 at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 at java.lang.Thread.run(Thread.java:864)
Caused by: java.lang.NullPointerException
 at java.net.NetworkInterface.getNetworkInterfacesList(NetworkInterface.java:286)
 at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:262)
 at org.fdroid.fdroid.net.WifiStateChangeService.setIpInfoFromNetworkInterface(WifiStateChangeService.java:202)
 at org.fdroid.fdroid.net.WifiStateChangeService.access$300(WifiStateChangeService.java:37)
 at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:99)
 at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:71)
 at android.os.AsyncTask$2.call(AsyncTask.java:264)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
 ... 5 more
java.lang.NullPointerException
 at java.net.NetworkInterface.getNetworkInterfacesList(NetworkInterface.java:286)
 at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:262)
 at org.fdroid.fdroid.net.WifiStateChangeService.setIpInfoFromNetworkInterface(WifiStateChangeService.java:202)
 at org.fdroid.fdroid.net.WifiStateChangeService.access$300(WifiStateChangeService.java:37)
 at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:99)
 at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:71)
 at android.os.AsyncTask$2.call(AsyncTask.java:264)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
 at java.util.concurrent.FutureTask.run(FutureTask.java:137)
 at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 at java.lang.Thread.run(Thread.java:864)
2016-06-01 21:00:10 +02:00
Hans-Christoph Steiner
984a507ffa fix random crash in WifiStateChangeService
java.lang.NullPointerException: Attempt to invoke virtual method
'android.os.Parcelable android.content.Intent.getParcelableExtra(java.lang.String)' on a null object reference
  at org.fdroid.fdroid.net.WifiStateChangeService.onHandleIntent(WifiStateChangeService.java:56)
  at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:135)
  at android.os.HandlerThread.run(HandlerThread.java:61)

fixes #559
2016-06-01 21:00:10 +02:00
Hans-Christoph Steiner
9c1b917604 Merge branch 'installerservice-wip' into 'master'
InstallerService

This merge request mainly introduces the ``InstallerService``. Many files have been touched and reworked in this merge request, due to the following changes:
* After download of an apk in ``InstallManagerService``, the ``InstallerService``is started an kicks off the installation process. For unattended installers this directly runs through without any user interaction, for the default installer a new PendingIntent containing ``DefaultActivityInstaller`` is returned that is either stuffed into the notification or directly started from ``AppDetails``
* Using local broadcasts, ``InstallManagerService`` and ``AppDetails`` are informed of state changes in the installation process
* ``DefaultActivityInstaller`` is a wrapper around the default installation APIs of Android
* If the unattended ``PrivilegedInstaller`` is available, a permission screen is shown before download
* Actual error codes and messages are displayed in notification or dialog on fail, especially interesting when using the ``PrivilegedInstaller``
* The process for installing the Privileged Extension has been moved into an own installer for logic seperation, called ``ExtensionInstaller``

Some design considerations:
* I try to use Uris where ever possible. At some points this clashes with the usage of ``urlString`` in ``InstallManagerService``. This could be fixed in a later merge request

Some other TODOs are left, but I would like to do them after this merge request has been merged if it's okay, as this one is already too huge:
* Check if apk permissions are the same as announced in the permission screen for ``PrivilegedInstaller``
* In ``Installer.newPermissionCount()``, I need the target SDK before download to check if it's targetting Android M, which does not require the permission screen
* Introduce FileProvider for Android N
* Redesign layout of ``InstallConfirmActivity``
* Remove "cancel" icon for installing progress in AppDetails

See merge request !300
2016-06-01 15:06:38 +00:00
Dominik Schürmann
b149cd64fd Removes remaining scopes from switch statements 2016-06-01 14:12:59 +02:00
Dominik Schürmann
619c4f284b Fix crash for apks with no permissions 2016-06-01 02:14:54 +02:00
Dominik Schürmann
1aa87ddf76 PrivilegedInstaller: Fix check for granted permissions
The onConnected callback of ServiceConnection is always
executed on the main looper of the context that is used
to create the service binding. Thus the old code resulted
in a deadlock and then in a timeout of the Thread.wait()
method.

The check for permissions is now called inside install and
uninstall callbacks, where it works asynchronously.
2016-06-01 02:14:51 +02:00
Dominik Schürmann
0b92806327 New error dialog on failed installs 2016-05-31 22:44:58 +02:00
Dominik Schürmann
5f1b7488f0 More Log.e for isExtensionInstalledCorrectly 2016-05-31 17:52:45 +02:00
Dominik Schürmann
886c67e452 Fix NPE for uninstall of extension 2016-05-31 17:28:55 +02:00
Dominik Schürmann
c5ae43d66c Remove UI code from PrivilegedInstaller 2016-05-31 17:15:07 +02:00
Dominik Schürmann
9e0787f23d Add javadoc to installer classes 2016-05-31 17:15:07 +02:00
Dominik Schürmann
b994b1c895 Fix selection of ExtensionInstaller 2016-05-31 17:15:07 +02:00
Dominik Schürmann
13f2e30a40 Make InstallerService an IntentService
Because only one apk should be installed at a time
and no cancelation is required it is sufficient to
use an IntentService
2016-05-31 17:15:07 +02:00
Dominik Schürmann
d6803e1bf4 Remove scopes from switch statements
also change two-case switch statements to if-else
2016-05-31 17:15:07 +02:00
Dominik Schürmann
f860257826 Fix pmd errors and code style 2016-05-31 17:15:07 +02:00
Dominik Schürmann
d3a7107a0f Fix checkstyle errors 2016-05-31 17:15:07 +02:00
Dominik Schürmann
2776b86050 Redesign PrivilegedInstaller
* use new local broadcasts
* show permission screen before download
* display permission screen as dialog
2016-05-31 17:15:07 +02:00
Dominik Schürmann
592cd0424a Better error handling for priv installer 2016-05-31 17:14:31 +02:00
Dominik Schürmann
4e8e148029 Display install errors as notify/dialog 2016-05-31 17:14:31 +02:00
Dominik Schürmann
de1d310499 Move installation of extension into own Installer 2016-05-31 17:14:31 +02:00
Dominik Schürmann
c5f9070370 Better error handling in privileged installer 2016-05-31 17:14:31 +02:00
Dominik Schürmann
bb273cd2f5 Use Uris more often instead of File 2016-05-31 17:14:31 +02:00
Dominik Schürmann
a2356b05d6 Refactor installer package 2016-05-31 17:13:53 +02:00
Dominik Schürmann
6d2f2d20a8 InstallerService 2016-05-31 17:13:26 +02:00
Hans-Christoph Steiner
4ef0642134 Merge branch 'ci-bumps' into 'master'
PMD and Checkstyle version bumps



See merge request !316
2016-05-31 14:39:04 +00:00
Daniel Martí
08e067c6ba pmd: bump to 5.4.2
This is a bugfix release where they mostly fixed false positives. No
changes required.
2016-05-30 22:08:19 +01:00
Daniel Martí
d4bb97db72 checkstyle: bump to 6.19
Seems like they finally fixed the hanging throws indent issue.
2016-05-30 22:04:33 +01:00
Daniel Martí
5e2da57565 Merge branch 'bump-minsdk' into 'master'
Bump minSdkVersion to 10, remove all compat code

Summary of changes:

* Remove compat apply()
* Remove compat setReadable()
* Remove pre-10 compat code in swap
* Remove pre-10 compat code in PRNGFixes

Fixes #663.

See merge request !296
2016-05-30 18:40:38 +00:00
Daniel Martí
cd1c213fb2 Bump minSdkVersion to 10, remove all compat code
Summary of changes:

* Remove compat apply()
* Remove compat setReadable()
* Remove pre-10 compat code in swap
* Remove pre-10 compat code in PRNGFixes

Fixes #663.
2016-05-30 19:25:06 +01:00
Daniel Martí
1bfd3425c9 Merge branch 'prep-for-InstalledAppProviderService' into 'master'
Prep for InstalledAppProviderService

This is basically a collection of little fixes in preparations for !299 .

See merge request !313
2016-05-27 20:31:00 +00:00
Hans-Christoph Steiner
a03629d29d SanitizedFileTest requires systems with "/" for a path separator
closes #622 https://gitlab.com/fdroid/fdroidclient/issues/622
2016-05-27 22:00:28 +02:00
Hans-Christoph Steiner
1914f5f3e1 remove unused app.uninstallable
app.uninstallable is only used in AppDetails.  It is only set when
generating App instances from installed APKs for the swap stuff. Since it
is initialized to false and used as !app.uninstallable, it is always true
when used.  So it was doing nothing.

This needs to be thought out more so this is not entirely complete for
#628. AppDetails needs to know whether its a system app to provide proper
feedback and swap needs to know whether its a system app with an update
installed, otherwise it should ignore it.
2016-05-27 22:00:28 +02:00
Hans-Christoph Steiner
f7688d7f9a convert App comments to javadoc so they can be read in popups, etc.
Decent Java editors have all sorts of nice ways to show javadoc comments,
whether they are for public or private APIs.  So comments should be in that
format whenever possible.
2016-05-27 22:00:28 +02:00
Hans-Christoph Steiner
1410a720c8 reorganize swap's App() constructor to prepare for database caching
To generate swap's index.jar, lots of information about all the installed
APKs needs to be parsed.  That can take a long time.  Some of that can be
stored in InstalledAppProvider.  This prepares for those changes.

Also, turns out that packageInfo.applicationInfo provides enough info, so
there is no need to use pm.getApplicationInfo().  And the metadata from
GET_META_DATA was not even being used.
2016-05-27 22:00:28 +02:00
Hans-Christoph Steiner
aca94bcb68 move Provider tests into same java package the Providers
This allows the tests to call more methods directly without having to use
`public` visibility.
2016-05-27 22:00:28 +02:00
Hans-Christoph Steiner
c947f24495 simple test for WifiStateChangeService.formatIpAddress()
94f79a6438c7021db9c02003865c17f3a0da1718 made me want to be sure
2016-05-27 16:15:15 +02:00
Hans-Christoph Steiner
68375163f5 only use swap header image on large screens
The previous logic was putting the header on some 4" screens while not
putting it on a 7" tablet.  Tested with:

* Samsung Galaxy Tab 3 7"
* Azpen A727 7"
* Xiaomi 4.5"
* Lenovo 4"
* emulators...
2016-05-27 16:15:15 +02:00
Hans-Christoph Steiner
1591851273 remove "Try to install" from swap UI
This should no longer be necessary since the local swap repo metadata now
includes the nativecode tag.

#30 https://gitlab.com/fdroid/fdroidclient/issues/30
2016-05-27 16:15:15 +02:00
Hans-Christoph Steiner
15005372a2 mark as compatible when App/Apk instances are from installed apps
By definition, an app that is already installed is compatible.
2016-05-27 12:26:17 +02:00
Daniel Martí
77376dfa42 Merge branch 'fix-empty-app-list' into 'master'
Use initLoader instead of resetartLoader. Call onResume after setting category.

While working on !311, I had some logging in place in the `AppProvider`. I ended up straying into an investigation of issue #606 and noticed with my logging that we have been doing more queries than required for some time, because the loader was being forceably recreated when it could instead be reused in onResume.

Perhaps more importantly, we were querying twice for list of apps to display. The first time is "Give me all the apps" because we haven't set the category yet. Then we set the category, which causes us to ask for "Apps matching this category". The fix for this is for the `onResume` method (which results in a cursor being created) to be called _after_ setting the selected category is set. This ensures that the query is run has the correct category the first time, and needn't be run again.

I am not confident that this fixes the issue in #606, but I haven't seen it reproduced since I've implemented this fix.

See merge request !312
2016-05-26 13:12:25 +00:00
Peter Serwylo
810e8eae0d Use initLoader instead of resetartLoader. Call onResume after setting category.
While investigating the infamous issue #606, I noticed these two things which
were a little off. Firstly, we were doing more queries than required, because the
loader was being forceably recreated when it could instead be reused in onResume.

Also, the onResume method (which results in a cursor beign created) should be
called _after_ setting the selected category. This ensures that the query
which is run has the correct category the first time, and needn't be run again.

I am not confident that this fixes the issue, but it seems to help, and I believe
it is the correct thing to do even if it doesn't fix 606.
2016-05-26 10:58:17 +10:00
Hans-Christoph Steiner
082a2f5fef Merge branch '0.100-alpha8-fixes' into 'master'
0.100 alpha8 fixes

3 bug fixes for ACRA crash reports

See merge request !310
2016-05-25 00:31:45 +00:00
Hans-Christoph Steiner
94f79a6438 prevent crash caused by bad netmask given to WifiStateChangeService
My guess is that is from IPv6, but those should be filtered out in this
code before it gets to the crash point.  Here's the stacktrace:

java.lang.RuntimeException: An error occured while executing doInBackground()
	at android.os.AsyncTask$3.done(AsyncTask.java:300)
	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
	at java.util.concurrent.FutureTask.run(FutureTask.java:242)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
	at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.IllegalArgumentException: Value [64] not in range [0,32]
	at org.apache.commons.net.util.SubnetUtils.rangeCheck(SubnetUtils.java:339)
	at org.apache.commons.net.util.SubnetUtils.calculate(SubnetUtils.java:264)
	at org.apache.commons.net.util.SubnetUtils.<init>(SubnetUtils.java:51)
	at org.fdroid.fdroid.net.WifiStateChangeService.setIpInfoFromNetworkInterface(WifiStateChangeService.java:222)
	at org.fdroid.fdroid.net.WifiStateChangeService.access$300(WifiStateChangeService.java:37)
	at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:99)
	at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:71)
	at android.os.AsyncTask$2.call(AsyncTask.java:288)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	... 4 more
java.lang.IllegalArgumentException: Value [64] not in range [0,32]
	at org.apache.commons.net.util.SubnetUtils.rangeCheck(SubnetUtils.java:339)
	at org.apache.commons.net.util.SubnetUtils.calculate(SubnetUtils.java:264)
	at org.apache.commons.net.util.SubnetUtils.<init>(SubnetUtils.java:51)
	at org.fdroid.fdroid.net.WifiStateChangeService.setIpInfoFromNetworkInterface(WifiStateChangeService.java:222)
	at org.fdroid.fdroid.net.WifiStateChangeService.access$300(WifiStateChangeService.java:37)
	at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:99)
	at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:71)
	at android.os.AsyncTask$2.call(AsyncTask.java:288)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
	at java.lang.Thread.run(Thread.java:841)
2016-05-24 21:47:45 +02:00
Hans-Christoph Steiner
2897dcb67e fix crash when InstallManager is killed while actively downloading
This is very related to #660 but this time, I can't see any other way to
solve it but a null guard.  I don't think it is possible to guarantee that
the Downloader.ACTION_INTERRUPTED receiver will be unregistered since
onDestroy() might not even be called.

java.lang.NullPointerException
	at org.fdroid.fdroid.installer.InstallManagerService.removeFromActive(InstallManagerService.java:328)
	at org.fdroid.fdroid.installer.InstallManagerService.access$400(InstallManagerService.java:58)
	at org.fdroid.fdroid.installer.InstallManagerService$4.onReceive(InstallManagerService.java:212)
	at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297)
	at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46)
	at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116)
	at android.os.Handler.dispatchMessage(Handler.java:110)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:5353)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:515)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:830)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:646)
	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
	at dalvik.system.NativeStart.main(Native Method)
2016-05-24 21:47:45 +02:00
Hans-Christoph Steiner
fb3dcb293d fix crash with Bluetooth on android-10
android.bluetooth.BluetoothSocket.isConnected() is only 14+

java.lang.NoSuchMethodError: android.bluetooth.BluetoothSocket.isConnected
  at org.fdroid.fdroid.net.bluetooth.BluetoothConnection.open(BluetoothConnection.java:37)
  at org.fdroid.fdroid.net.bluetooth.BluetoothClient.openConnection(BluetoothClient.java:31)
  at org.fdroid.fdroid.net.BluetoothDownloader.<init>(BluetoothDownloader.java:30)
  at org.fdroid.fdroid.net.DownloaderFactory.create(DownloaderFactory.java:56)
  at org.fdroid.fdroid.RepoUpdater.downloadIndex(RepoUpdater.java:97)
  at org.fdroid.fdroid.RepoUpdater.update(RepoUpdater.java:131)
  at org.fdroid.fdroid.UpdateService.onHandleIntent(UpdateService.java:377)
  at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:130)
  at android.os.HandlerThread.run(HandlerThread.java:60)
2016-05-24 21:47:45 +02:00
Daniel Martí
3f525c9bae Merge branch 'parsing-and-notifications' into 'master'
parsing and notification fixes

This is a follow up to !306

See merge request !309
2016-05-24 15:35:26 +00:00
Hans-Christoph Steiner
5f623e0c4a after downloading is complete, update notification to "Tap to install"
f9a30d2e1c9d95302e8f4dd0e733d019f70bed66 broke the "Tap to install" aspect.
2016-05-24 09:25:11 +02:00
Hans-Christoph Steiner
f08f8cb53d only parse <uses-sdk> once when looking for min/max SDK version
When building APK instances from installed apps, the minSdkVersion and
maxSdkVersion needs to be parsed directly from the APK's Android Manifest,
since PackageManager does not provide a method to get it how we need it.
Previously, the whole AndroidManifest.xml file was parsed entirely twice,
once for minSdkVersion then for maxSdkVersion.
2016-05-24 09:25:11 +02:00
Hans-Christoph Steiner
02d98826a9 when parsing APKs for the local repo, correctly set maxSdkVersion
The original logic had maxSdkVersion=0 meaning infinity. That was changed
to be a very large value SDK_VERSION_MAX_VALUE, but getMinMaxSdkVersion()
was still returning 0 for APKs where maxSdkVersion was not set.

This is a follow up on fc0df0dcf4dd0d5f13de82d7cd9254b2b48cb62d
2016-05-24 09:25:11 +02:00
Hans-Christoph Steiner
d54748ff39 SuppressLint("ParcelCreator") on MockApplicationInfo
Apparently, the CREATOR field is not (yet?) needed in the tests, since
they work without it.  This gets us closer to making lint errors fail
the CI builds.

closes #580
2016-05-24 09:24:25 +02:00
F-Droid Translatebot
f631d16828 Pull translation updates from Weblate
Translators:

Ajeje Brazorf         Sardinian
Allan Nordhøy         Norwegian Bokmål
Enol P                Asturian
ezjerry liao          Traditional Chinese
Olexandr Nesterenko   Ukrainian
Tijmen Ennik          Dutch
2016-05-23 15:35:27 +01:00
Peter Serwylo
215a493fa6 Merge branch 'lets-make-a-stable-release' into 'master'
notification update improvements

Ok, I made a mistake in c35d327fa4c503425c629d49778c001b08ecb833 / !301 that messed up installing.  Turns out it was a simple fix: 0838a15792fd70afde4e3743296ce88c961a299e  This also removes the _Cancel_ button from the one active download notification to provide a working, albeit verbose, notification UX for 0.100.

After this commit, these commits and the ones from !301 should be included in `stable-0.100` and a new alpha tagged :)

See merge request !306
2016-05-23 14:33:24 +00:00
Hans-Christoph Steiner
f9a30d2e1c reuse Notification.Builder instances
This is the recommended way to deal with updating Notifications. Each new
update should be a new Notification, but the same Builder instance should
be used to generate each new Notification instance.
2016-05-23 16:13:17 +02:00
Hans-Christoph Steiner
478538690e fix issue where first time installs do not work
New installs where being caught up in the logic to check whether a download
is still in progress after InstallManagerService got killed. Also checking
whether Intent was just redelivered lets the new installs through while
screening out the inactive Intents that were redelivered.  This logic also
cancels the notification for any download that was in progress when the
InstallManagerService was killed.

#660
2016-05-23 13:58:50 +02:00
Hans-Christoph Steiner
3df44ce302 Merge branch 'fix-connected10' into 'master'
CI: remove MALLOC_ARENA_MAX env vars



See merge request !304
2016-05-23 09:09:52 +00:00
Hans-Christoph Steiner
d4d5fb1908 Merge branch 'check-repo-index-timestamps' into 'master'
Check repo index timestamps

The Update Framework documents provide a [nice discussion of possible attacks](https://github.com/theupdateframework/tuf/blob/develop/SECURITY.md) against update systems.  One example is a "rollback attack", where the attacker just serves the old signed `index.jar` to keep all clients from updating their apps.  That allows the attacker to exploit known vulnerabilities in those un-updated apps.

While this is a reasonably hard attack, this fix is an important step towards removing the requirement for trusting the web server operator.  Ultimately, it should be able trusting the index signing key only.  Then it doesn't matter were the files come from, it just matters that they are verifiably signed by the index signing key.

This does not address "freeze attacks" since it allows an index update with the same timestamp.  I did that deliberately to slowly ramp up the security checks in order to avoid problems along the way. Code-wise, blocking freeze-attacks is mostly a matter of changing the timestamp check from `<` to `<=`.

See merge request !302
2016-05-21 19:56:49 +00:00
Hans-Christoph Steiner
79d2bd120e Merge branch 'couple-more-0.100-fixes' into 'master'
Couple more 0.100 fixes

This is a couple more bug fixes towards finally releasing 0.100.  These should be cherry-picked into `stable-0.100`.

See merge request !301
2016-05-20 19:46:48 +00:00
Hans-Christoph Steiner
e1f65cab62 prevent divide-by-zero errors when showing update download progress 2016-05-20 21:35:06 +02:00
Hans-Christoph Steiner
0ab80e4c6a delete the APK copy that Installer instances make
Installer instances always copy the APK to a safe place to run the install
from.  That copy needs to be deleted.  Until we have the whole lifecycle in
InstallManagerService, we need this hack. It should be handled on the
broadcast from InstallerService to say that its complete.

#611 !300
2016-05-20 21:35:06 +02:00
Hans-Christoph Steiner
c35d327fa4 include all needed data in install Intents
Including the App and Apk instances in the Intent that starts
InstallManagerService ensures that the needed data is present in the
Service no matter what happens outside of the Service.  For example, if the
index is updated or cleared while an install is in progress, the install
process still needs to know the name and packageName of the app to update
the Notification.

A cleaner but more labor-intensive way to implement this would be to make
App and Apk properly implement the full Parcelable interface.  That would
require tests to check that the Parcelable methods have all the same fields
as toContentValues() and the database.

closes #660 https://gitlab.com/fdroid/fdroidclient/issues/660
2016-05-20 21:35:06 +02:00
Daniel Martí
b57a57cfc1 CI: remove MALLOC_ARENA_MAX env vars
The connected checks on both emulators ran fine more than 30 times
without these. No noticeable slowdown either.
2016-05-20 12:20:18 +01:00
Daniel Martí
d1cdfab67a Merge branch 'bump-support' into 'master'
Bump support libs to 23.4.0



See merge request !303
2016-05-20 10:36:39 +00:00
Hans-Christoph Steiner
086ff54b5f move versionCode to app/build.gradle to match versionName
on @mvdan's request
2016-05-20 12:19:17 +02:00
Daniel Martí
30eaf328fd Bump support libs to 23.4.0 2016-05-20 11:12:34 +01:00
Hans-Christoph Steiner
f1a31a7fe3 RepoUpdaterTest: convert writable test to JUnit assumption
This will mark the test as ignored rather then succeeded if it cannot find
a writable dir.
2016-05-20 12:04:36 +02:00
Hans-Christoph Steiner
02b2090e53 check repo index timestamps to prevent rollback attacks
A hacked fdroid server could "replay" old index.jar files known to have
apps with vulnerabilities in it.  That provides a long window of time for
exploiting that vulnerability.  By checking that the timestamp of an update
is never older than the current index, this attack is prevented.
2016-05-20 12:04:36 +02:00
Hans-Christoph Steiner
014ab2d2b6 use Environment.getRootDirectory() instead of /system
Its officially possible to have the ROM's filesystem with any name. While I
have never seen that in practice, Android does provide an easy method to
get the real name.  Plus this should help avoid typos and the like, and
make it easy to track things that rely on that filesystem path.
2016-05-20 12:04:34 +02:00
Hans-Christoph Steiner
f7c043b3fc set versionName based on git release tag
This makes it easy to tell which debug build a device is running, since the
versionName now automatically describes the exact commit that was built,
based on `git describe`, e.g.:  0.100-alpha7-33-gc2e8e8a

For release builds, i.e. builds from commits that are tagged as releases,
the versionName will be just the tag name: 0.100-alpha8

closes #664 https://gitlab.com/fdroid/fdroidclient/issues/664
2016-05-20 08:42:28 +02:00
Daniel Martí
7fbce1f09c Merge branch 'master' into 'master'
Add template for e-mail

Subject: [App] on F-Droid

See merge request !297
2016-05-19 14:59:34 +00:00
Nico Alt
e91ba13601 Set default subject in e-mails
Fixes #600.
2016-05-19 15:26:12 +02:00
Daniel Martí
93ae78b46f Merge branch 'last-few-0.100-issues' into 'master'
Last few 0.100 issues

This is a collection of fixes towards issues in 0.100.  It should be also merged into `stable-0.100`.

See merge request !298
2016-05-19 10:44:01 +00:00
Hans-Christoph Steiner
2c017e158d gitlab-ci: connected10 does not mark build as failed
The connected10 build is not yet stable, and it has odd crashes.  So it
should not affect the overall success/fail marking. For example:

https://gitlab.com/eighthave/fdroidclient/builds/1430790
2016-05-19 10:48:55 +02:00
Hans-Christoph Steiner
c862eb0bd3 safely handle nulls that start InstallManagerService
For some odd reason, something is sending a URL to be downloaded that then
results in a null Apk instance.  My first guess was because it was being
canceled, but the interrupted receiver is not even registered yet. My
second thought is that something is sending a download and cancel Intent at
the same time.  In any case, its something to keep in mind when reworking
InstallManagerService once InstallerService comes along.

closes #660 https://gitlab.com/fdroid/fdroidclient/issues/660
2016-05-18 21:25:41 +02:00
Hans-Christoph Steiner
507f17e19e always set App.icon when instantiating from installed app
The App(Context context, PackageManager pm, String packageName) constructor
was not setting App.icon, which is required for lots of things.  This makes
it always get set, since its just a standard file name, and it does not
have to even exist yet.
2016-05-18 21:25:41 +02:00
Hans-Christoph Steiner
2038b7e1cb only generate basic swap index.jar if none exists
Let's keep the index.jar around as a cache of parsed information.

LocalRepoManager.getApps() was totally unused
2016-05-18 21:25:41 +02:00
Hans-Christoph Steiner
897ed989b1 fixes #633 update download progress regression
When reworking this in 7f10be18c6dd0b69e2fdbae98d09b197e60af443, I confused
the "Processing" with the "Downloading", probably because I thought those
steps were combined, but they are not. Also, I forgot that Downloader
instances do not broadcast status. So its just a matter of setting up the
right ProgressListeners.

https://gitlab.com/fdroid/fdroidclient/issues/633
2016-05-18 21:25:41 +02:00
Hans-Christoph Steiner
23ab7046bc parse APK for <nativecode> info in local repos
This parses the APKs for swapping, looking for what kinds of native code it
includes.  This is used in the compatibility check.

closes #30 https://gitlab.com/fdroid/fdroidclient/issues/30
2016-05-18 21:25:41 +02:00
Hans-Christoph Steiner
4224d6df81 only update static WiFi settings var from WifiInfoThread
Since Intents can come in any time, whether WifiInfoThread is running or
not, the global static vars for storing the WiFi settings info should only
be updated from the WifiInfoThread.  Otherwise, the WiFi settings could be
nulled out between the time of the null guard and the execution in code
like this:

if (!TextUtils.isEmpty(FDroidApp.ipAddressString) && netmask != null) {
  FDroidApp.subnetInfo = new SubnetUtils(FDroidApp.ipAddressString, netmask).getInfo();

fixes #589 https://gitlab.com/fdroid/fdroidclient/issues/589

java.lang.RuntimeException: An error occured while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:304)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.IllegalArgumentException: Could not parse [null/24]
        at org.apache.commons.net.util.SubnetUtils.calculate(SubnetUtils.java:275)
        at org.apache.commons.net.util.SubnetUtils.<init>(SubnetUtils.java:62)
        at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:89)
        at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:70)
        at android.os.AsyncTask$2.call(AsyncTask.java:292)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        ... 4 more
java.lang.IllegalArgumentException: Could not parse [null/24]
        at org.apache.commons.net.util.SubnetUtils.calculate(SubnetUtils.java:275)
        at org.apache.commons.net.util.SubnetUtils.<init>(SubnetUtils.java:62)
        at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:89)
        at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:70)
        at android.os.AsyncTask$2.call(AsyncTask.java:292)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)
2016-05-18 21:25:41 +02:00
Hans-Christoph Steiner
16a36f212c fix download progress when installing apps via swap
fixes issue that came from all the #601 !278 changes
2016-05-18 21:25:41 +02:00
Hans-Christoph Steiner
da1e3b93de Merge branch 'fix-604--swap-ui-smallness'
Correctly expand list of nearby people to the entire height of the screen.

NOTE: To be cherry-picked into stable-v0.100

If the device is small, then the "Conenct and trade apps with people
near you" header takes up too much space and we end up not being able
to see any nearby people at all, even if they are in the list. As
such, this also removes that header for "small" and "ldpi"
devices. During testing I found that "small" was not enough, because a
240x400 screen is considered "medium" and there is not enough
space. ldpi seems to be a reasonable metric for "that header is going
to be taking valuable space and should not be shown then".

All larger devices retain the header and seem to look nice.

This also pushes the "Can't find what you're looking for?" message and
associated buttons right to the bottom of the screen. This is more in
line with the original design.

Fixes #604.
Screenshots
No good

The image below shows a 240x400 device. This falls into the "medium"
screen size, and so would include the header if I only used
"layout-small". As such, I also removed the header for
"layout-ldpi". It doesn't look absolutely terrible, but remember that
this is an emulator without Bluetooth, and as such it is missing a UI
element for enablign Bluetooth which would take up the remaining real
estate:

emu-240x400
Good

Large devices work well now, with all of the empty space below
available for the "Nearby Devices":

large_device

Also, small devices should exclude the header and provide just enough
space for the list of pears (as shon by this 240x320 device):

emu-240x320dp

Here is a more normal sized phone (my Moto X 2nd gen with normal DPI
settings):

moto_x_2nd_gen__largish_

closes !291
See merge request !291
2016-05-17 13:28:37 +02:00
Peter Serwylo
8d742b7e30 Correctly expand list of nearby people to the entire height of the screen.
If the device is small, then the "Conenct and trade apps with people near you"
header takes up too much space and we end up not being able to see any nearby
people at all, even if they are in the list. As such, this also removes that
header for "small" and "ldpi" devices. During testing I found that "small" was
not enough, because a 240x400 screen is considered "medium" and there is not
enough space. ldpi seems to be a reasonable metric for "that header is going to
be taking valuable space and should not be shown then".

All larger devices retain the header and seem to look nice.

This also pushes the "Can't find what you're looking for?" message and associated
buttons right to the bottom of the screen. This is more in line with the original
design.

Fixes #604.
2016-05-17 13:27:49 +02:00
Hans-Christoph Steiner
571dfa8e1d Merge branch 'add-api10-emulator' into 'master'
CI: Add android-10 connectedCheck task

GitLab doesn't currently support any kind of build or env matrix, so we
have to duplicate this code. This is due to change in upcoming releases,
at which point I'll fix this.

See merge request !293
2016-05-17 09:55:00 +00:00
Daniel Martí
97807b8f0a Merge branch 'auto-requery-for-adapters' into 'master'
Ensure `FLAG_AUTO_REQUERY` is used for main app list adapters.

**NOTE: This has a sister MR which is targeting the `stable-v0.100` and thus should *not* be cherry-picked across to that branch.**
 
Although this is deprecated, and will result in queries being run on the main thread, it is required to fix #606. In the future, `LoaderManagers` should be used to address the concerns of querying on the main thread.

See merge request !294
2016-05-16 14:54:43 +00:00
Peter Serwylo
c7b6313907 Ensure FLAG_AUTO_REQUERY is used for main app list adapters.
Although this is deprecated, and will result in queries being run on the
main thread, it is required to fix #606. In the future, `LoaderManagers`
should be used to address the concerns of querying on the main thread.
2016-05-16 23:53:06 +10:00
Daniel Martí
d578327385 CI: Rename build task to test
To clarify that it is running the unit tests too.
2016-05-16 11:57:49 +01:00
Daniel Martí
2d24a54033 CI: Add android-10 connectedCheck task
GitLab doesn't currently support any kind of build or env matrix, so we
have to duplicate this code. This is due to change in upcoming releases,
at which point I'll fix this.
2016-05-16 11:57:15 +01:00
Daniel Martí
611db650d5 Merge branch 'fix-661--prevent-notification-swiping' into 'master'
Don't allow download notifications to be cancelled, other than our "Cancel" action on them.

*NOTE: To be cherry-picked into stable-v0.100*

As a user, I expect removing a notification of a pending action to cancel that pending action. This change makes the pending notifications uncancellable, unless users use our cancel action added to the events by @paresh. If the user is on an older device that doesn't support these type of rich notifications, then they will need to touch the pending download notification, which will take them to the `AppDetails` activity for that app. From there, they can cancel the install, which will remove the app from the pending download queue.

Until the notifications are reworked, this is the simplest solution. In the near future, the notifications will likely be combined into one more intelligent notification with better defined semantics.

See merge request !292
2016-05-15 12:52:20 +00:00
Peter Serwylo
f184c97354 Don't allow download notifications to be cancelled, other than our "Cancel" action on them.
Until the notifications are reworked, this is the simplest solution.
In the near future, the notifications will likely be combined into one
more intelligent notification with better defined semantics.
2016-05-15 11:53:04 +10:00
Peter Serwylo
b2f7fbd980 Merge branch 'installer-manager-cosmetic-changes' into 'master'
Installer manager cosmetic changes

This branch as some cosmetic code changes related to the `InstallManagerService`. I have a few more that I'll be throwing in here too as I go along. By and large, it is renaming, annotating, minor refactoring. The semantics should not change at all with this change, any fixes to the `InstallManagerService` will be done through separate MRs. They are from issues listed in [this comment](https://gitlab.com/fdroid/fdroidclient/merge_requests/278#note_11762414) during my CR and testing of !278.

I realise that cosmetic changes often come with baggage because we all have slightly different ideas of what Java code should look like, but in general, I will strive to only make changes if I believe strongly that they will:
 * Improve understanding of the code (i.e. renaming, extracting methods)
 * Prevent future errors by new contributors (e.g. @NonNull/@Nullable annotations, extracting classes to encapsulate logic which requires developers to know they need to change multiple things at once)

I try not to make changes because:
 * I have a different opinion about formatting.
 * Hopefully any other unreasonable or disagreeable reason.

See merge request !282
2016-05-14 22:42:29 +00:00
Peter Serwylo
da8a142510 Fix Android Studio warnings.
Type parameters can be ommited if defined and declared in same statement.
`onStart()` is deprecated and not required, as we target APIs > 5.
`Intent.FLAG_ACTIVITY_CLEAR_TASK` is not supported on APIs < 11 but we target 8.
2016-05-15 08:33:29 +10:00
Peter Serwylo
ef75f30701 Ignore intents other than ACTION_INSTALL 2016-05-15 08:31:53 +10:00
Peter Serwylo
4f6910fca7 Rename 'startDownload' to 'initiateInstall'.
This is more apt given the change from `DownloaderService` to `InstallManagerService`.
2016-05-15 08:31:53 +10:00
Daniel Martí
f7299c6537 Merge branch 'WifiStateChangeService-fixes' into 'master'
WifiStateChangeService fixes

`WifiStateChangeService` had a number of issues, including being run often when there was no change, and being run twice at start-up.  Also, its _complete_ broadcast was being sent twice, in effect. That made for a lot of flaky behavior for the things that rely on that information, namely wifi swap.

See merge request !289
2016-05-13 11:06:18 +00:00
Hans-Christoph Steiner
5bb73999ad more javadoc about how the download URL is used as a unique ID 2016-05-13 12:52:48 +02:00
Hans-Christoph Steiner
426e03a649 switch out swap Repo instance all at once
Before, it would change fields in a final Repo instance, which means that
things could be out of sync when accessed.  Now it swaps out the old one
with a new Repo instance in one step.

The local repo variables are now declared volatile so that they are more
predictable when accessed from various threads (WifiStateChangeService,
SwapService, etc.)

askServerToSwapWithUs(NewRepoConfig) was unused, so I removed it.
2016-05-13 12:52:48 +02:00
Hans-Christoph Steiner
26d173acdc convert WifiStateChangeService to IntentService
The IntentService provides the nice incoming Intent queue.  It also runs
the Intent in a thread, so even the initial check is now in a very low
priority thread.  The queuing prevents the incoming Intents from competing.
This also simplifies the code since the lifecycle is more automatic now.
2016-05-13 12:52:48 +02:00
Hans-Christoph Steiner
7eeab77aaf in ACRA process, do not run everything in FDroidApp.onCreate()
The `android:process` statement in AndroidManifest.xml causes another
process to be created to run CrashReportActivity.  This was causing lots of
things to be started/run twice including CleanCacheService and
WifiStateChangeService.
2016-05-13 12:52:48 +02:00
Daniel Martí
9b96282cbf Bump to 0.100-alpha7 2016-05-12 23:12:10 +01:00
F-Droid Translatebot
c7f92d2ee6 Pull translation updates from Weblate
Translators:

Boris Timofeev           Russian
ezjerry liao             Traditional Chinese
Kristoffer Grundström    Swedish
Licaon Kter              Romanian
2016-05-12 23:06:13 +01:00
Daniel Martí
d9f1215142 Merge branch 'install-lint' into 'master'
Ignore lint for GET_UNINSTALLED_PACKAGES



See merge request !287
2016-05-12 22:04:34 +00:00
Daniel Martí
d1d0f13a41 Merge branch 'priv-stub' into 'master'
Use IPrivilegedCallback.Stub()



See merge request !288
2016-05-12 21:55:18 +00:00
Dominik Schürmann
0984a93133 Ignore lint for GET_UNINSTALLED_PACKAGES
Lint says that only GET_META_DATA and GET_SHARED_LIBRARY_FILES are allowed.
This contradicts Android's documentation where GET_UNINSTALLED_PACKAGES
is also allowed.

Fixes #605
2016-05-13 00:53:20 +03:00
Dominik Schürmann
6c84c79397 Use IPrivilegedCallback.Stub() 2016-05-13 00:44:24 +03:00
Daniel Martí
9a6e2f0c71 Merge branch 'android-n' into 'master'
Workaround for Android N2 preview bug with EXTRA_RETURN_RESULT

A workaround for the bug discussed in https://gitlab.com/fdroid/fdroidclient/issues/631
The check against N is ugly, because: https://commonsware.com/blog/2016/03/17/backwards-compatibility-n-developer-preview.html

After removing EXTRA_RETURN_RESULT for Android N, we no longer get a result back on N, so instead of a proper error handling I always assume that the installation succeeds. Better than nothing...

See merge request !286
2016-05-12 21:43:22 +00:00
Dominik Schürmann
69e2546821 Workaround for Android N2 preview bug with EXTRA_RETURN_RESULT 2016-05-13 00:20:08 +03:00
Daniel Martí
00608c1bc3 Merge branch 'master' into 'master'
swap fixes for 0.100

Here are a couple of swap fixes for the upcoming 0.100 release.

See merge request !285
2016-05-12 19:17:12 +00:00
Hans-Christoph Steiner
768b3d7688 register event receivers for SwapAppsView when Apk is available
This was crashing when coming to SwapAppsView because some of the flow
changed related to the new DownloaderService and InstallManagerService.

Also, this lazy loading is a tiny optimization that we cannot afford right
now, there are far too many lifecycle bugs with swap.
2016-05-12 19:05:26 +02:00
Hans-Christoph Steiner
cad7a9687d manage InstallManagerService queue with methods
This should hopefully make it a bit clearer how the list of active APKs is
managed.
2016-05-12 19:05:19 +02:00
Hans-Christoph Steiner
80ed1e7180 prevent crash when starting swap in Android 6.0+
This just stops the crash for now, it does not yet request the permission.
That'll be part of the big UX overhaul.

#656 https://gitlab.com/fdroid/fdroidclient/issues/656
2016-05-12 19:05:19 +02:00
Daniel Martí
e96dcd653d Merge branch 'ci-emulators' into 'master'
CI: speed up running of Android tests



See merge request !284
2016-05-12 16:47:42 +00:00
Daniel Martí
03da7366c9 CI: Don't use the confusing "build" gradle task
Be more explicit about what we're running. This also means that we wont
run the "read log here" stuff if the build failed, which didn't make any
sense. That should only be run if the unit tests fail.
2016-05-12 17:39:39 +01:00
Daniel Martí
6363e14f10 CI: Remove lock file after every task
I tried using after_script, but it seems to not be supported on
gitlab.com's public runners.
2016-05-12 15:40:48 +01:00
Daniel Martí
f02e478cc4 CI: No more need to set ADB_INSTALL_TIMEOUT
The default was bumped in the Android plugin version 2.0.0, so we are
safe now.
2016-05-12 15:40:48 +01:00
Daniel Martí
8ef32eba0c CI: Move variables to connectedCheck
AVD_SDK is only used there. And MALLOC_ARENA_MAX was added when the
android-17 emulator was added, so it should stay there.
2016-05-12 15:40:48 +01:00
Daniel Martí
7de5d4d551 Remove broken test coverage
This never worked properly with the Gitlab UI. Now it's even more broken
since we run the tests in different jobs.
2016-05-12 15:40:47 +01:00
Daniel Martí
9d79d372cd CI: Split build and connectedCheck tasks
Advantages:

* Failing unit tests don't keep the android tests from running
* CI should be overall faster as the tasks get run in parallel and the
  former `gradle` task was the longest by far

This will later simplify the multiplexing of the android tests onto
multiple emulators.
2016-05-12 15:40:47 +01:00
Daniel Martí
dc9973cdbc CI: set up android-17 emulator with the image 2016-05-12 15:10:38 +01:00
Hans-Christoph Steiner
2e04d4b82c Merge branch 'pmd-2' into 'master'
Enable a few more PMD rules

I did one last pass over https://pmd.github.io/pmd-5.4.1/pmd-java/rules/index.html and these are the only sane rules left that I could find.

So I'm pretty much done with adding PMD stuff :) Don't know if anyone feels strongly in favour of adding findbugs, but I think checkstyle+PMD is good for now.

See merge request !283
2016-05-12 12:53:56 +00:00
Daniel Martí
c432bf1ea0 PMD: Enable most empty code rules 2016-05-12 13:34:20 +01:00
Daniel Martí
65e2931fe8 PMD: Enable UnnecessaryWrapperObjectCreation 2016-05-12 13:34:20 +01:00
Daniel Martí
7a8151753b Changelog updates in preparation for 0.100 2016-05-12 11:51:17 +01:00
Peter Serwylo
9680ba1694 Merge branch 'enable-pmd-java-basic' into 'master'
Enable PMD java-basic

This is the fixes necessary to enable PMD's `java-basic` ruleset.  I think there will be a few rules in there that will largely be annoying, so we'll need to ultimately decide whether to use `// NOPMD` or just specify the rules we want from `java-basic`.

See merge request !280
2016-05-12 08:32:24 +00:00
Hans-Christoph Steiner
7fbdfaaae7 enable PMD's java-basic ruleset
* CollapsibleIfStatements is pedantic
* that one NOPMD is for debug logging, it'll go away

closes #623 https://gitlab.com/fdroid/fdroidclient/issues/623
2016-05-12 09:36:08 +02:00
Hans-Christoph Steiner
93433cff05 equals() and hashCode() should always be overridden together
This addressed the PMD error:
"Ensure you override both equals() and hashCode()"

#623 https://gitlab.com/fdroid/fdroidclient/issues/623
2016-05-12 09:25:04 +02:00
Hans-Christoph Steiner
23dad31426 make AndroidXMLDecompress a little less kludgey
#623 https://gitlab.com/fdroid/fdroidclient/issues/623
2016-05-12 09:25:04 +02:00
Hans-Christoph Steiner
103b2265ee make sure HTTP servers are able to skip the right amount
This should fix the PMD error:
"Check the value returned by the skip() method of an InputStream to see if
the requested number of bytes has been skipped."
2016-05-12 09:25:04 +02:00
Hans-Christoph Steiner
a0c20a35c3 Merge branch 'installer-manager-fixes' into 'master'
Installer manager fixes

Builds on the recently merged `InstallManagerService` to fix a few minor UX bugs:
 * Cancellation of pending downloads now removes notifications.
 * No longer shows "Downloading Downloading {AppName}" in notification, just "Downloading {AppName}"
 * If cached file is same size but corrupted, remove it and then continue with the process of downloading + installing

See merge request !281
2016-05-12 07:22:35 +00:00
Peter Serwylo
0967b79763 Remove notification correctly upon cancellation of download.
The check was set up to only cancel when the `AppDetails` for that app
was shown. This is the correct behaviour for the 'complete' event, but
not the cancel. The cancel event should always result in the relevant
notification being removed.
2016-05-12 16:54:14 +10:00
Peter Serwylo
5c4d23d2d6 Do full verification of apk before talking to installer.
If we are capable of bailing earlier rather than later, then we should. This way,
if a hash doesn't match, the file will be removed and a new download will begin,
as expected. The alternative is to let the installer catch the unmatching hashes.
By then though, it is too late to really do anything meaningfull and it becomes
more difficult to recover in a way that the user would expect.
2016-05-12 16:54:14 +10:00
Peter Serwylo
63807a688d Return app name correctly from getAppName().
Due to the earlier refactoring of `getNotificationTitle()` (or something like that)
to `getAppName()`, it was still returning `getString(downloading_apk, appName)` instead
of just the app name.
2016-05-12 16:54:14 +10:00
Peter Serwylo
7389315dfa Merge branch 'InstallManagerService' into 'master'
InstallManagerService

This provides an over-arching `Service` for managing the whole install process, from checking the cache, downloading files, handling the notification.  Ultimately, it should probably also handle starting and tracking progress of the final installation steps.

Note: this does undo some of the `Notification` handling stuff, putting it back to one notification per APK. I did that to get that part working OK for the short term, giving us time to figure out what the whole picture should look like.  I think @pserwylo has it pretty well sketched out in #592.  But I have no strong feelings about the notification stuff for 0.100, so I'm happy to shape this MR accordingly, provided its only a little work.


See merge request !278
2016-05-12 06:52:54 +00:00
Hans-Christoph Steiner
43be8f3fd1 delete temp files created by DownloaderFactory#create(Context, String) 2016-05-11 21:56:00 +02:00
Hans-Christoph Steiner
81f13279fe some tricks to get Cancel working on the download Notification
I wrestled with this a bunch, it seems quite difficult to make the Cancel
button on the notification responsive.  This collection of minor changes
made it more reliable, but its still kind of flaky.  I think the problem
might be related to the fact that it is creating a whole new Notification
instance, with the accompanying Intent and PendingIntent instances, for
every single download progress update.

closes #652 https://gitlab.com/fdroid/fdroidclient/issues/652
2016-05-11 21:56:00 +02:00
Hans-Christoph Steiner
62295b72b4 send ACTION_INTERRUPTED when APK is canceled from queue
If an APK was queued to download but had not started downloading yet, it
was not able to be fully canceled because ACTION_INTERRUPTED was not sent.
That meant that the UI never got updated, even though the APK was removed
from the queue.

#652 https://gitlab.com/fdroid/fdroidclient/issues/652
2016-05-11 21:56:00 +02:00
Hans-Christoph Steiner
78c0416c84 clear notification for app once it has been successfully installed
This logic is pretty basic for now, it'll have to be expanded a lot to
support the different UX between priv and non-priv installs.  For example,
priv updates will be able to happen entirely in the background.  Those will
then require leaving a notification to tell the user that the app was
updated so nothing can transparently install updates without the user
knowing.  When the user is an active part of each install, like the
non-priv experience requires, then keeping the "app installed" notification
feels like just extra noise.
2016-05-11 21:56:00 +02:00
Hans-Christoph Steiner
e75143530f track AppDetails visibility to improve Notification UX
If AppDetails is visible, then it'll automatically launch the install
process, and there is no need to put up a "Tap to install" notification.

And of course, whenever I search stackoverflow, I find an answer from
@commonsguy :)
https://stackoverflow.com/questions/18038399/how-to-check-if-activity-is-in-foreground-or-in-visible-background/18469643#18469643
2016-05-11 21:56:00 +02:00
Hans-Christoph Steiner
2080d77e6b temporary notification user experience to get something workable
this represents the current state of things until we can overhaul the whole
notifications and update UX as outlined in #592

https://gitlab.com/fdroid/fdroidclient/issues/592
2016-05-11 21:56:00 +02:00
Hans-Christoph Steiner
4a9ed54f42 use simplified ProgressListener in Downloader and DownloaderService
Now the simplified ProgressListener works as the generic listener again,
enforcing the concept of URL as unique ID throughout the code base.
2016-05-11 21:56:00 +02:00
Hans-Christoph Steiner
7f10be18c6 fix index update progress using simplified ProgressListener
The Event class is no longer needed once there is specific ProgressListener
instances for each type of progress update.  The sourceUrl serves as the
unique ID, like with DownloaderService and InstallManagerService.

fixes #633 https://gitlab.com/fdroid/fdroidclient/issues/633
2016-05-11 21:56:00 +02:00
Hans-Christoph Steiner
96c36d85c4 keep App instances for each active APK in the install process
This allows the install process to have consistent data, even if the index
database changes while an APK is making its way through this process.

This also provides a set of packageNames to be easily queried.
2016-05-11 15:11:05 +02:00
Hans-Christoph Steiner
f195c34a8b make Apk the common internal data type
Standardizing on Apk as the internal data type means that most of the data
that is needed for the whole lifecycle of a given APK going through this
process will be available regardless of the database changes.  Once App
instances are also included, then all of the data should be available
separately from the database.  This is important to support parallel
operation.  The index could be updated and an app could disappear while an
APK of that app is being downloaded.  In that case, it should not show
blank notifications.

Also, in AppDetail, the Apk instance is completely loaded from the db, so
there should not be any nulls on the essential bits like packageName and
download URL.
2016-05-11 15:11:05 +02:00
Hans-Christoph Steiner
dded004321 use standard URL ID int for Intents used in Notifications
This keeps the IDs standard throughout the code: either urlString when it
should be a String, or urlString.hashCode() when it should be an int. It
also follows the naming convention in DownloaderService helper methods,
e.g. getIntentFilter().  "create" to me doesn't necessarily mean also "get"

Using @NonNull or @Nullable is fine when it is actually useful, like the
compiler can catch errors, but it also adds a lot of noise when reading the
code.  For example, @NonNull here will just make people avoid thinking.
Context can never be null anywhere in Android, that's a given throughout
the Android API.  And in this code, urlString is the unique ID used
throughout the process, so if its ever null, nothing works.
2016-05-11 15:11:05 +02:00
Hans-Christoph Steiner
08988f2369 move all downloading notifications to InstallManagerService
This keeps DownloaderService tightly focused on downloading, and makes it a
lot easier to manage Notifications since InstallManagerService's lifecycle
lasts as long as the Notifications, unlike DownloaderService.
2016-05-11 15:11:05 +02:00
Hans-Christoph Steiner
67e66a7b0c InstallManagerService skeleton which checks cache before installing
DownloaderService is structured to be as simple as possible, and as tightly
matched to the downloading lifecycle as possible, with a single queue for
all requests to avoid downloads competing for bandwidth.  This does not
represent the possibilities of the whole install process.  For example,
downloading can happen in parallel with checking the cache, and if an APK
is fully cached, there is no need for it to go through the DownloaderService
queue.

This also lays the groundwork towards simplifying DownloaderService even
more, by moving the Notification handling to InstallManagerService. That
will provide a single place to manage all aspects of the Notifications that
has a lifecycle that is longer than the Notifications, unlike an Activity
or DownloaderService.
2016-05-11 15:11:05 +02:00
Peter Serwylo
37ba565f5b Make logging more informative.
Before it said:

>  "doDownload for http://... false"

Now it says:

> "Starting download for http://... (is resumable: false)"
2016-05-11 13:49:07 +02:00
Peter Serwylo
2c7033e367 Ask for active downloading url in on resume.
Fixes #624.

The `AppDetails` activity was not correctly asking for the active
download url string when being resumed. This change recalculates the
value when being resumed now.
2016-05-11 13:49:07 +02:00
Peter Serwylo
3a1fcfd226 Move Utils#getApkUrl(String repoAddress, Apk apk) to Apk#getUrl()
Added assertions that both apkName and repoAddress need to be populated
in order to call `getUrl()`. Also verified that this is the case for all
usages of this method, which it should be. All `Apk` objects which currently
have `getUrl()` called on them are loaded using the `ApkProvider.Helper.findById()`
method without specifying which columns to load (which defaults to all).
2016-05-11 13:49:07 +02:00
Peter Serwylo
e72ba25fe5 Call stopService to ensure notification goes away. Always show download notifications.
Addresses a bug found in MR !273 whereby removing `stopForeground` results
in a persistent "Downloading ..." notification even though it was cancelled.

In the process of doing this, it also addresses / Fixes #621 by ensuring
that all downloads of apks are done in a foreground service, regardless
of the preference used for foreground updater service updating.
2016-05-11 13:18:18 +02:00
Peter Serwylo
169346ce76 Merge branch 'downloaderservice-fixes' into 'master'
DownloaderService fixes

This aims to simplify the `DownloaderService` a bunch to make it easier to understand.  It also fixes some bugs with the download queue and related progress reports.

This is groundwork for the upcoming `InstallManagerService` which will manage the whole process of installing an app, from checking the cache, to downloading, to running the install process.

See merge request !273
2016-05-10 21:00:54 +00:00
Hans-Christoph Steiner
c66b6c52b7 fix bug with enabling NetCipher on the wrong domains breaks SNI
I messed this up in f2621dcb558b12a4430b6301b4af4a824d57eb6d

fixes #629 https://gitlab.com/fdroid/fdroidclient/issues/629
2016-05-10 16:14:49 +02:00
Hans-Christoph Steiner
d73dac73ad delete DownloaderServiceTest stub, it is now crashing
DownloaderServiceTest is just a stub of a test that doesn't really test
anything yet.  It is now causing a NullPointerException, so its a problem:

 java.lang.NullPointerException
 	at org.fdroid.fdroid.net.DownloaderService.notifyDownloadComplete(DownloaderService.java:313)
 	at org.fdroid.fdroid.net.DownloaderService.handleIntent(DownloaderService.java:287)
 	at org.fdroid.fdroid.net.DownloaderService$ServiceHandler.handleMessage(DownloaderService.java:104)
 	at android.os.Handler.dispatchMessage(Handler.java:99)
 	at android.os.Looper.loop(Looper.java:137)
 	at android.os.HandlerThread.run(HandlerThread.java:60)
2016-05-10 15:38:27 +02:00
Hans-Christoph Steiner
0214e9e447 remove pointless method: DownloaderService.getPackageNameFromIntent()
This method provides the exact same results as the underlying method it
uses, intent.getStringExtra()

This was added in 0163d6efa6013181c2e6554760e5fa6e67a6daf9
2016-05-10 15:38:27 +02:00
Hans-Christoph Steiner
44b703a7d2 replace QUEUE_WHATS hack with urlString.hashCode() as ID
There is already a method for reproducibly generating an int based on
a the contents of a String, thanks to @pserwylo for finding it! So
urlString.hashCode() is used as the ID for Notifications and the
DownloaderService queue (msg.what).  This entirely replaces the
QUEUE_WHATS hack.  Both requestCode and msg.what just need to be
unique int, and that value can always be generated by the urlString.

This also fixes a bug preventing removing correct URL from Downloader queue.
b66810944fec802aa119c0e5ec8b7875930a2c22 made a change that breaks removing
the correct item from the queue. The `what` value must be fetched based on
urlString and fed to serviceHandler.removeMessages(what). The commit made
it use the `what` value from the last item that was queued. Those will
often be different things.

This also removes all stopForeground(true) calls except for the one in
onDestroy().  The nature of an IntentService, which DownloaderService
is basically a copy of, is to quit running once it is no longer
processing Intents.  That is also the time to remove the notification.
2016-05-10 15:38:27 +02:00
Hans-Christoph Steiner
18b3a05806 always cancel APK download progress reports
Before, these were not being reliably canceled before the final COMPLETE or
INTERRUPTED notification went out.  This moves closing the progress Timer
to a finally block after the Timer is setup, which should hopefully
guarantee the progress reports are always stopped.

This prevents any more progress reports from being sent, in case there is
one pending anywhere. downloaderProgressListener needs to be volatile to
ensure that the two threads are seeing the same values.

This was an omission on my part when putting together the DownloaderService
in !248
2016-05-10 15:38:27 +02:00
Hans-Christoph Steiner
3ee64b1bc0 fold DownloadCompleteService into DownloaderService
Having the notification as its own Service is overkill and really only
serves to increase complexity.  The notification stuff should not take much
time or resources at all.
2016-05-10 15:38:27 +02:00
Daniel Martí
ac151716c9 Merge branch 'latest-android-testing-support' into 'master'
use latest android testing support setup

With 2.0 of Android Studio and gradle pluging coming out shortly, I wanted to start trying to use the improved testing setup.  So this is a place to track that stuff until it stabilizes.

See merge request !252
2016-05-10 13:31:31 +00:00
Hans-Christoph Steiner
cff807e191 include useful output logs for failing tests
This helps when tests fail on the gitlab-ci builds.
2016-05-10 14:34:15 +02:00
Hans-Christoph Steiner
d6ed2a5e8a simplify downloadUninterruptedTests to improve reliability
Test downloads with actual files, not dynamically generated things.

Testing with the progress reports is really hard with multiple URLs, so
just test progress with a single URL for now, and multiple URLs can still
be tested without the progress check.

fixes #650 https://gitlab.com/fdroid/fdroidclient/issues/650
2016-05-09 20:00:28 +02:00
Hans-Christoph Steiner
00c6db81a7 gitlab-ci: add missing semi-colon in failure script
It was echoing 'cat "$log" instead of cat'ing the log.
2016-05-09 20:00:27 +02:00
Hans-Christoph Steiner
3112ba75c9 gitlab-ci: improve caching of gradle stuff 2016-05-09 20:00:27 +02:00
Hans-Christoph Steiner
d8c87c3d4b gitlab-ci: switch glibc to a memory conserving mode 2016-05-09 20:00:27 +02:00
Hans-Christoph Steiner
a4161aeb73 gitlab-ci: run adb shell input keyevent 82 in the background
This is the common pattern I've seen in travis-ci builds.  It should
speed things up a little bit since the adb connection process will
happen in parallel with waiting for the screen lock to be dismissed.
2016-05-09 19:59:51 +02:00
Hans-Christoph Steiner
41b2e175c9 improve build server performance by allowing disabling of pre-dexing
It seems that Google is finally paying some attention to CI builds with the
emulator, they issued a recommendation:
http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance
2016-05-09 19:58:05 +02:00
F-Droid Translatebot
aaf5bfe1db Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz  Catalan
Oliver Zehm            German
Tobias Bannert         German
2016-05-09 11:14:58 +01:00
Hans-Christoph Steiner
a96eeccea9 Merge branch 'crash-fixes' into 'master'
Two NPE fixes, cleanup

@eighthave I couldn't find why `setExecutable()` isn't used anymore. The fact that it is now unused code begs the question: why don't we need to set the APK download folder as executable anymore?

See merge request !279
2016-05-09 10:10:32 +00:00
Daniel Martí
5f6762f543 Remove some dead code found by Studio 2016-05-07 23:14:20 +01:00
Daniel Martí
98130de4ae Apply a few weaker access suggestions from Studio 2016-05-07 23:14:20 +01:00
Daniel Martí
0baf443b63 Remove now unused cache_downloaded_on string
We now use a list of time durations to keep the files for.
2016-05-07 23:14:20 +01:00
Daniel Martí
d847f2caef AppDetails: Also check null View in header
Mirror the check already being done in the other fragment. As reported
via ACRA:

	ANDROID_VERSION=4.4.4
	APP_VERSION_NAME=0.100-alpha6
	STACK_TRACE=java.lang.NullPointerException
		at org.fdroid.fdroid.AppDetails$AppDetailsHeaderFragment.updateViews(AppDetails.java:1524)
		at org.fdroid.fdroid.AppDetails$AppDetailsHeaderFragment.updateViews(AppDetails.java:1519)
		at org.fdroid.fdroid.AppDetails.refreshHeader(AppDetails.java:624)
		at org.fdroid.fdroid.AppDetails.onAppChanged(AppDetails.java:549)
		at org.fdroid.fdroid.AppDetails.access$000(AppDetails.java:100)
		at org.fdroid.fdroid.AppDetails$AppObserver.onChange(AppDetails.java:141)
		at android.database.ContentObserver$NotificationRunnable.run(ContentObserver.java:180)
		at android.os.Handler.handleCallback(Handler.java:733)
		at android.os.Handler.dispatchMessage(Handler.java:95)
		at android.os.Looper.loop(Looper.java:136)
		at android.app.ActivityThread.main(ActivityThread.java:5146)
		at java.lang.reflect.Method.invokeNative(Native Method)
		at java.lang.reflect.Method.invoke(Method.java:515)
		at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
		at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
		at dalvik.system.NativeStart.main(Native Method)
2016-05-07 22:38:33 +01:00
Daniel Martí
1a94c46e87 Fix NPE crash when clearing files in a directory
This was very probably introduced with the new CleanCacheService stuff.
Reported via ACRA:

	ANDROID_VERSION=6.0.1
	APP_VERSION_NAME=0.100-alpha6
	STACK_TRACE=java.lang.NullPointerException: Attempt to get length of null array
		at org.fdroid.fdroid.Utils.clearOldFiles(Utils.java:349)
		at org.fdroid.fdroid.Utils.clearOldFiles(Utils.java:351)
		at org.fdroid.fdroid.Utils.clearOldFiles(Utils.java:351)
		at org.fdroid.fdroid.CleanCacheService.onHandleIntent(CleanCacheService.java:54)
		at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
		at android.os.Handler.dispatchMessage(Handler.java:102)
		at android.os.Looper.loop(Looper.java:148)
		at android.os.HandlerThread.run(HandlerThread.java:61)

There is nothing to clear if the directory could not be obtained for
some reason, so this seems like a reasonable fix. Anything is better
than a crash anyway.
2016-05-07 22:30:31 +01:00
Daniel Martí
ee696b4737 Merge branch 'fix-ellipsize' into 'master'
Fix ellipsizing on 2.X, other minor updates



See merge request !276
2016-05-07 20:44:57 +00:00
Daniel Martí
2ed7c925f7 gradle: bump Android plugin to 2.1.0 2016-05-07 21:28:06 +01:00
Daniel Martí
a9c73dd278 Avoid NPE in getNotificationTitle
See the following crash reported via ACRA:

	java.lang.NullPointerException
	    at org.fdroid.fdroid.net.DownloaderService.getNotificationTitle(DownloaderService.java:188)
	    at org.fdroid.fdroid.net.DownloaderService.createNotification(DownloaderService.java:167)
	    at org.fdroid.fdroid.net.DownloaderService.handleIntent(DownloaderService.java:274)
	    at org.fdroid.fdroid.net.DownloaderService$ServiceHandler.handleMessage(DownloaderService.java:107)
	    at android.os.Handler.dispatchMessage(Handler.java:102)
	    at android.os.Looper.loop(Looper.java:136)
	    at android.os.HandlerThread.run(HandlerThread.java:61)

I'm not sure what the source of the null App was (could be that we
couldn't access the DB for some reason, or perhaps that somehow the app
wasn't in it anymore). In any case, it doesn't hurt to double check
here.

If the app is null, simply fall back to the title without the app name.
2016-05-07 21:28:06 +01:00
Daniel Martí
1192468015 Do not ellipsize description on Android 2.X
For some reason, even when showing the entire description some words at
the end of lines and paragraphs still get cut off. This results in
little parts of the description being completely inaccessible.

Ellipsizing is just cosmetic, so ditch it on 2.X altogether. I tested
and proved that this fixes the issue with an android-10 x86 emulator,
after reproducing the bug.

Keep the ellipsizing on newer versions, as it doesn't misbehave on
those.

Fixes #510.
2016-05-07 21:28:06 +01:00
Daniel Martí
6ce94a22d3 Never suppress UnusedDeclaration on TAG fields
Remove the ones that weren't used at all. They can be added back if
they're ever actually used. Moreover, one of them was even named
incorrectly.
2016-05-07 21:28:06 +01:00
Daniel Martí
78af79cd4f checkstyle: enable OneTopLevelClass
The only remaining error was ClipboardCompat, which was unnecessarily
exposing three top-level classes. Make the two implementation classes be
nested, private and static.
2016-05-07 21:28:06 +01:00
Daniel Martí
6311ad5c6b Run remove-unused-trans.py after !277
Automated change. No issues with lint or any of the other tests.
2016-05-06 10:27:35 +01:00
Hans-Christoph Steiner
7e53baf4c1 Merge branch 'installer-ui-updates' into 'master'
Installer UI updates and lint fixes

This updates UI classes of the installer to reflect the changes of AOSP's installer and fixes some lint errors.
* No more differentiation between personal and device permissions (didn't even notice that there was a differentiation here...)
* Icon for "other" permission group

I carefully merged only the changes from AOSP that are related to us and decided against maintaining different versions of the AppSecurityPermissions.

There will be more changes and discussions to the installer UI coming in the next days.

See merge request !277
2016-05-06 07:55:56 +00:00
Dominik Schürmann
26f8c851ec Fix checkstyle errors 2016-05-06 08:43:23 +03:00
F-Droid Translatebot
60bafa168c Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz     Spanish
Alberto Moshpirit         Spanish
Danial Behzadi            Persian
Enol P                    Asturian
Kristjan Räts             Estonian
Marcelo Santana           Portuguese (Brazil)
Mohamad Hasan Al Banna    Indonesian
Verdulo                   Esperanto
Verdulo                   Polish
2016-05-06 00:44:01 +01:00
Dominik Schürmann
fad9844d1f AppSecurityPermissions: Suppress lint for classes 2016-05-05 21:17:50 +03:00
Dominik Schürmann
8b0b8bd6d9 AppSecurityPermissions: fix some lint errors 2016-05-05 21:17:44 +03:00
Dominik Schürmann
2da380a04d Update InstallConfirmActivity and permissions_list from AOSP 2016-05-05 21:17:37 +03:00
Dominik Schürmann
06a8ff5787 AppSecurityPermissions: changes from Android 6 2016-05-05 21:16:53 +03:00
Dominik Schürmann
a2cb5f1ccf AppSecurityPermissions: changes from Android 5.2 2016-05-05 21:12:57 +03:00
Peter Serwylo
7ad4941554 Merge branch 'checkstyle-6.18' into 'master'
checkstyle: bump to 6.18

Also, forgot to simplify the checkstyle setup in the extension after we
moved from an ant folder hierarchy to a gradle one. Do that now.

See merge request !272
2016-05-05 01:33:45 +00:00
Daniel Martí
6e9437b1f4 checkstyle: bump to 6.18
Also, forgot to simplify the checkstyle setup in the extension after we
moved from an ant folder hierarchy to a gradle one. Do that now.
2016-05-03 11:36:57 +01:00
Daniel Martí
afea37450b Bump to 0.100-alpha6 2016-05-03 11:18:53 +01:00
F-Droid Translatebot
b0131a7490 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz    Catalan
Adrià García-Alzórriz    Spanish
Marcelo Santana          Portuguese (Brazil)
Mladen Pejaković         Serbian
naofum                   Japanese
Tobias Bannert           German
Verdulo                  Esperanto
Verdulo                  Polish
YFdyh000                 Simplified Chinese
2016-05-03 11:17:39 +01:00
Daniel Martí
3563e586c4 Merge branch 'cleancacheservice' into 'master'
CleanCacheService

This creates `CleanCacheService` to do all of the cache clean up at the lowest possible priority.  It also adds a preference to set how long to keep cached APKs.

See merge request !260
2016-05-02 23:15:47 +00:00
Daniel Martí
e3ebab9bc3 Merge branch 'updater-speed-improvements' into 'master'
Updater speed improvements during "Saving Application Details"

I've been able to reproduce #324 OutOfMemory errors on an emulator with 12MiB of heap space. This branch did _not_ have an OOM error when updating with F-Droid and F-Droid Archive repos enabled. They successfully update without problem.

Fixes #45.

The "Saving Application Details" stage of repository updating is where each apk has its suggested version calculated, icon URLs calculated, etc. These all require [correlated subqueries](https://en.wikipedia.org/wiki/Correlated_subquery) resulting in a full scan of the apk table for each row in the app table. This takes in the order of 25 seconds on my Moto X 2nd Gen.

This branch improves this process by doing the queries in an [sqlite in-memory database](https://sqlite.org/inmemorydb.html), with the results transferred to the database on disk when done. The time required drops from 25 seconds to ~0.5 seconds on my device.

*Note:* I was hoping this would also improve the "Processing ..." Part of the udpater, given it was inserting into an in memory table instead of on disk. If it did have any effect, it was negligible though, so that part is still likely slower than it could be. Each 50 apps (and their associated apks) takes between 150ms and 500ms on my Moto X.

*Secondary Note:* When creating the in memory database, I create indexes for some columns as per before. This technically should slow down the inserts we do, however in practice they had almost no effect. As such, I've left the index creation there because it is required for the correlated subqueries to not suck. 

See merge request !269
2016-05-02 21:31:35 +00:00
Hans-Christoph Steiner
77052c2b45 remove cosmetic changes to security sensitive code: RepoUpdater
Security-sensitive code should not be changed unless there is a good reason
to do so.  It is too easy to introduce bugs.  This change does not address
an issue, so I'm reverting it. See comment in javadoc header for the class.

This reverts commit 2074718391c2c17a974218bc6565cce2dc05407e for just the
RepoUpdater.java file.
2016-05-02 20:38:31 +02:00
Hans-Christoph Steiner
cbf1bda433 add preference to set the time to keep cached APKs
This schedules CleanCacheService to run regularly, and delete files older
than the value set in the new "Keep cached apps" preference. It auto-
migrates the old "Cache packages" pref to the new one.  The default cache
time for people who did not have "Cache packages" enabled is one day.
2016-05-02 20:38:31 +02:00
Hans-Christoph Steiner
83ee0c8f0b clean up cached files in a low priority IntentService
This moves the cache file deletion to a dedicated IntentService that runs
at the lowest possible priority.  The cache cleanup does not need to happen
with any kind of priority, so it shouldn't delay the app start or take any
resources away from foreground processes.

This also changes the logic around the "Cache packages" preference. The
downloader always saves APKs, then if "Cache packages" is disabled, those
APKs are deleted when they are older than an hour.

This also simplifies Utils.deleteFiles() since the endswith arg is no
longer needed.
2016-05-02 20:38:31 +02:00
Hans-Christoph Steiner
6fa8477650 make Utils.getApkCacheDir() more likely to succeed
* if there is a file there, remove it

The paths are all from the system, so are safe. No SanitizedFile is needed.
Plus, this method was not checking if the original and sanitized versions
where different, and instead just creating the sanitized version. I worry
that could cause odd bugs.
2016-05-02 20:38:11 +02:00
Hans-Christoph Steiner
6c47ade379 move init sequence comments to javadoc comments
By putting these comments into javadoc, they are directly describing the
code where it is, and there are many tools in IDEs for searching, viewing,
sorting, etc. javadoc comments.  Plain comments do not have those tools.
2016-05-02 20:38:11 +02:00
Hans-Christoph Steiner
972ef3b078 remove unused arg from FileCompat.setReadable()
Just trying to keep the code as close to what is actually used as possible.
2016-05-02 20:38:11 +02:00
F-Droid Translatebot
32fc118b3d Pull translation updates from Weblate
Translators:

Ajeje Brazorf     Sardinian
Allan Nordhøy     Norwegian Bokmål
Paresh Chouhan    Hindi
Sérgio Marques    Portuguese (Portugal)
tacsipacsi        Hungarian
2016-05-01 23:23:25 +01:00
Daniel Martí
90aa73dc40 Merge branch 'restrict-priv-ext' into 'master'
Fixes for priv extension install

For now, disable install of privileged extension on Android >=5.1 until we found better methods.
Also, fix crash of dialogs on Android 6 using a workaround for transparent activities and some code simplifications.

See merge request !259
2016-05-01 22:19:41 +00:00
Dominik Schürmann
cf694b6d83 Disable install of privileged ext on Android 5.1 2016-05-01 23:15:41 +02:00
Dominik Schürmann
834c08db3c Code cleanup in Installer 2016-05-01 23:14:29 +02:00
Dominik Schürmann
17f712870b Fix crash of transparent dialogs on Android 6 2016-05-01 23:10:41 +02:00
Peter Serwylo
dad993f7b8 Merge branch 'ci-bump' into 'master'
CI: Bump image, use 64-bit emulator

Since the base image is now 200MB smaller, this one too. Also updates
the SDK to 25.1.3.

See merge request !271
2016-04-30 23:31:14 +00:00
Daniel Martí
10904aa9a3 Merge branch 'pmd' into 'master'
Enable some more PMD rules



See merge request !270
2016-04-29 23:20:17 +00:00
Daniel Martí
37fe708f2b CI: Switch to 64-bit emulator 2016-04-30 00:05:34 +01:00
Daniel Martí
128d390e9c wait-for-emulator: don't prepend "unknown"
This way, error lines like this one:

    Waiting for emulator to start: unknown: error: no devices found

Become:

    Waiting for emulator to start: error: no devices found
2016-04-29 20:49:19 +01:00
Daniel Martí
7bc130d81a wait-for-emulator: skip adb log messages
Otherwise, we'd interpret this as "booting", which is wrong:

     $ adb -e shell getprop init.svc.bootanim
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    error: no devices found
2016-04-29 20:46:25 +01:00
Daniel Martí
f0d6c7c720 CI: Bump image
Since the base image is now 200MB smaller, this one too. Also updates
the SDK to 25.1.3.
2016-04-29 20:23:29 +01:00
Daniel Martí
023a6d01bd PMD: Enable some extra boolean/logic rules 2016-04-29 19:22:30 +01:00
Daniel Martí
ac8d3ff600 PMD: Enable and obey UnnecessaryParentheses
This works on statements, not expressions, so it's a lot easier and
saner to obey than UselessParentheses.
2016-04-29 19:22:04 +01:00
Daniel Martí
e5bc365b64 PMD: Enable a bunch of strictexception rules
We already obey them.
2016-04-28 17:17:17 +01:00
Peter Serwylo
ffa6fb92b9 Updated CHANGELOG with performance impovements. 2016-04-28 15:06:47 +10:00
Peter Serwylo
f9b22442ed Simplify detach code by catching exception istead of querying for attached dbs. 2016-04-28 15:06:47 +10:00
Peter Serwylo
721dcb00c1 Use temporary, in memory database for update process.
This increases the speed of the complex queries required at the end
of the update process to:
 * calculate suggested version codes
 * figure out icon urls
 * etc,
by two orders of magnitude.
2016-04-28 15:06:44 +10:00
Peter Serwylo
ab248525e0 Don't do a subquery in a subquery in a subquery.
This was there as a workaround for #1, but that has subsequently
been fixed. Thus, the hack is no longer required. Also removed an
additional `AND` because it is already performed in the `JOIN`.
I supsect this last one would've been eliminated by the sqlite
optimizer anyway, but the query is slightly simpler now.

This fix doesn't improve performance as much as I'd hoped, but it
is something.
2016-04-28 09:04:26 +10:00
Daniel Martí
fdd441c382 Add Estonian (et, Eesti) to the langs list
Its first translations were added in the previous commit, pulled from
Weblate.
2016-04-27 15:27:38 +01:00
F-Droid Translatebot
9faa84fa90 Pull translation updates from Weblate
Translators:

Danial Behzadi            Persian
fastest noob              Turkish
Fert Bálint               Hungarian
Green Lunar               Hebrew
Jean-Baptiste             French
Karola Marky              Japanese
Kristjan Räts             Estonian
Licaon Kter               Romanian
Marian Hanzel             Slovak
Mohamad Hasan Al Banna    Indonesian
naofum                    Japanese
Tobias Bannert            German
YFdyh000                  Simplified Chinese
2016-04-27 15:09:16 +01:00
Daniel Martí
27d1187216 Merge branch 'notifications' into 'master'
Added cancel action to notifications.

![Screenshot__Apr_27__2016_2-41-30_AM_](/uploads/7756406732c8583117532e5fed151a2c/Screenshot__Apr_27__2016_2-41-30_AM_.png)

See merge request !267
2016-04-26 22:53:11 +00:00
Daniel Martí
1505047cb7 Merge branch 'updates-available-notification' into 'master'
Don't show "Updates Available" if auto updates is enabled.

This notification is redundant in this circumstance.

See merge request !268
2016-04-26 21:23:26 +00:00
Paresh Chouhan
d0ca382d80 Added cancel action to notifications. 2016-04-27 02:45:07 +05:30
Peter Serwylo
51e48f4416 Don't show "Updates Available" if auto updates is enabled.
This notification is redundant in this circumstance.
2016-04-27 07:09:26 +10:00
Peter Serwylo
7a880fdc33 Merge branch 'more-fixes' into 'master'
A few Java fixes and tweaks, enable more PMD rules



See merge request !266
2016-04-25 12:19:46 +00:00
Daniel Martí
87a4cfb27c Get rid of Log.d calls in src/main
Also, Log.d in tests don't make much sense - replace by Log.i. This way
it's easier to limit all Log.d calls to Utils.java.
2016-04-24 15:06:11 +01:00
Daniel Martí
70da6eaa12 Fix NPE when clicking on missing app links
This happened to me when I clicked on an app link for a new app which
was already in the repo, but I had not ran an index update yet since the
app got built. Stack trace prior to the fix follows.

	java.lang.RuntimeException: Unable to destroy activity {org.fdroid.fdroid/org.fdroid.fdroid.AppDetails}: java.lang.NullPointerException:
	Attempt to invoke virtual method 'void android.support.v4.content.LocalBroadcastManager.unregisterReceiver(android.content.BroadcastReceiver)' on a null
	object reference
		at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3865)
		at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3883)
		at android.app.ActivityThread.-wrap5(ActivityThread.java)
		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417)
		at android.os.Handler.dispatchMessage(Handler.java:102)
		at android.os.Looper.loop(Looper.java:148)
		at android.app.ActivityThread.main(ActivityThread.java:5461)
		at java.lang.reflect.Method.invoke(Native Method)
		at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
		at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
	Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void
	android.support.v4.content.LocalBroadcastManager.unregisterReceiver(android.content.BroadcastReceiver)' on a null object reference
		at org.fdroid.fdroid.AppDetails.unregisterDownloaderReceivers(AppDetails.java:469)
		at org.fdroid.fdroid.AppDetails.onDestroy(AppDetails.java:569)
		at android.app.Activity.performDestroy(Activity.java:6422)
		at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1143)
		at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3852)
		... 9 more
2016-04-24 14:57:32 +01:00
Daniel Martí
e860503141 CONTRIBUTING: Add Android.mk gradlew note
See #632.
2016-04-24 12:45:35 +01:00
Daniel Martí
f1230adfc1 Apply a few suggestions from Android Studio 2016-04-23 17:58:22 +01:00
Daniel Martí
145314a83a UpdateService: add missing cursor.close()
Found by Android Studio.
2016-04-23 17:38:42 +01:00
Daniel Martí
50b2e6f7a5 PMD: Enable and obey SingularField 2016-04-23 17:27:22 +01:00
Daniel Martí
68db3ae353 PMD: Enable and obey ImmutableField 2016-04-23 17:27:22 +01:00
Daniel Martí
c746a49b15 PMD: Enable some design.xml rules we already obey 2016-04-23 17:27:22 +01:00
Daniel Martí
f655f49aee PMD: Enable and obey UnnecessaryConstructor 2016-04-23 16:17:55 +01:00
Daniel Martí
857b0ea1c7 PMD: Enable and obey AddEmptyString 2016-04-23 16:14:05 +01:00
Daniel Martí
5d3d8786e2 PMD: Enable and obey PrematureDeclaration 2016-04-23 16:06:41 +01:00
Daniel Martí
32c67d05ec PMD: XML config file, enable most of unnecessary 2016-04-23 15:59:04 +01:00
Daniel Martí
6a0eec1262 DBHelper: don't wrap entire func bodies in ifs
This removes tons of unnecessary indenting. Do it in smaller functions
too for consistency.
2016-04-23 15:40:09 +01:00
Daniel Martí
7f2a811541 RepoXMLHandler: make helper func static 2016-04-23 15:37:49 +01:00
Daniel Martí
942cfd3cd1 AppDetails: guard against null fragment on destroy
Fixes a crash reported by ACRA:

	java.lang.RuntimeException: Unable to destroy activity {org.fdroid.fdroid/org.fdroid.fdroid.AppDetails}: java.lang.NullPointerException
		at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3281)
		at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3299)
		at android.app.ActivityThread.access$1200(ActivityThread.java:133)
		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
		at android.os.Handler.dispatchMessage(Handler.java:99)
		at android.os.Looper.loop(Looper.java:137)
		at android.app.ActivityThread.main(ActivityThread.java:4812)
		at java.lang.reflect.Method.invokeNative(Native Method)
		at java.lang.reflect.Method.invoke(Method.java:511)
		at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
		at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:559)
		at dalvik.system.NativeStart.main(Native Method)
	Caused by: java.lang.NullPointerException
		at org.fdroid.fdroid.AppDetails.cleanUpFinishedDownload(AppDetails.java:442)
		at org.fdroid.fdroid.AppDetails.onDestroy(AppDetails.java:567)
		at android.app.Activity.performDestroy(Activity.java:5366)
		at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1124)
		at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3268)
		... 11 more
2016-04-23 15:29:41 +01:00
Daniel Martí
99840b5bba Bump to 0.100-alpha5 2016-04-23 02:01:10 +01:00
F-Droid Translatebot
b1aac69989 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz      Catalan
Adrià García-Alzórriz      Spanish
mahmut özcan               Turkish
Marcelo Santana            Portuguese (Brazil)
Massimiliano Caniparoli    Italian
Mladen Pejaković           Serbian
Verdulo                    Esperanto
Verdulo                    Polish
2016-04-23 01:59:30 +01:00
Daniel Martí
d902612f41 Merge branch 'random-improvements' into 'master'
Random improvements



See merge request !262
2016-04-23 00:56:16 +00:00
Daniel Martí
a484c03816 PMD: Re-enable on test files
This used to be the case, which is why only minimal changes were
required to bring it back. This also makes it take the same files that
checkstyle does, which is more consistent.
2016-04-23 01:45:04 +01:00
Daniel Martí
2074718391 Get java code closer to obeying PMD's java-basic 2016-04-23 01:20:29 +01:00
Daniel Martí
7b70560c9b Remove unused class UnexpectedResponseException 2016-04-23 01:16:14 +01:00
Daniel Martí
3c63bd4b1c Various spacing fixes 2016-04-23 01:16:14 +01:00
Daniel Martí
df39b0fe40 Drop elses after returns 2016-04-23 01:16:14 +01:00
Daniel Martí
c560463887 CONTRIBUTING: use check, not connectedCheck
We now have unit tests that run on the local jvm, so use `check` to run
those too.
2016-04-23 01:16:14 +01:00
Daniel Martí
2eea94e5ea gradlew: bump to 2.12
Also remove the 2.11 restriction on the root build.gradle file. It's
unnecessary, as the Android plugin will already error if the version is
too old. This means that the build will work on any version that is new
enough, which should be 2.10-2.12 at the time of writing.
2016-04-23 01:16:14 +01:00
Daniel Martí
a8c5d8e765 Convert java file to unix format via dos2unix
I assume this file was copied over from a windows machine or created on
one. Use unix-style line endings throughout.
2016-04-23 01:16:14 +01:00
Daniel Martí
00c138e42f PMD: enable and obey java-unusedcode 2016-04-23 01:16:14 +01:00
Daniel Martí
c240283ad4 Merge branch 'download-service-pending-intent' into 'master'
Misc fixes/improvements to apk downloading

This started as a fix to #625, but quickly turned into a mini rampage to fix and/or improve a few different things in the `DownloaderService`. Hopefully the commits are self explanatory as to what they fix, but of course feel free to ask questions if you have any.

See merge request !265
2016-04-22 16:58:57 +00:00
Peter Serwylo
7e83189f5b Appese checkstyle + pmd. 2016-04-23 00:10:02 +10:00
Peter Serwylo
3ebeec0b87 Cleaned up logging in downloader service.
Most of the logging is purely for debugging purposes during development.
As such, it has been moved to `Utils.debugLog`. Also provided more context
in some of the descriptions, so devs reading the logs without the sourcecode
will hopefully be able to infer more about what is happening. Left the error
logging as `Log.e` as it may be more informative.
2016-04-23 00:10:02 +10:00
Peter Serwylo
a149ce54db Always stop notifications at the conclusion of a download.
Without this, if the first download in the queue is downloaded,
the notification will persist with details of that first download
until the next download begins. With this change, the notification
is remoived immediately after cancelling the download.
2016-04-23 00:10:01 +10:00
Peter Serwylo
b66810944f Remove download notification when last queued download cancelled.
There was a race condition such that when the cancel `Intent` is
received, it would queue up a message on the download thread to stop
downloading. This was followed by cancelling the notification on the
thread the `Intent` was received on. As a result of the message taking
some time to get to the other thread, it would likely cause another
progress notification to be shown after we had already removed that
notification - making it show again after being cancelled.

The code in the download thread progress handler, which updates the
notification with progress, is not perfect. It does a check before
deciding to broadcast progress and update the notification. However,
the check happens at the beginning of the group of expressions. As
such, there is likely a small change that `isActive` returns true,
then the notification is cancelled on the other thread, and finally,
the download thread updates the progress again. However this is better
than it was before where the notification didn't go away.

Previously, apks were not being removed from the queue once download
was completed, only when removed. It didn't cause any specific issues
here, but I removed downloads from the queue after completion to prevent
potential problems in the future. Now the queue is a better representation
of what is to be downloaded.
2016-04-23 00:09:36 +10:00
Peter Serwylo
bbf7cd81a6 Extract common code to isQueued and isActive. 2016-04-23 00:02:15 +10:00
Peter Serwylo
7f1155816e Show name of app being downloaded in notification.
If a non-apk download is taking place, revert to the current generic
"Downloading..." message.
2016-04-23 00:02:15 +10:00
Peter Serwylo
18f3d86b68 Show indeterminite progess for apks queued to download.
Previously, navigating back to an app which is in the queue
qould indeed grey out the "Install" button and show the text
"Downloading..." in that disabled button. However, it woulnd't show
any sort of progress. This change shows an indeterminite progress
bar with the text "Waiting to start download..." underneath.
Happy to receive input on the best terminology if that is not
desirable.

In order to do this, I had to be more specific about when
the header fragment is updated. Previously, `headerFragment.updateViews()`
would get called by the `onResumeFragments()` activity method.
This was redundant because the `onResume()` method of the fragment
also invokes `updateViews()`. Thus, that call was removed (though
we still need to obtain a reference to the fragment in
`onResumeFragments()`.
2016-04-23 00:02:15 +10:00
Peter Serwylo
e56d604d6f Only cleanup receivers, don't reset the UI when in onDestroy().
When an Activity is destroyed, the next time it is created should
reinitialize all of the UI stuff again. Thus, there is no point to
clearing up the UI state before leaving. More importantly, this was
causing a problem when navigating back and forth through activities
via the downloader service notifications:

```
E  java.lang.RuntimeException: Unable to destroy activity {org.fdroid.fdroid/org.fdroid.fdroid.AppDetails}: java.lang.IllegalStateException: activity is already destroyed
...
E  Caused by: java.lang.IllegalStateException: activity is already destroyed
E      at android.nfc.NfcActivityManager$NfcActivityState.<init>(NfcActivityManager.java:126)
E      at android.nfc.NfcActivityManager.getActivityState(NfcActivityManager.java:176)
E      at android.nfc.NfcActivityManager.setNdefPushContentUri(NfcActivityManager.java:252)
E      at android.nfc.NfcAdapter.setBeamPushUris(NfcAdapter.java:830)
E      at org.fdroid.fdroid.NfcHelper.disableAndroidBeam(NfcHelper.java:68)
E      at org.fdroid.fdroid.AppDetails$AppDetailsHeaderFragment.updateViews(AppDetails.java:1507)
E      at org.fdroid.fdroid.AppDetails$AppDetailsHeaderFragment.updateViews(AppDetails.java:1490)
E      at org.fdroid.fdroid.AppDetails$AppDetailsHeaderFragment.removeProgress(AppDetails.java:1473)
E      at org.fdroid.fdroid.AppDetails.cleanUpFinishedDownload(AppDetails.java:442)
E      at org.fdroid.fdroid.AppDetails.onDestroy(AppDetails.java:567)
E      at android.app.Activity.performDestroy(Activity.java:6169)
E      at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1141)
E      at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3726)
E      ... 10 more
```

This is related to `onDestroy` calling a method which ends up calling
UI related stuff that assumes the `Activity` is around to interact with.
2016-04-23 00:02:15 +10:00
Peter Serwylo
8794611b26 DownloadCompleteService uses same notification code as DownloadService.
Both classes required the same type of notification intent to be
created, so they now both use the same static function to create
the relevant intent.
2016-04-23 00:02:14 +10:00
Peter Serwylo
0163d6efa6 Add PendingIntent for notification in DownloaderService.
Fixes #625, as devices pre 4.0 require such `PendingIntent`s to
be passed to the notificaitons `setContentIntent` method. As the
`DownloaderService` handles both apks and repo updates, the pending
intent will either point to the relevant `AppDetails` screen for
an apk download - or the main F-Droid activity if it is any other
sort of download (i.e. a repo update download).
2016-04-23 00:02:11 +10:00
Daniel Martí
a826d1101d Remove unused app_list_item_click
As per #fdroid-dev:

    +mvdan | paresh: look at what lint says
    +mvdan | src/main/res/transition-v21/app_list_item_click.xml:2: The resource R.transition.app_list_item_click appears to be unused
    +mvdan | are you aware of this?
    paresh | mvdan, oh yes
    paresh | it is useless
    paresh | I think I planned on adding some transition
    paresh | you can remove it safely
2016-04-21 11:05:36 +01:00
Daniel Martí
ebbb5f3863 Run tools/remove-unused-trans.py 2016-04-21 10:40:58 +01:00
F-Droid Translatebot
560a620a6c Pull translation updates from Weblate
Translators:

Danial Behzadi            Persian
ezjerry liao              Traditional Chinese
Mohamad Hasan Al Banna    Indonesian
Olexandr Nesterenko       Ukrainian
Osoitz                    Basque
Paresh Chouhan            Hindi
Verdulo                   Esperanto
2016-04-21 10:40:25 +01:00
Peter Serwylo
3f9881a6f5 Fix if condition which was always true.
I suspect this is the expected behaviour, seeing as this service
handles downloads for both Apks and repo indices.
2016-04-21 13:26:03 +10:00
Peter Serwylo
8ce4cad7ef Merge branch 'dup-strings' into 'master'
Removed duplicate string resource for string ("Swap apps")

Removed duplicate string resource for string ("Swap apps")

See merge request !264
2016-04-20 22:58:35 +00:00
Peter Serwylo
734fe262b1 Merge branch 'renames' into 'master'
Rename java names to match Android standards

As seen in #37. I also did a few more that weren't mentioned there, like a few in Apk.

This is basically (case insensitive):

* `*version` -> `*versionname`
* `*vercode` -> `*versioncode`
* `pubkey` -> `signingCertificate`

See merge request !263
2016-04-20 21:58:49 +00:00
Paresh Chouhan
45313c6234 Removed duplicate string resource for string ("Swap apps") 2016-04-21 00:55:23 +05:30
Daniel Martí
b7a5c6d201 Get rid of the last java vercode name
Last of its series. Closes #37.
2016-04-19 22:44:22 +01:00
Daniel Martí
865d537745 Rename Repo's pubkey to signingCertificate
Updates #37.
2016-04-19 22:44:22 +01:00
Daniel Martí
0ec9689a6c Rename App's suggestedVersion to suggestedVersionName 2016-04-19 22:44:22 +01:00
Daniel Martí
550f04cc8b Rename App's upstream vars to VersionCode/Name
Updates #37.
2016-04-19 22:44:22 +01:00
Daniel Martí
cde57efb98 Rename App.suggestedVercode to App.suggestedVersionCode
Updates #37.
2016-04-19 22:44:22 +01:00
Daniel Martí
4d8e410176 Rename Apk.version to Apk.versionName
Updates #37.
2016-04-19 22:44:22 +01:00
Daniel Martí
1abbedc4ab Rename Apk.vercode to Apk.versionCode
Updates #37.
2016-04-19 22:44:22 +01:00
Daniel Martí
887bb171aa Remove media/, now in its own repo
See the new shiny https://gitlab.com/fdroid/artwork page for details.
The git history of media/ is preserved in the new repo.
2016-04-19 22:06:46 +01:00
Daniel Martí
ac22cc5266 Bump to 0.100-alpha4 2016-04-17 11:02:40 +01:00
F-Droid Translatebot
ca3e13ebf6 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz    Catalan
ageru                    French
Alberto Moshpirit        Spanish
Allan Nordhøy            Norwegian Bokmål
Enol P                   Asturian
ezjerry liao             Traditional Chinese
Green Lunar              Hebrew
Kristoffer Grundström    Swedish
Ldm Public               French
Marcelo Santana          Portuguese (Brazil)
Mladen Pejaković         Serbian
naofum                   Japanese
Pander                   Dutch
Sérgio Marques           Portuguese (Portugal)
Tobias Bannert           German
Verdulo                  Esperanto
Verdulo                  Polish
Yaron Shahrabani         Hebrew
YFdyh000                 Simplified Chinese
2016-04-17 11:00:38 +01:00
Daniel Martí
58aa19f392 Merge branch 'notify-download-progress' into 'master'
Show progress bar in download notification.

This enhances the download notification to include a progress bar of the downloads progress.

(It doesn't show the actual size of the download or the number of bytes downloaded in text yet. Need to think about internationalizing this from the `AppDetails` `updateProgress` method so that it is not copy-pasted in two places.)

See merge request !261
2016-04-17 09:39:14 +00:00
Peter Serwylo
6d603ada0d Show progress bar in download notification.
By providing the same notification id, the existing one is updated.
2016-04-17 09:10:22 +10:00
Hans-Christoph Steiner
8d7b5bff5d Merge branch 'build-fixes' into 'master'
Build fixes and library updates



See merge request !257
2016-04-14 18:52:18 +00:00
Daniel Martí
132519590f Bump accesspoint library to 0.2.0
This release allows for Android 6+ support, but we'll need to ask for
permissions at runtime too. This commit simply does one half of the work
needed to support Android 6 with all things wi-fi.

See the issue and example app commit for reference:

https://github.com/mvdan/accesspoint/issues/6
6284f0376b
2016-04-14 15:31:47 +01:00
Daniel Martí
27c9a21764 Gradle: Bump android plugin to 2.0.0
Also add useProgard true, since minifyEnabled now refers to the new
experimental code shrinker.

I'm not removing proguard yet as we depend on it for the samsung
workaround. I also do not know how to port the rest of the config
options to the new shrinker.
2016-04-14 15:31:47 +01:00
Daniel Martí
127c65b78d Bump support libs to 23.3.0
Also bump the CI image to include the updated support lib maven repo.
2016-04-14 15:31:47 +01:00
Daniel Martí
db798afb67 PMD: Do all java files like checkstyle
Not just the org.fdroid.* classes. No changes needed.
2016-04-14 15:31:47 +01:00
Daniel Martí
158668f378 Merge branch 'new-downloader-service' into 'master'
New DownloaderService

This merge request is too big, but I have all this work complete, so I'm submitting it now for review.  If there are bigger issues with parts, I can rebase it down to the uncontroversial bits to get things merged.

This replaces `ApkDownloader`, `AsyncDownload`, and `AsyncDownloadWrapper`, and puts the whole APK download procedure into a custom `Service` that is based on the source code for `IntentService`.  It can't be a subclass of `IntentService` because it needs to be cancelable.  This does not yet add back a notification for the downloading, e.g. #592.  That was handled before by the Android DownloadManager stuff, and was not replaced since that was disabled.

My current implementation does not filter out duplicate requests like discussed in #601.  While its possible to do, I think it'll complicate the code a lot, and I really think that should be handled elsewhere.  The UI should prevent the possibility of the user being able to submit duplicate install requests.  If not, even if `DownloaderService` filtered them out, it would still be a buggy UX since the user would be clicking install again or something like that even though the install was in progress.

This also moves the APK verification logic to the `Installer` side.  The downloading side can check the file size to see if the whole thing is downloaded.  And to be extra safe, it should not be possible to submit an APK for installation without it going through the verification procedure.  So the only method for installing APKs, `Installer.install()`, is where the verification now happens.   Also, the installer now always copies the APK to be installed into the safe location RE: the Cure53 audit issue.  This way, the APK download and cache dirs can be merged into one, making resumable downloads and cache management easy.

ping @mvdan @pserwylo @dschuermann 
more comments in the commit messages

See merge request !248
2016-04-14 14:00:06 +00:00
Daniel Martí
44f39793be Merge branch 'issue-490' into 'master'
Fix Cursor initialization deprecation

Closes Issue #490, Avoids usage of `deprecated` constructors and suppresses deprecation warnings.

See merge request !242
2016-04-14 13:58:10 +00:00
Hans-Christoph Steiner
74d1c9521d put up a notification for each completed download
This makes background installs and updates a lot easier
2016-04-13 11:08:54 -04:00
Hans-Christoph Steiner
d114f428e7 add "Auto Download" pref to enable auto-downloading of updates
Now that we have a nice background service, let's put it to work!  This
makes update APKs be automatically downloaded after the index is updated.
Then when the user goes to install the updates, they will not have to wait
for the download part.

#601 https://gitlab.com/fdroid/fdroidclient/issues/601
2016-04-13 11:07:17 -04:00
Hans-Christoph Steiner
adcdc417ab add basic in progress Notification to DownloaderService
This is super basic, really just a placeholder to have something there. It
should be replaced with something much better as part of the UX overhaul.

#601 https://gitlab.com/fdroid/fdroidclient/issues/601
2016-04-13 11:07:17 -04:00
Hans-Christoph Steiner
77e041d640 put stray preference handling into Preferences
This moves a few stray preference handling instances into Preferences, and
move the non-preference "lastUpdateCheck" state to local only to
UpdateService.  This will still work with existing installs since the
String constant value is the same.
2016-04-13 11:07:17 -04:00
Hans-Christoph Steiner
721d4a300a add method to check if a URL is being handled by DownloaderService
This also saves the activeDownloadUrlString per packageName. Both are
necessary so that AppDetails can accurately display the current state
of a background download. Saving this per-packageName allows there to
be multiple active downloads in the background, then when people move
around AppDetails, it'll restore the progress meter and button state
when coming back to the app that they clicked install on.

By definition, there is just one DownloaderService enforced by
Android with a single active Downloader instance enforced by the
DownloaderService.  That means using a static variable maps directly
to those conditions and provides a really simple, implementation,
especially compared to what would have to happen to do it via messages
from the thread and any Activities.  If this ends up blocking testing
or something, it can always be changed when someone implements those
tests.
2016-04-13 11:07:17 -04:00
Hans-Christoph Steiner
49635c224d show download errors in a Toast
There are many possible cryptic errors that can cause downloads to fail. So
just show the localized message from the Exception in an extended Toast.
These might not show up until AppDetails works better with the lifecycle of
downloads, but they are being sent :)

closes #496 https://gitlab.com/fdroid/fdroidclient/issues/496
closes #594 https://gitlab.com/fdroid/fdroidclient/issues/594
closes #599 https://gitlab.com/fdroid/fdroidclient/issues/599
2016-04-13 11:07:17 -04:00
Hans-Christoph Steiner
3265c8634c implement resumable APK downloads for HttpDownloader
Moving towards having the Downloader always download directly into the
cache means its really easy to support resuming downloads.

This should also work for updates and icons, since it fetches the
Content Length via HTTP first.  The icon and update downloading code
needs to be adjusted to support that. For APKs, it probably makes
sense to include the file size from the index db to save the query
over the net.  That would be probably more helpful on Bluetooth.
2016-04-13 11:07:17 -04:00
Hans-Christoph Steiner
fa766180bf download APKs into dir named after repo's hostname
This is to prevent conflicts if two repos have APKs with the same names,
but are not the same app/version.
2016-04-13 11:07:17 -04:00
Hans-Christoph Steiner
ee37f26c4d verify APKs on install, and purge ApkDownloader
This moves the last piece of code to the DownloaderService model. Moving
the APK prep and verification to Installer.installPackage() makes it hard
to mess up and make bugs like installing from the External Storage issue
found by the Cure53 audit.
2016-04-13 11:07:17 -04:00
Hans-Christoph Steiner
d07c8b5d74 convert Installer's Exception into generic InstallFailedException
AndroidNotCompatibleException is not used for anything specific right now,
and in the process of adding verification to the start of the install
process, there will be other kinds of failures. So convert that Exception
into a general usage InstallFailedException.
2016-04-13 10:40:01 -04:00
Hans-Christoph Steiner
0b8796e56f add AndroidManifest parser for reading directly from APKs
This will make our algorithm choices a lot more flexible both in terms of
the Installer process and the swap repo process.
2016-04-13 10:40:01 -04:00
Hans-Christoph Steiner
fc9459d6c5 send Downloader progress on a 100 ms timer
No need to flood receivers with progress events since they are basically
always going to the UI, and the UI will only refresh every so often.  If
the refresh rate is 50Hz, then that's every 20ms.  100ms seems to make a
smooth enough progress bar, and saves some CPU time.  This becomes more
important if there are multiple downloads happening in the background, like
if we make DownloaderService support parallel downloads from different repos
2016-04-13 10:40:01 -04:00
Hans-Christoph Steiner
5e59f812ce port everything over to new Downloader.ACTION_PROGRESS
This replaces all of the previous progress events and listeners.
2016-04-13 10:40:01 -04:00
Hans-Christoph Steiner
2e3d2c84ae eliminate Interfaces used only internal to AppDetails class
When dealing with complex lifecycles like Fragments, it is important
to expose the reliance of the Fragment on the Activity, since they
have different lifecycles.

Just cast to AppDetails instead of adding complexity with unneeded
Interfaces.  The actual instance and class will be the same with or
without the Interfaces, so it does not help with lifecycle issues.
The methods that implement the interfaces only hide the fact that they
rely on an active instance of AppDetails, which can lead to
lifecycle-related crashes.

This is a step along the way to streamlining AppDetails Activity so that it
only uses Fragments when they are beneficial.
2016-04-13 10:40:01 -04:00
Hans-Christoph Steiner
20c66a825d use IntentService style to download all APKs via a queue
DownloaderService is based on IntentService to provide queued requests that
run in a background thread via the Handler and the HandlerThread.  It began
as the IntentService code, but it could not be a subclass because the
downloading needs to be cancelable.  IntentServices cannot be canceled and
they provide no visibility into their queue.

DownloaderService then announces relevant events via LocalBroadcastManager
and Intents with custom "action" Strings.

https://gitlab.com/fdroid/fdroidclient/issues/601 #601
2016-04-13 10:40:01 -04:00
Daniel Martí
d98d59a8d3 Merge branch 'check-privileged-certificate' into 'master'
Verify apk signature of privileged extension before installation

This implements a check that the signature of the extension apk is the same as the signature of F-Droid before installing the extension apk. Related issue: https://gitlab.com/fdroid/fdroidclient/issues/437

See merge request !256
2016-04-13 11:50:54 +00:00
Dominik Schürmann
15ec420db4 Check apk signature of privileged extension against F-Droid signature before installation 2016-04-13 13:35:48 +02:00
F-Droid Translatebot
f8ef7cda39 Pull translation updates from Weblate
Translators:

ezjerry liao    Traditional Chinese
Lev Lamberov    Russian
2016-04-13 09:54:01 +01:00
Daniel Martí
5fd591bbe8 Merge branch 'more-tests-and-bug-fixes' into 'master'
More tests and bug fixes

I pulled a few commits out of the !248 saga, and added a bug fix or two.  It would be easier if this was merged before !248 

ping @mvdan @pserwylo 

See merge request !255
2016-04-11 16:48:42 +00:00
Hans-Christoph Steiner
ed09b1af2d run UpdateService at lowest priority possible
Currently, UpdateService is running at default priority, which is the same
as the UI tasks, since it is a regular IntentService.  That means it would
put a noticable load on the device when running, especially on older
devices.  This should help with that.

#563 https://gitlab.com/fdroid/fdroidclient/issues/563
2016-04-11 11:26:21 -04:00
Hans-Christoph Steiner
22e40bfee1 port all but Provider tests to JUnit4 semantics
Android recently switched from JUnit 3 to 4 for its base testing classes.
It doesn't seem to support the old JUnit3 methods with gradle and AS. So
all the tests need to be ported to JUnit4 to work again.

#607 https://gitlab.com/fdroid/fdroidclient/issues/607
2016-04-11 11:26:21 -04:00
Hans-Christoph Steiner
6b3004160f HttpDownloaderTest: delete test files only if test succeeds
This helps with debugging. And since these tests run on the JVM,
deleteOnExit() actually works.
2016-04-11 11:26:21 -04:00
Hans-Christoph Steiner
eb93a38cf5 HttpDownloader: handle SSL errors like any other download error
Since SSLHandshakeException is a subclass of IOException, and all that is
happening is rethrowing an Exception, instead pass this one through so it
will be handled by the central Downloader error handling.  That's currently
just a Toast, but it can easily be expanded in the future.
2016-04-11 11:26:21 -04:00
Hans-Christoph Steiner
b86a30d40f fix expert mode version display when maxSdkVersion is MAX_VALUE
closes #616 https://gitlab.com/fdroid/fdroidclient/issues/616
2016-04-11 11:26:21 -04:00
Hans-Christoph Steiner
c4a1295095 move Theme handling to Preferences class
This is one of the last instances of direct SharedPreferences manipulation
in the code.  Moving it to Preferences like the rest.
2016-04-11 10:38:59 -04:00
Daniel Martí
230c06d536 Bump to 0.100-alpha3 2016-04-08 10:27:58 +01:00
Hans-Christoph Steiner
907507d27d Merge branch 'transition-v21' into 'master'
Shared element transition for app list item v21 and above

Shared element transitions for API level v21 and above  
![JJhZVJh](/uploads/05ff326b69176e2e793cd17dca63637f/JJhZVJh.gif)

See merge request !251
2016-04-06 09:00:54 +00:00
Paresh Chouhan
cdd0848927 Shared element transition for app list item v21 and above 2016-04-05 22:45:51 +05:30
Hans-Christoph Steiner
d846e18d7f Merge branch 'fixes-and-cleanups' into 'master'
fixes and cleanups related to ongoing DownloaderService work

This includes a fix for bug that @mvdan found in the processing of `Apk.maxSdkVersion`, as well as some cleanups related to the ongoing work in !248 . Indeed a couple of these commits were pulled out of that MR.

See merge request !253
2016-04-05 15:22:59 +00:00
Hans-Christoph Steiner
35c2ef8c1c re-add SNI support to guardianproject.info repo
Apparently, it uses SNI, but does not always fail without SNI support.
2016-04-05 13:06:25 +02:00
Hans-Christoph Steiner
fd51fad73b keep the core Downloader classes pure Java for easy testing 2016-04-05 12:44:01 +02:00
Hans-Christoph Steiner
514e83e604 convert Downloader's outputFile to a read-only property
Since Downloader's outputFile variable is final, it can safely be used
as a public property variable.  This makes it simple to use in
subclasses. Making it a public final variable rather than a getter
also communicates that the value does not change since there is no
getter method that could potentially change it.

http://binkley.blogspot.com/2005/01/read-only-properties-in-java.html
2016-04-05 12:44:01 +02:00
Hans-Christoph Steiner
9d69098605 purge unused code from Installer classes 2016-04-05 12:44:01 +02:00
Hans-Christoph Steiner
0e1584f083 ignore gradle.properties
This file is generated by Android Studio whenever I'm using a proxy like
Tor.  Its not used otherwise, and should not be checked into git.
2016-04-05 12:44:01 +02:00
Hans-Christoph Steiner
70864e3479 use custom proguard config for running tests
The new Android Testing Support library stuff causes proguard to freak
out, so make proguard ignore all that stuff when running tests.
2016-04-05 12:44:01 +02:00
Hans-Christoph Steiner
fc0df0dcf4 make db maxSdkValues values use Byte.MAX_VALUE as max not 0
Having 0 mean max makes the logic confusing when maxSdkValue is used in
variable.  This sanitizes the data so that maxSdkValue is always just a
plain int value that can be used to test against.  It does this by
defaulting to Byte.MAX_VALUE (127) if it is not explicitly set. At the rate
of 24 SDK numbers in 8 years, that gives us about 24 years before we have
to think about setting it to Short.MAX_VALUE.

This fixes an issue created by e021eb5ca7e8f05dbce7c1b87833722542138302
2016-04-05 12:44:01 +02:00
Hans-Christoph Steiner
74713810dd Merge branch 'ci-image' into 'master'
Update to april 5th docker image

* Debian 8.4
* Now includes curl
* No longer has android-10
* build-tools 23.0.3

See merge request !254
2016-04-05 10:38:44 +00:00
Daniel Martí
53c8752444 Update to april 5th docker image
* Debian 8.4
* Now includes curl
* No longer has android-10
* build-tools 23.0.3
2016-04-05 10:43:48 +01:00
Daniel Martí
09324bbb78 One last fix after moving to gradle dir layout 2016-04-04 21:44:56 +01:00
F-Droid Translatebot
bfca096775 Pull translation updates from Weblate
Translators:

Franco                    Spanish
Jonatan                   Swedish
Mário Castanheira         Finnish
Mohamad Hasan Al Banna    Indonesian
msrn                      Finnish
2016-04-04 21:44:56 +01:00
Daniel Martí
04914d8d8b Merge branch 'gitlab-with-emulator-23' into 'master'
gitlab-ci: use android-17 emulator for `gradle connectedCheck`

The android-10 emulator does not report test failures so it is pretty useless at the moment.  After lots and lots of trying, the most recent emulator that I could get running on gitlab-ci was 17, so let's hope that turns out to be more useful.  I also had to reduce the RAM that was used, it seems that gitlab-ci does not let the docker images use much RAM.  This might be able to be improved by creating an pre-setup AVD image in the docker image used by this.

As you can see from the history, I tried lots of things to see if it is was possible to get a more recent emulator running on gitlab-ci.

See merge request !241
2016-04-04 20:28:51 +00:00
Hans-Christoph Steiner
37bca5d244 gitlab-ci: use android-17 emulator for gradle connectedCheck
The android-10 emulator does not report test failures so it is pretty
useless at the moment.  After lots and lots of trying, the most recent
emulator that I could get running on gitlab-ci was 17, so let's hope that
turns out to be more useful.  I also had to reduce the RAM that was used,
it seems that gitlab-ci does not let the docker images use much RAM.

This might be able to be improved by creating an pre-setup AVD image in the
docker image used by this.
2016-04-04 21:14:56 +02:00
Hans-Christoph Steiner
409a50fe92 gitlab-ci: upload full build logs to clbin.com
I find that the logs dumped into the gitlab-ci screens are generally
unreadable, so here, only the errors are dumped into the build log, then
the rest are uploaded to clbin, a paste bin, where the whole text can be
viewed and downloaded in a clean, raw format.
2016-04-04 21:13:44 +02:00
Hans-Christoph Steiner
ac2cfe557d Merge branch 'simplify-internal-api-and-tests' into 'master'
Add non-emulator tests and simplify internal API

A lot of the purely internal API is using constructs which are not needed for internal APIs.  The internal API can be viewed and changed by any contributor, so its better to not cover all possible future uses.  Indeed to keep the codebase simple, it should be the opposite: the app's code should reflect what is actually happening now, not what might happen in the future.

This also adds tests that run on the JVM rather than the emulator.

These commits where originally in !248 but I'm submitting them separately since !248 is too big.

See merge request !250
2016-04-04 12:28:45 +00:00
Hans-Christoph Steiner
0bf221383b make RepoUpdater's index URL a property for easy use
Since the DownloaderService's events are all based on the complete download
URLs, and RepoUpdater is where the update URLs are built, this makes the
full download URL into a read-only property of RepoUpdater so it can be
used wherever there is an instance of RepoUpdater

This is also important because having the `final` property highlights
the lifecycle of that variable: it does not change during the entire
life of a RepoUpdater Instance.
2016-04-04 13:21:18 +02:00
Hans-Christoph Steiner
8befba0522 send Downloader progress only via its DownloaderProgressListener
Instead of duplicate APIs, standardize on a single API, and use that
everywhere via the Downloader.LOCAL_ACTION_PROGRESS event that is already
wired in.
2016-04-04 13:21:18 +02:00
Hans-Christoph Steiner
ae0976d24a move HTTP Auth to HttpDownloader to make it testable
This also encapsulates the HTTP Auth stuff better so that it will be easier
to wrap it all into a event-based service.
2016-04-04 13:21:18 +02:00
Hans-Christoph Steiner
591b23b5ab Downloader.cancelDownload() instead of using external Thread logic
This is needed so that downloads can be canceled from within an
IntentService. Since the Downloader classes do not have any Thread logic in
them, they shouldn't use Thread logic within them anyway.

This also removes the unused argument to AsyncDownloader.attemptCancel().
2016-04-04 13:21:18 +02:00
Hans-Christoph Steiner
74274d21b4 move SanitizedFileTest into non-Android tests
It can run in plain java, so might as well.
2016-04-04 10:53:12 +02:00
Hans-Christoph Steiner
bc3d8a89b6 add tests of HttpDownloader 2016-04-04 10:53:12 +02:00
Daniel Martí
f033276f67 Merge branch 'apply-for-android-8' into 'master'
SharedPreferences.Editor.apply() for android 8

Turns out that `SharedPreferences.Editor.apply()` was not added until `android-9`, so this is a little trick to support `android-8` still after the changes in c3b47ecd5a380678dd2df3dc2549155429d28514

See merge request !249
2016-04-02 21:38:57 +00:00
Hans-Christoph Steiner
e021eb5ca7 standardize SDK version test methods
I just took the most common method, using the SDK int value, and applied
that throughout the code to have it consistent.
2016-04-02 22:46:41 +02:00
Hans-Christoph Steiner
610ead83d0 make version of Editor.apply() for SDK 8
This is not pretty, but its the best I could think of.

Fixes this lint error:
Call requires API level 9 (current min is 8): android.content.SharedPreferences.Editor#apply [NewApi]
2016-04-02 22:46:37 +02:00
Daniel Martí
5175eacd6d CHANGELOG: include bugfix notes from stable branch 2016-04-01 16:56:21 +01:00
Hans-Christoph Steiner
4485d7c2cb Merge branch 'random-fixes-2' into 'master'
Gradle fixes, enable PMD unusedcode rules



See merge request !246
2016-04-01 08:39:50 +00:00
Daniel Martí
fddce692db PMD: Get closer to obeying unnecessary
Don't enable it just yet, it's way too pedantic with parenthesis.
2016-03-31 21:54:11 +01:00
Daniel Martí
b4dd9c857e Get closer to obeying PMD's unused code rules 2016-03-31 21:40:33 +01:00
Daniel Martí
0e76a2e1fe Fix source directories after gradle layout switch
'src' works because we're only doing java files under that directory.
But it would be slower than needed, and in the case of PMD it would also
use the test files which wasn't intended at all.
2016-03-31 21:40:33 +01:00
Daniel Martí
52436350c6 Make Android Studio a little happier 2016-03-31 21:40:30 +01:00
Daniel Martí
f34237f333 Remove duplicated commons-io dep
It seems like having it as a compile dependency already works for the
tests. Having it duplicated seems to sometimes trigger errors (e.g. a
user reported a duplicate zip entry due to the duplication) and might
also be problematic if we don't keep the two versions in sync.
2016-03-31 12:01:58 +01:00
Daniel Martí
41d54f7e92 Merge branch 'random-fixes-from-downloaderservice-hacking' into 'master'
Random fixes from DownloaderService hacking

Here are some random fixes that I did in the process of the DownloaderService refactoring.  I don't think anything should be controversial.  Thanks for your rapid code reviews recently @mvdan :)

See merge request !245
2016-03-31 10:43:13 +00:00
Hans-Christoph Steiner
6a1ab2b80a make LocalFileDownloader.close() actually close things
This doesn't fix the stacktrace but at least it makes this class complete
2016-03-31 10:16:39 +02:00
Hans-Christoph Steiner
c3b47ecd5a fix lint warning: CommitPrefEdits: use apply() instead of commit()
"Consider using apply() instead; commit writes its data to persistent
storage immediately, whereas apply will handle it in the background"

commit() is only useful if the code actually checks the return value.
2016-03-31 10:16:39 +02:00
Hans-Christoph Steiner
c67a60271d fix lint errors: StringFormatInvalid: Invalid format string
* Use a % sign that String.format() recognizes, apparently there are more
  than one % signs, in Chinese, its big: %

* a string in lithuanian forgot the %s
2016-03-31 10:16:39 +02:00
Hans-Christoph Steiner
38680d84e3 update some javadoc 2016-03-31 10:16:39 +02:00
Hans-Christoph Steiner
7f6dfb6dfe remove unused IOException from Downloader.close() method
This makes close() easier to use, and the IOException is not used at all.
2016-03-31 10:16:39 +02:00
Hans-Christoph Steiner
6ad9bbd367 Merge branch 'more-downloaderservice-progress' into 'master'
More DownloaderService progress

As part of the incremental approach of moving downloading to an IntentService, here are a few more commits refactoring things into events instead of listerners/callbacks/etc.

ping @pserwylo 

See merge request !240
2016-03-31 08:15:35 +00:00
Paresh Chouhan
df9954ba0b Fixed Cursor initialization deprecation 2016-03-30 23:16:46 +05:30
Hans-Christoph Steiner
29788254dd use background thread for swap icons instead of AsyncTask
An AsyncTask ties into the UI thread for things like onPostExecute(). If it
is run within an AsyncTask, then it freaks out because it can't tie into
the UI thread.  We don't need it to do that here anyway, so just use a
plain Thread, and set the priority to background.
2016-03-30 14:08:21 +02:00
Hans-Christoph Steiner
260b5bb9fb remove unused AsyncDownloadWrapper.MSG_DATA
This is all wired up, but the data is never ultimately used.
2016-03-30 14:08:21 +02:00
Hans-Christoph Steiner
91edad0c31 remove EVENT_DATA_ERROR_TYPE for DownloaderService reorg
As part of the process of moving the APK downloading to an
IntentService, I'm removing and incrementally reorganizing the
existing events so that the code continues to be functional as it is
reorganized.  We might want to include more detail in a download error
to expose to the user, but I think instead what will be more fruitful
is to hide details on errors where there is nothing the user can do
except retry.  Then if there are errors where the user can do
something about it, then F-Droid should instead offer them the option
of doing that, and not just show an error message and walk away.
2016-03-30 14:06:15 +02:00
Hans-Christoph Steiner
d38058497e move ApkDownloader.EXTRA_URL to Intent.setDataString()
This is part of the move to standardizing all internal broadcasts to use
the Intent's Uri field as the standard place for a download URL, and then
using that in IntentFilters to do matching.
2016-03-30 14:06:15 +02:00
Hans-Christoph Steiner
0473ac72da Merge branch 'random-fixes' into 'master'
CI image bump, version bumps, app folder fixes



See merge request !239
2016-03-29 17:25:14 +00:00
Daniel Martí
58c23c0a0e Fix binaryDeps with new app folder
Little remaining breakage in our main build.gradle. Went unnoticed
because we rarely use this. And hopefully we can get rid of it soon.
2016-03-29 17:57:21 +01:00
Daniel Martí
d5456e1bbf Bump ACRA to 4.8.5
Minor bugfix release.
2016-03-29 17:54:24 +01:00
Daniel Martí
3a83f80ab6 CI: Use the new client image
It's now made up of one extra layer. No changes in practice other than
android-23 being updated to rev2.
2016-03-29 17:48:43 +01:00
Daniel Martí
db2aaeaf22 Bump checkstyle to 6.17
No changes were necessary to keep it happy.
2016-03-29 17:46:37 +01:00
Daniel Martí
6a38e18057 Android.mk: Fix apk path
It's app-release-unsigned.apk, not F-Droid-release-unsigned.apk. To make
sure we don't screw up again, just use $(fdroid_dir).
2016-03-29 17:45:11 +01:00
Daniel Martí
858a44173b Add new language to the list 2016-03-29 17:25:02 +01:00
F-Droid Translatebot
c67570541b Pull translation updates from Weblate
Translators:

Marian Hanzel             Slovak
Mohamad Hasan Al Banna    Indonesian
Tobias Bannert            German
Waqar Ahmed               Urdu
2016-03-29 17:11:10 +01:00
Daniel Martí
c1f0414b6c Merge branch 'upgrade-arrow-fix' into 'master'
Fix values-ldrtl placement

Fix rebase error in !235.

See merge request !238
2016-03-29 15:56:55 +00:00
relan
406094b56d Fix values-ldrtl placement 2016-03-29 18:10:00 +03:00
Daniel Martí
7ef4e4245b Merge branch 'upgrade-arrow-rtl' into 'master'
Fix version upgrade string for RTL languages

In right-to-left languages _forward_ is the direction to the left, so leftwards arrow should be used to indicate upgrade:

![upgrade-arrow-rtl](/uploads/238dd85c33c92336e71357e4250aaef3/upgrade-arrow-rtl.png)

For left-to-right languages it remains the same:

![upgrade-arrow-ltr](/uploads/5e06ace9e6bf868ed89684c274f4e813/upgrade-arrow-ltr.png)

Closes #609.

See merge request !235
2016-03-29 13:50:53 +00:00
relan
057f6c167c Skip values-ldrtl while listing languages
ldrtl is a modifier ("layout direction right-to-left"), not a language.
2016-03-29 16:03:59 +03:00
relan
771ac45b8a Add version upgrade string for RTL languages 2016-03-29 15:59:39 +03:00
relan
d54a4b07e5 Move version upgrade arrow string to resources
Hardcoded strings cannot be localized.
2016-03-29 15:59:39 +03:00
Daniel Martí
ec53f4e05c Merge branch 'simplify-downloaders' into 'master'
Simplify Downloaders

This is some groundwork to simplify the Downloader stuff in preparation to moving it to something like an `IntentService`, as part of #601.  This mostly removes unused bits that I've found in the process of writing the `DownloaderService`.  Some of these events will be added back in a more consistent way, so that there is one event type for the same idea throughout the code base.

See merge request !236
2016-03-29 12:46:19 +00:00
Hans-Christoph Steiner
d76d7aa367 remove unused ApkDownloader.EVENT_APK_DOWNLOAD_CANCELLED
This also removes all the related stuff that resulted in
EVENT_APK_DOWNLOAD_CANCELLED being sent. Since EVENT_APK_DOWNLOAD_CANCELLED
ultimately does nothing, that whole bit of plumbing is unused.
2016-03-29 14:13:42 +02:00
Hans-Christoph Steiner
ab709e171a remove ApkDownloader.EXTRA_TYPE, it is entirely unused
This constant is wired up, but ultimately does nothing at all, since all
of the cases in the switch do the exact same thing.
2016-03-29 14:11:40 +02:00
Hans-Christoph Steiner
9c47f56f03 remove unused event message: ApkDownloader.ERROR_DOWNLOAD_FAILED 2016-03-29 14:09:30 +02:00
Hans-Christoph Steiner
2019b7a7c3 make all Downloader downloads cancelable
Allowing all downloads, including updates, to be canceled simplifies the
code and if the user wants to cancel an update, they should be able to. But
canceling updates is not implemented in this commit.
2016-03-29 14:07:51 +02:00
Hans-Christoph Steiner
88b5e284b5 use commons-io via a gradle dependency
This makes it so gradle provides all dependencies, rather than a mix of
classes that are copied in versus imported via gradle.  This library is
already used by the tests, so its not really a new dependency, and proguard
should remove all the unused stuff.
2016-03-29 14:06:52 +02:00
Hans-Christoph Steiner
2578e6bdff remove unused portions of DownloaderFactory
Since this is internal code and not a library for use with other projects,
it should only include the methods that are actually in use. The other
copies are just dead code, which means more stuff to read in order to
figure out.
2016-03-29 14:06:52 +02:00
Hans-Christoph Steiner
9d1743af33 purge disabled Android DownloadManager code
Unfortunately, this approach did not really work out.  It would have been
really nice to rely on the provided DownloadManager stuff, but it has too
many issues, like not working with Tor or other proxies, and being
difficult to tightly integrate.
2016-03-29 14:06:52 +02:00
Hans-Christoph Steiner
acc2a3154f Merge branch 'android-studio-testing-fixes' into 'master'
start porting tests to latest Android Studio/gradle setup

To encourage more people to use and add to the test suite, I've been working on making it work nicely with Android Studio and gradle.  I've also setup the possibility for JUnit tests that run on the host machine, not the emulator.  Those are run with `gradle test`.  I added a JUnit test of `HttpDownloader` too.

See merge request !233
2016-03-29 11:45:33 +00:00
Hans-Christoph Steiner
4538cf1ed0 suppress PMD JUnit4 warnings until tests are ported to JUnit4
#607 https://gitlab.com/fdroid/fdroidclient/issues/607
2016-03-29 12:30:30 +02:00
Hans-Christoph Steiner
9656de0147 remove checkstyle ExplicitInitialization check
"Variable explicitly initialized to 'false' (default value for its type)"

I never remember what the default init value of booleans are, so this error
is quite annoying to me, and I can't see the harm of this behavior.
checkstyle says: "So in this case, x gets initialized to 0 twice, and bar
gets initialized to null twice. So there is a minor inefficiency."
2016-03-29 10:57:55 +02:00
Hans-Christoph Steiner
538830d5a3 ignore checkstyle AvoidStaticImport for test frameworks
For whatever reason, both JUnit and Google recommend using static method
imports when writing tests.
2016-03-29 10:57:55 +02:00
Hans-Christoph Steiner
3fcdfe85bb move main project files into standard gradle/Android Studio layout
This makes it a lot easier to setup all the testing stuff.  Mostly,
I'm tired of fighting Android Studio's fragility, so I want to remove
as much non-standardness as possible in the hopes of improving that
situation.

closes #534 https://gitlab.com/fdroid/fdroidclient/issues/534
2016-03-28 12:12:37 +02:00
Hans-Christoph Steiner
f9063b5058 remove Preferences check out of HttpDownloader
This is the last Android code in the whole suite of Downloader subclasses,
so now we can write JUnit tests for them all, and avoid the fragility of
tests running on the emulator.
2016-03-28 12:05:35 +02:00
Hans-Christoph Steiner
f2621dcb55 avoid android.* classes to allow for direct JUnit tests
When running tests on the host machine, android.jar contains no code at all
which is totally stupid.  We can keep android.util.Log in there because it
does not affect the logic at all.  Then just set that android.jar to return
generic values using:

 unitTests.returnDefaultValues = true
2016-03-28 12:05:35 +02:00
Hans-Christoph Steiner
a1d6917ec7 remove Context/LocalBroadcastManager from Downloader for testing
If there is no LocalBroadcastManager, then the Downloader tests can be done
with pretty plain JUnit and then do not require the Android emulator to run
2016-03-28 12:05:35 +02:00
Daniel Martí
35764b90c0 Bump to 0.100-alpha2 2016-03-27 19:20:55 +01:00
Hans-Christoph Steiner
ba9f32e9f4 Merge branch 'fix-409--nfc-swap-crash' into 'master'
Fix crash when returning to swap after cancelling

Fixes #409. The problem was that there was some listeners being added for broadcast events when the swap view was shown. These were never removed, and so cancelling swap, then returning to it would spin up a _new_ activity with new views, while the old listeners were still around. When the old listeners received events, they would try to talk to their associated `Activity`. This no longer existed, so a crash ensued.

While I was fixing the specific bug associated with #409, I took the opportunity to make more of the event listeners well behaved in the swap process. I don't think any of them were liable to cause crashes, but were likely to cause some weirdness at some point in time if they were not fixed.

*Note:* This swap view was an exercise in moving away from `Fragment`s towards an `Activity` with individual `View`s. I'm going to call this a bit of a failure at this point, because there is so much work that needs to be invested in implementing lifecycle stuff in our custom views. `Fragment`s naturally come with lifecycle methods that are familiar to other Android dev's looking to contribute to this project (even if they are a little difficult to understand at times). Implementing our own custom Views instead still results in similar classes of bugs (i.e. talking to an `Activity` when the view no longer is part of that activity).

A classic example of this is in my usage of the `onDetachedFromWindow` function in the `View`. I have no idea if this is the best place to unregister listeners or not. In a Fragment, it would be a matter of `onPause` or one of the more well defined lifecycle methods. Empirically, `onDetachedFromWindow` seems to be well behaved. The other alternative would be for the Activity to explicitly invoke a `onRemoved` type method each view when it knows it is transitioning from one state to the next. However at this point, we are then really into reimplementing `Fragment` land.

See merge request !232
2016-03-25 10:22:47 +00:00
Daniel Martí
5195281848 CHANGELOG: Add 0.99.1 changelog entry 2016-03-22 12:50:49 +00:00
Daniel Martí
4c83b2c0c6 Add Hindi to the languages list 2016-03-21 15:46:22 +00:00
F-Droid Translatebot
f30cea33e3 Pull translation updates from Weblate
Translators:

ageru                     French
Ajeje Brazorf             Sardinian
Mohamad Hasan Al Banna    Indonesian
Paresh Chouhan            Hindi
YFdyh000                  Simplified Chinese
YF                        Simplified Chinese
2016-03-21 15:36:35 +00:00
Daniel Martí
a61fb677bc Merge branch 'fix-603--translate-categories-crash' into 'master'
Pass through a known good `Context` to `translateCategories`

All the good work to make sure that `getActivity()` actually returned
a proper context, obtaining a final reference to that known good activity
object, and then using that in the background thread is thrown away.
The reason was because the `translateCategories` method would go and
call `getActivity()` all over again. This changes the `translateCategories`
helper function so that it asks for a `Context`. This way, a known
good `Context` can be passed in, rather than having to perform a check
to see if `getActivity()` is good again.

Fixes #603 (Hopefully)

See merge request !231
2016-03-21 15:08:46 +00:00
Peter Serwylo
a7d757cdb2 Remove unused code and fix some typos.
The old swap code used to delegate to the `AppDetails` activity when
touching an app in the swap view. Now it shows the install button
and download feedback inline. The code which used to exist is no
longer required.
2016-03-21 22:36:15 +11:00
Peter Serwylo
d46efb1d84 Correctly start and stop listening for repo update events during swap.
This fixes the following bugs:
 * `BroadcastReceiver` was never being created due to incorrect guard
   condition `if (pollForUpdatesReceiver != null)` (should have been
   `== null`).
 * Called `unregisterReceiver` rather than `registerReceiver`.
 * Even if it did work, it didn't make an effort to unregister the receiver.

In addition, the creation and listening with the `BroadcastReceiver is
now done in a way similar to the other swap views:
 * Create it as a `final` member variable.
 * `registerReceiver` when view is inflated.
 * `unregisterReceiver` when view is detached.
2016-03-21 22:33:18 +11:00
Peter Serwylo
cfe2f71e4d Correctly unregister receiver in "qr code" swap view.
Previously the receiver was added but never removed. The result
is that once a swap session is cancelled, the receiver still
gets broadcasts.
2016-03-21 22:23:54 +11:00
Peter Serwylo
c29aff2167 Correctly unregister receiver in "connecting" swap view (Fixes #409)
Previously the receiver was added but never removed. The result
is that once a swap session is cancelled, the receiver still
gets broadcasts.

This is what was causing the bug in #409. It was trying to access
the `Activity` once it had been closed, and another swap session started
with a new activity.
2016-03-21 22:22:57 +11:00
Peter Serwylo
b19861226a Correctly unregister receiver in "join wifi" swap view.
Previously the receiver was added but never removed. The result
is that once a swap session is cancelled, the receiver still
gets broadcasts.
2016-03-21 22:21:09 +11:00
Peter Serwylo
8e28172942 Pass through a known good Context to translateCategories
All the good work to make sure that `getActivity()` actually returned
a proper context, obtaining a final reference to that known good activity
object, and then using that in the background thread is thrown away.
The reason was because the `translateCategories` method would go and
call `getActivity()` all over again. This changes the `translateCategories`
helper function so that it asks for a `Context`. This way, a known
good `Context` can be passed in, rather than having to perform a check
to see if `getActivity()` is good again.
2016-03-21 20:42:13 +11:00
Daniel Martí
1af6dbc19e Merge branch 'support-library-23.2.1' into 'master'
Update Support Library components to 23.2.1

As far as I can see from the release notes, 23.2.1 does not fix any bugs that could affect F-Droid. Anyway, it's better to be up-to-date.

See merge request !228
2016-03-17 15:13:59 +00:00
relan
82ed44fac0 Update Support Library components to 23.2.1 2016-03-17 17:43:50 +03:00
Daniel Martí
1d44a5f2e6 Merge branch 'ci-image' into 'master'
CI: Bump docker image

Also use a specific tag instead of latest, so that pushing latest on
Docker Hub won't break older branches and tags.

See merge request !229
2016-03-17 12:05:17 +00:00
Daniel Martí
3b76db0227 tools: check-string-format is python3
This has always been python3, so it was probably a typo. Fixes CI since
we may no longer have python2 installed.
2016-03-16 16:15:07 +00:00
Daniel Martí
fded4c9f2e CI: Bump docker image
Also use a specific tag instead of latest, so that pushing latest on
Docker Hub won't break older branches and tags.
2016-03-16 16:15:07 +00:00
F-Droid Translatebot
87d73e2d01 Pull translation updates from Weblate
Translators:

Ajeje Brazorf          Sardinian
Danial Behzadi         Persian
nikos                  Greek
Olexandr Nesterenko    Ukrainian
Sérgio Marques         Portuguese (Portugal)
Svetoslav Yordanov     Bulgarian
2016-03-15 21:08:54 +00:00
Daniel Martí
5ed4977b9d Merge branch 'master' into 'master'
gitlab-ci: enable lint, log posting, and caching

Some work to improve the CI functions, and first stab at getting parts running in parallel.

See merge request !211
2016-03-15 20:33:10 +00:00
Hans-Christoph Steiner
d4992831c0 gitlab-ci: enable lint and run tools scripts in parallel
* splitting out the tools script allows less things to happen on the
  main job, and runs the tools script in parallel, which should speed
  things up.

* `gradle check` also runs lint, and anything else we might add to
  that meta-target.

* `gradle build` also runs tests, `gradle assemble` does not
2016-03-15 20:54:29 +01:00
Hans-Christoph Steiner
e18e7a7067 gitlab-ci: cache downloaded things between builds
This stores the Android SDK tarball and gradle caches between builds
to speed things up.  Since the unpacked SDK gets unpacked very time,
updating the version is just a matter of changing the variable.  Since
only the gradle caches are stored, i.e. the jars and gradle binaries,
updates there will only add more files to the cache.
2016-03-15 14:29:28 +01:00
Daniel Martí
8bba6670a0 Merge branch 'fix-repository' into 'master'
UI: disabled repo name if apk is incompatible



See merge request !226
2016-03-13 15:51:31 +00:00
Paresh Chouhan
c34ceeffe4 UI : Repository : *Repo Name* is disabled if apk is incompatible. 2016-03-13 20:10:32 +05:30
Daniel Martí
4c9012557e Merge branch 'inconsistent-code-style' into 'master'
Code Style : Changed variable names to be consistent with other variable names

variable names are inconsistent in other files as well. At some places it is `mVariableName` and in some places it is `variableName`.  

suggestion : rename all public variables to `publicVaraible` and all private variables to `mPrivateVariable` ?  

we can use http://udacity.github.io/android-nanodegree-guidelines/index.html

See merge request !225
2016-03-11 16:39:54 +00:00
Daniel Martí
d5f0a6397f Remove empty translation that slipped through 2016-03-10 17:17:40 +00:00
Daniel Martí
0655abe3b9 Bump to 0.100-alpha1
Also update CONTRIBUTING, since we're now going to use three digits in
the version codes for the second part in each version.
2016-03-10 16:53:01 +00:00
F-Droid Translatebot
8f24759a33 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz      Catalan
Adrià García-Alzórriz      Spanish
Benedikt Volkmer           German
Irvan Kurniawan            Indonesian
Licaon Kter                Romanian
Marcelo Santana            Portuguese (Brazil)
Massimiliano Caniparoli    Italian
Mladen Pejaković           Serbian
Mohamad Hasan Al Banna     Indonesian
naofum                     Japanese
Pander                     Dutch
Phạm Nguyễn Hoàng          Vietnamese
riotism                    Chinese (Hong Kong)
Tobias Bannert             German
Verdulo                    Esperanto
Verdulo                    Polish
2016-03-10 16:48:08 +00:00
Paresh Chouhan
c5aa3f91b1 CodeStyle : Fixed inconsistent variable name, changed mctx to mCtx 2016-03-08 12:47:35 +05:30
Daniel Martí
35e791543a README: Use new CI badge url 2016-03-07 20:56:05 +00:00
Peter Serwylo
da8c0e0e16 Merge branch 'gradle-updates' into 'master'
Misc gradle, lint and markdown updates



See merge request !223
2016-03-07 14:00:27 +00:00
Daniel Martí
ea6b0340d9 Merge branch 'fix-554--content-resolver-reference' into 'master'
Ensure `getContentResolver()` is not requested from `null` object.

Should fix #554, however I couldn't reproduce this. At the very least, I fail to see how it is possible with this new change for a `null` to get passed to `AppProvider.Helper.categories`, whereas it could've before.

In the process, I also made the database query run on the background thread, then update the UI on the UI thread.

See merge request !224
2016-03-07 13:52:55 +00:00
Peter Serwylo
0f64f2c181 Clarify threading when loading categories
Previously, it was not explicit that the `onCreate` happened to be invoked
in the UI thread. Now it is, due to passing `new Handler(Looper.getMainLooper())`.
Also, the categories are now loaded in a background task, and then the UI is
updated on the UI thread.
2016-03-07 23:46:06 +11:00
Peter Serwylo
7421d33c3a Expand null check to include isAdded() check
Also, don't call `getActivity()` in the separate thread. Instead, use the
`Activity` which we have already checked and ensured is not null.
2016-03-07 23:45:58 +11:00
Daniel Martí
b8ce62e3ef README: Fix badge link
The old /ci site is gone. Link to the builds page, which at least shows
something related to CI.
2016-03-05 23:39:30 +00:00
Daniel Martí
26d60aa9ae Fix gradlew references in markdown files
Use gradlew consistently. Also, fix its calling after the cd.
2016-03-05 23:33:52 +00:00
Daniel Martí
80a3faa4d5 Explicitly set fullBackupContent to true
An F-Droid backup should contain all the app's data.
2016-03-05 23:27:18 +00:00
Daniel Martí
b534bba440 Bump targetSdkVersion to 23
compileSdkVersion in the build.gradle file was already bumped, but we
forgot about this one.
2016-03-05 23:27:00 +00:00
Daniel Martí
25a9360a58 Fix ScrollViewSize lint warnings 2016-03-05 23:21:15 +00:00
Daniel Martí
28988b9fdd Bump libsuperuser to the latest version 2016-03-05 23:15:47 +00:00
Daniel Martí
ccf858f960 CHANGELOG: Start writing upcoming release 2016-03-05 23:01:10 +00:00
Daniel Martí
3c33e55fd3 Merge branch 'add-repo-url' into 'master'
Enhancement : Repo URL added to apk's on AppDetailsActivity.

Fixes issue #527.
Adds repo URL to apk's present on AppDetails.

Samples  
![sample](/uploads/0d603cf7242f6f45348c78009f811623/sample.png)![sampl2](/uploads/31efab104bd52cecc9f2ea1e923116c6/sampl2.png)

See merge request !222
2016-03-05 21:50:48 +00:00
Paresh Chouhan
683ba8d20f Enhancement|UI : Repository URL added to APK's on AppDetails Activity.
Fixes issue #527.
Repository URL's now shown as Provided By domain.name/repo
2016-03-06 01:23:13 +05:30
Peter Serwylo
018a8231d6 Merge branch 'pmd' into 'master'
Add PMD



See merge request !221
2016-03-04 22:14:22 +00:00
F-Droid Translatebot
37ef67e1b8 Pull translation updates from Weblate
Translators:

ageru              French
Danial Behzadi     Persian
enolp              Asturian
ezjerry liao       Chinese (Taiwan)
Fr Translation     French
Hsiu-Ming Chang    Chinese (Taiwan)
Jonatan            Swedish
relan              Russian
riotism            Chinese (Hong Kong)
2016-03-04 17:04:38 +00:00
Daniel Martí
d3ca6020dc CI: Run pmd too 2016-03-01 17:46:49 +00:00
Daniel Martí
85ba537d95 PMD: Add a few rulesets that we already obey 2016-03-01 17:46:38 +00:00
Daniel Martí
fbeb6d140f PMD: Enable java-android, fix issues 2016-03-01 17:46:38 +00:00
Daniel Martí
78d15dd4a8 Add PMD, for now with no rules
Unlike findbugs, PMD is very easy to configure. Should be very useful as
long as we set a correct ruleSet.
2016-03-01 17:46:38 +00:00
Daniel Martí
580723fa64 CI: No need to install dependencies any more
They all come in mvdan/fdroid-ci. Same as in the other two repos.
2016-03-01 11:21:19 +00:00
Daniel Martí
e698e1557c Merge branch 'target-23' into 'master'
Bump target SDK and support libs to 23

Android 6.0 brought some changes that affect F-Droid client:

1. [Apache HTTP client removal](https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client)
2. [PackageInfo.REQUESTED_PERMISSION_REQUIRED removal](https://developer.android.com/sdk/api_diff/23/changes/android.content.pm.PackageInfo.html)

Closes #518.

See merge request !214
2016-03-01 11:20:28 +00:00
relan
e2b81c6b77 Permit deprecated Apache HTTP Client
This is a temporary solution. All code that uses Apache HTTP Client
should be rewritten.
2016-03-01 12:34:20 +03:00
relan
21a78054d5 Bump target SDK to 23
Also update Support Library components to 23.2.0.
2016-03-01 12:34:20 +03:00
relan
77074f83e2 Remove PackageInfo.REQUESTED_PERMISSION_REQUIRED
This flag existed in Android 4.2-5.1 and has always been set. Stop
checking it.
2016-03-01 12:33:21 +03:00
Daniel Martí
90e64badf3 Merge branch 'ci-image' into 'master'
CI: Use our docker image, print out test coverage



See merge request !220
2016-02-29 21:45:27 +00:00
Daniel Martí
26ce365c22 Enable test coverage for Gitlab CI 2016-02-29 20:11:29 +00:00
Daniel Martí
d6de4eb58b CI: Use our docker image 2016-02-29 14:35:16 +00:00
Daniel Martí
4aa44cb150 Bump to 0.99 2016-02-28 22:46:53 +00:00
F-Droid Translatebot
91482e05f0 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz    Catalan
Adrià García-Alzórriz    Spanish
Ajeje Brazorf            Sardinian
Alberto Moshpirit        Spanish
Alex Kalles              Greek
jetamkadlec              Czech
Ldm Public               French
Licaon Kter              Romanian
Mladen Pejaković         Serbian
naofum                   Japanese
Olexandr Nesterenko      Ukrainian
Verdulo                  Esperanto
Verdulo                  Polish
2016-02-28 22:41:02 +00:00
Hans-Christoph Steiner
b22c20ece3 Merge branch 'lint-checkstyle' into 'master'
Lint fixes and checkstyle update



See merge request !219
2016-02-28 22:25:15 +00:00
Daniel Martí
a203545e48 Bump checkstyle to 6.16
Due to fixes and improvements, some new checkstyle changes are due.
2016-02-28 16:44:44 +00:00
Daniel Martí
d061dafcd7 Remove a few extra spaces that checkstyle missed
There's also a change in a SQL string, but it should be safe.
2016-02-28 14:29:51 +00:00
Daniel Martí
3af5f55abd Remove unused repo field
Found by Android Studio.
2016-02-28 14:22:27 +00:00
Daniel Martí
9c86655af0 Make some declaration accesses weaker
As suggested by Android Studio.
2016-02-28 14:19:02 +00:00
Daniel Martí
982bf42a4b Remove unused resources from old search screen
We didn't remove the search results class until after reworking the
feature, which is probably why this was kept around.
2016-02-28 14:04:15 +00:00
Hans-Christoph Steiner
d43c6b326f Merge branch 'cleanup-swap-code' into 'master'
Cleanup swap code when returning to start swap view.

This change cleans up some code around how the `StartSwapView` attaches and detaches listeners/broadcast receivers/etc. There are two things that occured which were undesirable, one causing observable bugs, the other having the potential to.

The first is that when the swap process is stopped (e.g. by hitting the cross in the top left of the action bar) then it would trigger an event to be broadcast. This would hit the `StartSwapView`, and then that view would change the UI widgets to match the state of the swap process (i.e. "Stopping" == Disabled and unchecked switch, "Stopped" == Enabled and unchecked switch). When the UI was updated, it was inadvertantly sending further requests to stop swap, because `Switch` widgets _always_ notify their listeners, even if they are explicitly set via `setChecked()`. Now it temporarily removes listeners while brining the UI in line with what the swap service is doing, then reattaches them afterwards.

The later is due to `BroadcastReceivers` being added each time the `StartSwapView` is shown, and never unregistered. Now they are unregistered when the view is detached. Note that because we are not using the convoluted but well documented `Fragment` API, I'm not 100% certain this is the right time to detach listeners, but it seems suitable.

FYI, here is a logcat of me starting hitting the "Cancel swap" X button on master:

```
            SwapManager  I  Asked to stop swapping, will stop bluetooth, wifi, and move service to BG for GC.
                         D  Moving SwapService to background so that it can be GC'ed if required.
               SwapType  D  Sending broadcast STOPPING from WifiSwap
               WifiSwap  D  Sending message to swap webserver to stop it.
       BonjourBroadcast  D  Unregistering MDNS service...
               WifiSwap  I  we've been asked to stop the webserver: Thread-622 says stop
            SwapManager  D  Remembering that Bluetooth swap is NOT connected and WiFi swap IS connected.
          StartSwapView  D  WiFi service is stopping (setting toggle to unchecked and disabled).
                         D  Received onCheckChanged(false) for WiFi swap, disabling WiFi swap in background thread.
  AvailableAppsFragment  D  Category 'What's New' selected.
         OpenGLRenderer  D  endAllStagingAnimators on 0xb8c007e8 (RippleDrawable) with handle 0xb8cef7e8
        BluetoothFinder  D  Stopping bluetooth discovery.
       BluetoothAdapter  D  235158966: getState() :  mService = null. Returning STATE_OFF
          BonjourFinder  D  Cancelling BonjourFinder, releasing multicast lock, removing jmdns service listeners
                    art  I  WaitForGcToComplete blocked for 7.385ms for cause DisableMovingGc
Manager.CallbackHandler  D  CM callback handler got msg 524290
                         D  CM callback handler got msg 524290
               SwapType  D  Sending broadcast STOPPED from BonjourBroadcast
                         D  Sending broadcast STOPPED from WifiSwap
                         D  Sending broadcast STOPPING from WifiSwap
            SwapManager  D  Moving SwapService to background so that it can be GC'ed if required.
               WifiSwap  D  Sending message to swap webserver to stop it.
           MessageQueue  W  Handler (org.fdroid.fdroid.localrepo.type.WifiSwap$5$1$1) {29eeaaee} sending message to a Handler on a dead thread
                         W  java.lang.IllegalStateException: Handler (org.fdroid.fdroid.localrepo.type.WifiSwap$5$1$1) {29eeaaee} sending message to a Handler on a dead
                             thread
                         W      at android.os.MessageQueue.enqueueMessage(MessageQueue.java:325)
                         W      at android.os.Handler.enqueueMessage(Handler.java:631)
                         W      at android.os.Handler.sendMessageAtTime(Handler.java:600)
                         W      at android.os.Handler.sendMessageDelayed(Handler.java:570)
                         W      at android.os.Handler.sendMessage(Handler.java:507)
                         W      at org.fdroid.fdroid.localrepo.type.WifiSwap.stop(WifiSwap.java:167)
                         W      at org.fdroid.fdroid.localrepo.type.SwapType$3.doInBackground(SwapType.java:103)
                         W      at org.fdroid.fdroid.localrepo.type.SwapType$3.doInBackground(SwapType.java:100)
                         W      at android.os.AsyncTask$2.call(AsyncTask.java:288)
                         W      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                         W      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
                         W      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                         W      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                         W      at java.lang.Thread.run(Thread.java:818)
       BonjourBroadcast  D  Unregistering MDNS service...
               SwapType  D  Sending broadcast STOPPED from BonjourBroadcast
                         D  Sending broadcast STOPPED from WifiSwap
            SwapManager  D  Remembering that Bluetooth swap is NOT connected and WiFi swap is NOT connected.
          StartSwapView  D  WiFi service has stopped (setting toggle to not-visible).
            SwapManager  D  Remembering that Bluetooth swap is NOT connected and WiFi swap is NOT connected.
          StartSwapView  D  WiFi service is stopping (setting toggle to unchecked and disabled).
            SwapManager  D  Moving SwapService to background so that it can be GC'ed if required.
                         D  Remembering that Bluetooth swap is NOT connected and WiFi swap is NOT connected.
          StartSwapView  D  WiFi service has stopped (setting toggle to not-visible).
```

And also on this branch:

```
            SwapService  I  Asked to stop swapping, will stop bluetooth, wifi, and move service to BG for GC.
                         D  Moving SwapService to background so that it can be GC'ed if required.
               SwapType  D  Sending broadcast STOPPING from WifiSwap
               WifiSwap  D  Sending message to swap webserver to stop it.
       BonjourBroadcast  D  Unregistering MDNS service...
               WifiSwap  I  we've been asked to stop the webserver: Thread-646 says stop
            SwapService  D  Remembering that Bluetooth swap is NOT connected and WiFi swap IS connected.
          StartSwapView  D  WiFi service is stopping (setting toggle to unchecked and disabled).
  AvailableAppsFragment  D  Category 'What's New' selected.
         OpenGLRenderer  D  endAllStagingAnimators on 0xb8b1bb70 (RippleDrawable) with handle 0xb8cec7c0
          BonjourFinder  D  Cancelling BonjourFinder, releasing multicast lock, removing jmdns service listeners
        BluetoothFinder  D  Stopping bluetooth discovery.
       BluetoothAdapter  D  93224770: getState() :  mService = null. Returning STATE_OFF
Manager.CallbackHandler  D  CM callback handler got msg 524290
                         D  CM callback handler got msg 524290
               SwapType  D  Sending broadcast STOPPED from BonjourBroadcast
                         D  Sending broadcast STOPPED from WifiSwap
            SwapService  D  Moving SwapService to background so that it can be GC'ed if required.
                         D  Remembering that Bluetooth swap is NOT connected and WiFi swap is NOT connected.
          StartSwapView  D  WiFi service has stopped (setting toggle to not-visible).
Manager.CallbackHandler  D  CM callback handler got msg 524290
```

One of the most notable things that can be seen is the lack of the following message in the second (fixed) logcat.

> Received onCheckChanged(false) for WiFi swap, disabling WiFi swap in background thread.

See merge request !218
2016-02-28 10:14:29 +00:00
Peter Serwylo
ad63e52e50 Extract BroadcastReceivers to member variables, so they can be unregistered correctly.
Previously, they were registered, then forgotten. This means that each time
the start swap view was run, another receiver was registered. As a result,
they were being invoked multiple times.

It doesn't appear that this had any specific side effects which were terrible,
but they definitely have the potential to going forward.

Note that because we are not using `Fragments` with their convoluted, but at
least well documented API, I'm not 100% certain that I've unregistered the
receivers at the right location.
2016-02-28 13:58:49 +11:00
Peter Serwylo
1323e800b7 Temporarily disable listeners when updating switch state in response to background process.
Previously, something like this would happen:
 * Swap service is cancelled
 * WiFi swap is asked to stop
 * Event is broadcast when done
 * UI listens to this event
 * Upon receiving the event, it updates the UI
 * Updating the UI triggers an event, causing the process to happen again

An alternative solution to this would have been for the UI to stop listening
to listeners before WiFi swap is shut down, but that is then only specific
to the case when the swap view is being destroyed/removed. This could also
happen in other situations however, such as when the swap service times out.
2016-02-28 13:43:07 +11:00
Peter Serwylo
209afd6bf2 Extract switch change listeners to member variables, so that they can be unregistered.
When the view is detached, then the listeners will be unregistered.
This will also help in the future so that they can be temporarily
unregistered when manually changing the state of the switches.
2016-02-28 12:49:50 +11:00
Peter Serwylo
62b080a8d9 Rename logging tag to make logcat debugging clearer. 2016-02-28 12:36:06 +11:00
Hans-Christoph Steiner
94c0c391da Merge branch 'faster-ci' into 'master'
CI: Install SDK only if necessary



See merge request !217
2016-02-27 19:45:25 +00:00
Daniel Martí
affa569a79 CI: Install SDK only if necessary 2016-02-27 18:33:34 +00:00
Daniel Martí
1eedf66d66 Bump to 0.99-alpha2 2016-02-27 13:02:24 +00:00
Daniel Martí
d7827a3f07 CHANGELOG: prepare for upcoming release 2016-02-27 13:01:56 +00:00
Daniel Martí
4ec9cee143 Merge branch 'smooth-tor' into 'master'
Smooth Tor setup

This is a big reworking of the Tor support to make it really easy to setup, and to make .onion addresses work automatically even when "Use Tor" is off.

I needed to make the NetCipher v1.2.1 release to support this, hence it was originally WIP:.

See merge request !216
2016-02-27 12:42:20 +00:00
Hans-Christoph Steiner
fd03ebd764 annotate swap methods that require android-10
swap only works on >= android-10 anyway

closes #581 https://gitlab.com/fdroid/fdroidclient/issues/581
2016-02-27 11:05:16 +01:00
Hans-Christoph Steiner
26b35723d3 use AsyncTask for SwapType operations to run in background
Thread runs at normal priority by default.  AsyncTasks are integrated into
Android for handling things running in the background while keeping the UI
responsive.

This reverts most of commit 828cc272ee5235f868104b009349cc7e835e144f.
2016-02-27 11:05:16 +01:00
Hans-Christoph Steiner
96fe1f9584 do not show "Swap" as an option on less than android-10
Swap requires lots of APIs that are only all available in android-10, so
hide the menu item on older platforms.

closes #581 https://gitlab.com/fdroid/fdroidclient/issues/581
closes #575 https://gitlab.com/fdroid/fdroidclient/issues/575
2016-02-27 11:04:08 +01:00
Hans-Christoph Steiner
38e4b38602 Re-enable NetCipher to provide decent TLS on all Android versions
Revert "Revert netcipher to fix SNI regression"
This reverts commit 6c8e726aadbe6714d6295882c5be87a7bf81a9f0.

NetCipher is important for making sure that the client running on older
versions of Android is not using extremely crappy default TLS settings.  It
also streamlines the Tor support.

closes #431 https://gitlab.com/fdroid/fdroidclient/issues/431
closes #576 https://gitlab.com/fdroid/fdroidclient/issues/576
2016-02-27 11:04:08 +01:00
Hans-Christoph Steiner
eed0070d4b do not bail out of wifi settings if there is no DhcpInfo
There is still much useful information to be had without DhcpInfo.
2016-02-27 11:04:08 +01:00
Hans-Christoph Steiner
c5688dcdbf Merge branch 'cleanup-swap-stuff' into 'master'
Cleanup swap stuff, make more robust

While we're discussing the merits or otherwise of !208, here is some fixes to the swap workflow cherry-picked (and cleaned up) from that branch.

Although not directly reproducible, I'm confident this should fix #556 and #557.

The original assumption was that we can start the wifi local repo server, then tell the user it is connected while JmDNS is starting. The plan was for it to be very snappy, so the user could continue using the UI while bonjour was doing its stuff. However, in realtity this results in the possibility of turning swap on and off again while bonjour is still getting ready.

This now makes the user wait both when starting swap, and also when stopping swap. It will provide proper feedback to the user, do it on a background thread (properly) and update the UI when done.

Added some other misc cleanups while there.

See merge request !213
2016-02-27 09:59:52 +00:00
Peter Serwylo
db120133b9 Don't try to start bonjour without an IP.
Although not reproduced, it looks very much like this would be related
to, and should subsequently fix #556.
2016-02-27 09:28:17 +11:00
Peter Serwylo
3dd0589b08 Don't say wifi is connected until both wifi + bonjour are ready.
Although I can't reproduce reliably, I am hopeful that this will resolve
a lot of the errors such as #557.
2016-02-27 09:28:17 +11:00
Peter Serwylo
cd3a064a5a Don't call unregisterService(...) then unregisterAllSerivces().
The later will unregister the service we were explicitly unregistering anyway.
2016-02-27 09:28:17 +11:00
Peter Serwylo
1505d21781 Set connected status after disconnecting from wifi swap. 2016-02-27 09:28:17 +11:00
Peter Serwylo
2ed6110ae5 Cleanup looper after shutting down. 2016-02-27 09:28:17 +11:00
Peter Serwylo
18f97602e8 Don't start swap wifi when there is no network.
Not sure if we should be here or not in this situation, so this is
a little bit defensive. Can't bind to an IP address of `null`, so
don't bother starting LocalHTTP server unless we have an IP.
2016-02-27 09:28:17 +11:00
Peter Serwylo
ddbd9e2ea9 Actually run thread in background.
`Thread.run()` is not the correct call, changed to the correct `Thread.start()`.
Also, explicitly indicate that we want the stopping of wifi to happen in the
background.
2016-02-27 09:28:17 +11:00
Peter Serwylo
1eae135929 Add user feedback for when WiFi is being disabled.
On some devices this can take some time (i.e. a second) and the UI needs
to be disabled for that time. This should stop users quickly stopping and
starting regularly, queuing up many "start jmdns, stop jmdns, start jmdns"
calls.
2016-02-27 09:28:17 +11:00
Peter Serwylo
8364aa15f1 Don't try to start swap again if we have gone from network -> no network. 2016-02-27 09:27:57 +11:00
Hans-Christoph Steiner
94e3cf85ba Merge branch 'lint-errors-2' into 'master'
Lint errors round 2

There are only a few errors left, which I've either logged as issues or reported upstream:

* #580
* #581
* #582
* https://github.com/rtyley/spongycastle/issues/7#issuecomment-189299020

I've also done a bunch of warnings that were just too easy to leave alone.

See merge request !215
2016-02-26 21:15:56 +00:00
Daniel Martí
b08b97466f Fix a single rogue ellipsis 2016-02-26 15:00:50 +00:00
Daniel Martí
91c3278920 Take RTL suggestions from lint (warnings) 2016-02-26 14:57:42 +00:00
Daniel Martí
e390561c7c install_confirm: remove useless lines
These are already in its layout-v11 version. And as lint points out,
these need v11:

	?android:attr/buttonBarStyle requires API level 11 (current min is 8)
	?android:attr/buttonBarButtonStyle requires API level 11 (current min is 8)
2016-02-26 14:48:45 +00:00
Daniel Martí
1b6fc3da7c Move app_permission_item_money to layout-v17
Since it's only ever used on android-17 or later, move it there to keep
lint happy with all the NewApi errors.
2016-02-26 14:47:09 +00:00
Daniel Martí
5179e032db Fix NewApi bug introduced in 8e193cec 2016-02-26 14:39:02 +00:00
Daniel Martí
43a3c2b042 Remove useless app:backgroundTint from layouts
app:backgroundTint only works on AppCompatButton from v7-appcompat.
We're using a regular Button in these, so this attribute is useless and
makes lint error.

More info:

	https://stackoverflow.com/questions/27735890/lollipops-backgroundtint-has-no-effect-on-a-button
2016-02-26 14:26:05 +00:00
Hans-Christoph Steiner
d1b758147b Merge branch 'lint-errors' into 'master'
Fix first chunk of lint errors

These are easy, but numerous.

See merge request !212
2016-02-25 19:34:08 +00:00
Daniel Martí
cdecc1604c Add all missing Left/Right attributes in RTL
This improves support on older Android releases.
2016-02-25 16:56:23 +00:00
Daniel Martí
073052f5cc Move app_description to donottranslate.xml
As lint points out, only the original string is used in the
AndroidManifest.xml. So having it translated is useless.
2016-02-25 16:40:58 +00:00
Hans-Christoph Steiner
153a6bdbe7 Merge branch 'tools' into 'master'
Pull translation updates and make CI check more stuff via tools/



See merge request !210
2016-02-25 16:31:29 +00:00
Daniel Martí
99f930663d CI: Also check language list and string formats 2016-02-25 14:25:45 +00:00
Daniel Martí
54c4714b9d Fix string format issues 2016-02-25 13:56:06 +00:00
Daniel Martí
6b9d6b6be5 Add a py script to check for bad string formats
Lint finds these, but it's very slow and currently we're not taking lint
errors as fatal. So for now this script will be useful, as nearly every
time I pull from weblate there are at least a couple of these.
2016-02-25 13:56:01 +00:00
Daniel Martí
d130a2f634 Merge branch 'ci-patches' into 'master'
Small CI patches



See merge request !209
2016-02-25 13:51:50 +00:00
Daniel Martí
7e86dc5e48 Convert existing py tools to python3 2016-02-25 13:39:39 +00:00
F-Droid Translatebot
d79fccb2da Pull translation updates from Weblate
Translators:

agilob                 Polish
Hsiu-Ming Chang        Chinese (Taiwan)
Nathan Follens         Dutch
Perry Verheij          Dutch
Robin van der Vliet    Dutch
Robin van der Vliet    Esperanto
Verdulo                Esperanto
Wathiq Qajar           Arabic
2016-02-25 12:38:43 +00:00
Daniel Martí
86ecfa217f CI: Simplify sdk unboxing 2016-02-24 20:31:30 +00:00
Daniel Martí
1153a93425 CI: Remove kill line
Hans correctly pointed out all this does is try to kill the echo. The
AVD should be taken down along with the docker runner.
2016-02-24 20:27:20 +00:00
Daniel Martí
5cca8102d7 Update commons-io test dep to 2.4
Ran the tests locally, all still pass.
2016-02-22 18:47:25 +01:00
Daniel Martí
9fe6545654 Update ACRA to 4.8.2 2016-02-22 18:45:21 +01:00
Peter Serwylo
1bae2b0132 Merge branch 'checkstyle-more' into 'master'
Checkstyle: require braces, consistent constant names



See merge request !207
2016-02-21 01:40:03 +00:00
Daniel Martí
17c731ef1d checkstyle: obey ConstantName 2016-02-17 15:59:04 +00:00
Daniel Martí
a6b804e93a checkstyle: obey NeedBraces on multi-line stmts
We still allow them in single-line statements, like:

	if (foo) bar;
	for (int i : ints) bar;

Everything else should use braces to help readability and avoid silly
human mistakes that might result in bugs.

These changes were completely automated via a python script.
2016-02-17 12:04:36 +00:00
Daniel Martí
ea31ed3079 gradlew: add zip sha256 2016-02-16 20:27:50 +00:00
F-Droid Translatebot
6d6aa98c6b Pull translation updates from Weblate
Translators:

Hsiu-Ming Chang    Chinese (Taiwan)
Verdulo            Esperanto
2016-02-16 11:58:04 +00:00
Peter Serwylo
e892d55b91 Merge branch 'search-clear-focus' into 'master'
Search: clear focus when enter/return is pressed

Fixes #572.

Assigning to @pserwylo since he wrote the current search widget stuff.

See merge request !206
2016-02-16 11:06:21 +00:00
Daniel Martí
e066ed04dc Search: clear focus when enter/return is pressed
Fixes #572.
2016-02-15 16:47:25 +00:00
Daniel Martí
5e619a8117 README: Point to gradlew 2016-02-15 16:35:39 +00:00
Daniel Martí
ddda82509c Bump gradle to 2.11 2016-02-15 16:34:41 +00:00
Daniel Martí
7471fed31c CI: Use gradlew 2016-02-15 16:34:41 +00:00
Daniel Martí
714edfb456 Add gradle wrapper 2016-02-15 16:30:40 +00:00
Daniel Martí
247dfc5ecf Run remove-unused-trans.py 2016-02-14 15:15:15 +00:00
F-Droid Translatebot
6a6a37c42e Pull translation updates from Weblate
Translators:

Coucouf           French
Danial Behzadi    Persian
Green Lunar       Hebrew
Licaon Kter       Romanian
M2ck              French
Marian Hanzel     Slovak
Verdulo           Esperanto
Verdulo           Polish
2016-02-14 15:14:22 +00:00
Daniel Martí
80d8f9f30b Sync changelog with stable branch 2016-02-14 14:56:56 +00:00
Peter Serwylo
88b4e1ff31 Merge branch 'fix-554' into 'master'
Work around dead activity issue in AppDetails

It seems like install() sometimes runs when the AppDetails activity is
finished or finishing. This results in the windows (dialogs) failing to
show, and a BadTokenException to fire:

    android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@d6e3570 is not valid; is your activity running?

This seems to be the culprit:

    at org.fdroid.fdroid.AppDetails.install(AppDetails.java:840)
    at org.fdroid.fdroid.AppDetails$AppDetailsListFragment.install(AppDetails.java:1657)
    at org.fdroid.fdroid.AppDetails$AppDetailsListFragment.onListItemClick(AppDetails.java:1721)

Apparently, you can check whether an activity/context is being finished:

https://stackoverflow.com/questions/7811993/error-binderproxy45d459c0-is-not-valid-is-your-activity-running

I cannot reproduce this issue, thus can't say whether this fixes it or
not. Either way, it can't hurt to try. This can be reverted if we see
ACRA reports of this in the future, and the issue reopened.

Fixes #565.

See merge request !204
2016-02-13 21:49:22 +00:00
Hans-Christoph Steiner
f3e5f2adcc Merge branch 'fix-wifistatechange-npe' into 'master'
WifiStateChangeService: Avoid DhcpInfo NPE

Fixes #569.

See merge request !205
2016-02-12 15:15:16 +00:00
Daniel Martí
f6724413b0 WifiStateChangeService: Avoid DhcpInfo NPE
Fixes #569.
2016-02-12 13:04:28 +00:00
Daniel Martí
89c53bbd5e Bump gradle plugin to 1.5.0 2016-02-11 12:39:48 +00:00
Daniel Martí
1a1ece16cf Work around dead activity issue in AppDetails
It seems like install() sometimes runs when the AppDetails activity is
finished or finishing. This results in the windows (dialogs) failing to
show, and a BadTokenException to fire:

    android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@d6e3570 is not valid; is your activity running?

This seems to be the culprit:

    at org.fdroid.fdroid.AppDetails.install(AppDetails.java:840)
    at org.fdroid.fdroid.AppDetails$AppDetailsListFragment.install(AppDetails.java:1657)
    at org.fdroid.fdroid.AppDetails$AppDetailsListFragment.onListItemClick(AppDetails.java:1721)

Apparently, you can check whether an activity/context is being finished:

https://stackoverflow.com/questions/7811993/error-binderproxy45d459c0-is-not-valid-is-your-activity-running

I cannot reproduce this issue, thus can't say whether this fixes it or
not. Either way, it can't hurt to try. This can be reverted if we see
ACRA reports of this in the future, and the issue reopened.

Fixes #565.
2016-02-09 20:48:42 +00:00
Daniel Martí
9195e3c614 Bump to 0.99-alpha1 2016-02-09 16:04:29 +00:00
Daniel Martí
044bf0b2f8 CHANGELOG: Update with latest fixes 2016-02-09 16:04:29 +00:00
F-Droid Translatebot
4148edeccd Pull translation updates from Weblate
Translators:

Allan Nordhøy    Norwegian Bokmål
Licaon Kter      Romanian
2016-02-09 16:00:10 +00:00
Daniel Martí
401a1d473d Drop unnecessary elses after returns 2016-02-09 15:59:47 +00:00
Daniel Martí
9997b0f448 Merge branch 'fix-555--content-provider-invalid-uri' into 'master'
Fix 555  content provider invalid uri

Was not correctly encoding "/" characters when searching. This caused the Uri used by the Content Providers to include a slash, which makes it look like a separate segment of the path which was wrong. Now correctly encodes "/" characters. Also noticed one other place incorrectly encoding characters, where they would've been double encoded when added as query parameters to a Uri.

See merge request !203
2016-02-09 15:55:38 +00:00
Peter Serwylo
c0d752cce3 Merge branch 'reactivex--swap--peer-finders' into 'master'
Refactor swap "peer finders" to use ReactiveX

*NOTE: This includes the commit specified by !197.*

In the old code, there is a _lot_ of procedual style "Is this peer finder running, if so, do this". In addition, the choice to do things on background threads or not is a little ad-hoc. Finally, the `SwapService` needs to know about both bluetooth and wifi peer finders, whereas really they are both only there to emit "Peers", regardless of the type.

As such, some improvements in this change are:
 * The choice to run peer finding on a background thread is made once, at a higher level when starting the peer finder.
 * No longer does the UI code ask "Am I searching for peers". It instead waits to be told whether it is or isn't.
 * The addition of new types of peers in the future is the job of the Peer finder itself. It quietly aggregates all of the Peer Finders it knows about into a single observable that emits different types of peers.

This code doesn't fix any particular issue, but rather it is about making the entire swap workflow easier to reason about. I plan on migrating more of this workflow to this functional style in the future, and hopefully that will have benefits in terms of stability and code understanding.

See merge request !198
2016-02-07 00:08:03 +00:00
Peter Serwylo
d939e9dac9 Minor fixes due to CR. 2016-02-07 10:39:01 +11:00
Daniel Martí
416c7aff82 Update ACRA to 4.8.1
Fixes nasty crash on android-19 and earlier.
2016-02-06 23:35:43 +00:00
Daniel Martí
d063aa3a08 CHANGELOG: Add Android.mk fix
Also fix the 0.98 date to be the same as the one in the stable-v0.98
branch.
2016-02-06 13:47:07 +00:00
F-Droid Translatebot
597e9c42a2 Pull translation updates from Weblate
Translators:

fabrizio maggi     Italian
Gabriele Pau       Italian
Irvan Kurniawan    Indonesian
Karola Marky       Latvian
Patrik Kretic      Slovenian
riotism            Chinese (Hong Kong)
2016-02-06 12:09:08 +00:00
Daniel Martí
6dbcf95ae7 CHANGELOG: Add more crash fixes 2016-02-06 12:07:35 +00:00
Peter Serwylo
e57b034a62 Add test for searching for forward slashes. 2016-02-06 14:04:28 +11:00
Peter Serwylo
81b772c3fd Use appendPath(...) instead of appendEncodedPath(...).
I misread the documentation when first using the `appendEncodedPath` method,
because it expects the path to already be encoded. This causes a bug because
if you search for a '/'. The result is a malformed URI that has the path
'/search//' instead of '/search/%2F'.

Using `appendPath` will always encode the string given to it, which is desirable.

Also check for empty strings, and return a URI that gives all apps. This was
not strictly neccesary, because the code which invokes it checks for empty
strings, but if somewhere else in the future starts to use this code, they
would've had to know to check for empty strings first.

Fixes #555.
2016-02-06 14:02:54 +11:00
Peter Serwylo
46817b1893 Add tests for searching null or empty values.
Should help prevent abuse of the search API into the future.
2016-02-06 13:33:36 +11:00
Peter Serwylo
5f08181f7d Remove unused SearchResultsFragment.
This is left over from when the search functionality was updated recently.
2016-02-06 13:33:36 +11:00
Daniel Martí
0646b6473e Merge branch 'fix-286--refreshHeader-crash' into 'master'
Put null check around access of `R.id.header` fragment.

Please note I haven't reproduced the specific problem. Also, the stack
traces being reported are only marginally informative, because they are
in response to a content providers firing events, and thus don't have
any context about when or where the event was fired from.

However, my looking at the code seems to indicate that this will prevent
NPE when the Activity is no longer visible but an app is finished
installing. Also, the view should still update correctly on resuming the
Activity because the `onResumeFragments()` methods will be invoked
which invokes the `refreshHeaders()` method.

Fixes #286.

See merge request !202
2016-02-06 00:04:26 +00:00
Peter Serwylo
d9f0c86c2e Put null check around access of R.id.header fragment.
Please note I haven't reproduced the specific problem. Also, the stack
traces being reported are only marginally informative, because they are
in response to a content providers firing events, and thus don't have
any context about when or where the event was fired from.

However, my looking at the code seems to indicate that this will prevent
NPE when the Activity is no longer visible but an app is finished
installing. Also, the view should still update correctly on resuming the
Activity because the `onResumeFragments()` methods will be invoked
which invokes the `refreshHeaders()` method.

Fixes #286.
2016-02-05 22:50:11 +11:00
Daniel Martí
180179eb3a Merge branch 'reactivex--add-as-dependency' into 'master'
Add ReactiveX (rxjava + rxandroid) as dependency

This is going to be used to make the managing of async tasks in F-Droid easier to reason about. It does this by using a more functional style to performing multiple different asynchronous tasks as compared to the Android `AsyncTask` or `Service` or some other approach.

More specifically, I have some changes coming that will use this dependency.
I wanted to merge this separately so that it doesn't matter which of the changes I'm working on gets merged first.

I've never added a `dependencyVerification` to the gradle build before, and there wasn't a whole bunch of docs on the interwebs about how to do that. So I did a SHA256 sum of some other .jar files in my gradle cache and compared them to the existing dependency verification settings and they did match. So I also did a SHA256 sum of the newly added dependencies and gradle seems happy with the hashes I've chosen.

See merge request !197
2016-02-05 11:25:12 +00:00
Peter Serwylo
10ccd5c503 Reimplement "peer finder" logic using funcitonal ReactiveX style.
The benefits of this are as follows:

No longer need to worry about how many types of `Peer`s exist.
There is a single publicly accessible `PeerFinder` which aggregates
the results of both the Bluetooth and Bonjour peer finders. In the
future if another is added, the consumer of the peer finder
(i.e. `StartSwapView`) doesn't need to be aware of this. Neither does
the `SwapService` or `SwapActivity` or any other code.

Never ask "Are we searching" but instead receive push notifications
from the peer finder when it stops searching.

Don't worry about receiving the same peer multiple times, it will
automatically get filtered out.

Less concern about doing things in `AsyncTasks` (and knowing what to
do in an `AsyncTask`). The RXJava + RXAndroid libraries deal with this
by allowing the client consuming the `PeerFinder` to specify which
thread to perform the background task on, and also that the found
`Peer`s should be emitted on the UI thread.

In the future, can play with caching the results of a particular
sequence of found peers. However right now using the `Observable.cache()`
method means we can no longer unsubscribe from the peer finders
and thus they run longer than they need to when we move on from
the initial swap screen.
2016-02-05 15:39:40 +11:00
Peter Serwylo
73d24d987e Add exception for rxjava in Proguard.
The rxjava library depends on sun.misc.Unsafe, which is unavailable on Android
The rxjava team is aware of this, and mention in the docs that they only use
the unsafe functionality if the platform supports it.
 - https://github.com/ReactiveX/RxJava/issues/1415#issuecomment-48390883
 - https://github.com/ReactiveX/RxJava/blob/1.x/src/main/java/rx/internal/util/unsafe/UnsafeAccess.java#L23
2016-02-05 14:21:13 +11:00
Peter Serwylo
5c85302928 Add ReactiveX (rxjava + rxandroid) as dependency
This is going to be used to make the managing of async tasks in
F-Droid easier to reason about. It does this by using a more
functional style to performing multiple different asynchronous tasks
as compared to the Android `AsyncTask` or `Service` or some other approach.
2016-02-05 11:50:54 +11:00
Daniel Martí
23612570a8 Merge branch 'build' into 'master'
fix AOSP build integration

The build isn't done from the top-level directory so the symlink needs
to use an absolute path.

Fixes #551.

See merge request !200
2016-02-03 22:07:39 +00:00
Daniel Martí
29b6b261a2 Merge branch 'fix-560--searching-only-whitespace' into 'master'
Fix 560  (searching only whitespace)

When no keywords to search, use an empty query selection that evaluates to "1".

This means that instead of building invalid SQL such as `WHERE (() OR ())` it
will build `WHERE((1) OR (1))` which, while non-optimal, is at least valid.
In fact, I'm not even sure that it is non optimal because I'd hope the sqlite
query optimizer is able to realise that `1 OR 1` is effectively a no-op.

Fixes issue #560.

See merge request !201
2016-02-03 21:31:15 +00:00
Peter Serwylo
8060ac88c3 Don't update search query unless it has changed meaningfully.
Changing the search query is quite an expensive operation, so this does some rudimentary
checking to see if the two queries are meaningfully different. At present, it trims the
strings and does a case insensitive comparison.

The query is eventually exploded based on whitespace, so leading and trailing white
space is not important. Also, sqlite `LIKE` clauses are case insensitive, so case
is unimportant. Having said that, I'm not sure how someone will be able to change
the queries case without first deleting and then adding characters (thus inducing
meaningfull changse).
2016-02-04 07:51:41 +11:00
Peter Serwylo
bd0e9e0a3c When no keywords to search, use an empty query selection that evaluates to "1".
This means that instead of building invalid SQL such as `WHERE (() OR ())` it
will build `WHERE((1) OR (1))` which, while non-optimal, is at least valid.

Fixes issue #560.
2016-02-04 07:51:37 +11:00
Daniel Micay
71c507bbfd fix AOSP build integration
The build isn't done from the top-level directory so the symlink needs
to use an absolute path.

Fixes #551.
2016-02-03 13:33:04 -05:00
Peter Serwylo
02c8fac906 Merge branch 'null-uri-path' into 'master'
Avoid NPE in Uri.getPath().replaceAll()

Fixes #533.

See merge request !199
2016-02-03 09:17:11 +00:00
Daniel Martí
a028b3f6a2 Avoid NPE in Uri.getPath().replaceAll()
Fixes #533.
2016-02-02 21:55:45 +00:00
Ciaran Gultnieks
1cd0bf721a Set date for 0.98 in changelog 2016-02-02 18:09:59 +00:00
Daniel Martí
ff3cd9fb11 Drop visibility on some fields and classes
As suggested by Android Studio.
2016-02-01 15:07:14 +00:00
Daniel Martí
7f78b46664 Remove AndroidPinning dependency
Its use was removed long ago, and the dependency was left behind for
some reason. This commit can be reverted if it's needed in the future
again.

This of course slightly simplifies the build thus speeding it a little,
but what's more interesting is that the output apk is also ~100KB
smaller. So something is going on.
2016-02-01 14:31:44 +00:00
Daniel Martí
c198736cd1 Update ACRA to 4.8.0 2016-02-01 14:21:49 +00:00
Daniel Martí
a3d4c87101 Update libsuperuser to 1.0.0.201602011018 2016-02-01 14:16:49 +00:00
Daniel Martí
df6d1fe625 Bump checkstyle to 6.15 2016-02-01 14:08:59 +00:00
F-Droid Translatebot
bf435bce66 Pull translation updates from Weblate
Translators:

bd339                      Danish
Danial Behzadi             Persian
David Koňařík              Czech
Massimiliano Caniparoli    Italian
Olexandr Nesterenko        Ukrainian
Sebastiano Pistore         Italian
Tobias Bannert             German
Tong Hui                   Chinese (China)
2016-02-01 12:23:04 +00:00
Daniel Martí
f79d14a59c Bump to alpha0 after stable 2016-02-01 12:21:37 +00:00
Daniel Martí
10a8f349a1 CHANGELOG: Add note about db lock fix 2016-02-01 12:15:26 +00:00
Daniel Martí
b193a10e69 Bump to 0.98-alpha7 2016-01-29 12:11:16 +00:00
Daniel Martí
64c0950e76 Fix formatting in values-fa
As reported by a user via ACRA:

java.util.UnknownFormatConversionException: Conversion: I
        at java.util.Formatter$FormatToken.unknownFormatConversionException(Formatter.java:1399)
        at java.util.Formatter$FormatToken.checkFlags(Formatter.java:1336)
        at java.util.Formatter.transform(Formatter.java:1442)
        at java.util.Formatter.doFormat(Formatter.java:1081)
        at java.util.Formatter.format(Formatter.java:1042)
        at java.util.Formatter.format(Formatter.java:1011)
        at java.lang.String.format(String.java:1988)
        at android.content.res.Resources.getString(Resources.java:355)
        at android.content.Context.getString(Context.java:350)
        at org.fdroid.fdroid.UpdateService$1.onReceive(UpdateService.java:210)
        at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297)
        at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46)
        at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:5136)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:525)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
        at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
        at dalvik.system.NativeStart.main(Native Method)
2016-01-27 10:58:10 +00:00
Peter Serwylo
bf90cf7e9f Remove unused import to make checkstyle happy 2016-01-27 07:20:56 +11:00
Daniel Martí
ac0ab7e211 Merge branch 'fix-265--database-locked-crash' into 'master'
Fix 265  database locked crash (I'm pretty sure)

Previously, all of the various subclasses of FDroidProvider would create
their own database open helper in their respective `onCreate()` methods.
This seemed to be the cause of the multiple database locked exceptions.

Various online articles/SO posts/etc helped come to this conclusion:
 * http://stackoverflow.com/a/3689883
 * http://stackoverflow.com/a/8888606
 * https://web.archive.org/web/20150709074733/http://www.dmytrodanylyk.com/pages/blog/concurrent-database.html

This should fix #265.

In the process, also did away with the two `read()` and `write()` methods
that returned a "readable" and "writeable" database respectively. It turns
out that it doesn't quite do what I originally thought. There is not much
benefit to specifying to the database helper that you want a readable/writeable
database. In fact, it is often the case that a call to `read()` would most
likely have returned the same instance that is returned by `write()`. The
semantics of them were therefore broken, and they've been replaced with
`db()`.

See merge request !196
2016-01-26 11:38:34 +00:00
Peter Serwylo
97cc279d99 Fix unit tests to work with a singleton DBHelper instance.
The fix for the database locking bug was to have a singleton
`DBHelper` instance. This breaks tests because multiple tests
share the same database. The solution is to:

 * Hack together a static method which clears the singleton,
   then invoke it in the `setUp()` method for relevant test cases.

 * Ensure the mock context provided to the providers during
   the tests is able to provide a context via `getApplicationContext()`.
   Without this, the mock context throws an `UnsupportedOperationException`
   when invoking this method.
2016-01-26 22:23:41 +11:00
F-Droid Translatebot
5a03f6a786 Pull translation updates from Weblate
Translators:

Enol Puente       Asturian
nautilusx         German
Sérgio Marques    Portuguese (Portugal)
Саша Петровић     Serbian
2016-01-25 11:34:20 +00:00
Peter Serwylo
f7bbf0e282 Use getApplicationContext() instead of getContext() to prevent memory leaks.
Using whatever `Activity` as the `Context` used to construct the first content
provider means that it will be help onto in memory until the application is GC'ed.
2016-01-25 18:02:22 +11:00
Peter Serwylo
63d3006ba8 Fixed yellow in Android studio by adding annotations matching subclass. 2016-01-25 17:55:24 +11:00
Peter Serwylo
4957bcb812 Singleton database instance to prevent locking exceptions.
Previously, all of the various subclasses of FDroidProvider would create
their own database open helper in their respective `onCreate()` methods.
This seemed to be the cause of the multiple database locked exceptions.

Various online articles/SO posts/etc helped come to this conclusion:
 * http://stackoverflow.com/a/3689883
 * http://stackoverflow.com/a/8888606
 * https://web.archive.org/web/20150709074733/http://www.dmytrodanylyk.com/pages/blog/concurrent-database.html

This should fix #265.

In the process, also did away with the two `read()` and `write()` methods
that returned a "readable" and "writeable" database respectively. It turns
out that it doesn't quite do what I originally thought. There is not much
benefit to specifying to the database helper that you want a readable/writeable
database. In fact, it is often the case that a call to `read()` would most
likely have returned the same instance that is returned by `write()`. The
semantics of them were therefore broken, and they've been replaced with
`db()`.
2016-01-25 17:53:45 +11:00
Daniel Martí
426e3da139 README: Add FAQ section with privileged stuff
There's often a lot of confusion about this, so have it summarized here.
2016-01-19 15:36:54 +01:00
Daniel Martí
11a80ced6b Bump Privileged Extension to 0.1 2016-01-19 15:27:44 +01:00
Daniel Martí
fed9e8d103 Bump to 0.98-alpha6 2016-01-19 15:21:28 +01:00
Daniel Martí
31e99a1331 Merge branch 'fix-541--ignoring-malformed-uri' into 'master'
Finish main activity after navigating to AppDetails activity.

This is what used to happen before the recent refactor to the search UI.
Finishing the main activity means that it never comes back to handle the
"View this app" intent again. Instead, the main Activity just becomes an
entry point for redirecting the UI to the correct place.

Incidentally, I don't particularly like the current solution even though
it should work, and hope to come up with a better one in the future. The
reason is because the behaviour of some methods (`onCreate()` +
`handleIntent()`) is what defines the behaviour of other methods
(`checkForAddRepoIntent()`). This means it is hard to reason about the
state of the activity at any point in time. Developers need to be careful
when making changes to the `onCreate()` method because modifying it has
unintended consequences. That is what caused the problem in issue #541.

Fixes #541.

See merge request !195
2016-01-19 11:32:13 +00:00
Peter Serwylo
d23e68be6b Finish main activity after navigating to AppDetails activity.
This is what used to happen before the recent refactor to the search UI.
Finishing the main activity means that it never comes back to handle the
"View this app" intent again. Instead, the main Activity just becomes an
entry point for redirecting the UI to the correct place.

Incidentally, I don't particularly like the current solution even though
it should work, and hope to come up with a better one in the future. The
reason is because the behaviour of some methods (`onCreate()` +
`handleIntent()`) is what defines the behaviour of other methods
(`checkForAddRepoIntent()`). This means it is hard to reason about the
state of the activity at any point in time. Developers need to be careful
when making changes to the `onCreate()` method because modifying it has
unintended consequences. That is what caused the problem in issue #541.

Fixes #541.
2016-01-18 20:24:39 +11:00
F-Droid Translatebot
05c6269d53 Pull translation updates from Weblate
Translators:

Adam Magnier               French
Adrià García-Alzórriz      Catalan
Adrià García-Alzórriz      Spanish
Ajeje Brazorf              Sardinian
Alberto Moshpirit          Spanish
Dominik george             French
Dominik george             German
Enol Puente                Asturian
Jean-Baptiste              French
M2ck                       French
Marcelo Santana            Portuguese (Brazil)
Massimiliano Caniparoli    Italian
Mladen Pejaković           Serbian
Nam Mai Hoang              Vietnamese
naofum                     Japanese
Nick Bishop                Greek
riotism                    Chinese (Hong Kong)
Sérgio Marques             Portuguese (Portugal)
tacsipacsi                 Hungarian
ultrapeer                  Turkish
Андрій Бандура             Ukrainian
Дмитрий Михирев            Russian
2016-01-14 22:56:44 +01:00
Daniel Martí
0e60886f14 Run optipng on new drawables 2016-01-11 01:49:58 +01:00
Daniel Martí
bb1c551cb8 Merge branch 'master' into 'master'
Add author/email/license display capabilities to app. (Closes: #532)

![Screenshot_2016-01-06-20-10-18](/uploads/c15a5e59624113e9e83914914cd9c6a9/Screenshot_2016-01-06-20-10-18.png)
![Screenshot_2016-01-06-20-18-31](/uploads/0f6c15b6c0646a3336460a91a2a04e42/Screenshot_2016-01-06-20-18-31.png)


See merge request !189
2016-01-09 13:45:13 +00:00
Peter Serwylo
9aca7da375 Merge branch 'simplify-crash-activity' into 'master'
Fix crash report activity theme and behavior

Use proper theme, fix crash on sending and comment loss on device rotation.

See merge request !191
2016-01-08 02:44:31 +00:00
Daniel Martí
9b01f86fef Merge branch 'fix-524--fdroidrepos-urls' into 'master'
Handle  fdroidrepos:// urls better.

Before, it only handled the incoming `Intent` in `onResume()`. Now, it happens in `onNewIntent()` too (but ensures to only handle the same intent once).

Note the `onResume()` only ever handles the original intent, not the new intent. See inline comments for why.

Fixes #524.

See merge request !192
2016-01-07 13:48:11 +00:00
Peter Serwylo
315f1fa932 Use a better name than "handled" for swap activity.
Before, both the swap activity and the fdroid activity would use
the "handled" key to check if an intent had been handled. This caused
problems, because by the time we got to handling the add repo intent,
it had already been "handled" by the swap activity so we bailed.
2016-01-07 21:54:32 +11:00
Peter Serwylo
b4bf5d6daf Remove unused constant. 2016-01-07 21:54:32 +11:00
Peter Serwylo
16b765a6b8 Handle add repo intents after F-Droid is already open.
Before, it only happened in onResume(). Now, it happens in onNewIntent()
too (but ensures to only handle the same intent once).

Note the onResume() only ever handles the original intent, not the new
intent.

Fixes #524.
2016-01-07 21:54:17 +11:00
relan
e09e1dba0a Properly handle CrashReportActivity recreation
Retain comment text on device rotation.
2016-01-07 11:45:49 +03:00
relan
16170c0901 Fix null pointer exception on crash report sending
EditText with comment is in the dialog, not in the activity.
2016-01-07 11:42:25 +03:00
relan
fea2f9b9cf Use proper theme for CrashReportActivity
It's an activity, not a dialog.
2016-01-07 11:11:01 +03:00
Daniel Martí
b22674e3e3 README: SDK and gradle are not the only build deps
There's also OpenJDK, the android target and build-tools, for example.
2016-01-06 21:55:33 +01:00
Daniel Martí
6ab5299e40 checkstyle: clean up modules we'll never use 2016-01-06 21:51:23 +01:00
Daniel Martí
e3b29f9613 Fix regression in prefix/suffix file deletion
This partyally reverts ea3c95832ea733bb4e928772772b13638d243032.

Fixes #537.
2016-01-06 20:48:07 +01:00
Daniel Martí
dfa3ba2c99 Merge branch 'fix-521--search-after-activity-destroyed' into 'master'
Create fragments appropriately in main view.

The approach to creating fragments in the constructor of the `AppListFragmentPagerAdapter`
was incorrect. Fragments are a special kind of magic, so this commit uses the approach
documented at http://stackoverflow.com/a/15261142 to make sure that the correct
fragment instances are always retrieved.

Fixes #521.

See merge request !190
2016-01-06 17:12:21 +00:00
Daniel Martí
06c7bb8286 Remove unused strings
These stopped being used after the search and repo update makeovers.
2016-01-06 18:07:43 +01:00
F-Droid Translatebot
26e0708573 Pull translation updates from Weblate
Translators:

Ajeje Brazorf                               Sardinian
Alberto Moshpirit                           Spanish
hrskrs                                      Albanian
Kalle Lampila                               Finnish
Mladen Pejaković                            Serbian
Persian: fix format strings Daniel Martí
Tobias Bannert                              German
2016-01-06 18:04:18 +01:00
Daniel Martí
7a220077c5 pull-trans: do not revert changes in HEAD
Using .. instead of ... means that changes in HEAD not yet pushed (and
hence not in the weblate branch) will be reverted.
2016-01-06 18:03:46 +01:00
Daniel Martí
51cf2db6ac Persian: fix format strings
Someone introduced lots of %I and and other weird format issues like %!.
Fixed all of them.

We normally catch these via Android's lint, but it appears that %I went
under its radar.

Fixes #530.
2016-01-06 17:58:57 +01:00
Peter Serwylo
db1f54c352 Create fragments appropriately in main view.
The approach to creating fragments in the constructor of the `AppListFragmentPagerAdapter`
was incorrect. Fragments are a special kind of magic, so this commit uses the approach
documented at http://stackoverflow.com/a/15261142 to make sure that the correct
fragment instances are always retrieved.

Fixes #521.
2016-01-06 21:18:41 +11:00
Daniel Martí
96187bda4c Bump to 0.98-alpha5 2016-01-05 21:18:44 +01:00
Dominik George
0df829034c
Add author/email/license display capabilities to app. (Closes: #532) 2016-01-05 13:18:38 +01:00
Daniel Martí
57f5180dae Bump Gradle to 2.9
I'd do 2.10, the current stable, but the android plugin seems to break
with it.
2016-01-05 09:24:02 +01:00
F-Droid Translatebot
e1510d2329 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz      Catalan
ageru                      French
Ajeje Brazorf              Sardinian
Allan Nordhøy              Norwegian Bokmål
Enol Puente                Asturian
Erwin Scheuch-Heilig       German
Karola Marky               Japanese
Ldm Public                 French
Marcelo Santana            Portuguese (Brazil)
Massimiliano Caniparoli    Italian
naofum                     Japanese
Reiner Herrmann            German
riotism                    Chinese (Hong Kong)
Tobias Bannert             German
ultrapeer                  Turkish
2016-01-05 09:03:37 +01:00
Peter Serwylo
4ae5045568 Merge branch 'pmd-fixes' into 'master'
Pmd fixes



See merge request !188
2016-01-05 07:10:11 +00:00
Daniel Martí
ea3c95832e Simplify some ifs
Sometimes joining them, removing unnecessary checks and removing
unnecessary levels of indentation.
2016-01-04 11:03:00 +01:00
Daniel Martí
8e193cecff Apk: Don't create Integer object just to compare 2016-01-03 18:55:15 +01:00
Daniel Martí
87fb293348 Merge branch 'acra-dialog-styles' into 'master'
Use custom layout for ACRA report dialog, not default one.

Styling the default dialog was difficult and it doesn't obey some
of the guidelines provided by the Android design docs:

 https://www.google.com/design/spec/components/dialogs.html#dialogs-specs
 (see "Content Guidelines")

This change introduces a custom dialog extending the base ACRA reporting
activity. Specifically, it introduces a padding of 24dp around the dialog
contents.

I couldn't find design specs on the specific spacing between different elements _within_ the dialog, so I used the same spacing of 20dp suggested to use between the title and the main body of the dialog.

At the very least, this change should make it easier to update styles in the future if somebody suggests improvements to the layout of the dialog.

### Before

![acra-dialog.1](/uploads/9540290fcbe245f8b573506c6a982332/acra-dialog.1.png)

### After

![acra-dialog.2](/uploads/2cad0213101f53edfd32dab69cafa757/acra-dialog.2.png)


See merge request !186
2016-01-03 17:42:17 +00:00
Peter Serwylo
a99767f3a6 Remove icon, add scroll view to crash report dialog.
Scroll view helps with smaller screens. Alert dialog icons are not
part of the material design spec so that was removed.
2016-01-03 15:48:44 +11:00
Daniel Martí
c2c8c55862 Merge branch 'fix-519--crash-during-swap' into 'master'
Partially revert f2212e33. Make some constructors public again.

There is some code in the Android SDK using reflection to find the constructor
of one of our custom views. As such, a previous change in f2212e33 broke this
code because it made constructors package local. This partially reverts the bit
of f2212e33 which pertains to the constructors accessed using reflection.

Fixes #519.

See merge request !187
2016-01-03 01:03:14 +00:00
Peter Serwylo
d24a6b71b9 Partially revert f2212e33. Make some constructors public again.
There is some code in the Android SDK using reflection to find the constructor
of one of our custom views. As such, a previous change in f2212e33 broke this
code because it made constructors package local. This partially reverts the bit
of f2212e33 which pertains to the constructors accessed using reflection.
2016-01-03 11:06:52 +11:00
Daniel Martí
03c0ef5f65 Make checkstyle happy again 2016-01-02 20:00:16 +01:00
Daniel Martí
e1058ba46d Remove unused classes
These were useful at some point, but stopped being used some time ago.
Should have been removed then.
2016-01-02 19:19:16 +01:00
Daniel Martí
d0c8fecfd3 Remove some public fields and methods 2016-01-02 19:13:11 +01:00
Daniel Martí
e34192573d Remove some unused code 2016-01-02 19:04:11 +01:00
Daniel Martí
ae5fb8e8fc Run Studio's imports optimizer 2016-01-02 18:47:59 +01:00
Peter Serwylo
49d01e0ca3 Use custom layout for ACRA report dialog, not default one.
Styling the default dialog was difficult and it doesn't obey some
of the guidelines provided by the Android design docs:

 https://www.google.com/design/spec/components/dialogs.html#dialogs-specs
 (see "Content Guidelines")

This change introduces a custom dialog extending the base ACRA reporting
activity. Specifically, it introduces a padding of 24dp around the dialog
contents.
2016-01-02 13:42:57 +11:00
Daniel Martí
e29b6cbdaf Remove code that worked around #334 (now fixed) 2015-12-29 22:42:49 +01:00
Daniel Martí
3a8051898a checkstyle: be more strict with curly rules 2015-12-29 22:18:38 +01:00
Daniel Martí
c1d4248723 checkstyle: Check comment indentation too 2015-12-29 22:10:19 +01:00
Daniel Martí
9efe173380 checkstyle: Finally add proper indentation checks
Somewhat painful conversion, but should go much smoother from here
onward.
2015-12-29 22:00:23 +01:00
Daniel Martí
dd4420965d checkstyle: Add more rules that we already obey 2015-12-29 21:43:29 +01:00
Daniel Martí
7ed03bdcba checkstyle: EmptyLineSeparator is now fixed 2015-12-29 12:59:21 +01:00
Daniel Martí
0f27374452 checkstyle: forbid inner assignments 2015-12-29 12:55:29 +01:00
Daniel Martí
6a0c230493 Add NonFreeAssets anti-feature 2015-12-29 12:36:15 +01:00
Daniel Martí
0a0dc0d596 AppDetails: don't hide unknown anti-features
This is thinking of the future, when new AFs are added and the installed
client doens't know about them yet. Showing the name is better than not
showing anything at all.
2015-12-29 12:32:21 +01:00
Daniel Martí
975ce94246 Bump checkstyle to 6.14 2015-12-29 12:27:15 +01:00
Daniel Martí
209ed1dc62 ACRA: use reports@f-droid.org 2015-12-29 12:10:51 +01:00
F-Droid Translatebot
1b3080c07d Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz    Catalan
Ajeje Brazorf            Sardinian
Alberto Moshpirit        Spanish
Allan Nordhøy            Norwegian Bokmål
Enol Puente              Asturian
Kalle Lampila            Finnish
Marcelo Santana          Portuguese (Brazil)
Mladen Pejaković         Serbian
naofum                   Japanese
Tobias Bannert           German
Андрій Бандура           Ukrainian
Саша Петровић            Serbian
2015-12-29 12:03:44 +01:00
Peter Serwylo
352b87f1c4 Merge branch 'acra' into 'master'
Add opt-in crash reporting via ACRA

Fixes #398.

Screenshot: https://imgur.com/E3uNIBY

E-mails to team@, so the reports are somewhat private yet still available to developers.

Using e-mail over POST has two advantages:
* Doesn't require a specific server handling the form submits
* Makes interaction with users who reported issues easy (we can just reply to the e-mail to ask for more info, etc)

It also has a disadvantage, though:
* It requires an e-mail app to be present and set up in the device

Most phones are already logged in to user's Google accounts, though, and a large part of those have the gmail app or the stock mail app installed. Those who don't have Google installed are probably technical enough to have set up a mail client like K9 on their own.

See merge request !185
2015-12-26 22:55:36 +00:00
Daniel Martí
b22466ee66 Add opt-in crash reporting via ACRA
Fixes #398.
2015-12-26 23:35:48 +01:00
Daniel Martí
76cda91e64 Use .FDroidApp in the manifest
Like the rest of classes, e.g. activity names.
2015-12-26 19:04:19 +01:00
Daniel Martí
892b47c060 Merge branch 'rename-id-to-package-name' into 'master'
Renaming id -> packageName in local variables/method args/comments/etc.

Building on the previous MR. This finishes renaming "id" in the Java code to "package name" where appropriate. It still leaves the database symbols as "id" because they are not worth the effort to rename at this point in time. 

See merge request !184
2015-12-26 10:10:46 +00:00
Peter Serwylo
c36529f445 Renaming id -> packageName in local variables/method args/comments/etc. 2015-12-26 15:12:58 +11:00
Daniel Martí
feb7a2bd09 Merge branch 'rename-id-to-package-name' into 'master'
Rename id to package name

As suggested in issue #37, "id" is not the correct terminology to use in the code base. Instead, it should use "package name". I'm doing this now before I begin work on #511, where it is helpful to recoup the "id" name, as "rowid" in sqlite refers to a row's integer primary key.

This changes the following Java symbols:
 * `Apk.id` -> `Apk.packageName`
 * `App.id` -> `App.packageName`
 * `ApkProvider.DataColumns.ID` -> `ApkProvider.DataColumns.PACKAGE_NAME`
 * `AppProvider.DataColumns.ID` -> `AppProvider.DataColumns.PACKAGE_NAME`
 * A small number of comments referring to `id`.

It does _not_ change (and likely will not benefit from changing):
 * Any database columns, these are all still `id`.
 * Anything pertaining to the index, which still uses `id`.

It does _not_ change (but future MR's will change):
 * Local variables referring to `id`
 * Method names referring to `id`

By not changing any string literals, only changing the name of variables and constants, and ensuring that the original variables/constants are no longer present, then in theory if this compiles is should be good to merge.

See merge request !183
2015-12-24 22:38:22 +00:00
Peter Serwylo
038816e32a Renamed Apk.id to Apk.packageName 2015-12-25 08:04:52 +11:00
Peter Serwylo
5779736913 Renamed App.id to App.packageName 2015-12-25 08:04:48 +11:00
Peter Serwylo
756df4d635 Renamed Java constant APP_ID to PACKAGE_NAME
In both the ApkProvider and the AppProvider.

Left the underlying database name as 'id' for now because it is
not as important or visible.
2015-12-25 08:04:41 +11:00
Daniel Martí
6d7d19433e Bump to 0.98-alpha4 2015-12-24 17:27:21 +01:00
Daniel Martí
9baad0fc3e Run remove-unused-trans 2015-12-24 17:25:36 +01:00
F-Droid Translatebot
2c2b826640 Pull translation updates from Weblate
Translators:

Enol Puente                Asturian
Martin Lacina              Slovak
Massimiliano Caniparoli    Italian
2015-12-24 17:18:23 +01:00
Daniel Martí
62885db7c4 Merge branch 'fix-517--repo-update-sadness' into 'master'
Make sure to insert, rather than update apks when updating repo.

(Actually) fixes #517. I had a hunch the other bug (though problematic) wasn't actually the fix for #517. I am confident that this one _is_ the fix, although I am still struggling to reproduce specific circumstances reported by others. I tracked this down when I did an update this morning and noticed a new app without any versions - so in a way I kind of reproduced it, but I can't reproduce it at will.

The problem was that again, only the `vercode`s of apks were being
compared to see if they were the same, rather than `vercode` and `id`.
The result is that some new apks will incorrectly be asked to execute
an `UPDATE` query rather than an `INSERT`. As such, they don't end
up in our database at all because the `UPDATE` will not run against
any row at all.

See merge request !182
2015-12-24 16:16:12 +00:00
Peter Serwylo
60a3804c5a Make sure to insert, rather than update apks when updating repo.
Fixes #517.

The problem was that again, only the `vercode`s of apks were being
compared to see if they were the same, rather than `vercode` and `id`.
The result is that some new apks will incorrectly be asked to execute
an `UPDATE` query rather than an `INSERT`. As such, they don't end
up in our database at all because the `UPDATE` will not run against
any row at all.
2015-12-24 09:59:33 +11:00
Peter Serwylo
b7eb30a69b Merge branch 'fix-517--repo-update-sadness' into 'master'
Correctly purge removed apks.

There were two bugs in this code that have been fixed. Both were
introduced while moving to a lower memory consumption version of
the repo updater for #324.

They were found while investigating #517, although I'm not confident
that they are to do with the specific problem in that issue. It is
possible, because it is part of the code to do with purging apks
from the database, but I'd like to do further investigations into
the code before declaring that this is actually related to that issue.

In the mean time, this includes important fixes, and should probably
go out in an alpha once merged.

The first is that for each app which is updated by a particular repo,
it was not correctly asking the question: "Which apks belonging to
this apk, and provided by this repo, are no longer provided by this
repo?". It was accidentally only comparing the version number of
existing apks in the DB and new apks from the index. This ensures
that the apks being checked to see if they need to be removed or
not are those with the same package name AND the same version code
(provided by the same repo).

The second bug is that when it was persisting a set of apps + apks
to the database, it would ask for existing apks already in the
database for these apps. In this case, there was a bug where of
the 50 apps being persisted, it would only retrieve the first of
these 50 apps from the database to decide if it needed to be
cleaned up or not. Now, it correctly retrieves data from the DB
belonging to all 50 apps.

See merge request !181
2015-12-22 20:34:44 +00:00
Peter Serwylo
70bf49c3ac Correctly purge removed apks.
There were two bugs in this code that have been fixed. Both were
introduced while moving to a lower memory consumption version of
the repo updater.

The first is that for each app which is updated by a particular repo,
it was not correctly asking the question: "Which apks belonging to
this apk, and provided by this repo, are no longer provided by this
repo?". It was accidentally only comparing the version number of
existing apks in the DB and new apks from the index. This ensures
that the apks being checked to see if they need to be removed or
not are those with the same package name AND the same version code
(provided by the same repo).

The second bug is that when it was persisting a set of apps + apks
to the database, it would ask for existing apks already in the
database for these apps. In this case, there was a bug where of
the 50 apps being persisted, it would only retrieve the first of
these 50 apps from the database to decide if it needed to be
cleaned up or not. Now, it correctly retrieves data from the DB
belonging to all 50 apps.
2015-12-22 22:53:01 +11:00
Peter Serwylo
07eb633f0f Merge branch 'master' into 'master'
Add HTTP Basic Authentication to ApkDownloader

In order to download protected files, the APKDownloader must be able to supply HTTP Basic Authentication headers to the server.

See merge request !178
2015-12-22 08:40:08 +00:00
Christian Morgner
25cbf98390 Fixed checkstyle errors. 2015-12-21 10:25:29 +01:00
Daniel Martí
4bbd0d83ef Add new language zh-rTW to settings list 2015-12-21 10:14:10 +01:00
F-Droid Translatebot
753e983339 Pull translation updates from Weblate
Translators:

Ajeje Brazorf              Sardinian
Green Lunar                Hebrew
Ldm Public                 French
lucnsy                     Chinese (China)
Massimiliano Caniparoli    Italian
Mladen Pejaković           Serbian
naofum                     Japanese
Nordlenningen              Norwegian Bokmål
Sérgio Marques             Portuguese (Portugal)
Tobias Bannert             German
Vdragon, V字龍            Chinese (Taiwan)
2015-12-21 09:58:45 +01:00
Christian Morgner
a29bf3d9c8 Added HTTP Basic Authentication to ApkDownloader, added Credentials interface
and HttpBasicCredentials implementation to prepare HttpDownloader for other
authentication methods.
2015-12-20 22:49:15 +01:00
Peter Serwylo
b80bebc8bd Merge branch 'search-empty-view' into 'master'
Show appropriate message when search results are empty

Closes #512.

See merge request !180
2015-12-19 22:44:11 +00:00
relan
8b89b52d2b Show appropriate message when search results are empty
Closes #512.
2015-12-19 15:35:15 +03:00
Daniel Martí
fa5b7d8099 Bump to 0.98-alpha3 2015-12-16 14:14:52 +01:00
Daniel Martí
895cd7bbb1 Update changelog 2015-12-16 14:14:52 +01:00
Peter Serwylo
1a5b60f654 Merge branch 'fix-323--improved-search' into 'master'
Search as the user types

Fixes #323.

This does away with the separate `SearchResult` and instead applies the search to the currently viewed tab on the main screen (Available, Installed, Updates). When filtering the Available list, it filters the currently selected category.

Note however that there are still times when the old style `SearchDialog` will be shown over the top of the action bar rather than the `SearchView` within the action bar. These times include:
 * When a user with a hardware keyboard starts typing from the main screen.
 * On older devices with a "search" hardware button.
 * Probably some other cases (I think when there is not enough screen real estate, but haven't seen that happen).

In cases where this dialog is shown, filtering the lists as you type does not seem to be an option. I tried to figure out how to do that, but failed. If someone else figures it out, that would be great. However, when the search is submitted, it will hide the `SearchDialog` and populate the `SearchView`, focus it, and apply the search appropriately.

There is a script in the `F-Droid/tools/` subdirectory which will consecutively send various intents to F-Droid relating to search. This includes Play, market, Amazon search links. For good measure, I also made it send intents to do with viewing app details. This should probably be made into a proper instrumented test at some point, but I didn't have the time to figure out how to do that. Maybe a project for future @pserwylo.

One unknown is the performance implications. There is no problems on my Nexus 4 with Android 5.0. My Chinese/ebay/$30/Android 2.3.4 device seems good enough too.

See merge request !177
2015-12-16 11:50:30 +00:00
Daniel Martí
00e832fbe3 Don't fetch language names from the system
The system's are sometimes wrong, e.g. unexpected names. This also helps
our support across different Android versions without having to worry as
much about the system's language support.

Fixes #503.
2015-12-16 12:03:32 +01:00
Daniel Martí
985424ac62 README: fix gradle version 2015-12-16 11:48:45 +01:00
Daniel Martí
ef4221400b Fix format in values-nl count 2015-12-16 11:43:13 +01:00
F-Droid Translatebot
0f6e88d1a3 Pull translation updates from Weblate
Translators:

Dario Tordoni      Italian
Elia Argentieri    Italian
Enol Puente        Asturian
halcyonest         Korean
M2ck               French
relan              Russian
Tobias Bannert     German
Дмитрий Михирев    Russian
2015-12-16 11:41:32 +01:00
Peter Serwylo
35f73f3786 Also hide the coloured bar below the category spinner.
In addition, added a @Nullable constraint on the categorySpinner
and a null guard when resuming the fragment to handle possible
null cases (though I don't think there will be any).
2015-12-14 22:45:37 +11:00
Peter Serwylo
58205fefec Don't animate category spinner hiding
This caused the entire list view to e animated when navigating
back to the Available tab. Tried switching the `animateLayoutChanged=true`
to a child view only containing the category spinner, but this is not how
the animation handling works. It needs to animate both the thing being
hidden/shown, and also the next sibling of that thing to work properly.
Thus, moving the spinner to its own child and leaving the list didn't work.
2015-12-14 22:41:29 +11:00
Peter Serwylo
49ffe06576 Don't remove +'s from an fdroid.search intent.
As per CR comment. These don't really ressemble URIs very much, so I
don't think they will require sanitization like this at all.
2015-12-14 22:41:29 +11:00
Peter Serwylo
86fb652fc3 When searching "Available" tab, search all the things.
Removed the option to search the currently selected category, as suggested
by others on gitlab.
2015-12-14 22:41:29 +11:00
Peter Serwylo
cc759b17a4 Fixed typo in doc comments about % and sqlite.
% means wildcard, not case insensitive in sqlite3.
2015-12-14 22:41:29 +11:00
Peter Serwylo
59c6e36034 Minor formatting/lint fixes/cleanup before CR. 2015-12-14 22:41:29 +11:00
Peter Serwylo
cb0f252d74 Don't finish() activity after showing app details.
When calling `finish()` after handling an intent to show app details,
the ability to navigate "up" disappears.
2015-12-14 22:41:29 +11:00
Peter Serwylo
829e8f1058 Queue pending search until the SearchView is inflated. 2015-12-14 22:41:29 +11:00
Peter Serwylo
7b5160df47 Make the SearchView get shown when SearchDialog is submitted. 2015-12-14 22:41:29 +11:00
Peter Serwylo
bfb90ef655 Correctly search currently selected category in main app list. 2015-12-14 22:41:29 +11:00
Peter Serwylo
b1be1dffb6 Initial move of search logic to FDroid activity from SearchActivity 2015-12-14 22:41:29 +11:00
Daniel Martí
dba8cd45ed Update UIL and commons-net point releases 2015-12-13 19:40:20 +01:00
Daniel Martí
0cc6272664 Add Danish to the list of languages 2015-12-13 19:30:59 +01:00
F-Droid Translatebot
d9c48c28f6 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz      Catalan
agilob                     Polish
Ajeje Brazorf              Sardinian
bd339                      Danish
Benedikt Geißler           German
Danial Behzadi             Persian
Daniil Stryukov            Ukrainian
halcyonest                 Korean
ikmaak                     Dutch
Ldm Public                 French
Massimiliano Caniparoli    Italian
Mladen Pejaković           Serbian
Olexandr Nesterenko        Ukrainian
Phạm Nguyễn Hoàng          Vietnamese
relan                      Russian
Tobias Bannert             German
2015-12-13 19:24:38 +01:00
Daniel Martí
9950ea3ed2 Merge branch 'fix-506--rename-temp-table' into 'master'
Speed up "Saving Application Details" part of repo update

Fixes 506.

This does the thing mentioned in 506 (renaming temp table, rather than copying data). In the process, I also identified that the temp tables were missing key indexes which slowed the process down. This fix took the update time from ~100 seconds to ~60 seconds on my Nexus 4.

Below are a couple of log cats from before and after the change (this logging is not part of this MR, it was just for diagnosing the problem).

*Before change:*

```
            AppProvider  D  Calculating whether apps are compatible, based on whether any of their apks are compatible
                         D  Update compatible flags took 20244ms
                         D  Calculating suggested versions for all apps which specify an upstream version code.
                         D  Update suggested from upstream took 17808ms
                         D  Calculating suggested versions for all apps which don't specify an upstream version code.
                         D  Update suggested from latest took 129ms
            AppProvider  D  Update icon URLs took 7879ms
          UpdateService  I  Updating repo(s) complete, took 104 seconds to complete.
```

*After change:*

```
            AppProvider  D  Calculating whether apps are compatible, based on whether any of their apks are compatible
                         D  Update compatible flags took 1047ms
                         D  Calculating suggested versions for all apps which specify an upstream version code.
                         D  Update suggested from upstream took 601ms
                         D  Calculating suggested versions for all apps which don't specify an upstream version code.
                         D  Update suggested from latest took 136ms
                         D  Update icon URLs took 887ms
          UpdateService  I  Updating repo(s) complete, took 63 seconds to complete.
```



See merge request !179
2015-12-13 10:47:28 +00:00
Peter Serwylo
1ae1ae7368 Add indexes to temp tables when updating.
The idnexes which are added are for those columns which
are used to calculate information such as latest upstream version.
These queries use subqueries which seemed to be adversely
impacted by the lack of indexes.

In total, reduced update time on test device from just over 100 seconds
to just over 60 seconds.
2015-12-13 18:04:02 +11:00
Peter Serwylo
c24cd89028 Only create compatibility checker once per repo.
Looks like a non-trivial amount of work is done in the constructor
interrogating the features of the current device. This only needs
to be done once.
2015-12-13 18:02:55 +11:00
Peter Serwylo
9727dc505c Rename temp tables rather than DELETE + INSERT SELECT.
This requires renaming the old app/apk tables to be deleted and
the temp ones to be renamed. This is done in a transaction to
ensure we always have at least `fdroid_app` and `fdroid_apk`.
Well, two transactions, one for renaming the `fdroid_app` table
and one for `fdroid_apk`.
2015-12-13 18:02:55 +11:00
Daniel Martí
2067f15b27 Replace some lists with counters
These objects/strings were probably useful at some point. They no longer
are.
2015-12-08 15:24:51 +01:00
Daniel Martí
637d3dddc4 Fix regression in 9a0ba186e
I was too fast to remove unused code and missed the continue.
2015-12-08 15:20:56 +01:00
Daniel Martí
3f068929e8 Bump to 0.98-alpha2 2015-12-07 21:31:51 +01:00
Daniel Martí
2ecf18dc7f Start 0.98 changelog 2015-12-07 21:31:44 +01:00
Daniel Martí
e20188b804 Use more switches 2015-12-07 21:20:11 +01:00
Daniel Martí
62f6fd3d44 Simplify some code, mainly removing elses 2015-12-07 21:19:48 +01:00
Daniel Martí
9a0ba186e6 Remove some unused code found by Studio 2015-12-07 21:06:58 +01:00
Daniel Martí
9a9e5c8668 Make RepoXMLHandler receiver final 2015-12-07 21:06:43 +01:00
Daniel Martí
c8e69c794a Run Studio's import optimizer 2015-12-07 20:56:47 +01:00
Daniel Martí
fee37d88cf Run remove-unused-trans.py 2015-12-07 20:46:34 +01:00
Daniel Martí
6010a6136b Bump checkstyle to 6.13 and fix it after MR merge 2015-12-07 20:44:03 +01:00
F-Droid Translatebot
4a77b057bd Pull translation updates from Weblate
Translators:

agilob                Polish
Ajeje Brazorf         Sardinian
Alberto Moshpirit     Spanish
Daniil Stryukov       Ukrainian
Enol Puente           Asturian
Jaroslav Lichtblau    Czech
Ldm Public            French
lucnsy                Chinese (China)
Marcelo Santana       Portuguese (Brazil)
Mladen Pejaković      Serbian
naofum                Japanese
relan                 Russian
2015-12-07 20:38:20 +01:00
Peter Serwylo
7c99b6ce91 Merge branch 'fix-324--memory-issue-repo-update' into 'master'
Fix 324 : Out of memory errors while updating repos.

Fixes #324, but in the process makes the updater take a lot longer. My benchmarks tell me that an update which used to take approx 30 seconds on my Nexus 4 now takes about 50-55 seconds. This is because it first inserts the apps into the database (in a temp table) and then subsequently copies that table to the actual table. This means there is a lot more disk access than before.

I'm open for discussion on whether this tradeoff is worth it - however I'll caution that there is always going to be a tradeoff between faster and more memory vs slower and less memory. This is the case with all software, and perhaps more so with memory constrained devices such as phones. Also, as the repo index grows (until perhaps we are able to extract the app descriptions in the future), this will become more of an issue.

I'd also like this to be CR'ed properly before merging, because it changes some important code around the repo updater. It is important because security, and it is also important because it is the main thing that F-Droid needs to do (get a list of apps to show the user).

See merge request !173
2015-12-07 13:57:14 +00:00
Daniel Martí
1e740cf72a Merge remote-tracking branch 'upstream/merge-requests/174' 2015-12-05 16:16:36 +01:00
F-Droid Translatebot
30a013a4d1 Pull translation updates from Weblate
Translators:

ageru                French
Ajeje Brazorf        Sardinian
Alberto Moshpirit    Spanish
enolp                Asturian
Ldm Public           French
lucnsy               Chinese (China)
Mladen Pejaković     Serbian
naofum               Japanese
2015-12-05 16:12:52 +01:00
relan
aef0d8be87 Remove unused string "about_desc" 2015-12-03 13:05:27 +03:00
relan
88c2774692 Refresh about dialog
Now it's vertically-oriented. Mention of Aptoide is removed because
F-Droid went far away from it.
2015-12-03 13:03:41 +03:00
relan
2ecb519a56 Rework styles for text caption and text body
Now they are reusable and include layout_with and layout_height
attributes.
2015-12-03 13:03:41 +03:00
Daniel Martí
f67527a86e Replace _i18n with _count in tab strings
All strings are internationalized. Use a name that actually says what
they mean.
2015-12-02 18:46:01 +01:00
Daniel Martí
aff3995475 tab fragments: use string resources consistently
Also, remove unnecessary "Installed" tab title duplicate.
2015-12-02 18:45:49 +01:00
F-Droid Translatebot
2154d37dc8 Pull translation updates from Weblate
Translators:

Ajeje Brazorf       Sardinian
Ldm Public          French
Mladen Pejaković    Serbian
naofum              Japanese
2015-12-02 18:37:18 +01:00
Ruben Roy
676d173cc9 Merge branch 'master' into 'master'
Add counter to "Installed" tab. Closes #497



See merge request !176
2015-12-02 00:30:23 +00:00
Ruben Roy
ab00d49737 Add counter to "Installed" tab. 2015-12-02 05:51:13 +05:30
Daniel Martí
4f8fe4e967 FileCompat: fix setExecutable signature
For some reason its first argument was "readable", while it clearly
should be "executable" as per the code below. Also see the method we
call on api 9 and newer:

https://developer.android.com/reference/java/io/File.html#setReadable(boolean, boolean)
2015-12-01 13:52:25 +01:00
Daniel Martí
30bc2cf8d5 Build fix after checkstyle changes 2015-11-30 11:36:04 +01:00
Daniel Martí
8405ba7d87 checkstyle: proper multiple empty line check
Hopefully checkstyle could catch all of these on its own one day. For
now, help it via a multiline regex.
2015-11-30 11:30:49 +01:00
Daniel Martí
1e79b6d1d5 checkstyle: add TODO regarding func wrapping 2015-11-30 11:04:12 +01:00
Daniel Martí
098241c981 checkstyle: don't allow multiple empty lines 2015-11-30 10:40:35 +01:00
Daniel Martí
04e730c6bb checkstyle: add AnnotationLocation 2015-11-30 10:38:49 +01:00
Daniel Martí
f2212e33d7 Make newer checkstyle happy
Mostly just dropping public from constructors.
2015-11-30 10:37:43 +01:00
Daniel Martí
4f34013885 Bump checkstyle to 6.12.1
Makes the existing checks a lot better (we were on 5.x) and allows us to
add checks that require newer versions.
2015-11-30 10:37:43 +01:00
Daniel Martí
b6654f5077 Bump gradle to 2.8 2015-11-30 10:37:38 +01:00
Peter Serwylo
959fe9f2e3 Show indeterminate progress when persisting the temp apk table.
Will also appear as indeterminate if:
 * The repo being downloaded from doesn't send a Content-Length header.
 * While connecting to the HTTP server to begin downloading.
2015-11-30 18:46:10 +11:00
Peter Serwylo
77ee4296a5 Guard against divide by zero exceptions during progress events. 2015-11-30 18:19:34 +11:00
Peter Serwylo
096b9c20d1 Changed logging levels as per CR. 2015-11-30 18:16:11 +11:00
Peter Serwylo
a3c91e4eae Reformatted some annotations to be inline. 2015-11-30 18:16:11 +11:00
Peter Serwylo
ab33eccaa2 Replaced if with switch. Fixed typo in error. 2015-11-30 18:16:11 +11:00
Peter Serwylo
c5bf2a131b Remove unused imports. 2015-11-30 18:16:11 +11:00
Peter Serwylo
8a6a62833b Alert update notification when saving details to DB. 2015-11-30 18:16:11 +11:00
Peter Serwylo
6969dcb90e Change "inserting" string to not include progress for last phase of update. 2015-11-30 18:16:11 +11:00
Peter Serwylo
90290f830a Send "inserting" message to notifications while committing temp provider.
Right now it says "50%" always, will need to think whether to ditch the
percentage completely, or to have the temp app/apk providers emit progress
events some how too.
2015-11-30 18:16:11 +11:00
Peter Serwylo
71f641860a More refactoring of AppProvider to use getTableName() instead of constant.
Although not used by the temp provider, it seemed strange having some of
the code always using the `DBHelper.TABLE_APP` and other code using
`getTableName()` where all of it could have used `getTableName()`.

Also moved commiting of the temp tables to the real tables into the
`RepoPersiter` instead of in `RepoUpdater`.
2015-11-30 18:16:10 +11:00
Peter Serwylo
b22b39ea26 Fix bug with SQL generation (missing . char) from bung rebase. 2015-11-30 18:16:10 +11:00
Peter Serwylo
ad6a8e5b4e Extracted RepoPersister class from RepoUpdater to separate security and DB logic. 2015-11-30 18:16:10 +11:00
Peter Serwylo
1d951e7689 Fixed repo updater tests. Fix to temp app/apk providers.
The repo xml handler now has a different mechanism for returning
data about the parsed xml file. This is done via a callback, rather
than storing the data in member variables. The tests now deal with
this correctly.

The update/delete operations of the TempAp[pk]Provider's didn't
work, so that has now been fixed.
2015-11-30 18:16:02 +11:00
Peter Serwylo
b34853a776 Cleanup before CR. 2015-11-30 18:14:44 +11:00
Peter Serwylo
cc0adcc5ad Save app details to temp table, then flush after update verified. 2015-11-30 18:14:44 +11:00
Peter Serwylo
9a2d390279 WIP: Do repo update database work in temp table for apks, then copy at end.
At the start of a repo update, it will create a copy of the apk table.
Throughout the update, it will query the original apk table for info.
All inserts and updates happen to the temp table. After the repo has been
verified as trusted, the original apk table is emptied, and all apks are
copied from the temp table to the real one.

I realise that the work done to query the apk table for info during the update
could happen against the temp table, but it was not neccesary to move all of
the queries that are required for this task to the temp apk provider.
2015-11-30 18:14:44 +11:00
Peter Serwylo
b989ef3ecc WIP: Stream index details to database rather than waiting until end.
Refactored repo update to stream apks from network -> jar file reader ->
xml parser -> database. No longer build up large lists of app metadata
to save. Saves memory, but is MUCH slower.

Does sig verification properly, but does it at the END of the process
and DOESN'T ROLL BACK on failure.

Quick and dirty benchmarks show an increase in time from ~25 seconds
to ~30 seconds on my Nexus 4 with Android 5.0. This doesn't seem so
bad to me, for the tradeoff that people on low end devices can actually
update now.

Also, as @eighthave pointed out, if we are able to stream the download
directly from the internet, then that time will drop to essentially
the time it takes to download the index.
2015-11-30 18:14:42 +11:00
F-Droid Translatebot
e50a12731d Pull translation updates from Weblate
Translators:

Alberto Moshpirit      Spanish
naofum                 Japanese
Olexandr Nesterenko    Ukrainian
RACER                  Japanese
Rafał Michalski        Polish
Tobias Bannert         German
2015-11-29 19:52:32 +01:00
Peter Serwylo
72b3bda941 Merge branch 'master' into 'master'
Make progressbar in notification determinate



See merge request !175
2015-11-28 00:56:22 +00:00
Ruben Roy
1a54c61a50 Make progressbar in notification determinate 2015-11-27 18:43:16 +05:30
Daniel Martí
7286bafa23 Bump to 0.98-alpha1 2015-11-23 20:25:07 +01:00
F-Droid Translatebot
2cbaa3eaed Pull translation updates from Weblate
Translators:

Ajeje Brazorf          Sardinian
enolp                  Asturian
Ldm Public             French
Marcelo Santana        Portuguese (Brazil)
Mladen Pejaković       Serbian
naofum                 Japanese
Nathan Follens         Dutch
Olexandr Nesterenko    Ukrainian
riotism                Chinese (Hong Kong)
Sergio Oller           Catalan
2015-11-23 13:13:09 +01:00
Peter Serwylo
b9342e909b Merge branch 'master' into 'master'
Improved support for HTTP Basic Authentication

Extended DownloaderFactory to support optional username & password parameters.

Extended HttpDownloader to check for HTTP 401 Authorization Required status code
and send a simple HTTP Basic Authentication header with all requests.

Extended ManageReposActivity to support repositories that use HTTP Basic
Authentication, added a dialog to prompt for username and password.

Extended RepoDetailsActivity to be able to display and modify the authentication
credentials.

See merge request !171
2015-11-23 06:43:49 +00:00
Daniel Martí
9dceb60786 Add english to list of locales to pick
Useful to make F-Droid be in English if the system language is
different.

Fixes issue brought up in https://f-droid.org/forums/topic/f-droid-0-97-language-selection/
2015-11-22 03:01:04 -08:00
Daniel Martí
69fdaf874e Add missing sq language to langs list 2015-11-22 02:53:40 -08:00
Daniel Martí
ecff5b1832 Replace phone with device in strings 2015-11-22 02:52:16 -08:00
F-Droid Translatebot
20666ba824 Pull translation updates from Weblate
Translators:

Jack Phoenix           Finnish
Jaroslav Lichtblau     Czech
Michalis               Greek
Olexandr Nesterenko    Ukrainian
riotism                Chinese (Hong Kong)
Sergio Oller           Catalan
2015-11-22 02:50:50 -08:00
Daniel Martí
35c65fbffa Remove UnusedResource usages in translations 2015-11-19 08:17:05 -08:00
Daniel Martí
6af08494a2 Revert "Suppress lint warnings about unused categories names"
This reverts commit 5c9e314c9bfdd8df97b702c16b729ba440964168.

Error in question:

https://stackoverflow.com/questions/19526945/android-gradle-merged-values-xml-uses-wrong-namespace
2015-11-19 08:16:55 -08:00
F-Droid Translatebot
e29ae6de1a Pull translation updates from Weblate
Translators:

Indrit Bashkimi        Albanian
Kiril LastName         Bulgarian
Olexandr Nesterenko    Ukrainian
relan                  Russian
Sergio Oller           Catalan
tactmayers             Chinese (Hong Kong)
zmni                   Indonesian
2015-11-19 08:06:38 -08:00
F-Droid Translatebot
46c066468a Pull translation updates from Weblate
Translators:

Benedikt Geißler     German
Ronalds              Latvian
Sergey Vladimirov    Russian
Tobias Bannert       German
2015-11-17 19:48:48 -08:00
Christian Morgner
0df276eefc Remove initial HEAD request in HttpDownloader.setupConnection(), just add
credentials if present, fix checkstyle error in ManageReposActivity.
2015-11-16 21:02:39 +01:00
Christian Morgner
caabec7ef9 Reverted change in RepoProvider. 2015-11-16 13:48:08 +01:00
Christian Morgner
0c0342b12f Merge remote-tracking branch 'pserwylo/cmorgner-master' 2015-11-16 12:52:30 +01:00
Christian Morgner
e82382fe94 Modified return expression on MagageReposActivity.java. 2015-11-16 12:50:47 +01:00
Peter Serwylo
ee7761e1af CR: Replace String.isEmpty() with TextUtils.isEmpty(String).
String.isEmpty() is only supported in API v9, whereas we target
API v8 for now.
2015-11-16 18:05:37 +11:00
Peter Serwylo
0b3b32dab3 CR: Add overloaded createNewRepo method which provides default arguments.
Instead of passing in `null` each time you don't have a username/password,
this change provides those as meaningful default values in an overloaded
version of the method. This takes care of Java's lack of default argument
support.
2015-11-16 18:05:31 +11:00
Peter Serwylo
3426b3bb2d CR: Better deal with the possibility of crashes during database update.
This is for an abundance of caution. If the guard condition checks
for the presence of both username _and_ password fields, then a crash
or some sort of force close during the update (after adding username
but before password) will mean that next time the app runs, this
condition will evaluate to false and the password field will never
get added.
2015-11-16 18:05:16 +11:00
Peter Serwylo
97b60d937d CR: Apply database changes in chronological order.
As with the previous commit, there is probably not any harm doing this
in the way it was done. However it helps reason about the code if
changes are applied in the order that they were introduced. Especially
because each of them does something depending on the version of the
database at that point. With this change, you always know that at the
point that the function is run, the database version will be 51 (and
hence the structure of the database will be predictable).
2015-11-16 18:05:03 +11:00
Peter Serwylo
6957721479 CR: Leave old db update code as it was.
This may not have caused any trouble, but the principle behind the old
behaviour is that at the point that that was required, the fdroid_repo
table had that particular structure. There is a small chance that it
_may_ have some unintended consequences when upgrading clients with very
old database versions. Probably not, but may as well leave it as is.
2015-11-16 18:04:54 +11:00
Christian Morgner
34838fd0dc Added username & password fields to the REPO table, increased DB version to 52.
Extended DownloaderFactory to support optional username & password parameters.

Extended HttpDownloader to check for HTTP 401 Authorization Required status code
and send a simple HTTP Basic Authentication header with all requests.

Extended ManageReposActivity to support repositories that use HTTP Basic
Authentication, added a dialog to prompt for username and password.

Extended RepoDetailsActivity to be able to display and modify the authentication
credentials.
2015-11-15 13:04:23 +01:00
Daniel Martí
31313bc9ee Specify why the DM downloader is disabled
Closes both issues since they don't affect official builds anymore, for
as long as this is disabled.

Closes #445.
Closes #459.
2015-11-14 17:18:15 +01:00
Daniel Martí
4e81aba841 Remove spongycastle, use maven repos in zipsigner 2015-11-14 17:14:28 +01:00
Daniel Martí
51676bf255 Update spongycastle to 1.53.0.0
Which sits on top of bouncycastle 1.53.
2015-11-14 17:14:27 +01:00
Daniel Martí
34ac4319c0 Merge branch 'tests-lint' into 'master'
Close all cursors in tests



See merge request !170
2015-11-14 15:12:18 +00:00
Daniel Martí
b6e2f2d691 Remove one lone Log.d in prod code 2015-11-14 14:19:29 +01:00
Daniel Martí
11e2fb7540 test: close all cursors
This makes lint happy and avoids tons of warnings on the logcat due to
StrictMode.
2015-11-14 14:18:08 +01:00
Daniel Martí
5d048a7c53 Specify why we use proguard in debug builds 2015-11-14 14:05:15 +01:00
Daniel Martí
9fc1aba8bc Checkstyle fix 2015-11-13 20:46:52 +01:00
Daniel Martí
04e7b8d7ab Collapse identical catch statements in tests 2015-11-13 18:51:28 +01:00
Daniel Martí
52ada0131a Deduplicate types in tests 2015-11-13 18:50:43 +01:00
Daniel Martí
14a79b5577 Remove unused parameters 2015-11-13 18:50:43 +01:00
Daniel Martí
d951ccd221 Make a few declarations final 2015-11-13 18:44:08 +01:00
Daniel Martí
682cf58aa9 Merge branch 'search-widget' into 'master'
Replace search dialog with a search widget

SearchView is the recommended way to implement search UI. See https://developer.android.com/guide/topics/search/search-dialog.html#UsingSearchWidget

The UX is still far from ideal but looks much better now.

Before and after (Gingerbred):

![gingerbred-before](/uploads/f724afaf152aeef8ff9cb3e838427d22/gingerbred-before.png)
![gingerbred-after](/uploads/da67fe57d2a55e64cce7d0cba31aa181/gingerbred-after.png)

Before and after (Lollipop):

![lollipop-before](/uploads/4a50258993a8304d984450456d07e3bb/lollipop-before.png)
![lollipop-after](/uploads/4b49b2f802eca567c6713fe653b10331/lollipop-after.png)


See merge request !168
2015-11-13 17:22:19 +00:00
Daniel Martí
7581d8443e Merge branch 'lint-unused-resources' of https://gitlab.com/relan/fdroidclient
Fix some lint warnings about unused resources

No functional changes, just cleanups.
2015-11-13 18:19:13 +01:00
F-Droid Translatebot
3afe248159 Pull translation updates from Weblate
Translators:

AtomiKe                 French
Erwin Scheuch-Heilig    German
Ldm Public              French
Michal Čihař            Czech
pizzaiolo               Esperanto
2015-11-13 18:16:36 +01:00
Daniel Martí
04a2c4b70d Fix tests by never caching a null signature
This also keeps us from future possible NPE or null signature issues, if
we ever call getPackageSig on a PackageInfo with no signatures.
2015-11-13 11:42:47 +01:00
Daniel Martí
41b2ad6a9d Merge branch 'master' into 'master'
Enable HttpDownloader to use URL-based HTTP Basic Authentication.

This is a very small merge request that adds the possibility to use URL-based HTTP Basic Authentication in a repository URL. With this change you can for example use `https://user:password@my.repo.com` to authenticate against a private repository.

It would be great if you could merge my little feature request into the master, or let me know what I can do or have to change in order for the merge request to get accepted.

I'm of course open for discussion. My use-case is the identification of individual users. We dynamically create a signed index.jar file for each user which contains an individual set of apps depending on the permissions of the user etc.

HTTP Basic Authentication is on of the possible solutions, another solution would be to use the Android Account Manager, but this would be a much larger change.

Thank you for your consideration.

Best regards,
Christian Morgner


See merge request !167
2015-11-13 10:00:20 +00:00
Christian Morgner
405e411200 Enable HttpDownloader to use URL-based HTTP Basic Authentication. 2015-11-13 09:30:08 +01:00
relan
c3fd3984b8 Remove the code related to the compact layout
Compact layout preference is gone.
2015-11-13 09:25:49 +03:00
relan
7458dff6e9 Remove unused string repo_icon 2015-11-13 09:14:45 +03:00
relan
0324631a4e Remove unused string repo_update 2015-11-13 09:14:44 +03:00
relan
bb5665ab23 Remove unused color 2015-11-13 08:58:06 +03:00
relan
5c9e314c9b Suppress lint warnings about unused categories names
They are actually used from the code.
2015-11-13 08:58:06 +03:00
relan
e841d63ea9 Replace search dialog with a search widget
SearchView is the recommended way to implement search UI. See
https://developer.android.com/guide/topics/search/search-dialog.html#UsingSearchWidget
2015-11-13 08:27:55 +03:00
relan
f0d72a3ec4 Remove search button from the search results activity
It violates app navigation logic.
2015-11-13 08:27:55 +03:00
relan
32413a2753 Put empty text below the categories spinner
When an on-screen keyboard is used to enter a search query, empty text
can overlap categories spinner on small screens.
2015-11-13 08:19:57 +03:00
Daniel Martí
f7a0063495 proguard: only keep zipsigner 2015-11-12 20:21:48 +01:00
F-Droid Translatebot
e0c09853b9 Pull translation updates from Weblate
Translators:

ageru               French
Benedikt Geißler    German
Kiril LastName      Bulgarian
Marcelo Santana     Portuguese (Brazil)
Marvin W            German
2015-11-09 17:12:35 +01:00
Daniel Martí
ad4e53098a Merge branch 'clean-up-tabs-fragments' into 'master'
Clean up tabs fragments

No functional changes, just refactoring. The only visual change is that empty text is now positioned at the center which was the initial design (as far as I understand):

![screenshot](/uploads/1f930f283dae86f20675c11c861183f2/screenshot.png)


See merge request !165
2015-11-09 16:09:20 +00:00
relan
b533bc2112 Remove unused string swap_tap_to_select_apps 2015-11-09 15:51:18 +03:00
relan
3bbcca9966 Remove unused string update_all 2015-11-09 15:47:20 +03:00
relan
96ffb5f0fd Remove unused layouts 2015-11-09 15:45:47 +03:00
relan
7fdcd706fd Split tabs layouts
Use separate layouts for the three tabs. This simplifies code and improves
maintainability.
2015-11-09 15:43:09 +03:00
relan
950854318b Add styles for app list and empty text
Those styles will be used in the three layouts that will define the
look of the fragments.
2015-11-09 15:43:09 +03:00
relan
080527bf2e Remove ThemeableListFragment
Not sure why it was added initially but now it appears to be unneeded:
the support library does everything right and the lists are themed
properly without any hacks.
2015-11-09 15:42:52 +03:00
relan
817cac3002 Remove dead code in CanUpdateAppsFragment
Remove unused layout creation code. If needed, it can be re-added later as
an XML resource which is a much more maintainable way to define layouts.
2015-11-09 15:08:53 +03:00
Daniel Martí
3e44ab2474 Merge branch 'download-local-files-through-fdroid' into 'master'
Never fallback to UIL for handling image downloads, only use for displaying.

@relan picked up a bug I introduced while refactoring the icon downloading code in !139. This fixes that bug.

Our `IconDownloader` extended `BaseImageDownloader` from UIL. There was an
explicit check in the F-Droid `IconDownloader` which looks for
HTTP/HTTPS/Bluetooth schemes. If it wasn't one of these, it fell back
to the base class. This was what was happening for local cached image
files. As such, when the `getInputStream(...)` method was refactored
to only use F-Droids `DownloadFactory` and not delegate to the base class,
it failed on local "file://" URLs.

This change introduces a `LocalFileDownloader` and makes the `DownloaderFactory`
aware of it.

The `BaseImageDownloader` class only provides support for the following schemes:

 * HTTP
 * HTTPS
 * File
 * Android content providers
 * Android assets
 * Android drawables

F-Droid now supports HTTP, HTTPS, and File URLs. There is not currently any
need for content proiders, assets or drawables to get icons for apps in F-Droid.
If there is a need in the future (e.g. an issue currently discusses loading
icons from installed apps if possible) then that specific `Downloader` can get
introduced to solve the problem.

See merge request !164
2015-11-08 10:07:27 +00:00
Peter Serwylo
1a5bd84fad Never fallback to UIL for handling image downloads, only use for displaying.
Our `IconDownloader` extended `BaseImageDownloader` from UIL. There was an
explicit check in the F-Droid `IconDownloader` which looks for
HTTP/HTTPS/Bluetooth schemes. If it wasn't one of these, it fell back
to the base class. This was what was happening for local cached image
files. As such, when the `getInputStream(...)` method was refactored
to only use F-Droids `DownloadFactory` and not delegate to the base class,
it failed on local "file://" URLs.

This change introduces a `LocalFileDownloader` and makes the `DownloaderFactory`
aware of it.

The `BaseImageDownloader` class only provides support for the following schemes:

 * HTTP
 * HTTPS
 * File
 * Android content providers
 * Android assets
 * Android drawables

F-Droid now supports HTTP, HTTPS, and File URLs. There is not currently any
need for content proiders, assets or drawables to get icons for apps in F-Droid.
If there is a need in the future (e.g. an issue currently discusses loading
icons from installed apps if possible) then that specific `Downloader` can get
introduced to solve the problem.
2015-11-08 10:30:23 +11:00
F-Droid Translatebot
447dbe73ea Pull translation updates from Weblate
Translators:

ageru                French
Phạm Nguyễn Hoàng    Esperanto
Phạm Nguyễn Hoàng    Vietnamese
2015-11-07 14:03:48 +01:00
Daniel Martí
3df93940c8 Merge branch 'installed-sig' into 'master'
Cache installed signature

This will later be useful for #122 and others. Also a few more fixes related to signatures and package information.

CC @pserwylo

See merge request !158
2015-11-07 13:01:21 +00:00
Daniel Martí
eefbee969e Store installed app signature in cache
This means we can fetch the signatures only once instead of every time we need
them. Start by using the cache in AppDetails.
2015-11-07 13:57:34 +01:00
Daniel Martí
bb9426763c Remove <p> from comments
These are written manually and mostly don't contain HTML. Some html is
fine if you want to use links or markup, but <p> elements are just
pointless and very seldom used. Be consistent in not using them.
2015-11-07 13:25:01 +01:00
Daniel Martí
40092a07dd Don't duplicate repo info in UpdateException
The exception already contains the repo object, so don't hard-code the
address in the message string again.
2015-11-07 13:19:30 +01:00
Daniel Martí
4412b0a557 CI: Bump sdk to 24.4.1 2015-11-07 13:15:54 +01:00
Daniel Martí
dd9a7207ac Bump to 0.98-alpha0 after stable 2015-11-07 13:15:21 +01:00
Daniel Martí
94b30a54a6 Merge branch 'test-multi-repos' into 'master'
Added tests for multiple repositories providing same apks

Right now, multi repo support works, but is kinda funky. While fixing #324, I accidentally broke this support without realising it. So in the interests of making my approach to #324 more test driven, I've written some tests for multi repo support.

Initially I wrote tests for the actual correct, desirable behaviour. Then when it became apparant that we dont' do this, I commented those tests out (but left them there for hopefully future multi-repo work) and then added tests for the current behaviour to make sure we don't introduce regressions.

Android unit testing framework is nice for testing content providers. It is nice for testing file handling. However I really struggled to get it working with both. Had to do some interesting things with instrumentation and contexts in order to get it to work.

I'm sure Android has nice `Service` testing capabilities too. But given the trouble with instrumentation/contexts/files/providers/etc, it was easier for me to refactor the parts of `UpdateService` that I needed to test into a separate, testable class. 

See merge request !163
2015-11-07 11:45:47 +00:00
Peter Serwylo
47196234fe Merge branch 'improve-downloader-close-handling' into 'master'
Make closing of `Downloader`s more concise.

*NOTE: This is  only a WIP branch in so far as I haven't tested it, as it was done on the train before my holiday. The code is final though, so if people are happy it works, please merge.*

The base `Downloader` class now wraps the `InputStream` returned by
any child classes, in order to notify the child class when that stream
is closed. This prevents each child class having to figure out a way
to be notified of this.

This helps keep the API concise, because close handling is dealt with
without the need to add any public methods to the `Downloader` class
hierarchy.

Also removed some dead code which was unused.

See merge request !139
2015-11-06 22:47:11 +00:00
Peter Serwylo
5307d56ee5 Merge branch 'fix-empty-message-display' into 'master'
Ensure the "no apps to display" doesn't overlap with the category spinner.

There is no layout .xml file for the updated/installed list,
but there is for the available apps list. As a result, the `TextView` containing
the empty list message is added dynamically. With the recent improvements to
the category spinner, a `RelativeLayout` was used instead of a `ListView`. To
remedy this, the layout has been augmented to ensure the dynamically added
`TextView` still displays correctly.

*Before:*

![before](/uploads/15e8dca7a98c6ed2e302e33934cddd52/before.png)

*After:*

![after](/uploads/88de17059d84c6c2bf97d108f3504905/after.png)

See merge request !162
2015-11-06 22:43:27 +00:00
Peter Serwylo
12d5c5c7b4 Format to make checkstyle happy. Remove unused code. 2015-11-07 09:40:44 +11:00
Peter Serwylo
002d356ece Ensure the "no apps to display" doesn't overlap with the category spinner.
There is no layout .xml file for the updated/installed list,
but there is for the available apps list. As a result, the `TextView` containing
the empty list message is added dynamically. With the recent improvements to
the category spinner, a `RelativeLayout` was used instead of a `ListView`. To
remedy this, the layout has been augmented to ensure the dynamically added
`TextView` still displays correctly.
2015-11-07 09:05:10 +11:00
Peter Serwylo
94410c5dbc Code formatting to pass checkStyle. 2015-11-07 08:39:23 +11:00
Peter Serwylo
3ad429aa6b Guard against null activity.
Came across this whibluetooth swap.
I think it is reasonable to guard against null activities here, because
we are likely not releasing observers correctly, and thus the observer
may receieve a notification when the activity is not attached.
2015-11-07 08:39:23 +11:00
Peter Serwylo
f388f32fcf Don't use download manager for Bluetooth downloads.
The F-Droid Bluetooth downloader must be used for these, as it is a
custom protocol and Android download manager only understands HTTP
and HTTPS.
2015-11-07 08:39:23 +11:00
Peter Serwylo
012cdce37b Make closing of Downloaders more concise.
The base `Downloader` class now wraps the `InputStream` returned by
any child classes, in order to notify the child class when that stream
is closed. This prevents each child class having to figure out a way
to be notified of this.

Also removed some dead code which was unused.
2015-11-07 08:36:17 +11:00
Peter Serwylo
938c992023 Comment out tests for future, desirable behaviour.
Leave only the ones which align with the current multi-repo behaviour
that F-Droid exhibits.

The commented out tests can be uncommented in the future when working
on proper multi-repo support.
2015-11-07 08:05:13 +11:00
Peter Serwylo
1c179848b7 Added tests for current multi-repo behaviour.
This is the bare minimum of what must be maintained going forward.
Ideally the behaviour sohould be better, but that is for the future.
2015-11-07 08:05:13 +11:00
Peter Serwylo
0685c16efe More work on multi-repo tests, currently broken due to F-Droid being broken.
(One of) the problems with F-Droid's multiple support is that there is
a primary key on the fdroid_apk table which is a composite of:

 * id
 * vercode

Which means that two repos providing the same version means one will
update the other, rather than ending up with two different versions.

Instead, there should be some other way to differentiate apks from
different sources. Firstly, it should take into account the signing
cert. Secondly, it may taken into account the hash, because two people
could sign different apks with the same cert and then we are back at
square one.
2015-11-07 08:05:13 +11:00
Peter Serwylo
f794d1e7a5 Infrastructure for doing test driven development to support multiple repo dev.
The new test skeletons right now update three different repos
in different configurations. They do so such that the order of updates
changes and therefore the way in which conflicts between repos are
dealt with are tested.

They should all have the same result (though I'm not sure exactly what
that should be yet).
2015-11-07 08:05:13 +11:00
Peter Serwylo
8d1e20b7fd Remove TargetApi(8) because that is our min-sdk now. 2015-11-07 08:05:13 +11:00
Peter Serwylo
b6218c6d05 Refactored code which inserts apps into database to make testable.
Putting it in the UpdateService made it a little tricky to test, so
I moved it out to a separate class called `RepoPersister`.
2015-11-07 08:05:13 +11:00
F-Droid Translatebot
c6a8bd2139 Pull translation updates from Weblate
Translators:

Dimos D            Greek
Dmitry Mikhirev    Russian
Michalis           Greek
Szöllősi Attila    Hungarian
2015-11-05 12:06:14 +01:00
Daniel Martí
c74e272de7 Bump build-tools to 23.0.2 2015-11-05 12:00:42 +01:00
Daniel Martí
6483106a46 Merge branch 'category-filter-height' into 'master'
Set category filter height to 48dp

This improves usability of the category spinner. Divider is now behind
it. This makes the layout visually more compact while keeping actual
touch target 48dp. See
http://www.google.com/design/spec/layout/metrics-keylines.html#metrics-keylines-touch-target-size

Before and after:

![before](/uploads/b52b3c84675c8b3ef5896e90967dafd4/before.png)
![after](/uploads/a07efee75bdfe5356378fa9960da8730/after.png)


See merge request !161
2015-11-05 10:16:38 +00:00
relan
0bd995a731 Set category filter height to 48dp
This improves usability of the category spinner. Divider is now behind
it. This makes the layout visually more compact while keeping actual
touch target 48dp. See
http://www.google.com/design/spec/layout/metrics-keylines.html#metrics-keylines-touch-target-size
2015-11-05 11:56:18 +03:00
Daniel Martí
d242440fe3 Fix all InlinedApi lint warnings 2015-11-01 20:16:31 +01:00
Daniel Martí
ca9e390e60 lint: ignore UnusedAttribute 2015-11-01 20:09:31 +01:00
Daniel Martí
81db276f8d Avoid showAsAction=always whenever possible
In AppDetails, work around it by using ifRoom and placing that button
first so that it gets preference. The rest aren't affected at all.
2015-11-01 20:06:17 +01:00
Daniel Martí
6db5da2cf7 Fix string formatting issues found by lint 2015-11-01 19:54:37 +01:00
F-Droid Translatebot
c5a36f34f2 Pull translation updates from Weblate
Translators:

agilob                   Polish
Allan Nordhøy            Norwegian Bokmål
Kiril LastName           Bulgarian
Kristoffer Grundström    Swedish
Mladen Pejaković         Serbian
2015-11-01 19:49:07 +01:00
Daniel Martí
41d2c69d2e Remove unused ic_info_white drawable
The layout code that uses it is now commented out. This commit can be
reverted once the layout code is used again in the future.
2015-11-01 19:43:45 +01:00
Daniel Martí
41fbbd9825 Exclude more license/notice files from apk
This reduces the final apk size by an additional 5KB.
2015-11-01 19:38:29 +01:00
Daniel Martí
04e8117c3e Bump to 0.97-alpha8 2015-10-31 10:12:07 +01:00
F-Droid Translatebot
079e704375 Pull translation updates from Weblate
Translators:

Anders Jonsson           Swedish
Kristoffer Grundström    Swedish
Mladen Pejaković         Serbian
2015-10-31 10:09:53 +01:00
Daniel Martí
7c2b7ef280 checkstyle fix 2015-10-31 10:09:23 +01:00
Daniel Martí
4bfae52a9e Merge branch 'privileged-extension-icon' into 'master'
New icon for Privileged Extension

Align Privileged Extension icon with current F-Droid icon. The # sign is associated with privileges because it's usually used by root shell. Lego blocks that can be plugged into each other are also known very well around the world.

"F-Droid Privileged Extension icon" by @relan is licensed under CC-BY-SA 3.0 or GPLv3+.

Smaller size:

![privileged-small](/uploads/5af03c7d7e7c50f3669b72f2c913c08f/privileged-small.png)

Larger size:

![privileged-large](/uploads/9408b31a92e154e1e8a9cd3953889d94/privileged-large.png)

Raster images are optimized using `optipng -o7 -zm1-9`.

See merge request !155
2015-10-29 15:43:20 +00:00
Daniel Martí
b4560fc217 Merge branch 'materialize-category-filter' into 'master'
Make category filter look Material

Get rid of Gingerbred legacy.

Before and after (note the glitch below the spinner):

![before](/uploads/b0ed14216dcd772a78e3efc8ea8295f0/before.png)
![after](/uploads/0fba2177b33a2061ab67534a73de3f90/after.png)


See merge request !159
2015-10-29 15:41:58 +00:00
Daniel Martí
501d3d3176 Merge branch 'darker-dark-theme' into 'master'
Use darker primary colors for the Dark theme

Primary colors of the Light theme are too bright for the Dark theme. The difference should be especially noticeable on OLED screens.

Before and after:

![before](/uploads/437920c0b1173522b3d8312740532d12/before.png)
![after](/uploads/e1fa004e35021152688ba5b0da4d7086/after.png)

See merge request !160
2015-10-29 15:40:09 +00:00
relan
96091b00d5 Use darker primary colors for the Dark theme
Primary colors of the Light theme are too bright for the Dark theme.
2015-10-29 18:26:39 +03:00
Daniel Martí
214fd32552 Update changelog for 0.97 2015-10-29 16:18:41 +01:00
relan
9170e2af91 Make category filter look Material
Get rid of Gingerbred legacy.
2015-10-29 18:15:01 +03:00
Daniel Martí
2c1b13620f Disable DownloadManager usage for stable
Since it's unstable and introduces regressions. See #445 and #459, for
example.
2015-10-29 16:11:08 +01:00
Daniel Martí
6c8e726aad Revert netcipher to fix SNI regression
Fixes #431.
2015-10-29 16:08:17 +01:00
F-Droid Translatebot
dd0f9dcccf Pull translation updates from Weblate
Translators:

ageru                 French
agilob                Polish
Ajeje Brazorf         Sardinian
Dario Tordoni         Italian
Laura Arjona Reina    Spanish
Ldm Public            French
naofum                Japanese
Osoitz                Basque
Sérgio Marques        Portuguese (Portugal)
2015-10-29 16:05:01 +01:00
relan
e599300620 New icon for Privileged Extension 2015-10-27 09:39:00 +03:00
Daniel Martí
92713acdce Fix tests after e085e039
We already had a getPackageInfo, but it wasn't the proper one with flags so
that our new code could use it.
2015-10-25 13:13:55 +01:00
Daniel Martí
42b6176cff AppSecurityPermissions: cleanup
Mostly removing obsolete comment from the original source. Also removing some
unnecessary C-style for loops.
2015-10-23 16:40:48 +02:00
Daniel Martí
e085e0392b PackageReceiver: Only fetch the one PackageInfo
We were fetching information on all installed packages and doing a linear
search. Which is silly and inefficient since we can directly fetch information
on a single installed package by id.
2015-10-23 13:21:56 +02:00
Daniel Martí
1a4c2ca408 Remove unnecessary variable initializations 2015-10-23 13:11:18 +02:00
Daniel Martí
927e05ba8d Take some final declaration suggestions from AS 2015-10-23 13:08:24 +02:00
Daniel Martí
7f2efc7267 Take some declaration access suggestions from AS 2015-10-23 13:06:23 +02:00
Daniel Martí
97eea866aa Remove unused class fields 2015-10-23 13:01:10 +02:00
Daniel Martí
1ad69adf4e Explicit catch ignores to make linters happy 2015-10-23 12:58:51 +02:00
Daniel Martí
0bb921adad Optimize imports 2015-10-23 12:55:09 +02:00
Daniel Martí
9475d1634c AppDetails: Remove another extra getPackageManager() 2015-10-23 12:44:31 +02:00
Daniel Martí
da6fd323fd Remove unnecessary initializers
These fields are initialized to their zero values (0, null, false) so doing
the same over in the constructor is unnecessary.
2015-10-23 12:41:05 +02:00
Daniel Martí
56d9ccd737 Deduplicate getApp() getter madness
Not that it's any more efficient, but it's surely more readable.
2015-10-23 12:35:05 +02:00
Daniel Martí
8b114326f5 AppDetails: Remove unnecessary Signature
Mainly since in the future we'll only have the hash of it, so avoid depending
on the object.
2015-10-23 12:31:05 +02:00
Daniel Martí
960b67e950 AppDetails: Remove extra getter 2015-10-23 12:25:20 +02:00
Daniel Martí
d32c866bb4 Bump to 0.97-alpha7 2015-10-23 11:01:04 +02:00
F-Droid Translatebot
04e548aec4 Pull translation updates from Weblate
Translators:

Ajeje Brazorf                     Sardinian
Allan Nordhøy                     Norwegian Bokmål
Daniel Martí                      Catalan
Luiz Wagner Tavares Nascimento    Italian
Marcelo Santana                   Portuguese (Brazil)
relan                             Russian
2015-10-23 10:59:58 +02:00
Daniel Martí
35acb141c9 Ignore upstreamVercode if it doesn't work
If it doesn't result in any version being marked as suggested, e.g. because it
is higher than 0 but lower than any available version, we end up with a NULL
suggestedVercode.

Run the Latest() algorithm after the Upstream() one, and have it pick up those
cases too by adding "OR suggestedVercode IS NULL". This way, we treat invalid
upstreamVercode values as if they were NULL.

Also some cleanup of comments.

Fixes #371.
2015-10-22 16:58:38 +02:00
Daniel Martí
fb3b0a0281 Comment indenting fix 2015-10-22 00:25:19 +02:00
Daniel Martí
adca9a051b Checkstyle fixes 2015-10-22 00:13:17 +02:00
Daniel Martí
30b6d6df90 Don't hardcode preference keys 2015-10-22 00:10:18 +02:00
Daniel Martí
2ceeda40b7 Make language change stick properly
As seen in https://stackoverflow.com/questions/2264874/changing-locale-within-the-app-itself.

Fixes #458.
2015-10-22 00:07:36 +02:00
Daniel Martí
8307015d8d Don't use DownloadManager if it was disabled
Fixes #442.
2015-10-21 23:29:45 +02:00
Daniel Martí
3311043e80 Merge branch 'materialize-app-list' into 'master'
Materialize app list

Improve the look of app list items. Note that compact mode is removed because it does not make much sense, see the screenshots.

Before (default layout, compact layout):

![before](/uploads/6e9b4f0827c89e191257210178a09b41/before.png)
![before-compact](/uploads/d98f907405d28e292ccab3af9d910162/before-compact.png)

After:

![after](/uploads/d95fc34ab047934e78b1e92bfce915dc/after.png)
![after-rtl](/uploads/0129f19390e1501cbd2e45d6597b7db5/after-rtl.png)

Affects #471 and #467. Those bugs will still be relevant because there are other places with wrong padding and font style.


See merge request !157
2015-10-21 19:55:57 +00:00
relan
6797f51481 Make app list look more Material
Use recommended paddings, text sizes, colors, avoid bold font style.
See https://www.google.com/design/spec/components/lists.html
2015-10-21 22:25:52 +03:00
relan
a9457e30a6 Fix applistitem layout parameters resolution
See http://www.doubleencore.com/2013/05/layout-inflation-as-intended
2015-10-21 22:04:52 +03:00
relan
a962ba9523 Remove compact layout strings
They are unused now.
2015-10-21 22:04:52 +03:00
relan
71da35d3fd Remove compact layout setting
It's quite useless because it makes app list insignificantly smaller.
Besides, this contradicts the Material Design spec.
2015-10-21 22:04:52 +03:00
Daniel Martí
7bc2622b94 Sort apps by name ignoring case with locale
Fixes #475.
2015-10-21 17:15:56 +02:00
F-Droid Translatebot
cbb526d68b Pull translation updates from Weblate
Translators:

Ajeje Brazorf    Sardinian
Allan Nordhøy    Norwegian Bokmål
Enol Puente      Asturian
2015-10-21 16:55:10 +02:00
Daniel Martí
2191cba844 CONTRIBUTING: Clarify source strings changes 2015-10-21 16:53:00 +02:00
Daniel Martí
e8093a66f0 Replace preferences by settings in other strings 2015-10-20 23:40:57 +02:00
F-Droid Translatebot
70cb5cd94a Pull translation updates from Weblate
Translators:

ageru                French
agilob               Polish
Ajeje Brazorf        Sardinian
Alberto Moshpirit    Spanish
Enol Puente          Asturian
Green Lunar          Hebrew
2015-10-20 23:40:53 +02:00
Daniel Martí
1a60a7cfb7 Make remove-unused-trans remove empty strings
English is better than no text at all.
2015-10-19 09:49:14 +02:00
Daniel Martí
5b688d3c23 Rename Preferences to Settings
For consistency with Android and other apps.

Closes #464.
2015-10-19 09:48:05 +02:00
Daniel Martí
f349437334 Replace all tabs with spaces in string xml files
For consistency, and to keep weblate from adding even more tabs everywhere.
2015-10-19 09:35:57 +02:00
F-Droid Translatebot
9f7380691b Pull translation updates from Weblate
Translators:

ageru     French
Osoitz    Basque
Sylvie    Dutch
2015-10-19 09:27:27 +02:00
Daniel Martí
abf4528d02 Get rid of many tabs for consistency 2015-10-19 09:23:35 +02:00
Daniel Martí
0b2aac253b Merge branch 'bump-appcompat-v7' into 'master'
Bump appcompat-v7 library to 22.2.1

This is the proper fix for #356.

See merge request !156
2015-10-19 06:54:48 +00:00
relan
b1a1bedc68 Bump support appcompat-v7 library to 22.2.1
Let it be the same version as other support libraries.
2015-10-19 07:56:50 +03:00
relan
68de2356c5 Fix default textColor for TextView
TextView respects textViewStyle since appcompat-v7:22.2:

     public AppCompatTextView(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
+        this(context, attrs, android.R.attr.textViewStyle);
     }

This change in appcompat-v7 breaks previous behaviour by applying
textColorSecondary to TextViews: text becomes grey after upgrading
appcompat-v7 to 22.2.

See https://code.google.com/p/android/issues/detail?id=170476
2015-10-19 07:56:41 +03:00
F-Droid Translatebot
8bf0b1df91 Pull translation updates from Weblate
Translators:

agilob             Polish
Marcelo Santana    Portuguese (Brazil)
Michal Čihař       Bulgarian
relan              Russian
Rubén Santos       Galician
2015-10-17 13:36:44 +02:00
Daniel Martí
41cfc67d4a Bump to 0.97-alpha6 2015-10-13 22:49:05 +02:00
F-Droid Translatebot
127be67c79 Pull translation updates from Weblate
Translators:

Alberto Moshpirit     Spanish
Laura Arjona Reina    Spanish
Marcelo Santana       Portuguese (Brazil)
moshpirit             Spanish
Sérgio Marques        Portuguese
Sérgio Marques        Portuguese (Portugal)
zmni                  Indonesian
2015-10-13 22:32:40 +02:00
Daniel Martí
dfe72b30ce gradle: debug is already debuggable 2015-10-13 22:30:02 +02:00
Daniel Martí
9586c159a3 Deduplicate gradle code 2015-10-13 22:28:55 +02:00
Daniel Martí
bbeef3cd8d Bump libsuperuser 2015-10-13 22:17:57 +02:00
Daniel Martí
ed978ba785 Downloader: Don't use DownloadManager if null
If getSystemService(Context.DOWNLOAD_SERVICE) returns null, we should not go
ahead with using AsyncDownloaderFromAndroid. This would result in NPE and
crashes.

Fixes #442.
2015-10-12 13:02:32 +02:00
Daniel Martí
52e9e79fad README: Clarify that we now use Gradle 2.7 2015-10-12 12:48:54 +02:00
Daniel Martí
7b8f577fd4 Keep apk downloads from crashing on 2.2
Use a temporary quick fix for the crash until a better solution is in place.
This is explained in the TODO.

Fixes #448.
2015-10-12 12:45:27 +02:00
Daniel Martí
8d4e785185 Simplify a few elses
Mostly just dropping them after returns.
2015-10-12 12:37:39 +02:00
Daniel Martí
603a5b25e4 lint: disable LocaleFolder check 2015-10-11 01:43:08 +02:00
Daniel Martí
f1c3e5ee32 Add id to list of languages and add in link
As per #139.
2015-10-11 01:35:45 +02:00
F-Droid Translatebot
0f17901d9d Pull translation updates from Weblate
Translators:

agilob               Polish
AtomiKe              French
Ferenc Nagy          Hungarian
Mário Castanheira    Portuguese (Portugal)
Sérgio Marques       Portuguese (Portugal)
zmni                 Indonesian
2015-10-11 01:32:28 +02:00
Daniel Martí
65e8087211 CI: Run checkstyle 2015-10-09 17:05:36 +02:00
Daniel Martí
1e8bbbd1f9 checkstyle: Add curly checks 2015-10-09 11:40:50 +02:00
Daniel Martí
8396eba8d9 checkstyle: Always wrap commas 2015-10-09 11:27:24 +02:00
Daniel Martí
b60afa2dc0 checkstyle: Also check test sources 2015-10-09 11:19:41 +02:00
Daniel Martí
6b573db3f4 checkstyle: Add more checks we already obey 2015-10-09 11:06:59 +02:00
Daniel Martí
65f292708c checkstyle: Add AvoidStaticImport
Plus bonus build fix (whoops).
2015-10-09 11:04:39 +02:00
Daniel Martí
2249ad59da checkstyle: Add StaticVariableName 2015-10-09 11:02:19 +02:00
Daniel Martí
caa91186cc checkstyle: Add LocalFinalVariableName 2015-10-09 10:59:44 +02:00
Daniel Martí
6ee3dba3ea checkstyle: Add LocalVariableName 2015-10-09 10:56:50 +02:00
Daniel Martí
b5f62c03cb checkstyle: Add MemberName 2015-10-09 10:55:27 +02:00
Daniel Martí
48b7096523 checkstyle: Enable some naming checks we obey 2015-10-09 10:50:13 +02:00
Daniel Martí
bd68caa152 checkstyle: Add FallThrough
With bonus bugfix.
2015-10-08 23:33:29 +02:00
Daniel Martí
638daf83cf checkstyle: Add OneStatementPerLine
Also OneTopLevelClass, but we're not there yet
2015-10-08 22:29:32 +02:00
Daniel Martí
d97319efb7 checkstyle: Add DefaultComesLast 2015-10-08 22:25:38 +02:00
Daniel Martí
7bbcbf25a6 checkstyle: Add EmptyLineSeparator 2015-10-08 22:23:10 +02:00
Daniel Martí
f5352eaf28 checkstyle: Add ArrayTrailingComma 2015-10-08 22:15:51 +02:00
Daniel Martí
3f8875ab9c checkstyle: Add EqualsAvoidNull 2015-10-08 22:09:51 +02:00
Daniel Martí
174e37e4e0 checkstyle: Add ExplicitInitialization 2015-10-08 22:01:09 +02:00
Daniel Martí
38cc95b035 checkstyle: Add StringLiteralEquality 2015-10-08 21:53:02 +02:00
Daniel Martí
0a13cf5c63 checkstyle: Add UnnecessaryParentheses 2015-10-08 21:50:46 +02:00
Daniel Martí
561d7833d1 checkstyle: Add indentation 2015-10-08 21:41:38 +02:00
Daniel Martí
04ea84640e Run dos2unix on BoundedInputStream.java 2015-10-08 20:01:58 +02:00
Daniel Martí
3eb758f1b2 checkstyle: Add WhitespaceAround 2015-10-08 20:01:37 +02:00
Daniel Martí
95b53706f9 checkstyle: Add NoWhitespace{Before,After} 2015-10-08 19:49:43 +02:00
Daniel Martí
793788eadf checkstyle: enable and apply WhitespaceAfter 2015-10-08 19:44:31 +02:00
Daniel Martí
5736c70dc8 checkstyle: enable and apply FinalClass 2015-10-08 19:29:04 +02:00
Daniel Martí
2211dc38bb Fix -PsourceDeps build
We can't do verification since spongycastle isn't imported in the sourceDeps
build, and witness complains about missing libs.
2015-10-08 19:22:15 +02:00
Daniel Martí
2d62c94b5f Rename extension into Privileged-Extension
The previous name, F-Droid-Privileged, made it look like it was a replacement
for F-Droid. The full name, F-Droid-Privileged-Extension, is too long.
2015-10-08 19:10:30 +02:00
Daniel Martí
5a8c68b8f8 Also add checkstyle to the privileged extension 2015-10-08 19:08:08 +02:00
Daniel Martí
2b0e6dade1 checkstyle: enable ModifierOrder and apply it 2015-10-08 18:59:41 +02:00
Daniel Martí
7c6888b5d4 checkstyle: remove rules that will never be used 2015-10-08 18:58:40 +02:00
Daniel Martí
a47e32d40f Mention checkstyle in CONTRIBUTING 2015-10-08 17:38:00 +02:00
Daniel Martí
d8a624b397 End AS formatting madness in build.gradle
This was changed to obey Android Studio's formatting of gradle files. Some of
what it did was fine, but removing all line spacing is bonkers.
2015-10-08 17:26:27 +02:00
Daniel Martí
1f973a7c88 checkstyle: Enable and apply AvoidNestedBlocks 2015-10-08 17:26:27 +02:00
Daniel Martí
b05ed99c74 Make F-Droid obey the easy checkstyle rules 2015-10-08 17:26:27 +02:00
Daniel Martí
42b7687cf9 Remove trailing whitespaces from zxing code 2015-10-08 17:26:27 +02:00
Daniel Martí
999fa6eb21 Add checkstyle with a small config
It doesn't include all of the Android style checks as found in Android Studio,
but it's a start.

Bump Gradle to 2.7 because the checkstyle plugin in earlier versions is just
not good enough.
2015-10-08 17:26:27 +02:00
Daniel Martí
bc283304df Fix tests compilation after 5c4de9a1 2015-10-08 13:28:35 +02:00
Daniel Martí
7dd239d4bf README: itc meetings are now at 20h UTC 2015-10-07 13:26:37 +02:00
Daniel Martí
9225309191 Bump to 0.97-alpha5 2015-10-07 11:02:38 +02:00
F-Droid Translatebot
17f5fc67ec Pull translation updates from Weblate
Translators:

Ajeje Brazorf        Sardinian
Daniel Martí         Catalan
Enol Puente          Asturian
Mladen Pejaković     Serbian
naofum               Japanese
Phạm Nguyễn Hoàng    Vietnamese
relan                Russian
2015-10-07 11:01:05 +02:00
Daniel Martí
89607eb58a Don't update repos when opening the app yet
As the comment says, this should not be on until it can be opted out from. The
biggest problem is unwanted repo updates, e.g. when a user is on a mobile
connection.

Fixes #435.
2015-10-07 10:58:09 +02:00
Daniel Martí
995036f4e4 Fix regression introduced in 37e23e8d5082
The idea was good, but it applied the second-precise date format everywhere.
This broke dates on apps and apks, which have the format yyyy-MM-dd on the
index.

Fix this by having two sets of funcs in Utils, one for dates (precise to a
day) and one for times (precise to a second). We should use the latter for
dates we ourselves measure, like the last repo update time.
2015-10-07 10:51:32 +02:00
Daniel Martí
a6b416e7c9 Don't fall back to category resource ids
Fall back to their full names instead.
2015-10-07 10:51:32 +02:00
Daniel Martí
cebf82e7e3 Merge branch 'last-repo-update' of https://gitlab.com/relan/fdroidclient 2015-10-07 10:10:27 +02:00
Daniel Martí
b204377a4e AppDetails: don't remove last character
When fixing the trailing newline issue, I overlooked the fact that
subsequence's second index is exclusive, not inclusive, so it's i<=len not
i<len.
2015-10-07 10:06:20 +02:00
relan
714fbc8f2a Show last repo update time in locale-dependent format 2015-10-07 08:58:07 +03:00
relan
37e23e8d50 Store last repo update time with 1 sec precision 2015-10-07 08:58:07 +03:00
Daniel Martí
7cfc2ea004 Simplify some bits of code
* Don't call getIntent() multiple times
* Drop else after return
* Don't do "if (!cond) foo else bar"
2015-10-06 14:50:57 +02:00
Daniel Martí
fd8355e872 Fix lint warning about implicit locale 2015-10-06 14:36:40 +02:00
Daniel Martí
469f09c0b3 Remove all unused resources 2015-10-06 14:33:28 +02:00
Daniel Martí
17fdaa116c Run optipng -o7 on new drawables 2015-10-06 14:21:21 +02:00
Daniel Martí
8d75e87c6b Don't keep all of jmdns
It is used as part of swap, but the library never caused any proguard issues
and there is no reason to think it should. The issues came from zipsigner and
its use of spongycastle.
2015-10-06 14:19:05 +02:00
Daniel Martí
2bbde8c705 Don't keep all of libsuperuser
These keeps are to keep swap working, which depends on libraries that use
reflection and other stuff that proguard breaks. libsuperuser is not used by
swap though, and doesn't have those issues.
2015-10-06 14:15:24 +02:00
Daniel Martí
d1bdd7789b Remove now unused vendored jmdns 2015-10-06 14:11:30 +02:00
Daniel Martí
d40781584b Update jmdns to 3.4.2 from 3.4.1+ trunk 2015-10-06 14:11:30 +02:00
Daniel Martí
a6199e7603 Update changelog 2015-10-06 12:40:34 +02:00
Daniel Martí
77306e85e7 Make sure locale display names are capitalized 2015-10-06 12:34:09 +02:00
Daniel Martí
c4699df82a Merge branch 'theme-night' into 'master'
Add night theme

[Screenshot](http://i.imgur.com/gVK5M0G.png)

The screenshot is huge, so making it an image in markdown takes up a lot of space. Hence link.

See merge request !149
2015-10-06 10:33:18 +00:00
Daniel Martí
b94e2e3648 Support spaces and apostrophes in categories
Just like the hard-coded ones, for consistency.
2015-10-06 09:38:44 +02:00
Daniel Martí
5c4de9a166 Use the same format for hardcoded categories 2015-10-06 09:32:31 +02:00
Daniel Martí
c8bf53fd3b Use category_X for category name strings
This means more consistent and descriptive naming.
2015-10-06 09:18:15 +02:00
Daniel Martí
a052dc2ff1 Add night theme
Similar to the dark theme, but dropping blue in favour of very dark shades of
grey.

Removed colorEdgeEffect to simplify the sharing of the style between dark and
night themes. It should default to colorPrimary anyway, so we're good.

Fixes #345.
2015-10-06 09:03:11 +02:00
F-Droid Translatebot
ff9871f86f Pull translation updates from Weblate
Translators:

ageru                  French
Ajeje Brazorf          Sardinian
Enol Puente            Asturian
Olexandr Nesterenko    Ukrainian
relan                  Russian
Sérgio Marques         Portuguese (Portugal)
2015-10-06 09:00:46 +02:00
Daniel Martí
7875d8622e Merge branch 'feature/app-details-minor-refresh' into 'master'
Refresh layout of AppDetails screen

This change primarily affects the AppDetails links section to make them easier to click. It also strips down the UI a bit to provide a cleaner interface as well as some modest Material Design tweaks.

Fixes #389.

Also fixes an unreported issue where the permissions list would be blank if the app only requested the root permission on devices which no longer support this.

The most significant change is arguably removing the expand/collapse functionality around the links and permissions UI elements. I think personally this kind of UI behavior is a bit of an anti-pattern as it clutters up the UI visually and doesn't provide much if any real utility to the user. Also, given the background and context of the app, I would argue that the links (especially to the source code and website) should have high visual priority as well as the permissions the application requests. I know I personally very commonly click on these before deciding to install any given app.

It's not perfect, and I would like to do more eventually, but I tried to refrain from making too many or too drastic of changes to the existing design for now.

| **before** | **after** |
| -------- | -------- |
| ![before] | ![after] |

**link touch target**

![touch_target]

[before]: https://gitlab.com/zaventh/fdroidclient/uploads/c45d27a19777ea345820d8753d3e290b/before_480.png
[after]: https://gitlab.com/zaventh/fdroidclient/uploads/b1f517c9de9e74c63b6957fed68b3dd3/after_480.png
[touch_target]: https://gitlab.com/zaventh/fdroidclient/uploads/6e7a38610bc792f11a76fe837fb9f28a/touch_target.png

See merge request !153
2015-10-05 21:08:52 +00:00
Jeff Mixon
36e0479967 Refresh layout of AppDetails screen
This change primarily affects the AppDetails links section to make them easier to click. It also strips down the UI a bit to provide a cleaner interface as well as some modest Material Design tweaks.

Fixes #389.
2015-10-05 22:38:57 +02:00
Toby Kurien
a0ad3ee07d Use correct downloadId when there are multiple
Fixes #447.
2015-10-05 18:15:10 +02:00
Daniel Martí
d7d13b26e0 Merge branch 'privileged-fixes' into 'master'
Privileged Extension fixes

Remove install/unistall commands, not needed and can cause problems

See merge request !152
2015-10-05 13:00:57 +00:00
Dominik Schürmann
dda3ea15b7 Privileged Extension: Remove install/unistall commands, not needed and can cause problems 2015-10-05 13:45:45 +02:00
Daniel Martí
12ed92aa01 Run a stricter optipng -o7 -zm1-9 on all pngs
This takes even longer, and catches some optimizations that -o7 had left out.
2015-10-04 17:51:34 +02:00
Daniel Martí
bed363e6fa Update changelog 2015-10-04 08:21:58 -07:00
Daniel Martí
194dff8ab8 Run optipng -o7 on all png images
The android build process doesn't waste time running optipng and such, since
it takes minutes to run properly.

I had already ran this a few months ago. Running it again gives an apk ~15KB
smaller, which is welcome. This is because of the new images added.
2015-10-04 08:14:48 -07:00
F-Droid Translatebot
ee57a7b683 Pull translation updates from Weblate
Translators:

Ajeje Brazorf          Sardinian
Allan Nordhøy          Norwegian Bokmål
AtomiKe                French
Enol Puente            Asturian
jaksi                  Hungarian
Luis Ruiz              Spanish
Marc Ringel            German
Mário Castanheira      Portuguese (Portugal)
Marvin W               German
naofum                 Japanese
Olexandr Nesterenko    Ukrainian
Osoitz                 Basque
Reg                    Swedish
Thomas Lü              German
2015-10-04 08:02:25 -07:00
Daniel Martí
d7a30b4c34 Merge branch 'fix-430--download-without-content-length' into 'master'
Ddownload index, even when not presented with a Content-Length header (Fixes 430)

This works for the index download, but still does not work for downloading .apks correctly. That is, the Android Download Manager needs one of:

 * `Content-Length: ...`
 * `Connection: close`
 * `Transfer-Encoding: Chunked`

headers to be set to work correctly. In the absence of all three of these, problems ensue. In fact in my toy web server, even the `Connection: close` did not seem to work correctly, but I'd be happy to be corrected on that. Either way, this is an improvement on what was there before.

For reference, here is my toy PHP web server, which can be saved in the root of the F-Droid repo and invoked with:

> `php -S 10.0.0.4:8888 no-headers.php`

```
<?php

function streamFile( $file ) { $size     = filesize( $file );
        $contents = file_get_contents( $file );

        $buffer = (int)( $size / 5 );
        $bytes = 0;
        while ( $bytes < $size ) {
                $toStream = min( $size - $bytes, $buffer );
                echo substr( $contents, $bytes, $toStream );
                $bytes += $toStream;

                // Sleep to allow progress to be viewed in F-Droid
                sleep( 1 );
        }
}

$index    = "/fdroid/repo/index.jar";
$firefox  = "/fdroid/repo/fennec-40.0.multi.android-arm.apk";

// Test downloading a large .apk to see how it behaves
if ( $_SERVER['REQUEST_URI'] == "/fdroid/repo/fennec-40.0.multi.android-arm.apk" ) {
        $file = $firefox;
} else {
        $file = $index;
}

// Android Download Manager requires this (if not using Content-Length or Transfer-Encoding
// headers, but I can't seem to get it to work as expected).
header( "Connection: Close" );
streamFile( dirname( __FILE__ ) . $file );

```

See merge request !150
2015-10-04 15:00:07 +00:00
Peter Serwylo
19ae4a76c2 Use existing byte-format function.
Utils already contains a function to format bytes, removed duplicate
function.
2015-10-04 11:24:40 +11:00
Daniel Martí
d911aa2424 Merge branch 'feature/return-to-search-on-up' into 'master'
Return to SearchResults on "Up" navigation from AppDetails

When arriving to the AppDetails screen from SearchResults, the Up navigation should return to SearchResults screen and not its actual parent.

Not only is this behavior intuitive, it is a commonly accepted UX paradigm on the platform.

See merge request !147
2015-10-04 00:23:56 +00:00
Peter Serwylo
0164adc386 Don't depend on Content-Length headers to download (Fixes #430)
Instead, keep downloading until the `InputStream` returns -1.

Also, required updates to the UI so that when the download size is
not known, there is still a reasonable response to the user.

Note that this still fails when using the Android download manager
if the download attempts to get resumed, and the server did not
send a Connection: close, Content-Length, or Transfer-Encoding: Chunked
header.
2015-10-04 11:21:38 +11:00
Daniel Martí
f2b1583239 Bump to 0.97-alpha4 2015-10-02 17:34:42 -07:00
Daniel Martí
9bb0719a86 Update list of languages 2015-10-02 17:34:07 -07:00
F-Droid Translatebot
312d559e81 Pull translation updates from Weblate
Translators:

agilob                 Polish
Mário Castanheira      Portuguese
Mário Castanheira      Portuguese (Portugal)
Olexandr Nesterenko    Ukrainian
2015-10-02 17:33:30 -07:00
Daniel Martí
ef23e36ef1 Remove obsolete commented activities from AM.xml
They vanished long ago, no need to keep them in the manifest.
2015-10-02 16:58:38 -07:00
Daniel Martí
eea66e390b Make some fields final as suggested by AS
Most of these are fields initialized statically or in the constructor.
2015-10-02 16:41:08 -07:00
Daniel Martí
ebb991d1c6 Remove unused/unwanted empty default_repo trans 2015-10-02 16:35:50 -07:00
Daniel Martí
8d87031f81 Remove some more unused resources 2015-10-02 16:32:15 -07:00
Daniel Martí
2509f6f869 Remove all duplicated drawables form drawable/
These already have density-specific versions in drawable-*/, so having a
fallback in drawable/ makes no sense.
2015-10-02 16:30:32 -07:00
Daniel Martí
fd48b504c8 Be consistent with log tags
They are private and just the class name everywhere else.
2015-10-02 16:18:38 -07:00
Daniel Martí
34ac244fdf Optimize imports 2015-10-02 16:16:30 -07:00
Daniel Martí
fc50fea18c Merge branch 'materialize-repository-details' into 'master'
Materialize repository details

Modernize the look of repo details. Enabled repo before and after:

![1a](https://gitlab.com/relan/fdroidclient/uploads/c3e7906508763081fcde5d0ebd1d7b7b/1a.png)
![1b](https://gitlab.com/relan/fdroidclient/uploads/6be4bd19cd375abf8df1f403464dfca0/1b.png)

Disabled repo before and after:

![2a](https://gitlab.com/relan/fdroidclient/uploads/6ff39317b598c3da3a814e60f74e75cb/2a.png)
![2b](https://gitlab.com/relan/fdroidclient/uploads/5354ec4c56dd3dc0958d7f002543ee9b/2b.png)


See merge request !148
2015-10-02 19:18:30 +00:00
Jeff Mixon
1daae076ec Return to SearchResults on "Up" navigation from AppDetails
When arriving to the AppDetails screen from SearchResults, the Up navigation should return to SearchResults screen and not its actual parent.
2015-10-02 11:39:16 +02:00
F-Droid Translatebot
3235ddd120 Pull translation updates from Weblate
Translators:

agilob                 Polish
Ajeje Brazorf          Sardinian
Enol Puente            Asturian
Full Name              Slovak
Lu Ca                  Sardinian
Marcelo Santana        Portuguese (Brazil)
Olexandr Nesterenko    Ukrainian
2015-10-01 20:07:53 -07:00
Daniel Martí
e87d4ac1e8 Rework README/CONTRIBUTING docs 2015-10-01 20:02:02 -07:00
Daniel Martí
c8f495ec16 Move wait-for-emulator out of F-Droid subdir
It doesn't specifically apply only to the client.
2015-10-01 19:50:37 -07:00
relan
b3ae79e5c2 Correct the fingerprint caption
Do not use the word "repo" in captions because all the info in the
activity is about a repository.
2015-10-01 17:49:31 +03:00
relan
f9feab57cc Use monospace font for repository fingerprint
Bytes look better when they are properly aligned.
2015-10-01 17:47:05 +03:00
relan
2cc6661979 Make repository details look more Material
See http://www.google.com/design/spec/style/typography.html

Remove useless attributes; add styles with proper paddings, size and color
for caption and body text. Unfortunately, line spacing attributes are
supported only since Jelly Bean.
2015-10-01 17:38:20 +03:00
relan
4b2089b790 Use primary text color for key fingerprint
No need to grey it out.
2015-10-01 07:26:58 +03:00
relan
6f6bd44a38 Use static title for repository details activity
Repository name is usually too long to fit into the title. Besides, it's
also shown in the activity, no need to duplicate it.
2015-10-01 07:26:58 +03:00
relan
77f0dbb65a Correct the message about disabled repo
Explain that repository should be enabled.
2015-10-01 07:26:58 +03:00
relan
f5906f320f Remove update button
It's confusing because it does not update the repo details view.
2015-10-01 07:26:58 +03:00
relan
dbd69444f1 Set side paddings in LinearLayout, not in ScrollView
This fixes scrollbar position.
2015-10-01 07:26:58 +03:00
relan
4ecb253c80 Remove useless RelativeLayout 2015-10-01 07:26:58 +03:00
relan
fe3a739fe3 Fix up indentation in repodetails.xml 2015-10-01 07:26:58 +03:00
Daniel Martí
998d99eee0 Be consistent about strings being capitalized
These strings aren't completely wrong being all lowercase, but better be
consistent.
2015-09-30 13:45:03 -07:00
Daniel Martí
be1b68153f Don't use emoticons in strings 2015-09-30 13:40:52 -07:00
Daniel Martí
ae6f71f482 Apply string changes from !145 to new translations 2015-09-30 13:26:48 -07:00
F-Droid Translatebot
03e98dbb10 Pull translation updates from Weblate
Translators:

agilob          Polish
Daniel Martí    Catalan
2015-09-30 13:21:18 -07:00
Daniel Martí
e856a9be3b Don't end setting summaries with periods 2015-09-30 13:20:35 -07:00
Daniel Martí
c57c73ec92 Update changelog 2015-09-30 11:50:33 -07:00
Daniel Martí
8f6af2be55 Merge branch 'improve-privileged' of https://gitlab.com/dschuermann/fdroidclient 2015-09-30 11:40:58 -07:00
Daniel Martí
d77fce9d80 Don't use DownloadManager on Android 2.3
Fixes apk downloads crashing on 2.3 devices as spotted in the comments at
issue #421.
2015-09-30 11:29:04 -07:00
Dominik Schürmann
6de7d9f3f0 proper const naming 2015-09-30 07:41:32 +02:00
Dominik Schürmann
3c9df2fc74 Improve constants 2015-09-30 07:41:32 +02:00
Dominik Schürmann
f27823adc8 sleep before folder removal 2015-09-30 07:41:32 +02:00
Dominik Schürmann
178eabfd01 Fix nullpointer 2015-09-30 07:41:32 +02:00
Dominik Schürmann
8f5a1850e9 Fix permissions check 2015-09-30 07:41:32 +02:00
Dominik Schürmann
2b0f2cfc67 Better error handling 2015-09-30 07:41:32 +02:00
Dominik Schürmann
50215356ae Privileged Install: improve strings, fix uninstall 2015-09-30 07:41:27 +02:00
Daniel Martí
9b3ede7a81 Get rid of all newly added Log.d calls
Some were wrapped in BuildConfig.DEBUG, some weren't. Move all of them to
debugLog.

The ones that require building complex strings are left with an explicit
BuildConfig.DEBUG if so that the strings aren't constructed.
2015-09-29 22:28:38 -07:00
Daniel Martí
12f98a64e4 Update changelog 2015-09-29 22:12:44 -07:00
Daniel Martí
80e9ff9994 Get rid of some elses after return/continue 2015-09-29 22:07:31 -07:00
Daniel Martí
12386570ff Remove unnecessary extra getter calls
These are especially to be avoided since they require casting, which means
really long lines everywhere.
2015-09-29 22:06:45 -07:00
Daniel Martí
07f528352a Simplify some more boolean inversions 2015-09-29 22:03:26 -07:00
Daniel Martí
d1d81d85fa RepoXMLHandler: tag handling simplification
* Don't have both curel and localName
* Check for empty content only once
* Don't convert curchars (StringBuilder) to String and trim unless necessary
2015-09-29 21:56:14 -07:00
Daniel Martí
c06c115f4d Pull translation updates from Weblate
Translators:

agilob               Polish
AtomiKe              French
Enol Puente          Asturian
Green Lunar          Hebrew
Lu Ca                Sardinian
Marcelo Santana      Portuguese (Brazil)
naofum               Japanese
Phạm Nguyễn Hoàng    Esperanto
Phạm Nguyễn Hoàng    Vietnamese
raspbiak             Slovak
2015-09-29 21:30:30 -07:00
relan
d535d9c6ae Use affirmative action in the "Delete repository?" dialog
"Delete" instead of "OK" more clearly indicates the outcome.
See http://www.google.com/design/spec/components/dialogs.html
2015-09-27 11:41:59 +03:00
relan
5046213f3c Make repositories list look more Material
See http://www.google.com/design/spec/components/lists.html
2015-09-27 11:41:59 +03:00
relan
3434d71569 Split "unsigned" and "unverified"
Since now we don't have problems with list item height, we can use two
different text labels for unsigned and unverified repositories
indication. Code now only switches visibility for them.
2015-09-27 11:41:59 +03:00
relan
38a19c305d Remove unused strings 2015-09-27 11:41:59 +03:00
relan
5f06910cf9 Remove last update header
This is technical detail that should not be exposed to users, at least
not before repositories list which are the main data in the activity.
Last update label didn't work properly anyway: it was not updated on
repositories refresh, just on activity creation.
2015-09-27 11:41:41 +03:00
relan
8b15fb4cb1 Define repo_item layout in XML instead of run time 2015-09-27 09:56:13 +03:00
relan
d3f7e9555e Fix repo_item layout parameters resolution
See http://www.doubleencore.com/2013/05/layout-inflation-as-intended
2015-09-27 09:56:13 +03:00
relan
c18900c242 Remove unused ImageView from repo_item 2015-09-27 09:56:13 +03:00
Daniel Martí
2d75c57a20 Update changelog 2015-09-25 22:09:53 -07:00
Daniel Martí
6d579368af Start using gradle-witness
Fixes #429.
2015-09-25 22:00:24 -07:00
Daniel Martí
c0fc70c7c0 Make all donation methods strings translatable
F-Droid itself (the app name) can be translated, so these fall under the same
category.
2015-09-25 10:12:17 -07:00
F-Droid Translatebot
24ffbb2d6d Pull translation updates from Weblate
Translators:

AtomiKe             French
Enol Puente         Asturian
Lu Ca               Sardinian
Mladen Pejaković    Serbian
naofum              Japanese
raspbiak            Slovak
2015-09-25 10:06:18 -07:00
Daniel Martí
3b3fb93990 Forgot to remove dogecoin layout/string
Follow-up to 735ac0eb3da.

Fixes #433.
2015-09-24 22:20:07 -07:00
Daniel Martí
960f3ca2c2 Update changelog with 0.96.1 release 2015-09-24 16:53:18 -07:00
Daniel Martí
f41015b793 Fix typo introduced in a82032d5d0d5a1 2015-09-24 16:30:10 -07:00
Daniel Martí
c0f69e2daa Optimize imports 2015-09-24 16:17:41 -07:00
Daniel Martí
f2ac130517 Install privileged: don't do sound/vibration
Only enable the light if it's a default. The vibration was causing issues
since we don't have the vibrate permission, and the sound is unnecessary.

Fixes #346.
2015-09-24 15:17:26 -07:00
Daniel Martí
7e02518394 pull-trans: fix adding new files
Using find means that we limit ourselves to existing files.
2015-09-23 22:53:31 -07:00
Daniel Martí
88d1645c4a Bump to 0.97-alpha3 2015-09-23 22:42:44 -07:00
F-Droid Translatebot
63c4ce5915 Pull translation updates from Weblate
Translators:

Enol Puente       Asturian
Kiril LastName    Bulgarian
Łukasz Cieśluk    Polish
Osoitz            Basque
2015-09-23 22:42:44 -07:00
Daniel Martí
5dd9842bdc UpdateService: contentIntent not necessary in 4.0
The workardound is necessary in <4.0, not <4.1. The "contentintent == null"
check is gone in the 4.0.1 source tree.
2015-09-23 22:35:21 -07:00
Toby Kurien
2642c14cb7 Better handle download errors from DownloadManager
Rebased and squashed from !141.
2015-09-23 22:26:49 -07:00
Daniel Martí
6eddfb8b97 Avoid NPE in normalizeUrl
Found it when trying to add a repo manually:

E/AndroidRuntime(30549): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.replaceAll(java.lang.String, java.lang.String)' on a null object reference
E/AndroidRuntime(30549):        at org.fdroid.fdroid.views.ManageReposActivity$AddRepo.normalizeUrl(ManageReposActivity.java:547)
E/AndroidRuntime(30549):        at org.fdroid.fdroid.views.ManageReposActivity$AddRepo.validateRepoDetails(ManageReposActivity.java:358)
E/AndroidRuntime(30549):        at org.fdroid.fdroid.views.ManageReposActivity$AddRepo.access$700(ManageReposActivity.java:218)
E/AndroidRuntime(30549):        at org.fdroid.fdroid.views.ManageReposActivity$AddRepo$4.afterTextChanged(ManageReposActivity.java:342)
E/AndroidRuntime(30549):        at android.widget.TextView.sendAfterTextChanged(TextView.java:7698)
2015-09-23 22:17:23 -07:00
Daniel Martí
55f467e8ba Update build status badge to new CI url 2015-09-22 21:46:43 -07:00
Daniel Martí
d90edde68a langs-list-check: ignore symlinks, update list 2015-09-19 16:28:19 -07:00
Daniel Martí
dd96b8b9f9 Use a symlink to support old language codes
Fixes #139. For now only Hebrew is present.
2015-09-19 16:25:11 -07:00
F-Droid Translatebot
03e731a836 Pull translation updates from Weblate
Translators:

Enol Puente         Asturian
Green Lunar         Hebrew
Mladen Pejaković    Serbian
naofum              Japanese
riotism             Chinese (Hong Kong)
2015-09-19 16:21:08 -07:00
Daniel Martí
735ac0eb3d Remove Dogecoin donation support
Analogous to the server commit that removes it on its side. If an index
includes it, we will fail silently since unrecognised tags are ignored.

SQLite doesn't allow deleting columns, so don't do a DB version bump to try to
remove it. It will be gone on new installs, and it doesn't keep current
installs from working. Tested both cases.
2015-09-18 19:14:09 -07:00
Daniel Martí
f65dcdd66f AppDetails: Simplify link list logic 2015-09-18 18:50:57 -07:00
Daniel Martí
4eea995c89 Trim newlines from the description in a safer way
This avoids problems in a few corner cases:

* The description is empty (it would probably throw an exception)
* The description doens't end in newlines (as seen in #422)

For the general case that was already working, the result is the same.
2015-09-18 18:36:39 -07:00
Daniel Martí
a1fb4636d2 Simplify view_all_description logic
* Use a positive if condition
* Invert bool in one place
2015-09-18 18:35:27 -07:00
Daniel Martí
b54ae7ba25 CI: Remove 4.4 emulator, still too flaky 2015-09-17 22:26:40 -07:00
Daniel Martí
9483f2ce8e Remove empty Gujarati (gu) translation 2015-09-17 21:27:05 -07:00
Daniel Martí
e0897cce2e Remove empty versions of array.xml
Translations are in strings.xml, so these files are useless. They won't be
updated by weblate either.
2015-09-17 21:26:18 -07:00
Daniel Martí
6853f9a306 pull-trans: use team@ instead of admin@, typo fix 2015-09-17 19:37:42 -07:00
F-Droid Translatebot
c9448b1781 Pull translation updates from weblate
Translators:

Green Lunar           Hebrew
Kiril LastName        Bulgarian
Laura Arjona Reina    Spanish
Lu Ca                 Sardinian
Marc Ringel           German
Mladen Pejaković      Serbian
Pablo                 Spanish
relan                 Russian
riotism               Chinese (Hong Kong)
2015-09-17 19:30:32 -07:00
Daniel Martí
7440cf1b74 Add script to pull+squash from weblate. Fixes #140 2015-09-17 19:28:42 -07:00
Hans-Christoph Steiner
4fb173e364 Merge branch 'small-swap-fixes' into 'master'
Small swap fixes

These are a few fixes I found while debugging the new swap stuff.  The `repo.fingerprint` commit is quite important since that is the code that provides the core of FDroid's security model.

See merge request !142
2015-09-16 17:53:42 +00:00
relan
8cf3dd39f9 Translated using Weblate (Russian)
Currently translated at 66.4% (200 of 301 strings)
2015-09-16 17:29:02 +02:00
Kiril LastName
1114af11ea Translated using Weblate (Bulgarian)
Currently translated at 83.0% (250 of 301 strings)
2015-09-16 17:29:01 +02:00
Enol Puente
4cebbbd8a7 Translated using Weblate (Asturian)
Currently translated at 97.3% (293 of 301 strings)
2015-09-16 17:29:01 +02:00
Hans-Christoph Steiner
c8b64281c2 sync up logcat tags with the class names 2015-09-16 13:00:32 +02:00
Hans-Christoph Steiner
d37b473e10 temporary workaround to NPE crash on first install
The solution is really to get rid of the Fragment and do everything in the
Activity, especially since this nullguard will probably leave things in a
not good state.  But that's better than a crash, I think.

W  java.lang.NullPointerException
W      at org.fdroid.fdroid.views.fragments.AvailableAppsFragment$CategoryObserver.onChange(AvailableAppsFragment.java:88)
W      at org.fdroid.fdroid.views.fragments.AvailableAppsFragment$CategoryObserver.onChange(AvailableAppsFragment.java:103)
W      at android.database.ContentObserver.dispatchChange(ContentObserver.java:163)
W      at android.database.ContentObserver$Transport.onChange(ContentObserver.java:195)
W      at android.database.IContentObserver$Stub.onTransact(IContentObserver.java:60)
W      at android.os.Binder.execTransact(Binder.java:404)
W      at dalvik.system.NativeStart.run(Native Method)
2015-09-16 13:00:32 +02:00
Hans-Christoph Steiner
69b210a4b8 fix swap to follow repo.fingerprint logic: null means unset
The repo.fingerprint logic is based on null meaning that the fingerprint
has not been set.  This ensures that a "" does not sneak in somehow as a
valid fingerprint.
2015-09-16 13:00:32 +02:00
Hans-Christoph Steiner
03d074a0e8 always use Locale.ENGLISH for formatting Strings for the machine
For Strings that are meant to be displayed to humans, using the default
Locale makes sense.  But this String is meant to be parsed by code, so it
should force the Locale to make sure the digits are always rendered in the
same format.
2015-09-16 12:48:33 +02:00
Hans-Christoph Steiner
003f5331fa revert to previous, proven index.xml writing
It was added in c831cf77ccf9ecfa792d0ffdc84f272053fa945a and changed in
42d31eb0e6e5d5c9e7fe9c35435a56258ad90578
2015-09-16 12:48:33 +02:00
Pablo
ce2fa5cf80 Translated using Weblate (Spanish)
Currently translated at 99.0% (298 of 301 strings)
2015-09-16 00:19:11 +02:00
relan
fe50205eca Translated using Weblate (Russian)
Currently translated at 65.7% (198 of 301 strings)
2015-09-16 00:19:11 +02:00
Thomas Lü
b625fa4fca Translated using Weblate (German)
Currently translated at 71.0% (214 of 301 strings)
2015-09-16 00:19:11 +02:00
Kiril LastName
6a01145ab8 Translated using Weblate (Bulgarian)
Currently translated at 81.3% (245 of 301 strings)
2015-09-16 00:19:11 +02:00
Marcelo Santana
ada640c5f2 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (301 of 301 strings)
2015-09-15 13:50:59 +02:00
Sebastian Oliva
3d72425874 Translated using Weblate (Spanish)
Currently translated at 99.0% (298 of 301 strings)
2015-09-15 07:35:34 +02:00
Daniel Martí
cdfe1566fa Give more context on some strings, split installed
As per !140, some languages require different translations for an app being
installed and the tab name for installed apps. Namely, one is plural while the
other isn't. Separate the two.
2015-09-14 15:00:14 -07:00
agilob
46ebd0f276 Translated using Weblate (Polish)
Currently translated at 100.0% (300 of 300 strings)
2015-09-14 23:52:05 +02:00
Robert Martinez
df2adf8d06 Translated using Weblate (German)
Currently translated at 65.3% (196 of 300 strings)
2015-09-14 23:52:05 +02:00
Antoine Bolvy
ab891463f7 Translated using Weblate (French)
Currently translated at 53.6% (161 of 300 strings)
2015-09-14 23:52:05 +02:00
Kiril LastName
8d403866ed Translated using Weblate (Bulgarian)
Currently translated at 61.0% (183 of 300 strings)
2015-09-14 23:52:05 +02:00
Osoitz
2e96a22d3d Translated using Weblate (Basque)
Currently translated at 40.6% (122 of 300 strings)
2015-09-14 23:52:05 +02:00
agilob
98d2a1219b Translated using Weblate (Polish)
Currently translated at 100.0% (300 of 300 strings)
2015-09-14 23:52:05 +02:00
Daniel Martí
5de0673df5 CONTRIBUTING: Android style, not Google's 2015-09-14 14:31:23 -07:00
Daniel Martí
b9aca242fd README: Mention that CI runs the tests 2015-09-14 14:31:10 -07:00
Daniel Martí
1c362beafb README: explain why translation MRs aren't okay 2015-09-14 14:30:27 -07:00
Daniel Martí
9aef0aad42 Merge remote-tracking branch 'upstream/unstableUpdates' 2015-09-14 10:18:19 -07:00
Alex Moonshine
6036b87a2a Translated using Weblate (Ukrainian)
Currently translated at 19.1% (57 of 298 strings)
2015-09-14 19:14:47 +02:00
Pablo
46f5d7b9cd Translated using Weblate (Spanish)
Currently translated at 98.6% (294 of 298 strings)

Missing context
2015-09-14 19:14:47 +02:00
Marcelo Santana
7e5fa235e2 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (298 of 298 strings)
2015-09-14 19:14:46 +02:00
Daniel Martí
57ae045d05 Translated using Weblate (French)
Currently translated at 53.6% (160 of 298 strings)
2015-09-14 19:14:46 +02:00
David Koňařík
2ef61b1c17 Translated using Weblate (Czech)
Currently translated at 59.3% (177 of 298 strings)
2015-09-14 19:14:46 +02:00
Daniel Martí
3109dff3c2 Translated using Weblate (Catalan)
Currently translated at 68.1% (203 of 298 strings)
2015-09-14 19:14:46 +02:00
Nico Alt
ab2c1d49b6 Prompt for unstable updates globally 2015-09-14 18:58:52 +02:00
Pablo
5d768188bc Translated using Weblate (Spanish)
Currently translated at 97.9% (292 of 298 strings)
2015-09-14 16:31:54 +02:00
Laura Arjona Reina
e4c2589e07 Translated using Weblate (Spanish)
Currently translated at 76.1% (227 of 298 strings)
2015-09-14 16:06:18 +02:00
Marcelo Santana
1d0df6b5f0 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (298 of 298 strings)
2015-09-14 13:29:43 +02:00
Daniel Martí
a6bf0f4b7f Translated using Weblate (Spanish)
Currently translated at 60.7% (181 of 298 strings)
2015-09-14 12:43:34 +02:00
Laura Arjona Reina
11095cf8c9 Translated using Weblate (Spanish)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2015-09-14 12:42:48 +02:00
naofum
e34492a204 Translated using Weblate (Japanese)
Currently translated at 100.0% (298 of 298 strings)
2015-09-14 10:04:35 +02:00
Marcelo Santana
b44529586b Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (298 of 298 strings)
2015-09-14 07:59:19 +02:00
Daniel Martí
85b8c9a0c2 Improve some strings as per #415 2015-09-13 22:57:54 -07:00
Daniel Martí
38075ae36d Get rid of the last all caps strings. #415
If we really, really need all caps strings, do it in xml/java. Don't make
translators use all caps.
2015-09-13 16:43:44 -07:00
Daniel Martí
eb4782c50b Remove duplicate scan_qr string. #415
The other one isn't capitalized, but we shouldn't expect translators to have
to use all caps anyway.
2015-09-13 16:42:29 -07:00
Daniel Martí
d2f41cd571 remove-unused-trans: no need to handle arrays.xml 2015-09-13 16:41:58 -07:00
Daniel Martí
b78ad7ea4f Translated using Weblate (Catalan)
Currently translated at 67.8% (203 of 299 strings)
2015-09-14 01:28:19 +02:00
agilob
c00daa2462 Translated using Weblate (Polish)
Currently translated at 100.0% (1 of 1 strings)
2015-09-13 21:08:06 +02:00
Marcelo Santana
6942428b25 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (300 of 300 strings)
2015-09-13 21:08:06 +02:00
agilob
bc9760b1eb Translated using Weblate (Polish)
Currently translated at 100.0% (299 of 299 strings)
2015-09-13 21:08:06 +02:00
Green Lunar
55d23298e0 Translated using Weblate (Hebrew)
Currently translated at 90.3% (270 of 299 strings)
2015-09-13 21:08:06 +02:00
Sylvie
f91e4ac73f Translated using Weblate (Dutch)
Currently translated at 95.3% (286 of 300 strings)
2015-09-13 21:08:06 +02:00
Marcelo Santana
375e47818c Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (300 of 300 strings)
2015-09-13 21:08:05 +02:00
agilob
22b5088f0b Translated using Weblate (Polish)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2015-09-13 21:08:05 +02:00
agilob
1f101f4155 Translated using Weblate (Polish)
Currently translated at 100.0% (299 of 299 strings)
2015-09-13 21:08:05 +02:00
naofum
91d7c46e83 Translated using Weblate (Japanese)
Currently translated at 100.0% (300 of 300 strings)
2015-09-13 21:08:05 +02:00
Daniel Martí
42ab9a757c Utils: remove unused code 2015-09-13 11:33:07 -07:00
Green Lunar
0b467f736f Translated using Weblate (Hebrew)
Currently translated at 90.6% (271 of 299 strings)
2015-09-13 08:27:10 +02:00
Daniel Martí
dd8a3440d6 Rework about dialog
* Don't have website link twice
* Add source code link
* Don't have trailing spaces in strings
2015-09-12 23:26:14 -07:00
Daniel Martí
6c81216bc2 Add Utils.getVersionName(Context) 2015-09-12 22:38:52 -07:00
Daniel Martí
7f23cc9d51 Apply langs-list-check fixes 2015-09-12 22:08:14 -07:00
Daniel Martí
c750514919 Improve and rename langs array script 2015-09-12 22:08:05 -07:00
Daniel Martí
2d3aab24b6 Remove broken change-package-name
With the three privileged packages, this needs rewriting from scratch.
Besides, the script is messy anyway.
2015-09-12 21:59:59 -07:00
Daniel Martí
fdf4655068 Remove obsolete translation cleanup scripts 2015-09-12 21:51:49 -07:00
Daniel Martí
63e83c3b21 Remove all remaining unused strings
If they are ever useful again, they can be brought back with their
translations. Reasons to not keep them around:

* Most will not be used ever again
* Most languages don't have all of them yet
* Translators doing new languages would waste their time

Kept the local repo https ones since the setting was just temporarily
removed.
2015-09-12 21:43:51 -07:00
Daniel Martí
f8bb714d25 Fix string resource name typo 2015-09-12 21:35:07 -07:00
Daniel Martí
1aa454013c Translated using Weblate (Catalan)
Currently translated at 63.3% (202 of 319 strings)
2015-09-13 04:41:28 +02:00
naofum
95eb48f303 Translated using Weblate (Japanese)
Currently translated at 93.8% (303 of 323 strings)
2015-09-13 04:41:27 +02:00
Marcelo Santana
3109340bdc Translated using Weblate (Portuguese (Brazil))
Currently translated at 82.9% (277 of 334 strings)
2015-09-13 04:41:27 +02:00
naofum
b056d31110 Translated using Weblate (Japanese)
Currently translated at 100.0% (334 of 334 strings)
2015-09-13 04:41:27 +02:00
Daniel Martí
47ea7267ed Don't have spaces at the end of strings 2015-09-12 19:39:13 -07:00
Daniel Martí
100ba7088b Remove more unused old strings 2015-09-12 19:28:04 -07:00
Daniel Martí
cee71a2cc4 Merge remote-tracking branch 'weblate/master' 2015-09-12 19:19:33 -07:00
Marcelo Santana
23ee10fbc8 Translated using Weblate (Portuguese (Brazil))
Currently translated at 81.1% (271 of 334 strings)
2015-09-13 04:14:26 +02:00
naofum
1d4c9bef5e Translated using Weblate (Japanese)
Currently translated at 100.0% (334 of 334 strings)
2015-09-13 04:14:25 +02:00
Daniel Martí
272a614ce4 Remove some more old strings 2015-09-12 19:14:15 -07:00
Daniel Martí
7e03c3d81a Update translatable categories 2015-09-12 19:14:15 -07:00
naofum
4911e012e8 Translated using Weblate (Japanese)
Currently translated at 100.0% (334 of 334 strings)
2015-09-13 04:06:54 +02:00
Daniel Martí
7832732a25 Remove some unused strings, most very old 2015-09-12 19:01:28 -07:00
Daniel Martí
0ebcec416f Remove unused swap_success drawable 2015-09-12 19:01:13 -07:00
Daniel Martí
393694eab8 Some strings don't need all caps 2015-09-12 18:49:10 -07:00
Daniel Martí
0537e24a82 Be consistent about capitalized strings. #415 2015-09-12 18:41:25 -07:00
Daniel Martí
852d88de84 Toast strings are full sentences. #415 2015-09-12 18:38:20 -07:00
Weblate
0ceb93da7a Merge remote-tracking branch 'origin/master' 2015-09-13 03:29:19 +02:00
Lu Ca
5e1329fbd4 Translated using Weblate (Sardinian)
Currently translated at 75.7% (253 of 334 strings)
2015-09-13 03:29:19 +02:00
Marcelo Santana
9db4bcd24e Translated using Weblate (Portuguese (Brazil))
Currently translated at 74.5% (249 of 334 strings)
2015-09-13 03:29:19 +02:00
agilob
b640108c7e Translated using Weblate (Polish)
Currently translated at 82.0% (274 of 334 strings)

some polish translations
2015-09-13 03:29:19 +02:00
naofum
8b7346aa37 Translated using Weblate (Japanese)
Currently translated at 82.9% (277 of 334 strings)
2015-09-13 03:29:18 +02:00
Daniel Martí
e8a0b151fb Be consistent about "Wi-Fi". #415 2015-09-12 18:28:51 -07:00
agilob
74bb9f7f44 Translated using Weblate (Polish)
Currently translated at 82.0% (274 of 334 strings)

pozwoleń? przywilejów?
2015-09-13 02:07:09 +02:00
agilob
9854d971b6 Translated using Weblate (Polish)
Currently translated at 69.4% (232 of 334 strings)
2015-09-13 01:32:44 +02:00
Lu Ca
44be338c3d Translated using Weblate (Sardinian)
Currently translated at 70.6% (236 of 334 strings)
2015-09-13 00:59:20 +02:00
Daniel Martí
a31d2d3188 Bump to 0.97-alpha2 2015-09-12 15:53:01 -07:00
Daniel Martí
27420f6c01 Update changelog 2015-09-12 15:52:55 -07:00
Lu Ca
3b7e031d76 Translated using Weblate (Sardinian)
Currently translated at 70.3% (235 of 334 strings)
2015-09-13 00:48:47 +02:00
Lu Ca
e49bd8b300 Translated using Weblate (Sardinian)
Currently translated at 70.0% (234 of 334 strings)
2015-09-13 00:48:47 +02:00
Sylvie
a7d1aafecd Translated using Weblate (Dutch)
Currently translated at 79.3% (265 of 334 strings)
2015-09-13 00:48:47 +02:00
Sylvie
c7bdf6816b Translated using Weblate (Dutch)
Currently translated at 79.0% (264 of 334 strings)
2015-09-13 00:48:47 +02:00
Sylvie
dd14c8e86d Translated using Weblate (Dutch)
Currently translated at 78.9% (263 of 333 strings)
2015-09-13 00:48:47 +02:00
Daniel Martí
873910400d Merge branch 'fix-405--swap-feedback-speed' of https://gitlab.com/pserwylo/fdroidclient 2015-09-12 15:42:45 -07:00
Peter Serwylo
198cc7357c Update UI in response to WiFi enabling, not Bonjour discovery enabling.
The Bonjour stuff takes a while to start, and isn't strictly neccesary
in order to swap over WiFi. Rather, it is more of a convenience. Also,
it was causing the UI to appear to lag quite a lot. This way, the WiFi
swap gets setup almost instantly, and is available to swap - therefore
the UI seems much more responsive.
2015-09-13 08:26:33 +10:00
Peter Serwylo
90ede44790 Check for null netmask variable to prevent NPE.
Not sure if this is the correct course of action to prevent the problem,
but it prevents the crash documented in Issue #413.
2015-09-13 08:26:33 +10:00
Peter Serwylo
828cc272ee Only start Bluetooth in UI thread, WiFi needs background.
While we're at it, use `Thread`s rather than `AsyncTask`s because
they are more concise. Not 100% sure, but I think `AsyncTask`s
need to wait for the UI event loop to get to them in order kick off.
2015-09-13 08:26:33 +10:00
Peter Serwylo
4bb2a0e0d0 Added massive amounts of logging to pin down problem.
Trying to pin down why the UI takes one or two seconds to catch up
after performing the "Enable WiFi" toggle. This is best done via
logging rather than using the debugger.

Also changed to Utils.DebugLog instead of Log.d, and removed some
comments and fixed a typo in one comment.
2015-09-13 08:26:28 +10:00
Daniel Martí
4bd8210ef1 Remove values-zh. See #139. 2015-09-12 15:23:08 -07:00
Daniel Martí
cf0ab74870 Allow app_name to be translated. Fixes #203. 2015-09-12 15:19:46 -07:00
Sylvie
9e410662ea Translated using Weblate (Dutch)
Currently translated at 75.6% (252 of 333 strings)
2015-09-13 00:09:02 +02:00
Sylvie
d32680a14f Translated using Weblate (Dutch)
Currently translated at 76.8% (249 of 324 strings)
2015-09-13 00:09:02 +02:00
Daniel Martí
78e8341206 Replace string array items with strings
Fixes #206. Two other small fixes too:

* Units don't really translate, and they are appended to java strings anyway.
  If it is to be translated, do a proper formatted string.
* Placed the light theme above the dark one, since it's the default.
2015-09-12 15:02:46 -07:00
Daniel Martí
f2107219c2 Cleanup after Hebrew import 2015-09-12 14:48:29 -07:00
Daniel Martí
fe8635667c Include cleaned up translations from #392
Thanks to @GreenLunar
2015-09-12 14:28:06 -07:00
Daniel Martí
75d8abcf55 String arrays don't belong in strings.xml 2015-09-12 14:25:41 -07:00
Daniel Martí
4c680ca7f3 README: Update translation instructions 2015-09-12 14:09:28 -07:00
Daniel Martí
4407926ae8 Add Weblate translation badge 2015-09-12 14:06:46 -07:00
Daniel Martí
cb79503f5f Merge remote-tracking branch 'weblate/master' 2015-09-12 14:03:09 -07:00
naofum
3203bd99d2 Translated using Weblate (Japanese)
Currently translated at 85.1% (276 of 324 strings)
2015-09-12 21:41:28 +02:00
Michal Čihař
160865cd86 Translated using Weblate (Czech)
Currently translated at 58.9% (191 of 324 strings)
2015-09-12 21:41:28 +02:00
F-Droid Translatebot
089dcecf1c Translation updates 2015-09-12 19:41:19 +00:00
Daniel Martí
de44771755 Exception logging improvements
* On error logs, always print the stack trace
* Log full stack traces instead of just exception names or messages
* Never use printStackTrace
2015-09-11 17:43:59 -07:00
Daniel Martí
c0a13ad65f Some Java 1.7 string switch goodness 2015-09-11 17:30:58 -07:00
Daniel Martí
a2c8c4678e Remove duplicate debug log
D/AvailableAppsFragment(18359): Selected category: Reading
D/AvailableAppsFragment(18359): Category 'Reading' selected.
D/AvailableAppsFragment(18359): Selected category: What's New
D/AvailableAppsFragment(18359): Category 'What's New' selected.
2015-09-11 17:17:37 -07:00
Daniel Martí
be87a31b84 Apply some PMD fixes 2015-09-11 17:00:24 -07:00
Daniel Martí
90822e9258 Utils: don't capitalize method names 2015-09-11 16:43:03 -07:00
Daniel Martí
132eeda4a0 Fix small variable mistake in RepoDetailsActivity
qrUriString was supposed to be used. Moreover, it does look like execute()
must be called with an upper case string. Caught since qrUriString is an
unused variable.
2015-09-11 15:48:55 -07:00
Daniel Martí
b4e23c2cbc Make most fields in AsyncDownloader final 2015-09-11 15:48:21 -07:00
Daniel Martí
0c9c93e493 Fix some javadoc warnings 2015-09-11 15:47:38 -07:00
Daniel Martí
9cbefca4bb Code cleanup via AS 2015-09-11 15:34:05 -07:00
Daniel Martí
0f8c310c8d Optimize imports via AS 2015-09-11 15:32:22 -07:00
Daniel Martí
110a004d59 AppDetalis: Avoid division by zero crash 2015-09-11 15:26:56 -07:00
Toby Kurien
6d6d9bc7cd Follow download progress in AppDetails
Added a new thread to update the AppDetails screen with the progress of the
download once per second.
2015-09-11 15:14:22 -07:00
Daniel Martí
860bc8ae97 Apply some checkstyle fixes 2015-09-11 14:45:19 -07:00
Daniel Martí
1dfe3d962f Hasher cleanup and simplification 2015-09-11 13:07:53 -07:00
Daniel Martí
27f212f3ec Use Writer, always close FileWriter exactly once 2015-09-11 13:07:53 -07:00
Daniel Martí
6793780d4f Beef up 4.4 emulator sleep to avoid errors 2015-09-10 19:24:10 -07:00
Daniel Martí
d415ceae15 Block formatting fixes 2015-09-10 19:04:18 -07:00
Daniel Martí
cba2e67a70 Cleanup after bluetooth-swap merge 2015-09-10 19:00:09 -07:00
Daniel Martí
42d31eb0e6 Fix build after bluetooth-swap merge 2015-09-10 18:56:47 -07:00
Daniel Martí
2159b3d49b Merge branch 'bluetooth-swap' of https://gitlab.com/n8fr8/fdroidclient 2015-09-10 18:52:52 -07:00
Daniel Martí
cc8b9bb41d Fix formatting error in WifiStateChangeService
It's %d, not %i.
2015-09-10 18:29:48 -07:00
Daniel Martí
35c5f063f1 CI: Get logcat output (W and above) on failure 2015-09-10 18:27:13 -07:00
n8fr8
6dec9fb928 remove unnecessary whitespace 2015-09-10 21:26:28 -04:00
n8fr8
884c8219fd put exception back into Log per this comment: https://gitlab.com/fdroid/fdroidclient/merge_requests/137 2015-09-10 21:26:28 -04:00
n8fr8
988f5dbfdc use TextUtils.isEmpty() - a better solution! 2015-09-10 21:26:28 -04:00
n8fr8
b6939dcce4 for #404 a few more tweaks to make sure things are getting closed! 2015-09-10 21:26:28 -04:00
n8fr8
b3f8ac0a5b related to #404 improvement to patterns to support close and discoverable
You must, must, must close the BT sockets else you run out of them.
This code tries to handle all the places where BT sockets may not get closed.
It also tries to tweak user experience/UI integration pieces in a few areas,
and handle some NPEs that can occur when BT fails.
2015-09-10 21:26:28 -04:00
n8fr8
0a96d17dd1 now handling empty repo fingerprint during check
- also support icondownloading over bluetooth
- also check for null repoUrl variable
2015-09-10 21:26:28 -04:00
n8fr8
c831cf77cc Many changes to swap workflow to get Bluetooth to work
- don't try to start BT in the background. you can only start/stop a BT server once, else new connections don't work
- be more mindful of reading/writing bytes from the input/output streams... make sure bytes are available, because you will block forever if you do not do that
- use the device class tag to filter devices in discovery instead of the fdroid name tag
- this now successfully connects but there is an error in the certificate fingerprint verification still
2015-09-10 21:26:28 -04:00
Daniel Martí
f05d0e12a0 Merge branch 'my-first-new-swap-fixes' into 'master'
My first new-swap fixes

I've been working on getting new-swap stable, these are my fixes so far.  The big one is fixing swap when proxy settings are enabled.  Comments in the commits.

See merge request !136
2015-09-11 00:50:48 +00:00
Daniel Martí
30ed545981 Bump accesspoint lib 2015-09-10 10:49:45 -07:00
Hans-Christoph Steiner
a69488b32f HttpDownloader bypasses proxy when accessing a swap repo
Proxying are basically always for internet access, and swap repos are by
definition only on the local network.  This adds a pretty strict check for
whether a given download URL is for a swap repo, and if so, the proxy
settings are ignored.

fixes https://dev.guardianproject.info/issues/3421
2015-09-10 18:42:36 +02:00
Hans-Christoph Steiner
1654443b00 StrictMode only works in android-9 and above 2015-09-10 18:42:36 +02:00
Hans-Christoph Steiner
0f44fcb8fd swap: remove useless text that used to be a link
It is not helpful to the user to tell them they can download from the web
when they are using swap, since a) they should use F-Droid since its safer,
and b) they are probably using swap because they can't access the web
reliably.
2015-09-10 18:42:36 +02:00
Hans-Christoph Steiner
8d20135779 swap: close resources reported by StrictMode
This required rebuilding the zipsigner.jar, since there was once issue to
be fixed in kellingwood.security.zipsigner.ZipSigner.

Here are the stacktraces:

            StrictMode  E  A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
                        E  java.lang.Throwable: Explicit termination method 'close' not called
                        E      at dalvik.system.CloseGuard.open(CloseGuard.java:184)
                        E      at java.io.FileOutputStream.<init>(FileOutputStream.java:90)
                        E      at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
                        E      at java.io.FileWriter.<init>(FileWriter.java:42)
                        E      at org.fdroid.fdroid.localrepo.LocalRepoManager.writeIndexJar(LocalRepoManager.java:488)
                        E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:698)
                        E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:645)
                        E      at android.os.AsyncTask$2.call(AsyncTask.java:288)
                        E      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                        E      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
                        E      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                        E      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                        E      at java.lang.Thread.run(Thread.java:841)
                        E  A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
                        E  java.lang.Throwable: Explicit termination method 'close' not called
                        E      at dalvik.system.CloseGuard.open(CloseGuard.java:184)
                        E      at java.io.RandomAccessFile.<init>(RandomAccessFile.java:128)
                        E      at kellinwood.zipio.ZipInput.<init>(ZipInput.java:57)
                        E      at kellinwood.zipio.ZipInput.read(ZipInput.java:75)
                        E      at kellinwood.security.zipsigner.ZipSigner.signZip(ZipSigner.java:646)
                        E      at org.fdroid.fdroid.localrepo.LocalRepoKeyStore.signZip(LocalRepoKeyStore.java:218)
                        E      at org.fdroid.fdroid.localrepo.LocalRepoManager.writeIndexJar(LocalRepoManager.java:515)
                        E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:698)
                        E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:645)
                        E      at android.os.AsyncTask$2.call(AsyncTask.java:288)
                        E      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                        E      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
                        E      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                        E      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                        E      at java.lang.Thread.run(Thread.java:841)
                        E  A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
                        E  java.lang.Throwable: Explicit termination method 'end' not called
                        E      at dalvik.system.CloseGuard.open(CloseGuard.java:184)
                        E      at java.util.zip.Inflater.<init>(Inflater.java:82)
                        E      at kellinwood.zipio.ZioEntry.getInputStream(ZioEntry.java:475)
                        E      at kellinwood.zipio.ZioEntry.getInputStream(ZioEntry.java:445)
                        E      at kellinwood.security.zipsigner.ZipSigner.addDigestsToManifest(ZipSigner.java:418)
                        E      at kellinwood.security.zipsigner.ZipSigner.signZip(ZipSigner.java:713)
                        E      at kellinwood.security.zipsigner.ZipSigner.signZip(ZipSigner.java:647)
                        E      at org.fdroid.fdroid.localrepo.LocalRepoKeyStore.signZip(LocalRepoKeyStore.java:218)
                        E      at org.fdroid.fdroid.localrepo.LocalRepoManager.writeIndexJar(LocalRepoManager.java:515)
                        E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:698)
                        E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:645)
                        E      at android.os.AsyncTask$2.call(AsyncTask.java:288)
                        E      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                        E      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
                        E      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                        E      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                        E      at java.lang.Thread.run(Thread.java:841)

StrictMode  E  A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
            E  java.lang.Throwable: Explicit termination method 'close' not called
            E      at dalvik.system.CloseGuard.open(CloseGuard.java:184)
            E      at java.io.FileOutputStream.<init>(FileOutputStream.java:90)
            E      at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
            E      at java.io.FileWriter.<init>(FileWriter.java:42)
            E      at org.fdroid.fdroid.localrepo.LocalRepoManager.writeIndexJar(LocalRepoManager.java:488)
            E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:698)
            E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:645)
            E      at android.os.AsyncTask$2.call(AsyncTask.java:288)
            E      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            E      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            E      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            E      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            E      at java.lang.Thread.run(Thread.java:841)
            E  A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
            E  java.lang.Throwable: Explicit termination method 'close' not called
            E      at dalvik.system.CloseGuard.open(CloseGuard.java:184)
            E      at java.io.RandomAccessFile.<init>(RandomAccessFile.java:128)
            E      at kellinwood.zipio.ZipInput.<init>(ZipInput.java:57)
            E      at kellinwood.zipio.ZipInput.read(ZipInput.java:75)
            E      at kellinwood.security.zipsigner.ZipSigner.signZip(ZipSigner.java:646)
            E      at org.fdroid.fdroid.localrepo.LocalRepoKeyStore.signZip(LocalRepoKeyStore.java:218)
            E      at org.fdroid.fdroid.localrepo.LocalRepoManager.writeIndexJar(LocalRepoManager.java:515)
            E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:698)
            E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:645)
            E      at android.os.AsyncTask$2.call(AsyncTask.java:288)
            E      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            E      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            E      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            E      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            E      at java.lang.Thread.run(Thread.java:841)
            E  A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
            E  java.lang.Throwable: Explicit termination method 'end' not called
            E      at dalvik.system.CloseGuard.open(CloseGuard.java:184)
            E      at java.util.zip.Inflater.<init>(Inflater.java:82)
            E      at kellinwood.zipio.ZioEntry.getInputStream(ZioEntry.java:475)
            E      at kellinwood.zipio.ZioEntry.getInputStream(ZioEntry.java:445)
            E      at kellinwood.security.zipsigner.ZipSigner.addDigestsToManifest(ZipSigner.java:418)
            E      at kellinwood.security.zipsigner.ZipSigner.signZip(ZipSigner.java:713)
            E      at kellinwood.security.zipsigner.ZipSigner.signZip(ZipSigner.java:647)
            E      at org.fdroid.fdroid.localrepo.LocalRepoKeyStore.signZip(LocalRepoKeyStore.java:218)
            E      at org.fdroid.fdroid.localrepo.LocalRepoManager.writeIndexJar(LocalRepoManager.java:515)
            E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:698)
            E      at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:645)
            E      at android.os.AsyncTask$2.call(AsyncTask.java:288)
            E      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            E      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            E      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            E      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            E      at java.lang.Thread.run(Thread.java:841)
2015-09-10 18:42:35 +02:00
Daniel Martí
2f06bf8b47 Merge branch 'ci-tests-4.4' 2015-09-09 22:29:51 -07:00
Daniel Martí
68899ec476 Privileged: reserve alpha1 for the first tag 2015-09-09 22:09:06 -07:00
Daniel Martí
3fe1893336 CI: 4.4 says it's ready before it actually is
Its boot animation is "stopped" but on my laptop the CPU is still at 100%,
which means it's probably still working and not ready yet. The tests fail if
you run them right after wait-for-emulator is done. If you wait a few seconds
though, they do work since the CPU load drops.

Until we can figure out a better solution, have a generous 30-second sleep
after it tells us it's ready.
2015-09-09 22:04:57 -07:00
Daniel Martí
5bb5e3a96b Fix conflict between swap and privileged merges
Also avoid possible NPE in the package name comparison.
2015-09-09 21:35:38 -07:00
Daniel Martí
faecbd03a0 Unify and deduplicate gitignores 2015-09-09 21:24:36 -07:00
Daniel Martí
2bb4ae6984 Bump buildToolsVersions after merge 2015-09-09 21:23:01 -07:00
Daniel Martí
ed5de47197 Merge branch 'enhanced-priv-install' of https://gitlab.com/dschuermann/fdroidclient 2015-09-09 21:21:06 -07:00
Daniel Martí
e3400006a9 CI: test adb before running connected checks 2015-09-09 21:16:09 -07:00
Daniel Martí
de4198efaf CI: Increase adb install timeouts
It sometimes fails with the default (2 minutes), especially on the 4.4
emulator. Increase to 8 minutes.
2015-09-09 18:57:03 -07:00
Daniel Martí
25b8a47371 README: some links support https 2015-09-09 18:32:56 -07:00
Daniel Martí
51ed0f9625 CI: Run tests on a 4.4 emulator too 2015-09-09 18:24:57 -07:00
Peter Serwylo
3f87462994 Updated changelog with downloadmanager details.
Used Toby's MR description because it was very concise.
2015-09-10 09:25:29 +10:00
Peter Serwylo
da8811eadf Merge branch 'cr-of-download-manager' into 'master'
Resumeable, simultaneous APK downloads in the background using Android's DownloadManager (post code-review)

This is the CR'ed version of !132, ready for merging. Created a MR instead of direct merging because of CI goodness. Will merge when CI passes. Thanks for your work Toby.

See merge request !133
2015-09-09 23:21:07 +00:00
Peter Serwylo
9848816df4 Fix bug introduced when resolving conflicts during rebase.
ApkDownloader now requires an `App` to be passed in.
2015-09-10 08:49:46 +10:00
Daniel Martí
af5836cb09 Bump accesspoint library to try to fix #407 2015-09-09 15:39:21 -07:00
Peter Serwylo
645f9fc5e3 Rename Utils.copy and Utils.symlinkOrCopyFile to indicate exception clobbering
Renamed to Utils.copyQuietly() and Utils.symlinkOrCopyFileQuietly().

The copy(File, File) method gobbles up IOExceptions, whereas the other
copy(InputStream, OupputStream) method doesn't. This could cause confusion,
whereas developers using one may not realise it is is gobblign their
exceptions.
2015-09-10 06:22:29 +10:00
Peter Serwylo
a09587c7e2 Use helper functions where appropriate. 2015-09-10 06:21:12 +10:00
Peter Serwylo
7b773f94f9 Make DownloadManager code file-agnostic, needn't be specific to "Apps"
This is mainly cosmetic, changing the names of variables so that the downloader
can seemingly be used for any type of download into the future.
2015-09-10 06:21:12 +10:00
Peter Serwylo
0a9941d93d Refactor AsyncDownloader to be an interface.
The interface is used by both AsyncDownloadWrapper and
AsyncDownloaderFromAndroid.
2015-09-10 06:21:12 +10:00
Peter Serwylo
d0d287f668 Remove undocumented params from JavaDoc.
Android Studio by default warns about undocumented params, which makes it harder
to identify more problematic warnings to do with actual code problems. This warning could
be toned down in the IDE so that it doesn't complain, but equally, the params are
not neccesary in JavaDoc if they are undocumented, and don't end up adding any more
than the parameters themselves.
2015-09-10 06:21:12 +10:00
Peter Serwylo
69ecaf023f Refactored AsyncDownloader to only ever be constructed by DownloadFactory. 2015-09-10 06:21:12 +10:00
Peter Serwylo
9b7c4c7b4a WIP: CR. 2015-09-10 06:21:11 +10:00
Toby Kurien
ef40b5f3db Now displays a notification when download is complete, unless use is already on the app details screen, in which case it pops up the installer immediately 2015-09-10 06:21:11 +10:00
Toby Kurien
13e54ced07 Display of app name and version in the download title 2015-09-10 06:21:11 +10:00
Toby Kurien
6f8b49c974 proper handling of file resources, implemented progress stats for async downloader 2015-09-10 06:21:11 +10:00
Toby Kurien
d10a56ed44 re-inserted log statement mistakenly removed 2015-09-10 06:21:11 +10:00
Toby Kurien
f3ef78d292 reverted to previous version, for merge request. 2015-09-10 06:21:11 +10:00
Toby Kurien
efd4ebeadf cleaned up code, prevented multiple app details screens popping up, fixed "no such app" toast after install 2015-09-10 06:21:11 +10:00
Toby Kurien
e827be1b5b when user clicks on notification, the app details screen now comes up. If there are multiple downloads, the first one is shown. 2015-09-10 06:21:11 +10:00
Toby Kurien
8a7feba9cc drastically speed up debug build by not minifying and compressing resources. Release builds unaffected. 2015-09-10 06:21:11 +10:00
Toby Kurien
11caf22dc6 wip: app details now reloads details of running downloads 2015-09-10 06:21:11 +10:00
Toby Kurien
f9fee5beb0 wip: when a download is completed, app is woken up and app details screen displayed 2015-09-10 06:21:11 +10:00
Toby Kurien
5f989739bb wip: running download manager outside fdroid 2015-09-10 06:21:10 +10:00
Toby Kurien
dbd4c467f8 added asyndownloader to use DownloadManager when possible 2015-09-10 06:21:10 +10:00
Daniel Martí
592f0c65bf Update changelog 2015-09-09 10:41:06 -07:00
Daniel Martí
7b4abe46c1 Remove now unused vendored libraries 2015-09-08 15:40:44 -07:00
Daniel Martí
3d749120a7 Remove support for building entirely from source
* Hard to keep both regular and source builds working and bug-free
* Keep -PsourceDeps to package jars for libs which are not yet in jcenter
* Use the libs packaged in jcenter the same way in both builds
* Remove cleanBinaryDeps, can be done via the shell easily
2015-09-08 15:40:44 -07:00
Hans-Christoph Steiner
13c90e6c4a add HTTPS pins for good, free CAs: cert.startcom.org & letsencrypt.org
These are two good options for easy, free HTTPS certificates.  This should
help, but not fix, #238 https://gitlab.com/fdroid/fdroidclient/issues/238
2015-09-08 19:21:24 +02:00
Hans-Christoph Steiner
2c88703588 use NetCipher to get improved TLS and cipher support on HTTPS connections
The NetCipher library creates instances of HttpURLConnection that are
configured to have solid TLS protocol and cipher settings, especially on
older versions of Android.

fixes #370 https://gitlab.com/fdroid/fdroidclient/issues/370
2015-09-08 19:19:30 +02:00
Hans-Christoph Steiner
853e281710 code formatting fixes for build.gradle from Android Studio 2015-09-08 19:19:29 +02:00
Hans-Christoph Steiner
1f607d3e6d improve net check for index updates; update index on app start
This remove the magic number "1" from the network state check, and makes
explicit that it is checking the active network connection.

This is then used to check whether it is appropriate to update the index
when FDroid first starts.
2015-09-08 19:19:29 +02:00
Daniel Martí
cba103af77 Start changelog for 0.97 2015-09-08 10:18:27 -07:00
Dominik Schürmann
b8b60d52bf Change privileged app name, versioning and icon 2015-09-07 01:40:37 +02:00
Dominik Schürmann
1fd85f40e7 Install privileged methods 2015-09-07 01:40:37 +02:00
Dominik Schürmann
5bfc30651a Refactor, allow installPrivileged from apk path 2015-09-07 01:40:37 +02:00
Dominik Schürmann
57af421561 Check if PrivilegedInstaller is available, adapt InstallPrivileged 2015-09-07 01:38:49 +02:00
Dominik Schürmann
976d06ea1a Method to check for privleged permissions via IPC 2015-09-07 01:38:48 +02:00
Dominik Schürmann
85c8e7035d Move shared AIDL files into lib, restructure, start of install/delete code 2015-09-07 01:38:48 +02:00
Dominik Schürmann
09cdb08fdb Cleanup, restructure 2015-09-07 01:37:07 +02:00
Dominik Schürmann
73cedf858b Use protectionLevel signature for security 2015-09-07 01:37:07 +02:00
Dominik Schürmann
e87693d989 Add Privileged F-Droid project 2015-09-07 01:37:07 +02:00
Dominik Schürmann
d530a1cf56 Restructure installer packages 2015-09-07 01:37:06 +02:00
Daniel Martí
50cd629d7d Bump to 0.97-alpha1 2015-09-06 00:34:23 -04:00
Daniel Martí
9e85911b5d StrictMode fix: close cached keystore file 2015-09-05 23:45:45 -04:00
Daniel Martí
cb9290fb89 Detect all VM policy penalties 2015-09-05 23:35:39 -04:00
Daniel Martí
8b7eba6698 StrictMode fix: close streams in local repo assets 2015-09-05 23:31:19 -04:00
Daniel Martí
bd1db5412b Add StrictMode to the entire app, fixes #399
Only enabled on debug builds. With only logs for now, we can move on to more
annoying penalties like dialogs or crashes once we have solved all of them.
2015-09-05 23:30:59 -04:00
Daniel Martí
232ed2229b Bump build-tools 2015-09-05 23:00:47 -04:00
Daniel Martí
6214b7f659 Merge branch 'issue-395' 2015-09-05 22:16:15 -04:00
Daniel Martí
45782355db Update zxing-core to 3.2.1 2015-09-05 22:14:18 -04:00
Peter Serwylo
3213fd2ba1 Merge branch 'new-swap' 2015-09-06 08:37:26 +10:00
Hans-Christoph Steiner
9cb8e0f5d5 Merge branch 'ci-rootproject' into 'master'
CI: use root project, test fix

See merge request !130
2015-09-04 12:37:12 +00:00
Daniel Martí
2fda08a33e Remove duplicated spaces from strings 2015-09-03 22:03:07 -07:00
Daniel Martí
10171d9228 Installer: handle package parse errors, fixes #395 2015-09-03 18:52:40 -07:00
Daniel Martí
74c93907c5 Don't call onAppChanged() if install was cancelled
It should have not changed anything about the app. It should make AppDetails
update anything as needed just like returning from any other activity.
2015-09-03 18:49:31 -07:00
Daniel Martí
16a0344ceb Update RepoXMLHandlerTest to make tests pass 2015-09-03 18:02:57 -07:00
Daniel Martí
c725b36ff8 Move RepoXMLHandlerTest into the proper directory
This was probably due to a faulty rebase/merge.
2015-09-03 18:02:57 -07:00
Daniel Martí
6821254aeb README fixes
* Don't suggest assembleDebug for building
* Use connectedCheck for tests like the CI
* Don't split links for readability
2015-09-03 18:02:54 -07:00
Daniel Martí
9106fb1321 CI: Run build and connectedCheck in the root
This will make sure that all projects in the repository are built and tested.
Should come in handy for !126, which splits up the app into two apps and one
library.
2015-09-03 17:18:24 -07:00
Daniel Martí
e72ccd3012 Bump to 0.97-alpha0 2015-09-02 17:54:55 -07:00
Daniel Martí
24c3ebbf57 README: mention stable branching and -alpha0 2015-09-02 17:54:55 -07:00
Daniel Martí
77bb9dbed8 Update changelog for 0.96 2015-09-02 17:54:55 -07:00
Daniel Martí
7ae6c38e9a Merge branch 'ci-emulator-tests' into 'master'
CI: run Android tests in an emulator

See #400. Using a WIP merge request to be able to test things on the CI.

See merge request !129
2015-09-02 23:28:32 +00:00
Daniel Martí
c43505befb Fix tests by making a method explicitly protected
This was making proguard complain and refuse to continue. This fix should not
alter how F-Droid works, it's just to make the tests function with proguard
enabled.
2015-09-02 16:10:06 -07:00
Daniel Martí
582eebd436 Run connectedAndroidTest against an emulator
Using 2.3.7 (10) armeabi for now. We can look into using more images in the
future.
2015-09-02 12:59:59 -07:00
Peter Serwylo
f635df8502 Merge branch 'master' into new-swap 2015-09-02 17:01:58 +10:00
Daniel Martí
ab1ec07686 Add platform-tools and build-tools to PATH 2015-09-01 21:43:26 -07:00
Daniel Martí
1fcc1dae1c CI: split up package installing 2015-09-01 15:45:13 -07:00
Daniel Martí
b2e736bb55 Mention irc channels and meetings in CONTRIBUTING 2015-09-01 14:48:57 -07:00
Daniel Martí
f9181b85f9 Install all android sdk packages at once
Spotted by Hans at fdroidserver. The 'update sdk' tool will download the
package index at each run, so installing one package at a time will be rather
inefficient.
2015-09-01 11:31:21 -07:00
Daniel Martí
b14faf5352 Remove jenkins-build script
We now use GitLab CI
2015-09-01 10:29:26 -07:00
Daniel Martí
d079d7770e Bump to 0.96-alpha6 2015-08-29 21:44:03 -07:00
Daniel Martí
47352eddd0 Use a more generic comment on -keep proguard rules 2015-08-29 21:42:50 -07:00
Hans-Christoph Steiner
dc46bc2e84 update proguard config to not strip needed classes
This stops the stripping of classes required for the swap stuff.  proguard
strips all sorts of stuff that is needed because of things like dynamic
loading, reflection, etc.

fixes #391 https://gitlab.com/fdroid/fdroidclient/issues/391
2015-08-28 09:55:42 +02:00
Daniel Martí
42e9f7b2dd Gitlab CI: Make apt-get quiet 2015-08-27 15:46:37 -07:00
Daniel Martí
85c83045f3 Fix esperanto string formatting
Also fixed in translatewiki
2015-08-27 09:44:20 -07:00
Daniel Martí
cbaa8676fc Merge branch '0.96-swap-fixes' into 'master'
0.96 swap fixes

This fixes the swap issues that I could find, except for #391. @mvdan feel free to beat @pserwylo to this, I just assigned it to him because its swap.

See merge request !127
2015-08-27 16:35:13 +00:00
Daniel Martí
22ad6260c7 Add new languages to languageValues
As reported by list-missing-langs-setting
2015-08-27 09:31:52 -07:00
F-Droid Translatebot
2740743320 Translation updates 2015-08-27 10:07:20 +00:00
Hans-Christoph Steiner
303de3d972 temporarily disable broken HTTPS support in swap
Right now, turning on HTTPS really just prevents things from working.  It
is not fully required, since swapping is only local connections, so not
easily susceptible to mass eavesdropping, though it would be nice.  I'm
leaving the rest of the plumbing for this here intact for when we come back
to getting swap always using HTTPS.

closes #378 https://gitlab.com/fdroid/fdroidclient/issues/378
2015-08-27 11:05:36 +02:00
Hans-Christoph Steiner
04e318c9ca force swap X.509 cert generation to use English/Gregorian times
When using locales that use different calendars, like Farsi, Arabic,
Hebrew, etc. there was a crash in spongycastle's X.509 generation because
it was trying to parse a Farsi date string as English.

fixes #334 https://gitlab.com/fdroid/fdroidclient/issues/334

Here's the original stacktrace:
    java.lang.IllegalArgumentException: invalid date string: Unparseable date: "ñõðøòñðóñõõóGMT+00:00" (at offset 0)
            at org.spongycastle.asn1.ASN1UTCTime.<init>(ASN1UTCTime.java:115)
            at org.spongycastle.asn1.DERUTCTime.<init>(DERUTCTime.java:23)
            at org.spongycastle.asn1.x509.Time.<init>(Time.java:67)
            at org.spongycastle.cert.X509v3CertificateBuilder.<init>(X509v3CertificateBuilder.java:40)
            at org.fdroid.fdroid.localrepo.LocalRepoKeyStore.generateSelfSignedCertChain(LocalRepoKeyStore.java:301)
            at org.fdroid.fdroid.localrepo.LocalRepoKeyStore.generateSelfSignedCertChain(LocalRepoKeyStore.java:281)
            at org.fdroid.fdroid.localrepo.LocalRepoKeyStore.<init>(LocalRepoKeyStore.java:136)
            at org.fdroid.fdroid.localrepo.LocalRepoKeyStore.get(LocalRepoKeyStore.java:73)
            at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:124)
            at org.fdroid.fdroid.net.WifiStateChangeService$WaitForWifiAsyncTask.doInBackground(WifiStateChangeService.java:62)
2015-08-27 11:05:35 +02:00
Hans-Christoph Steiner
9e939131b7 Utils.calcFingerprint() should always return null if given null
#334 https://gitlab.com/fdroid/fdroidclient/issues/334
2015-08-27 11:05:35 +02:00
Ciaran Gultnieks
ba3b90bdf6 Use a more compatible (?) path for env 2015-08-27 10:04:46 +01:00
Daniel Martí
ee85533aa4 Add build status badge 2015-08-26 21:56:36 -07:00
Daniel Martí
9d59b094e6 Gitlab CI: Install OpenJDK 2015-08-26 21:46:58 -07:00
Daniel Martí
092bdc0578 First try at a gitlab CI script 2015-08-26 20:30:59 -07:00
Daniel Martí
c125243915 Link to CONTRIBUTING from README 2015-08-26 20:07:03 -07:00
Daniel Martí
142db699a4 Add reporting issues to CONTRIBUTING 2015-08-26 20:05:52 -07:00
Daniel Martí
e7c727f446 Don't minify zipsigner, fixes #391 2015-08-26 13:38:35 -07:00
Daniel Martí
67ceaec460 Follow-up to e8ebb0: forgot one string with markup 2015-08-26 13:30:43 -07:00
Daniel Martí
a2b924837a Bump to 0.96-alpha5 2015-08-25 21:38:20 -07:00
Daniel Martí
bfcd88ebb2 Use activity context in AppDetails, fixes #388 2015-08-25 21:21:35 -07:00
Daniel Martí
752c7c7022 Bump to 0.96-alpha4 2015-08-24 11:43:33 -07:00
Daniel Martí
9860008549 Fix format issue in pt-rBR
Also fixed it in translatewiki
2015-08-24 11:43:33 -07:00
Daniel Martí
f07497a39c Revert appcompat-v7 to 22.1.1. Closes #356.
22.2.* have an issue where all the text in the app becomes gray, both in the
light and dark themes. We'll see if appcompat 23.* fixes this issue.
2015-08-24 11:37:11 -07:00
Daniel Martí
64c1d7fa04 Run fix-ellipsis 2015-08-24 11:29:25 -07:00
Daniel Martí
a92288b342 Make fix-ellipsis also replace &#8230; 2015-08-24 11:29:16 -07:00
Daniel Martí
138859ccd6 Fix duplicate %s in bg string
Also fixed it in translatewiki.
2015-08-24 11:22:02 -07:00
Daniel Martí
e8ebb0069b Don't use html/markup in strings. Closes #290.
Also fixes the build.

There hasn't been a reply to the issue in months, and there's only one string
using them.
2015-08-24 11:09:26 -07:00
Daniel Martí
74e34ee695 Run remove-unused-trans 2015-08-24 11:04:56 -07:00
Daniel Martí
d250f4cafb Run remove-empty-trans 2015-08-24 11:04:47 -07:00
Daniel Martí
8c45250f78 Update the changelog 2015-08-24 11:03:57 -07:00
Daniel Martí
ef56f8db88 Revert "Add timeout for Http request" merge
See !117 and #387

This reverts commit e895d1f0d3d6b333eeaa3e82e58392b58d647c33, reversing
changes made to 8d5c7abe89f98d4c8248e0b50eb8857f2a31f049.
2015-08-24 11:02:54 -07:00
Daniel Martí
0515948055 Rename COPYING to LICENSE. Fixes #384 2015-08-24 10:35:55 -07:00
Daniel Martí
888760e6ee Update HACKING, rename it to CONTRIBUTING
See #384
2015-08-24 10:34:38 -07:00
Daniel Martí
5c00c4463c README: mention building from source 2015-08-24 10:34:06 -07:00
F-Droid Translatebot
63761ead27 Translation updates 2015-08-24 10:16:20 +00:00
Nico Alt
625c306b2f Merge branch 'revertBetaUpdates' into 'master'
Revert "Prompt for beta updates"

This reverts commit 92f8678b3d2da18ad93bac6af0ae83984cf74714.

I read the logs on IRC and agree that we should revert this for stable.

CC @pserwylo

See merge request !122
2015-08-22 19:52:13 +00:00
Nico Alt
4331fa4047 Revert "Prompt for beta updates"
This reverts commit 92f8678b3d2da18ad93bac6af0ae83984cf74714.
2015-08-22 10:04:42 +02:00
Daniel Martí
478ff88a82 Don't crash if we couldn't generate a certificate
Another crash workaround for #334. Even though this null check should be left
there, since getCertificate() may return null for whatever reason.
2015-08-20 21:14:38 -07:00
Daniel Martí
d8b4fc403d Bump to 0.96-alpha3 2015-08-20 19:32:41 -07:00
Daniel Martí
1f41bbdc0d Replace printStackTrace with proper Log.e calls 2015-08-20 19:28:30 -07:00
Daniel Martí
8669fddd70 Properly log exceptions 2015-08-20 19:21:50 -07:00
Daniel Martí
ce8c928337 Move some Log.i to debug logs
These don't look like they will be useful to users at all.
2015-08-20 19:09:27 -07:00
Daniel Martí
c9cdc1a5dc Remove all Log.d calls from release builds 2015-08-20 18:59:14 -07:00
Daniel Martí
d04f26b6e4 Raise some log message priorities 2015-08-20 18:59:13 -07:00
Daniel Martí
96014a7365 Simplify debugging logging via Utils 2015-08-20 18:37:25 -07:00
Daniel Martí
4c75f6078d Disable lint warnings in command-line builds
There are just too many now, and they hide actual compilation errors.

They can still be viewed in the HTML report.
2015-08-20 18:05:34 -07:00
Daniel Martí
2d14e3c1c4 Temporarily work-around for repo update crashes
On certain locales, F-Droid would crash at startup due to #334.

This isn't a proper fix, but rather a workaround that logs what happened and
links to the issue, instead of making F-Droid crash entirely.
2015-08-20 17:49:57 -07:00
Daniel Martí
f0481ffa14 Support libs will never be built from source
We can't rely on their plugin versions to be compatible with ours. Besides,
they require tons of Android SDK targets to be installed to build.

They are already bundled with the SDK, so you can build them as part of the
SDK from source if you want to.
2015-08-20 10:35:18 -07:00
Daniel Martí
4f40160c40 A root build.gradle file is now common 2015-08-20 10:35:10 -07:00
Daniel Martí
487da9615f Some changelog rewordings 2015-08-20 10:33:35 -07:00
Daniel Martí
05285d23b7 Replace fdroid.org with f-droid.org 2015-08-20 10:06:01 -07:00
Daniel Martí
0283962ed2 We were still pointing at the old issue tracker?! 2015-08-20 10:05:47 -07:00
Daniel Martí
e4527da122 Prepare for sdk level 23 2015-08-20 09:56:57 -07:00
Peter Serwylo
133cabeed8 Let user select wifi network. Prevent "Send F-Droid" if no bluetooth.
Include support for libaccesspoint to control the WiFiAP of a device.

Selecting wifi networks i snow possible by touching the name of the
wifi network in the "Start Swap" screen (sometimes it will say
"No network yet"). This exhibits the same behaviour as the "Join Wifi"
screen used to (and still does) do.

On emulators (is there other devices too?), Bluetooth is unavailable,
but the "Send F-Droid" is still there. I could remove it, but then
people may get confused as to why it is not there. Instead, there is
now a dialog which explains why it can't be sent (no Bluetooth).
2015-08-20 21:46:07 +10:00
Daniel Martí
3f5b5ffc93 Avoid package receiver NPE crashes. Fixes #380. 2015-08-19 11:19:59 -07:00
Daniel Martí
968b35f324 Update notes about discontinued libraries 2015-08-18 19:42:01 -07:00
Daniel Martí
33e09cc344 Don't use multi-arg compiles in gradle
Easier to keep line changes simpler this way.
2015-08-18 19:32:38 -07:00
Peter Serwylo
2182ff4c59 Comment out the "Help" icon in start swap screen for now.
In the future, this should be implemented with a relevant help screen,
but for now it is more than we have time for. It will require, not only
good content which is translatable, but also a generic approach so that
it can be used elsewhere in F-Droid too.
2015-08-19 08:44:55 +10:00
Daniel Martí
780f77dab9 Don't show menu item to enable NFC if not available
Follow-up to #379
2015-08-18 14:16:50 -07:00
Daniel Martí
997b4a4698 Run remove-unused-trans.py 2015-08-18 13:16:02 -07:00
Daniel Martí
fd7f942595 Avoid NPE crash on devices without NFC. Fixes #379. 2015-08-18 13:14:13 -07:00
Daniel Martí
fa929a4cf4 Bump buildToolsVersion 2015-08-18 10:24:52 -07:00
Peter Serwylo
b05080bbd9 Enable "Send F-Droid" in main swap screen. 2015-08-18 19:26:48 +10:00
Daniel Martí
ca06edd797 Merge branch 'master' into 'master'
Clean up colors definitions

Use system constants when possible; move the red color definition from `styles.xml` to `colors.xml` and tune it to match the [Material Design guidelines](http://www.google.com/design/spec/patterns/errors.html#errors-user-input-errors).

See merge request !121
2015-08-17 17:23:07 +00:00
Peter Serwylo
a82032d5d0 Fixing lint errors in swap WIP branch but not master. 2015-08-17 22:59:51 +10:00
relan
0d864a866c Use the red color suggested by the Material Design spec
See http://www.google.com/design/spec/patterns/errors.html#errors-user-input-errors
2015-08-17 14:29:51 +03:00
relan
83c8d6d303 Move the red color constant from styles.xml to colors.xml
Because this is the proper place for colors definitions.
2015-08-17 14:25:58 +03:00
relan
f25dafe913 Use system constant for the white color 2015-08-17 13:14:45 +03:00
relan
a49ea5c3c3 Remove unused constant for the black color 2015-08-17 13:11:35 +03:00
relan
1b81267841 Use system constant for the transparent color 2015-08-17 13:11:06 +03:00
Peter Serwylo
2008708cd9 Change bluetooth response to remove deprecated warning.
The StringBufferInputStream is deprecated, because it doesn't know the
encoding of the string it is buffering. This has been changed to use
a ByteArrayInputStream with UTF-8 encoding now.

Also made use of previously unused mimeType parameter to set the
Content-Type header of the response.
2015-08-17 17:15:42 +10:00
Peter Serwylo
99ebc84a91 Show message when touching the QRCode button, but swap isn't enabled.
Also cleaned up a doc comment in the swap activity, and minor
formatting of swap related strings in strings.xml.
2015-08-17 17:15:08 +10:00
Peter Serwylo
930c906460 Allow bluetooth:// URLs to be parsed by java.net.URL.
Sets a stream handler in FDroidApp which understands bluetooth://
URLs and returns a non-functioning URL handler for such URLs.
The reason it is  non-funcitoning is because the openConnection()
function is not being used by the BluetoothDownloader at this point.

In the absense of this, a MalformedURLException is thrown.

The bluetooth stuff is still broken, but it is not broken in
this way any more.
2015-08-17 08:08:49 +10:00
Daniel Martí
a6b1f21ce5 Bump to 0.96-alpha2 2015-08-16 13:20:15 -07:00
Nico Alt
d69021804d Use tabs instead of spaces
To do not indent the code
2015-08-16 17:32:48 +02:00
Nico Alt
eaf04dd78e Don't mark as code in code block 2015-08-16 17:28:34 +02:00
Peter Serwylo
6bfd76caf2 Search now works when choosing swapped apps to install.
Was incorrectly parsing the URI in order to build a query for the database.
2015-08-17 00:00:30 +10:00
Peter Serwylo
e53a56f7b2 Show "preparing local repo" stuff in activity, not dialog.
Use the same view as when downloading a swap index. This means
no more progress dialogs, and no more Toasts when finished, which
is good.
2015-08-16 23:32:37 +10:00
Daniel Martí
ed2de37207 Merge branch 'master' into 'master'
Update string.xml

Use a less mathematical wording.

Hopefully, translators will follow this.

See merge request !120
2015-08-16 08:38:49 +00:00
Hartmut Goebel
9d4bfe0f63 Update string.xml
Use a less mathematical wording
2015-08-16 07:44:23 +00:00
Peter Serwylo
1ea35f6977 Remove unused AppDetails subclass. Show download progress for swap.
The AppDetails subclass used to be used when you couldn't install apps
directly from the swap workflow. Now we don't send people to app
details, so the activity is unneeded.

The swap progress also now listens for progress broadcasts, rather than
showing an indeterminant progress bar.
2015-08-16 17:29:56 +10:00
Peter Serwylo
2868e3c4f1 Allow apks to be installed from swap. Show feedback while downloading.
Seems to work pretty-alright even when installing multiple apps.
Shows a progress (indeterminent at this stage) bar for each downloading
item, and hides the install button.
2015-08-16 11:31:02 +10:00
Peter Serwylo
d672983a90 Refactor toolbar colours, fix notification for < 4.1 devices.
InnerView.getToolbarColour() was expecting a @ColorRes, except all views
were returning integers which were the colour value, not a pointer to
the resource as they should have been. Now only one place requires a
call to getResources().getColor() whereas before it was in each view.

Notifications on pre 4.1 devices require a pending intent to work. This
is so that when you touch the intent, it takes you somewhere meaningfull.
Without it, the update process crashes.
2015-08-16 08:34:05 +10:00
Daniel Martí
d9ed0ffb0d Merge branch 'installer-patches' 2015-08-15 14:01:03 -07:00
Daniel Martí
944fb46aa5 Add proguard rules for support-v7, fixes #372 2015-08-15 14:00:24 -07:00
Daniel Martí
7bff114602 Re-enable proguard for release builds
It can be disabled for stables if it's not reliable.

Also enabled for debugging so that bugs don't slip into release builds.
2015-08-15 13:56:28 -07:00
Daniel Martí
3c35927085 Undo update repo button hiding in e984ed82ef3
The button can be hidden or entirely removed once users have an easy way to
trigger an index update, e.g. via pull to refresh.
2015-08-15 13:11:20 -07:00
Daniel Martí
ad8896b2e8 Bump gradle plugin version to 1.3.1 2015-08-13 11:23:28 -07:00
Daniel Martí
0e3172b277 Use mkdir -p instead of mkdir to not error if already existing
See #364
2015-08-12 13:41:13 -07:00
Daniel Martí
98117b19c0 Make sure that our system folder is 755
See #364
2015-08-12 13:41:02 -07:00
Daniel Martí
e434f39839 Android Studio fixes 2015-08-12 13:33:43 -07:00
Daniel Martí
e48fb93c77 First changelog writeup 2015-08-10 17:27:50 -07:00
Daniel Martí
e895d1f0d3 Merge branch 'master' into 'master'
Add timeout for Http request

The timeout of HttpURLConnection is 0, which means the request would never return if either connection or read timeouts, and the code would never catch these exceptions.

This patch set explicit timeout value (10s for connection timeout and 40s for read timeout), so the code would catch and handle timeout exceptions as you would expect.

Best,

See merge request !117
2015-08-11 00:20:17 +00:00
Daniel Martí
14cd500121 Remove unnecessary uses of getString(int) 2015-08-10 17:11:51 -07:00
Daniel Martí
eab27d402b Update install/uninstall internal error codes to 5.1 2015-08-10 17:11:51 -07:00
Daniel Martí
816bd4b2e6 Start reporting proper install/uninstall error messages 2015-08-10 17:11:50 -07:00
Daniel Martí
79b1396e4a Disable uninstall button if the app cannot be uninstalled
Fixes #329
2015-08-10 17:11:50 -07:00
Daniel Martí
ba54e8b798 SystemInstaller: don't try to remove system apps without updates 2015-08-10 17:11:50 -07:00
Daniel Martí
8d5c7abe89 Add 0.95.1 changelog notes 2015-08-10 17:11:30 -07:00
Daniel Martí
4e0808449d InstallIntoSystem: Apks are fine being 644, no need for 655
See #364
2015-08-10 17:08:01 -07:00
Daniel Martí
052f411433 InstallIntoSystem: add missing trailing '/'
See #364
2015-08-10 16:54:50 -07:00
Daniel Martí
ddb94cc831 Cleanup "Downloading..." icon if download fails 2015-08-10 14:56:33 -07:00
Miku Nyan
05f2a76bc4 fixed privileged installer crash on Android < 3.0 2015-08-10 12:00:40 -07:00
Daniel Martí
97f5391567 Merge branch 'master' into 'master'
fix #361

![screenshot_2015-08-10_2139](https://gitlab.com/miku-nyan/fdroidclient/uploads/dd590898795124d8f36eac7601281265/screenshot_2015-08-10_2139.png)

See merge request !118
2015-08-10 18:55:47 +00:00
Miku Nyan
a4fe44437a fix #361 2015-08-10 21:44:20 +03:00
Daniel Martí
1d47956bcf Run fix-ellipsis 2015-08-09 21:44:01 -07:00
Daniel Martí
e43355ce56 Limit lint output to HTML 2015-08-09 21:33:36 -07:00
Daniel Martí
939e3004b6 Reorganize buildTypes gradle config
* disable minify (proguard) on all build types
* explicitly disable resource shrinking on all build types
2015-08-09 19:10:27 -07:00
Daniel Martí
be3148d0e7 Hide all apk download progress views equally
Two views weren't hidden by default, so they were taking up space before they
were needed. The java code already takes care of showing them when necessary.
2015-08-09 18:39:20 -07:00
Daniel Martí
019c6019d7 Bump to 0.96-alpha1 2015-08-09 12:15:06 -07:00
Daniel Martí
31dad85da6 Forgot to bump targetSdkVersion with compileSdkVersion 2015-08-09 12:14:39 -07:00
Daniel Martí
d6dcf6bf7b Don't prompt users to install into system until it's stable
Right now there are multiple issues - #294, #346, #347, #348 - so telling
people to go through the process at startup should not happen yet.
2015-08-09 12:12:41 -07:00
Daniel Martí
d20ef02745 Re-add superuser permission to manifest (fixes #339) 2015-08-09 12:12:37 -07:00
Daniel Martí
56ff9d1353 Re-add lightWithDarkActionBar enum item (fixes #340)
Added it in the same position as it was originally.
2015-08-09 12:12:28 -07:00
Daniel Martí
51a0bb26fa Merge branch 'version-bumps' into 'master'
Target/Support version bumps

This is part of the (unmergeable as of now) !96. These changes are simple yet important enough for me to think that they deserve their own merge request.

I didn't push the changes directly because I haven't worked with the material stuff enough to notice whether anything is breaking or not. For all I can see, the app looks the same and the bumps just added lots more deprecation warnings (which is fine, they can be dealt with over time).

See merge request !109
2015-08-09 18:36:27 +00:00
Daniel Martí
9cafe80763 Merge branch 'betaUpdates' into 'master'
Prompt for beta updates

Ready to get merged. 👍

~~This MR is ready to get merged, the last thing that needs to be fixed is [this](72ed814a73 (note_1726274)).~~

This closes #313.

See merge request !112
2015-08-09 18:33:09 +00:00
Peter Serwylo
0b160d2e04 WIP: hooking up ApkDownloader to swap apps. 2015-08-09 22:12:56 +10:00
Peter Serwylo
ba6d2e7793 WIP: Fixing styles and removing unused styles. 2015-08-09 22:12:55 +10:00
Peter Serwylo
5ee8307703 Merge branch 'master' into new-swap--updated-downloader
Fixed multiple conflicts to do with the repo updater moving to
broadcasts from the previous progress listeners.
2015-08-09 22:12:09 +10:00
Daniel Martí
8bd6e56065 Bump support libraries to 22.2.1 2015-08-08 23:40:52 -07:00
Daniel Martí
853d7ed047 Bump compileSdkVersion 2015-08-08 23:40:52 -07:00
Peter Serwylo
2b8a882933 Merge branch 'integration/mr-102-and-107' into 'master'
Integration branch containing both MR 102 and 107

Given both MR !102 and !107 both stood on eachothers feet to some extent, this branch contains all commits from both in an integration branch. If both @Nutomic and @eighthave are happy that it faithfully kept their changes during the minor merge conflict resolutions, then we can merge this instead of those two branches. 

* !102 changed download progress from events + listeners to broadcasts + receivers.
* !107 made use of download progress events + listeners to show a downloading UI that was embedded in the activity, rather than shown as a modal dialog.

The conflicts which arose while I merged these branches together were in `AppDetails`. I made it so that, to the best of my ability, it uses broadcast receivers instead of progress listeners when updating the progress bar. Other than that, the only other conflict was both trying to store a reference to the main button from the UI. The only changes were in naming (mainButton vs btMain) and also in the place where the local variable was assigned (onCreate() vs setupViews() which is called during onCreate() anyway).

After merging, I did some minor cleanups. This is because in the process of checking that my conflict resolution compiled, I thought it best to remove a bunch of warnings from `AppDetails` and others. Turns out that by doing so, I found a bug due to the integration (to do with the `AppDetails` querying the downloader for status in `onResume()` rather than waiting for a broadcast event) so I'm glad I did so.

Let me know what you think, and then after the next stable, we can go ahead and merge this if people are happy.

p.s. I have no idea why GitLab is showing @eighthave's commit at the top of the list of commits, after my integration related commits.

See merge request !114
2015-08-09 06:09:54 +00:00
xinxin
e3140573ac Add timeout for Http request 2015-08-08 19:04:16 -07:00
Daniel Martí
a777c89ef6 README: improve build instructions and add some building tips 2015-08-05 16:53:42 -07:00
Daniel Martí
94ace2e1af Get rid of support submodule
It is now unused. Was used for v7-appcompat in ant, which is no longer
supported.
2015-08-05 16:48:45 -07:00
Daniel Martí
20c3a50f3b Bump to 0.95 2015-08-04 14:37:34 -07:00
Daniel Martí
91696f5ccb Fix versioning scheme for actual stable releases 2015-08-04 14:35:46 -07:00
Daniel Martí
f1901d75ac Remove leftover lightWithDarkActionBar enum item 2015-08-03 17:52:31 -07:00
Daniel Martí
bdb71d828f Have the light theme as the default throughout
It was changed in preferences.xml, but not in the manifest and in the default
case in the Java code.
2015-08-03 17:45:32 -07:00
Peter Serwylo
cbd8c977e2 Use annotations to remove lint warnings.
Also removed undocumented java doc.
2015-08-03 22:59:47 +10:00
Peter Serwylo
215dcc0dd9 Don't use Notification class, but rather NotificationCompat. 2015-08-03 22:59:46 +10:00
Peter Serwylo
f3a9581d89 Fix warnings in app details (remove progress thingo).
AppCompat no longer supports progress indicators in the action bar. So
this is not your everyday "Deprecated, but sure, keep using it" job.
Rather, it is "deprecated, and no, we wont even let you use it."

Also removed unused argument and extended AppCompatActivity.
2015-08-03 22:59:46 +10:00
Peter Serwylo
a0bf49d1ea Reinstate code to allow resumed activity to query download status (rather than wait for broadcasts). 2015-08-03 22:59:46 +10:00
Peter Serwylo
b2bde89834 Merge remote-tracking branch 'Nutomic/no-download-dialog' into integration2/mr-102-and-107 2015-08-03 22:59:38 +10:00
Hans-Christoph Steiner
b8261fcecf EXTRA_REPO_ERRORS in Intents should be a CharSequence[], not an ArrayList
This was including the instance of the ArrayList in the Intent, rather than
the expected CharSequence[].
2015-08-03 11:58:34 +02:00
Hans-Christoph Steiner
60f02c0181 in Downloader, instance vars that are set in constructor should be final 2015-08-01 21:02:39 +02:00
Hans-Christoph Steiner
5582e906c8 disable Install/Run/Uninstall button when the install process is running
To make things less confusing, this disables the main button on AppDetails
when something is running.  During install, it also changes the text of the
button to "Installing..."
2015-08-01 21:02:39 +02:00
Hans-Christoph Steiner
7d48ad736c replace Downloader's ProgressListener with local broadcasts
This removes lots of boiler plate, makes it much easier to get the info
where it is needed, and puts the code in line with rest of FDroid. The
ProgressListener pattern was forcing a lot of passing the listener
instances around through classes that never used the listener even.
2015-08-01 21:02:38 +02:00
Hans-Christoph Steiner
e984ed82ef run index update in the background after adding a new repo
That makes that repo automatically ready for use based on user actions like
adding a new repo, switching an existing repo on, etc.

This also lowers the priority of the "update" menu item since it shouldn't
be needed any more.  But leave it for now, just in case.
2015-08-01 21:02:38 +02:00
Hans-Christoph Steiner
cd0b5b80f9 purge unused methods from ApkDownloader and AsyncDownloadWrapper 2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
5d4bdf6139 all Downloaders have a URL, so make the base class store it for use
This lets the local broadcasts include the URL as an extra, and other
tricks.
2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
9a9bf92126 make all Downloaders get a Context so the base class can use those tricks
Having a Context in Downloader means that the communications can be changed
to a LocalBroadcastManager, following the pattern that is in a lot of this
app already.
2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
80063eb786 simplify Downloader constructors
Since all Downloaders are created via the DownloaderFactory, put the temp
file creation there, then we can remove lots of constructors.
2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
4fd914ac7a convert repo update dialog to a notification
Since the repo updates are happening in an IntentService, they are already
running in a separate thread.  Ironically, the dialog was showing in spite
of that.  This removes the dialog entirely and instead puts up a
Notification with the same messages.  Ultimately, the "refresh" button
should go away, the repos should be updated whenever someone goes to
install an app, and all APK downloads should also show up in the same
Notification.

This removes UpdateReceiver entirely and replaces it with local broadcasts,
since that is a common pattern in FDroid and Android.  It also reduces the
amount of code here.

refs #103 https://gitlab.com/fdroid/fdroidclient/issues/103
2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
1d263b2aee fix sending repo via NFC
This was my stupid mistake: using a String for a class, instead of a .class
so that when ManageRepo was renamed to ManageRepoActivity, this broke.
2015-08-01 20:55:37 +02:00
Hans-Christoph Steiner
46978e1086 make RepoDetails scrollable and add a QR code to the bottom
Having a QR Code of the repo makes it easy for people to share the repo to
someone else.
2015-08-01 20:55:37 +02:00
Hans-Christoph Steiner
7ea294bb66 switch RepoDetailsActivity to plain structure, purge RepoDetailsFragment
No need for a reusable Fragment here, its only used in one place.  This
changes the structure to be a regular Activity, with all View and Menu
setup in XML files loaded in onCreate().

This also converts the URL to a TextView.  Having it editable in this
Activity makes for a confusing user experience.  Instead, the "Add Repo"
input should validate the URL and not allow creating repos that don't work.

This also purges the use of UpdateService.UpdateReceiver, it will be going
away in the upcoming commits.
2015-08-01 20:55:37 +02:00
Daniel Martí
50ac03e97d Bump gradle plugin to 1.3.0 2015-07-31 17:13:42 -07:00
Daniel Martí
7f3acb215e Bundling support-v4 as a binary dep is no longer necessary 2015-07-30 20:24:25 -07:00
Daniel Martí
040c900be5 Bump to 0.95-alpha2, prepare for stable 2015-07-30 10:28:40 -07:00
Daniel Martí
e9ce43832a Finish up changelog
* Don't imply that material design is completely finished
* Shorten changelog links item
2015-07-30 10:24:11 -07:00
Daniel Martí
4935ba5c8d Merge branch 'ensure-large-icon-urls-exist' of https://gitlab.com/pserwylo/fdroidclient 2015-07-30 10:19:49 -07:00
Peter Serwylo
92f7d5e197 Add changelog entry about changelogs. Mind blown.
Made sure to include a comment about needing to update the index
in order to get changelogs to show.
2015-07-30 21:39:59 +10:00
Nico Alt
92f8678b3d Prompt for beta updates
Fixes #313
2015-07-30 13:06:53 +02:00
Peter Serwylo
4565f58a75 Clear out the etag from the repo table to "force" update.
We are not forcing an update, in the sense that we make the update
service run. Rather, we are ensuring that the next update wont return
after doing nothing, with the message "repos already up to date".
In this case, the repo metadata (and hence its etag) is the same,
but we made changes in the client to handle the metadata correctly.
Thus, we don't care that it hasn't changed, we want to update anyhow.
2015-07-30 21:06:30 +10:00
Peter Serwylo
e1a8c42f9e Ensure icon URLs are always populated when database is upgraded.
Did this by using the same query which is used to update the icon URLs
after updating the index. To make this same method accessible, without
causing sad database locking, had to expose the method from AppProvider
in a way which would let DBHelper access it. See comments in code for
further explainations.

While there, removed the final lint warning in my Android Studio for
the AppProvider. This was a warning because we could have ended up
iterating over a null object. Although it turns out there was a correct
guard in place which would ensure this didn't happen, it wasn't in such
a way that lint would understand. Thus, I changed the guard condition
around `for( String blah : CommaSeparatedList.make() ) {}` to let lint
relax and not be so pedantic.
2015-07-30 21:06:30 +10:00
Peter Serwylo
760eae5a7b WIP: Fixing swap UI for earlier versions of Android.
Replaced `Switch` with `SwitchCompat`. In the future, should completely remove
F-Droid's `SwitchCompat` class. Fixed paddingLeft/paddingStart, except for some
places where lint complained. Apparantly that is for some Samsung tablets on
Android-16. Will have to create a layout-v17 version in the end for these.
2015-07-29 18:49:11 +10:00
Daniel Martí
a5c65f7b30 Unused resource cleanup #2 2015-07-28 22:15:58 -07:00
Daniel Martí
6ebd24e2bb Re-run remove-unused-trans after unused resource cleanup 2015-07-28 22:08:26 -07:00
Daniel Martí
083ceca893 Remove unused resources
These went unnoticed because apparently lint.xml was omitting all unused
resources, not just default_repo.xml.
2015-07-28 22:04:45 -07:00
Daniel Martí
b152c682fa Move lint config to build.gradle
* Removed UnusedResources from default_repo.xml, since there are none of those
  warnings anymore
* Same for TrulyRandom in the whole project
2015-07-28 21:39:33 -07:00
Felix Ableitner
8c25134031 Replaced download dialog with embedded progress bar (fixes #270). 2015-07-27 13:04:42 +02:00
Peter Serwylo
0e5c039536 Merge branch 'master' into new-swap
Fixed lots of (minor) conflicts. Some due to earlier rebasing of
material stuff that was subsequently merged into master with a
different commit hash (I guess, that's what it looked like anyway).
2015-07-27 18:42:16 +10:00
Peter Serwylo
8ddc6a656d Failed attempt at fixing bluetooth timeout error.
Kept getting a message in the Bluetooth _client_, which said the
socket timed out or received an invalid response or something. Most
people seem to believe that it is due to a bug in the Bluetooth stack
on Android 4.2.1 and suggest using reflection to access a method that
actually works as intented. I couldn't get it to work correctly though.
Kept the code here because this whole branch is a WIP, and we need
to figure out how to make Bluetooth work one way or another.
2015-07-27 17:26:13 +10:00
Peter Serwylo
c57f7105e1 Attempt to show "Setting up [wifi/bluetooth]..." in UI.
Not sure it is working as intended yet, but the idea should be close to what is required.
2015-07-27 17:21:21 +10:00
Peter Serwylo
4d11c97d51 Cleanup misc TODO's that are floating around (swap and general f-droid)
`SwapService`: Remove unneccesary TODO's and unused constant. Also
added other TODO's there which will need to be done before swap is
stable. Can make them into issues in gitlab, but will leave there for
now.

`SwapWorkflowActivity`: Clarified TODO's, fixed issue with cancelling
swap when in the "connecting" state (before it would not show the
right view again, now it goes back to the first view).

`WifiQrView`: Make scanning of QR code initiated by `SwapActivity`.
This is because the activity is actually the one who is able to listen
for a response anyway.

`BluetoothFinder`: Cleaned up TODO's in  but didn't actually address
them.

`BluetoothPeer`: Removed TODO about fingerprints, because TOFO is
probably the way to go with Bluetooth anyhow.

`BonjourFinder`: Remove dead code, prevent NPE by using final local
variable rather than member variable (the member variable gets set
to null in a different thread).

`BonjourPeer`: Fix bug with prompting other device to swap back.

`BluetoothDownloader`: Fix typo in comment.

`Downloader`: Removed TODO that was left over from a refactor, and
was never actually correct. The code after refactoring was broken
because it created an `InputStream` which was never closed. Now it
doesn't do that, because it was fixed in an earlier commit in this
branch.

`HttpDownloader`: Remove TODO, but clarify that the downloader does
not follow 30x redirects.
2015-07-27 17:19:51 +10:00
Daniel Martí
f3e08bdc68 Add a few changelog items 2015-07-25 21:24:35 -07:00
Daniel Martí
378c177490 Remove android-support-v4 jar since it was only needed by ant 2015-07-25 21:15:22 -07:00
Daniel Martí
96906ec35a Remove test jar libs since gradle pulls them from jcenter 2015-07-25 21:13:55 -07:00
Daniel Martí
5e0683df23 Remove ant stuff from the test project
Forgot to get rid of those when removing ant support
2015-07-25 21:06:53 -07:00
Daniel Martí
07c19aef37 Prepare jenkins-build for gradle 2015-07-25 21:04:32 -07:00
Daniel Martí
49400a9ed9 Remove ant from HACKING 2015-07-25 21:02:40 -07:00
Daniel Martí
340cba3ebe Bump gradle plugin version 2015-07-25 21:01:39 -07:00
Peter Serwylo
9180c9f5c0 WIP: Bluetooth can actually transfer indexes and apks over HTTPish!
It is very hacky, and I did it through the non-swap interface, and it
only works once then the state stuffs up and it no longer accepts incomming
connections, but it worked! Now to smooth out all the things.
2015-07-26 07:44:12 +10:00
Daniel Martí
17b6ca83d7 Merge branch 'master' of https://gitlab.com/relan/fdroidclient 2015-07-24 10:21:08 -07:00
relan
8f2c827280 Fix padding in dialogs
Padding around content area should be 24dp. See the Material Design spec:

	http://www.google.com/design/spec/components/dialogs.html#dialogs-specs
2015-07-23 09:47:27 +03:00
relan
28ba6921d1 Tint links
Apply the accent color to links.
2015-07-23 09:46:33 +03:00
relan
0b7c5fb616 Tint preference dialogs
Apply the accent color to EditTextPreference and ListPreference. They
use android.app.AlertDialog.Builder, not
android.support.v7.app.AlertDialog.Builder, so the theme has to be
specified using "android:alertDialogTheme" attribute in addition to
AppCompat's "alertDialogTheme". For the same reason those dialogs won't
be tinted on pre-Lollipop Android versions.
2015-07-23 09:41:37 +03:00
relan
04e8b591ab Tint alert dialogs
Apply the accent color to alert dialog buttons. Note that without
"android:windowMinWidthMajor" and "android:windowMinWidthMinor" attributes
dialog width is calculated incorrectly resulting in visual artifacts.
2015-07-23 09:19:20 +03:00
Daniel Martí
85ae6f86b1 Quote version patterns as well 2015-07-21 11:48:09 -07:00
Daniel Martí
cfff0ba0e8 Bump to 0.95-alpha1 2015-07-21 11:47:14 -07:00
Daniel Martí
79943b9d4a Explain new versioning scheme in the README 2015-07-21 11:47:14 -07:00
Daniel Martí
97f5697af7 Don't have extremely long lines in the README 2015-07-21 11:06:13 -07:00
relan
4b699d5376 Use AlertDialog from the support library
This unifies look of alert dialogs across various Android versions and
allows proper tinting.
2015-07-20 11:17:40 +03:00
Daniel Martí
c9f6be61b5 Merge branch 'crash-app-on-unknown-cursor-column' of https://gitlab.com/slackydeb/fdroidclient 2015-07-19 20:43:15 -07:00
Luca Favatella
b7527e78e7 Log error when view finds unknown column in model
This stricter behaviour would have reported a more meaningful error
easing investigation for issue #276 on Android 2.1.
2015-07-20 03:26:22 +01:00
Daniel Martí
f875c6902f Merge branch 'master' of https://gitlab.com/relan/fdroidclient 2015-07-19 11:55:22 -07:00
relan
bcb3ac1fe0 Fix identical bitmaps across various configurations
No need to put mdpi images into drawable/ directory since F-Droid does not
support Android 1.5. This fixes appropriate warning from lint.
2015-07-19 19:34:25 +03:00
Peter Serwylo
9da6893ac3 Added verbose debugging to diagnose swap state. Foreground/background service correctly. 2015-07-19 23:52:47 +10:00
Daniel Martí
f97b1851e6 Merge branch 'master' of https://gitlab.com/relan/fdroidclient 2015-07-17 09:52:09 -07:00
Peter Serwylo
240bcce445 Remove bonjour preference. Separate bluetooth and wifi more clearly.
Before, you could "Enable swapping" without specifying which type
of protocol to enable. Now, the two switches are clearly delimited
between bluetooth and wifi.
2015-07-18 01:48:56 +10:00
Peter Serwylo
4f4310c0ca Clean up after merging swap stuff. 2015-07-18 00:08:25 +10:00
relan
6ddd1571c7 Change repositories icon
Use ic_toc_white instead of ic_view_headline_white. The latter often used
to show navigation drawer and thus may be confusing.
2015-07-17 15:43:42 +03:00
relan
2dc689e2a1 Remove icons from dialogs titles
Dialogs should not have icons in their title bars. See the Material Design
spec:

    http://www.google.com/design/spec/components/dialogs.html
2015-07-17 09:59:34 +03:00
relan
f0f0bd09d3 Reuse existing refresh icon
Use Material-style icon instead of the old Holo-style one.
2015-07-17 09:20:47 +03:00
relan
cc43561bf2 Reduce action bar icons size from 48dp to 24dp
From the Material Design spec:

> DP unit grid

> System icons are displayed at 24dp.

See http://www.google.com/design/spec/style/icons.html#icons-system-icons

Script used to update the icons:

    function download {
        F-Droid/tools/download-material-icon.sh F-Droid/res $1 $2
    }

    download content add
    download device bluetooth
    download action delete
    download notification do_not_disturb
    download image edit
    download action help
    download device nfc
    download av play_arrow
    download navigation refresh
    download action search
    download action settings
    download social share
    download action view_headline
2015-07-17 08:34:32 +03:00
Peter Serwylo
0a373de7a4 Merge branch 'nathan-bluetooth-swap' into nearby-peers-with-bluetooth 2015-07-15 17:42:03 +10:00
Peter Serwylo
a653e6392c Merge branch 'repoupdater-simplify-and-streams' into 'master'
simplify RepoUpdater and use more streams

This is an overhaul of `RepoUpdater` to make its code match the architecture that is in use now: only download and use a signed index.jar.  It also streams index.xml directly out of the index.jar and directly into the XML parser.  That makes the update process quicker and more reliable because it no longer has to write out an index.xml to the filesystem, then read it in.  Ultimately I hope to stream the index.jar download directly to the XML parser, so not even the index.jar needs to be written to disk.  You can see that work in my git repo under the branches SKETCH-JarURLConnection and SKETCH-verify-with-JarInputStream for two different approaches.

This also changes the index parsing process to be based on bytes for now.  The progress is based on the stream now, and this will still work once the full streaming mode is implemented.  It also simplifies `RepoXMPHandler`.

This includes tests for index.jar signature verification. The tests all pass on my machine and our Jenkins.

See merge request !101
2015-07-13 20:50:50 +00:00
n8fr8
2a6b514232 change BT request handling to operate directly on files
We don't want to depend on HTTP being active in case there is
no wifi that exists at all. In some cases, local 127.0.0.1 does not
exist if the Wifi is not connected. This commit takes the code
from LocalHTTPD and repurposes it for the BluetoothServer needs.
2015-07-13 16:45:53 -04:00
n8fr8
e930e03378 improvement on scan/re-scan logic to avoid failure 2015-07-13 16:05:13 -04:00
n8fr8
c53df989b8 small UI clean-up of header display 2015-07-13 16:05:00 -04:00
n8fr8
c399a17369 add more checks for possible NPE and simplify the UI 2015-07-13 15:04:38 -04:00
n8fr8
cc6b2736ce add logic for setting/re-setting "Fdroid" name tag for bluetooth device 2015-07-13 14:41:21 -04:00
n8fr8
d662c15fb8 list background should be white 2015-07-13 14:40:22 -04:00
n8fr8
99a86c4080 handle null adapter case 2015-07-13 14:40:11 -04:00
Hans-Christoph Steiner
01fce7f94f re-enable Lollipop spongycastle hack
It doesn't look like there is an easy way around this, so re-enable it in
the new structure.

#111 https://gitlab.com/fdroid/fdroidclient/issues/111
2015-07-13 10:32:08 -07:00
Hans-Christoph Steiner
2910acc906 break out TOFU so all connections also run through regular verification
This drastically simplifies the very important index.jar signature
verification process by splitting out the Trust On First Use (TOFU) part of
the process into its own method, and makes the TOFU write happen separately
from the `RepoUpdateRememberer`.  It requires all connections go through
the normal verification process.
2015-07-13 10:32:08 -07:00
Hans-Christoph Steiner
43cc017c91 Utils.closeQuietly() for closing things in finally {} blocks 2015-07-13 10:32:08 -07:00
Hans-Christoph Steiner
675151b4ef rename string status_processing_xml to prevent crashes on old translations
Thanks to @mvdan for catching that.  Turns out Java's String formatting is
not as tolerant as C's printf().  Java crashes when the format is wrong,
while C just ignores extras.
2015-07-13 10:32:08 -07:00
Hans-Christoph Steiner
64d709c142 create ProgressBufferedInputStream to get progress info while parsing XML
Might as well tap into the stream to get the byte counts, that's best
progress info I can think of when parsing a file.

This is a step towards a single progress bar for the whole process, instead
of showing one progress for downloading, another for parsing XML, then a
third for processing the new app info.
2015-07-13 10:32:08 -07:00
Hans-Christoph Steiner
4f2650cd47 update logic to match only parsing signed index files
Now that there is only ever the index.jar, the whole flow of RepoUpdater
has changed quite a bit.  This updates the logic for deciding when to store
the current repo's pubkey in the database for future reference.

This changes the flow to stop writing the unpacked index.xml and instead
stream it directly to the XML parser from the index.jar.  This should speed
things up some.
refs #259 https://gitlab.com/fdroid/fdroidclient/issues/259

This is also work towards running the whole thing in the background:
refs #103 https://gitlab.com/fdroid/fdroidclient/issues/103

This also removes the progress stuff since it will need to change a lot to
work with the streaming mode
2015-07-13 10:32:07 -07:00
Hans-Christoph Steiner
d7efc99bdb simplify RepoUpdater to remove cruft from previous code structure
Before, there was an abstract RepoUpdater class with two subclasses, one
for signed and unsigned.  Now there is just a single class, and it only
ever starts with the index.jar.  So this removes lots of code that was
there to handle that more complicated structure.  For example, there is no
longer the need to separately work on the index.xml vs index.jar.
2015-07-13 10:32:07 -07:00
Hans-Christoph Steiner
3c6389c004 fix failing symlink test
the dest.txt  symlink was produced, but it was pointing to a non-existent
file.
2015-07-13 10:32:07 -07:00
Peter Serwylo
a8dedd8ac2 Removed SwapAppListActivity, implemented UI mockup for swap app list.
Still need to hook up the buttons in the app list, but this change
shows the correct status and/or buttons for installable/upgradable/
incompatible/installed apps in the swap list. This change also hooks
up UIL to download icons for apps and thus display them in the list.
2015-07-13 22:52:51 +10:00
Daniel Martí
ef4c67530a Merge branch 'master' of https://gitlab.com/relan/fdroidclient 2015-07-12 11:42:27 -07:00
Peter Serwylo
f236dc3d3e Removed ConnectSwapActivity, refactored into SwapWorkflowActivity.
Involved creating another view/state for which the swap workflow can
be in. It is not explicitly stated by setting the state of the SwapService,
as is the case with other views. Rather, it is inferred based on the
presence of a `NewRepoConfig` crafted from the incoming intent in
`onResume()`.

Also gave me an idea of how to move more logic out of individual views,
and into the SwapWorkflowActivity. That is, inflateInnerView should
return the inflated view, to be cast into the specific subclass. From
there, the activity can call methods directly on the view to set it
up, rather than having the view do that stuff itself. In the future,
may consider doing this with other views too.
2015-07-12 23:18:09 +10:00
Nico Alt
53c4ba52c4 delete default value for old permission preference 2015-07-11 11:43:59 +02:00
Peter Serwylo
4e4d3ec3f9 WIP: More cleaning up of swap process, unbinding service, and investigating getting rid of ConnectSwapActivity. 2015-07-10 01:14:32 +10:00
Peter Serwylo
0b1e2732c2 Refactored SwapService + SwapManager into single SwapService 2015-07-09 11:43:34 +10:00
relan
c6a2b1174e Apply new UI colors
Action bar color is Blue 700.
Status bar color is Blue 900.
Accent color is not from Material Design palette.

See https://www.google.com/design/spec/style/color.html for color values.
2015-07-04 21:32:38 +03:00
relan
db3e8a62c4 Update raster icons
Script used to generate raster icons:

    function rasterize_icon {
        inkscape media/fdroid-logo-2015/$1.svg -e F-Droid/res/drawable-$4/$2.png -w $3 -h $3
    }

    function rasterize {
        rasterize_icon $2 $3 $(( 18 * $1 )) ldpi
        rasterize_icon $2 $3 $(( 24 * $1 )) mdpi
        rasterize_icon $2 $3 $(( 36 * $1 )) hdpi
        rasterize_icon $2 $3 $(( 48 * $1 )) xhdpi
        rasterize_icon $2 $3 $(( 72 * $1 )) xxhdpi
        rasterize_icon $2 $3 $(( 96 * $1 )) xxxhdpi
    }

    rasterize 2 fdroid-logo ic_launcher
    rasterize 2 default-app ic_repo_app_default
    rasterize 1 default_notification ic_stat_notify
    rasterize 1 updates_notification ic_stat_notify_updates
2015-07-04 21:29:16 +03:00
relan
4bf5a37cf8 New launcher icon
Now in Material Design style. Other icons updated accordingly.
2015-07-04 21:17:14 +03:00
Daniel Martí
618b1096f3 Remove partial arrays to fix theme selection crashes 2015-06-30 10:22:05 -07:00
Peter Serwylo
a3af6b8b9f WIP: Serialize bonjour peers correctly. Refactor mini-service APIs.
The reference to mini-services above are not full blown Android
services. Rather, they are utility classes which can be started,
stopped, and send broadcasts about their status.

Made the list of apps to install better, with buttons for install
or upgrade, and statuses for incompatible and installed.
2015-06-30 19:04:06 +10:00
Daniel Martí
186b2d0dc8 Mention material in the changelog 2015-06-28 13:43:05 -07:00
Daniel Martí
3cc54ad2ff Bump to 0.94-test 2015-06-28 13:41:51 -07:00
Daniel Martí
6e5468daa1 Remove unused code in TabsAdapter 2015-06-28 13:37:37 -07:00
Daniel Martí
d9c2ea6fb6 Remove unused imports 2015-06-28 13:33:19 -07:00
Daniel Martí
2b15a3c17b Make good use of TextUtils.isEmpty()
Keep a consistent style when checking for empty strings. This also adds some
missing lentgh() > 0 checks in crucial places like AppDetails.
2015-06-28 13:24:23 -07:00
Peter Serwylo
22b072962e WIP: Don't show self in Bonjour peer list. Implement UI for peer list.
Peers are shown as proper list items now, subject to feedback from Carrie.
TODO: Need to figure out how to combine bluetooth and bonjour with same
fingerprint.
2015-06-27 10:12:26 +10:00
Peter Serwylo
30669f8058 WIP: Hooking up specific peers from the "nearby peers".
Touching the peers will prompt app selection for swap, then skip the
wifi and NFC screens, then show updating info, then a list of apps to
swap.
2015-06-26 00:13:52 +10:00
Peter Serwylo
7c49f03f21 Updated readme with instructions for running tests. Fixed for Andoid-10
Updated the README with details of how to run the tests. Also added a
minor fix to allow tests to run on pre-honeycomb devices. However their
behaviour may not be 100% defined - because the contentproviders are
not shuttind down correctly due to lack of an API to do so.
2015-06-24 21:36:36 +10:00
Daniel Martí
e7912359eb Drop ant support
It broke with a recent support lib update that made the binary library be an
.aar instead of a .jar. Besides, the ant plugin has been buggy and unsupported
for a very long time.

Also dropping support for eclipse in the process, which lets us get rid of the
nasty symlinks.
2015-06-24 00:01:51 +02:00
Peter Serwylo
5e9931fa03 WIP: Make bluetooth/bonjour peers parcelable.
The Bluetooth peer need only parcel up the BluetoothDevice, which
itself is parcelable. The wifi peer requires the JmDNS ServiceInfo
class to be parcelled. For this, I took the most full on looking
constructor, and parcelled up each individual property of the service
info object which is required by that constructor.

Also made the scan qr button hooked up to the swap process, and fixed
minor bugs with the "visible via wifi" TextView setup.
2015-06-24 07:16:49 +10:00
Peter Serwylo
8ae3ae3e80 WIP: Start initial swap repo instantly, with only F-Droid...
... then when the swap process is setup properly, setup a real swap
repo with all of the apps that were selected.
2015-06-23 23:17:35 +10:00
Peter Serwylo
e343918ef9 WIP: Moving from listener to broadcasts for discovered peers. 2015-06-23 23:12:57 +10:00
Peter Serwylo
ff93f96959 WIP: MOre ui stuff for "Start Swap" screen. 2015-06-23 22:46:52 +10:00
Daniel Martí
44127c563d Merge branch 'debuggable' of https://gitlab.com/slackydeb/fdroidclient 2015-06-22 22:06:54 +02:00
Peter Serwylo
0100415e3e WIP: Refactoring Bonjour from manage repos to swap.
Implementing the bare bones of a generic "peer finder" framework. This
may or may not eventuate to something which can live in its own library
and be used by other projects. Might go hand in hand with Carries idea
of having a common UI to be shared among projects.

Got Bluetooth and Bonjour kinda working, but the UI is crud,
and it doesn't remove items and ends up with duplicates. Otherwise,
on our way to a proper "nearby peers" screen.
2015-06-22 08:59:37 +10:00
Peter Serwylo
a30ec646b2 WIP: Refactoring Bonjour from manage repos to swap.
Implementing the bare bones of a generic "peer finder" framework. This
may or may not eventuate to something which can live in its own library
and be used by other projects. Might go hand in hand with Carries idea
of having a common UI to be shared among projects.
2015-06-22 08:55:46 +10:00
Peter Serwylo
593aaf3894 WIP: I18n of start swap screen, colouring of text, add header.
Styled "send fdroid" and "qr code" buttons correctly.
2015-06-22 08:54:23 +10:00
Luca Favatella
a965ab755a Add debuggable option in build.gradle...
... as recommended at https://developer.android.com/tools/device.html
2015-06-21 19:13:53 +01:00
Daniel Martí
515ca01d38 Replace all occurences of FDroid with F-Droid
Except FDroid.apk, since that is actually its name. Thanks to @SylvieLorxu for
spotting.
2015-06-21 13:48:10 +02:00
Peter Serwylo
2645b2bfd4 Script to convert SVG's into (many different res) drawables.
Adapted from 3ee3b4aad8/original/convert.sh
2015-06-21 10:40:38 +10:00
Peter Serwylo
a48deb9160 WIP: More work on UI for initial swap screen. 2015-06-21 10:05:38 +10:00
Daniel Martí
0a71d6b45d Merge branch 'fix_android-mk' of https://gitlab.com/SWW13/fdroidclient 2015-06-18 23:25:44 +02:00
Daniel Martí
71704d5cbc Merge branch 'master' of https://gitlab.com/xphnx/fdroidclient 2015-06-18 23:25:16 +02:00
Nico Alt
5be35d1d87 Merge branch 'material-design' into 'master'
Material Design

Similar to !94, this wants to merge from the F-Droid branch.
Old MR is !84.

See merge request !95
2015-06-18 21:17:36 +00:00
Daniel Martí
a7c9be9b16 Don't read empty xml elements from the index
This fixes cases where e.g. strings would be "" instead of null. Fixes #285.
2015-06-17 20:59:27 +02:00
Daniel Martí
f95bfc397d Run remove-unused-trans script 2015-06-17 12:09:05 +02:00
Daniel Martí
7f3db513e5 Don't mention automatic app updates, closes #280
This feature is not yet implemented. The new sentence is more generic and
doesn't get us into trouble.
2015-06-17 12:08:24 +02:00
rober
5bb3721b3a fix link icons 2015-06-16 20:15:01 +02:00
Android Build System
41b0d0fa7e symlink build dir into out 2015-06-16 20:05:55 +02:00
Daniel Martí
7e0f4bbc0e We bumped minSdk to 8, so TargetApi(8) can go 2015-06-16 17:22:57 +02:00
Peter Serwylo
b0b285bc1f Merge branch 'swap/bluetooth' into swap-demolition-material-mockups 2015-06-17 00:41:37 +10:00
Nico Alt
8bb4d9012f delete case in switch for deleted theme 2015-06-15 21:19:15 +02:00
Peter Serwylo
a345788dba Added material icons from CC licensed "Google material icons" set.
Fixes #240.

To make this easier, I added a script to aid in downloading icons.
Checkout F-Droid/tools/download-material-icon.sh for more details.

The icons are licensed under the CCv4 attribution license, which I
added a shout out to under "License" in the README.md.
2015-06-15 21:19:14 +02:00
Peter Serwylo
71605e98dc Made swap button text white. 2015-06-15 21:19:14 +02:00
Peter Serwylo
a50efda113 Updated support libraries to 22.1.0 2015-06-15 21:19:14 +02:00
Peter Serwylo
6452d2da96 More colours beyond colorPrimary.
Signed-off-by: Nico Alt <nicoalt@posteo.org>
2015-06-15 21:19:14 +02:00
Peter Serwylo
d94e8a4ad2 Made category Spinner style correctly.
Signed-off-by: Nico Alt <nicoalt@posteo.org>
2015-06-15 21:19:14 +02:00
Nico Alt
03c5a224de fix #91: Material Design
- use 'com.android.support:appcompat-v7:22.0.0' instead of version 20.0.0
- ActionBar color: "F-Droid Blue" (also option for "F-Droid Green")
- fix invisible swap button with Material Design
- remove "Light + dark action bar" theme (as of Action Bar is always blue/green)
2015-06-15 21:19:14 +02:00
Peter Serwylo
d6aa60b211 Updated changelog after two merge requests merged. 2015-06-15 22:20:16 +10:00
Daniel Martí
a2fac20e6b Bump to 0.93-test 2015-06-15 13:21:04 +02:00
Peter Serwylo
78b5f489ef Merge branch 'fix-263/explicitly-add-swap-repo' into 'master'
Fix #263 "cannot manually add repo that was swapped before"

Pretends that the swap repo never existed, by deleting it before adding
the new repo, and showing the same message that is shown when a new
repo is added. This does not change behaviour for existing non-swap
repos. They are not deleted before being added again, or else we would
lose the ability to verify the fingerprint of an existing repo is the
same as a newly added one with the same URL.

Note that this has the effect that the fingerprint/pubkey of the swap
repo is nuked when adding that repo manually.

Internationalised the string "BAD FINGERPRINT" while I was at it.

To test it out, here is some instructions to make life easier:

Firstly, go into manage repos and delete the guardian project main repo (going to pretend to use this for swapping to make life easier).

Then if you run `sqlite3 /data/data/org.fdroid.fdroid/databases/fdroid` and execute the query:

`select substr(fingerprint, 0, 10), substr(pubkey, 70, 10), address, isSwap from fdroid_repo order by fingerprint desc;`

You should see:

```
B7C2EEFD8|081ad310b3|https://guardianproject.info/fdroid/archive|0
43238D512|071310b300|https://f-droid.org/archive|0
43238D512|071310b300|https://f-droid.org/repo/|0
```

Now simulate a swap session like so:

```
adb shell am start -a android.intent.action.VIEW -d 'https://guardianproject.info/fdroid/repo?swap=1'
```

Which results in the following database:

```
B7C2EEFD8|081ad310b3|https://guardianproject.info/fdroid/archive|0
B7C2EEFD8|081ad310b3|https://guardianproject.info/fdroid/repo|1
43238D512|071310b300|https://f-droid.org/archive|0
43238D512|071310b300|https://f-droid.org/repo/|0
```

Note the last column (`isSwap`) is `1` for the newly added swap repo. Now we will add the repo (without a fingerprint) to the Manage Repo activity. If you are feeling lazy, execute:

```
adb shell am start -a android.intent.action.VIEW -d https://guardianproject.info/fdroid/repo
```

The repo will be removed, then re-added as a TOFU repo:

```
B7C2EEFD8|081ad310b3|https://guardianproject.info/fdroid/archive|0
43238D512|071310b300|https://f-droid.org/archive|0
43238D512|071310b300|https://f-droid.org/repo/|0
||https://guardianproject.info/fdroid/repo/|0
```

I noticed some bugginess with sending the same intent and it being ignored, I'll have to look at this another day (not caused by this change, it already existed in master).

See merge request !90
2015-06-15 09:33:06 +00:00
Peter Serwylo
435fc27e31 Merge branch 'fix-267/nfc-swap' into 'master'
NFC swap now goes to confirm swap, not manage repos activity.

The NFC message now is handled by the FDroid activity, so it is treated
the same way as every other incoming repo URL. Because FDroid handles
incoming intents correctly, the NFC one just magically works when
the <intent-filter> is moved from ManageReposAcivity to FDroid without
further code changes.

The other change is that the two way swap only happens when both are
actually swapping. Otherwise, we will send a request for someone to
swap with us, when we are incapable of swapping with them.

Fixes #267.

See merge request !91
2015-06-15 09:28:24 +00:00
Daniel Martí
3fa5a51600 No need for TabInfo struct in TabsAdapter 2015-06-15 01:38:52 +02:00
Daniel Martí
4084cd5260 Remove redundant constructor call 2015-06-15 01:38:43 +02:00
Daniel Martí
3aa8bf4ea0 Apply some android studio fixes 2015-06-15 01:38:21 +02:00
Daniel Martí
93973131f7 Start changelog for next release 2015-06-14 19:46:41 +02:00
Daniel Martí
62f9c84252 Merge branch 'fdroid-system-install' 2015-06-14 18:15:19 +02:00
Nico Alt
e92be5322d update icons
- icons for dogecoin and litecoin
- updated icons for website, bitcoin, donate, flattr and issues

Thanks to xphnx (https://gitlab.com/xphnx)
2015-06-14 14:57:15 +02:00
Peter Serwylo
4a8ff47fce WIP: Implementing mockups from Carrie, added "Toolbar"
The Toolbar is the new thing from Google which acts as an ActionBar.
It is not a special view like the action bar is, it is
implemented and added to your layout the same as any view.

The InnerView classes of the swap workflow have the choice of what
colour to make the toolbar, so that they can distinguish themselves
as per the mockups (some deep blue, others bright blue).

Added icons for close, but they don't do anything yet.

Minor tweaks to layout so that it looks more like the latest mockups.
2015-06-12 22:45:55 +10:00
Peter Serwylo
0d4c61df96 WIP: Implementing UI mockup, different "selected" indicator for swap.
Using stock icons from Google Material Icons. Need to use the actual
icons provided by carrie, but will do so in the future.
2015-06-11 08:21:10 +10:00
Daniel Martí
4895e2d790 Fix large icons by caching two icon urls per app in the DB 2015-06-10 15:48:57 +02:00
Nico Alt
f0c00c144c Add support for changelog links 2015-06-10 15:48:50 +02:00
Nico Alt
a653b0156a improve AppDetails
- App icon is now 72dp x 72dp
- Description is expandable
- License, categories, Website, Source Code, Issues and Donate (#232) are moved from header to summary
- Buttons to install, update and run are moved from action bar to header
- Permissions are expandable and always shown
- Add myself to copyright holders of "F-Droid/res/layout/app_details_header.xml", "F-Droid/res/layout/app_details_summary.xml" and
"F-Droid/src/org/fdroid/fdroid/AppDetails.java"
2015-06-10 15:48:11 +02:00
Daniel Martí
ee6daf356b Bump all bundled repo versions to 13 2015-06-10 15:48:02 +02:00
Daniel Martí
5f27b65a92 Remove duplicate ICON_URL values.put() line 2015-06-08 23:53:51 +02:00
Daniel Martí
ab7067f247 Also bundle repo versions in the client
Without them, some features like proper density icons only worked after the
first update, but not on the first index update itself since the version
defaulted to 0.
2015-06-08 23:53:07 +02:00
Daniel Martí
3b962b7546 Bump to 0.92 with changelog 2015-06-08 17:06:27 +02:00
Dominik Schürmann
2e6984bfbe Use new icon for install into system notifications 2015-06-08 16:34:04 +02:00
Peter Serwylo
c6bc8b5e37 Merge branch 'material-design' into swap-demolition-material 2015-06-04 08:26:46 +10:00
Peter Serwylo
f9bcf33d50 WIP: Fixed minor UI issues.
"Confirm swap" background was white but should have been blue.

SwapWorkflowActivity now extends ActionBarActivity instead of
FragmentActivity so older devices have an action bar (though it is
not styled with blue action buttons on android-10 devices).
2015-06-03 23:55:11 +10:00
Peter Serwylo
d9f91da9a6 WIP: Added logging, removed dead code, fixed minor bugs.
Logging to help understand when the service is started, stopped,
restarted, and when individual components (e.g. web server, bonjour)
are started/stopped.

Fixed bug where service was moved to foreground during "restartIfEnabled"
because that is unneccesary if it is already in the foreground.
2015-06-03 23:41:51 +10:00
Peter Serwylo
2553b8520c WIP: Move swap starting/stopping to async task.
There is now a private [en|dis]ableSwappingSynchronous() method, to go
along with the public [en|dis]ableSwapping() method. The public method
knows about not spinning up tasks if already enabled, and also about
pushing the invocation to a background task. The private method just
blindly does what it is asked, without checking if it should be done,
and without running on a background task.

The same goes for the restartIfEnabled() method, it is responsible for
creating a single background task which runs in order: disable, and
then enable. This is actually the reason for having the synchronous
methods, rather than having, e.g., the public [en|dis]ableSwapping()
method know about threads. If that was the case, then restarting would
consist of starting, waiting for some form of notification that the
background task has completed, and then scheduling the enable task.
Now, it is a matter of calling both *SwappingSynchronous methods in
succession.
2015-06-03 17:55:36 +10:00
Peter Serwylo
7c9492e6b4 WIP: Refactoring swap service.
Removed LocalRepoService, replaced with SwapService.

Still TODO:
  Manage threads. Currently everything is called from the
  UI thread, which is a regression from the previous behaviour.
  I'd like to manage this so that the code interacting with the
  SwapManager doesn't need to bother itself with whether it is calling
  from the UI thread or not.

The local repo service had many different methods and properties for
dealing with starting and stopping various things (webserver, bonjour,
in the future it will also need to know about bluetooth and Wifi AP).

The SwapService handles this stuff by delegating to specific classes
that are only responsible for one of these. Hopefully this will make
the process of enabling and disabling swap repos easier to reason
about.

The local repo service was also stopped and started quite regularly.
This meant it was up to the code making use of the service to know if
it was running or not, and to enable it if required.
The new SwapService is only started once (when the singleton
SwapManager is created for the first time). It should not use any more
resources, because it is a background service most the time, and it
is responsible for moving itself to the foreground when required (the
burden is not on the code consuming this service to know when to do
this).

By having the service running more often, it doesn't need to'
continually figure out if it  needs to register or unregister listeners
for various properties (e.g. https enabled) or wifi broadcasts. The
listeners can stay active, and do nothing once notified if swapping is
not enabled.

Moved the timeout timer (which cancels the swap service after 15 mins)
into the SwapService, rather than being managed by the
SwapWorkflowActivity. Seems more appropriate for the service to know to
time itself out rather than the Activity, seeing as the Activity can
die and get GC'ed while the service is still running.

Finally, although there is nothing stopping code in F-Droid from
talking to the service directly, it is now handled by the SwapManager
singleton. This means that details such as using a Messenger or Handler
object in order to communicate via arg1 and arg2 is no longer required,
and instead methods with proper type signatures can be used. This is
similar (but not exactly the same) to how Android system services work.
That is, ask for a "Manager" object using getSystemService(), and then
use that to perform functionality and query state via that object,
which delegates to the service. Then we get the best of both worlds:

 * Reasonable and type safe method signatures
 * Services that are not tied to activity lifecycles, which persist
   beyond the closing of the swap activity.
2015-06-02 00:18:37 +10:00
Daniel Martí
9795b31b69 Add missing language code for Sardinian in the settings
Closes #272
2015-05-30 12:19:39 +02:00
Daniel Martí
578a98250b Add script to detect missing language codes in the settings
This will prevent future issues like #272
2015-05-30 12:19:25 +02:00
Daniel Martí
38ab8ac353 Don't add count=-1 to bytesRead when finished 2015-05-30 00:51:35 +02:00
Daniel Martí
29403c1d84 Use KiB for progress in apk downloads
Quick improvement for #270, but a proper solution would be more complex to
also do MiB when appropriate. It would probably involve a modified
ProgressDialog.
2015-05-29 23:39:28 +02:00
Daniel Martí
d70fd02178 Hide more debug logs from release builds 2015-05-29 17:00:08 +02:00
Daniel Martí
02ed2293e6 Make "failed" log messages be warnings, not debugs 2015-05-29 16:59:40 +02:00
Daniel Martí
35f9900101 Update UIL to 1.9.4 2015-05-29 12:34:02 +02:00
Peter Serwylo
0e16eae5bc Minor fixes to swap after refactor.
List views need to have their header view set _before_ an adapter is
assigned to them.

Was incorrectly passing an application context instead of an Activity
context to the progress dialog for swap.

Extend ActionBarActivity rather than FragmentActivity.

Don't persist swap workflow state to disk, only store it in the
singleton.
2015-05-28 23:34:03 +10:00
Peter Serwylo
ea61e8f2d3 Organised SwapState class, moved methods around to make more sense.
Put all of the step handling code in one place, added some comments to
make sense of the different parts of the claass and their
responsibilities.
2015-05-25 16:20:56 +10:00
Peter Serwylo
c26c6b9e89 Removed old SwapActivity + Fragments.
All the code from the activity and the fragments has been successfully
ported to the SwapWorkflowActivity + Views. Thus, the code is no longer
useful, as it was only kept over the previous WIP commits so that it
can be referred to to help re-implement fragments with views.
2015-05-25 16:07:49 +10:00
Peter Serwylo
f325e9d057 WIP: Moved start/stop local repo code from static FDroidApp to SwapState
Didn't change any behaviour, but wanted to start unifying swap state
management in one location.
2015-05-25 08:39:31 +10:00
Peter Serwylo
68c6648da5 WIP: Store selected apps in SwapState. Handle back presses for swap.
Currently the view to show after pressing the back button is defined
by individual InnerView classes. For example, the JoinWifiView always
says its previous step is the SelectAppsView. This works for the most
part, but doesn't work for:

 * The first StartSwapView class (instead handled by a special case in
   the Activity).

 * WifiQrView which could either be going back to the NfcView or the
   JoinWifiView, depending on a few cases, which the WifiQrView probably
   shouldn't care about.
2015-05-25 08:17:09 +10:00
Peter Serwylo
38059ec324 WIP: Initial state handling for swap process.
The state is saved to a preference file, but that is abstracted from
the SwapWorkflowActivity. It interacts with a SwapState object, which
is relatively safe in that you should not be able to save it into an
invalid state.

Note: At this point it is not tied to any service. I'm not sure it will
ever have to be either, as the service needs to persist state somewhere
anyway, so that will probably also end up saving to a preferences file
too.
2015-05-23 13:17:33 +10:00
Peter Serwylo
1b2678d6ed WIP: Applying styles correctly to views refactored from fragments. 2015-05-23 01:25:06 +10:00
Peter Serwylo
38eafdeedd WIP: Refactored wifi QR fragment into view.
As per the select apps list, there is quite a bit of business logic
in this class, which is now spread between the activity and the view.
The activity needs to handle some stuff, because the zxing library
routes intents to either an activity or a fragment.
2015-05-23 01:11:16 +10:00
Peter Serwylo
97994c5e43 WIP: Refactored NFC fragment to view. 2015-05-23 00:55:39 +10:00
Peter Serwylo
1fd6e447af WIP: Refactored join wifi fragment into view.
There is quite a lot of business logic that was moved directly from
the fragment to the view. Before this feature is complete, that logic
should either be moved into the activity, or into some sort of
associated Presenter class for the JoinWifiView.
2015-05-23 00:46:40 +10:00
Peter Serwylo
4f7f7b2cb5 WIP: Refactored select apps to swap into view.
Not worrying about styling yet, just functionality. Added an InnerView
interface that these views can implement. Currently it asks them to
populate the menu. It may be slightly inefficient if we end up with a
popup menu, because it is called onPrepareOptionsMenu, but expects the
inner view to inflate the menu. However, for swap this shouldn't be an
issue, as all the menus pretty much fit in the action bar of most screen
sizes.
2015-05-23 00:10:50 +10:00
Peter Serwylo
b6415dadb4 WIP: Refactored start swap fragment into a view.
Added a SwapWorkflowActivity to re-implement the SwapActivity.
Once all the fragments have been refactored into views, then the
SwapActivity will be removed.
2015-05-23 00:10:07 +10:00
Dominik Schürmann
29c1aaf33c Touch instead of Click 2015-05-21 00:07:23 +02:00
Dominik Schürmann
767db8a598 Improve system install process by killing FDroid to prevent hanging, cleanup dialog builders 2015-05-20 23:56:50 +02:00
Peter Serwylo
f298ed7156 Merge branch 'fix-263/explicitly-add-swap-repo' into integration 2015-05-21 07:52:35 +10:00
Peter Serwylo
3aac399456 Merge branch 'fix-267/nfc-swap' into integration 2015-05-21 07:52:10 +10:00
Dominik Schürmann
fc631c8781 Better strings for system installer, cleanup 2015-05-20 23:27:57 +02:00
Dominik Schürmann
b393befb70 Implement notification for install into system feature 2015-05-20 21:59:24 +02:00
Dominik Schürmann
2befa22b2c Remove uneeded case of no new permissions in InstallConfirmActivity 2015-05-20 21:59:24 +02:00
Dominik Schürmann
f48236deb9 Do not show install confirm activity if there are no new permissions, externalize app diff for this functionality 2015-05-20 21:59:24 +02:00
Dominik Schürmann
62a4d58756 Use right theme in InstallConfirmActivity, cleanup 2015-05-20 21:59:24 +02:00
Daniel Martí
8e62d9ae7e Add install confirm+perms screen to SystemInstaller 2015-05-20 21:59:24 +02:00
Daniel Martí
6e89a55879 Add confirmation dialog to uninstalling via SystemInstaller 2015-05-20 21:56:45 +02:00
Dominik Schürmann
a7aa554f66 Remove root installer 2015-05-20 21:56:45 +02:00
Dominik Schürmann
51b2aeda1a Rename for consistency 2015-05-20 21:56:45 +02:00
Dominik Schürmann
03b7f59dce Add missing chmod command 2015-05-20 21:56:45 +02:00
Dominik Schürmann
709bd9d699 Simplify subclass changes, fix mkdir missing on lollipop 2015-05-20 21:56:45 +02:00
Peter Serwylo
4775c17653 Refactored system app converter into classes.
The multiple occurances of "if (Build.SDK_INT < ... )" statements
hint at the prospect that there are a couple of different implementations
of this class which behave differently. The new classes start with
InstallFDroidAsSystem, and then there are SDK specific subclasses
which provide the customization relevant for those subclasses.
2015-05-20 21:56:44 +02:00
Dominik Schürmann
c27d8f6287 Enable system installer directly on first start if FDroid is a system-app 2015-05-20 21:56:44 +02:00
Dominik Schürmann
dbbad1c95c Finish transparent activity on dialog cancels 2015-05-20 21:56:44 +02:00
Dominik Schürmann
f328a9de5e Install F-Droid as system-app via root access 2015-05-20 21:56:44 +02:00
Dominik Schürmann
9f7536a926 Allow downgrade via root installer 2015-05-20 21:56:44 +02:00
Dominik Schürmann
198c9fbaff Remove deprecated superuser permission, see https://plus.google.com/+Chainfire/posts/Ka3ujLb4bJu 2015-05-20 21:56:44 +02:00
Daniel Martí
8fd1bc39f3 Remove unused reset() from Hasher 2015-05-20 19:05:24 +02:00
Daniel Martí
8a3001465f Take some suggestions from PMD 2015-05-20 19:01:23 +02:00
Daniel Martí
3eab46d7f9 Group compileOptions together 2015-05-20 18:37:05 +02:00
Peter Serwylo
9824e8df09 NFC swap now goes to confirm swap, not manage repos activity.
The NFC message now is handled by the FDroid activity, so it is treated
the same way as every other incoming repo URL. Because FDroid handles
incoming intents correctly, the NFC one just magically works when
the <intent-filter> is moved from ManageReposAcivity to FDroid without
further code changes.

The other change is that the two way swap only happens when both are
actually swapping. Otherwise, we will send a request for someone to
swap with us, when we are incapable of swapping with them.

Fixes #267.
2015-05-20 22:10:18 +10:00
Peter Serwylo
5065c37e13 Fix #263 "cannot manually add repo that was swapped before"
Pretends that the swap repo never existed, by deleting it before adding
the new repo, and showing the same message that is shown when a new
repo is added. This does not change behaviour for existing non-swap
repos. They are not deleted before being added again, or else we would
lose the ability to verify the fingerprint of an existing repo is the
same as a newly added one with the same URL.

Note that this has the effect that the fingerprint/pubkey of the swap
repo is nuked when adding that repo manually.

Internationalised the string "BAD FINGERPRINT" while I was at it.
2015-05-20 08:26:57 +10:00
Hans-Christoph Steiner
c39e1cab6e Merge branch 'fix-117/landscape-swap' into 'master'
Force entire swap process to be portrait.

Although this is usually regarded as poor form, it is currently better
than the alternative which is the whole swap process poohing itself
when a device is rotated. In the future, it may be worthwhile investing
in designing a proper UX for landscape swap too. However the process
of swapping can be quite complex if not presented well, and so it might
end up being too much work to maintain two different UXes for landscape
and portrait.

See merge request !89
2015-05-19 18:07:42 +00:00
Daniel Martí
f5ce844803 Add some missing spacings 2015-05-19 14:40:59 +02:00
Peter Serwylo
3df1327b9b Force entire swap process to be portrait.
Although this is usually regarded as poor form, it is currently better
than the alternative which is the whole swap process poohing itself
when a device is rotated. In the future, it may be worthwhile investing
in designing a proper UX for landscape swap too. However the process
of swapping can be quite complex if not presented well, and so it might
end up being too much work to maintain two different UXes for landscape
and portrait.
2015-05-19 21:41:38 +10:00
Daniel Martí
cbf59f9dd0 Fix minsdk to be 8 instead of 7
Java 1.7 is supported from 8, not 7, so we dropped support for 7 long ago.
Very few devices run 7 and quite a few things wouldn't work on 7 anyway.
2015-05-19 13:08:55 +02:00
Daniel Martí
fc52e3e1c0 Bump to 0.91 2015-05-18 23:08:32 +02:00
Daniel Martí
f41be4bbe4 Bump to 0.90-test 2015-05-15 17:37:53 +02:00
Daniel Martí
c586de61d2 Add unsigned repos dropping to the changelog 2015-05-15 17:20:49 +02:00
Peter Serwylo
f8578b178e Fix #254 - regression where TOFU repos were not working.
The code for promoting an untrusted repo with no fingerprint, to
a repo with a pubkey and a fingerprint, was still there. The problem
was that it was being executed after we verified the index.jar cert
against the pubkey stored against the repo (which is empty for TOFU
repos).

This change makes it so that if we are updating a repo without a
fingerprint, then it is a TOFU request, and we don't try to verify
the certificates.

closes #85 https://gitlab.com/fdroid/fdroidclient/merge_requests/85
closes #254 https://gitlab.com/fdroid/fdroidclient/issues/254
2015-05-14 23:23:14 -04:00
Daniel Martí
f65824857c Merge branch 'cm-build' into 'master'
fix paths in Android.mk

It turned out i only tested the build with an outdated source tree so the last commit (38c25f0ecce48ef9cfe5b0b41956ac9a4e2047fd) broke the Android.mk build. Sorry for that.

See merge request !86
2015-05-14 23:07:58 +00:00
Simon Wörne
886919adb7 fixed apk output path 2015-05-15 00:25:44 +02:00
Daniel Martí
c5bb3adfdc Following 09444b0 - also use maxSdk when building an index 2015-05-14 17:11:14 +02:00
Daniel Martí
a936b5d070 Properly list maxSdkVersion as an incompatible reason 2015-05-14 17:07:32 +02:00
Daniel Martí
09444b0181 Also populate maxSdkVersion when parsing a package
There is no reason why this should fail, so make the default be 0.
2015-05-14 17:03:33 +02:00
Daniel Martí
70a93b01db Don't crash if links on descriptions cannot be handled
Basically the same safety net for ActivityNotFoundException that we had for
links in the menus, but for links in the descriptions too now.
2015-05-14 16:39:11 +02:00
Peter Serwylo
40925009bb Shortened log tags to below 23 chars (required by lint) 2015-05-14 22:24:40 +10:00
Peter Serwylo
52c4554877 Removed localrepo classes that were used before "swap".
All of the relevant code from them has been ported across to swap,
and they are no longer needed as a reference for how to implement
app swapping.
2015-05-14 22:24:40 +10:00
Daniel Martí
ec44c1efe5 ACCESS_SUPERUSER permission is now deprecated 2015-05-14 12:29:52 +02:00
Daniel Martí
647d63cd10 Add a couple of changelog entries 2015-05-14 12:18:53 +02:00
Daniel Martí
80fffdac61 Merge branch 'cm-build' into 'master'
added Android.mk with gradle build

Allow ROM build with fdroid using Android.mk

See merge request !81
2015-05-14 10:14:48 +00:00
Simon Wörne
38c25f0ecc build only F-Droid without unneeded libraries 2015-05-14 12:05:55 +02:00
Peter Serwylo
92430e163e WIP 2015-05-14 18:40:25 +10:00
Peter Serwylo
cb73e6352c Cleaned up some lint errors, i18n some strings. 2015-05-14 10:00:11 +10:00
Peter Serwylo
6f3ca8b9c4 WIP: Making 'scan' UI more solid 2015-05-13 16:54:50 +10:00
Peter Serwylo
d7b7af76b7 Cleanup after rebase. 2015-05-13 16:54:17 +10:00
Peter Serwylo
5e80b04266 WIP: Improving streme handling for bluetooth swap connections.
Brought in an Apache 2.0 licensed file from apache commons to help
with this, which is one of many similar classes online that do the
same thing. At this stage, didn't feel like pulling in all of apache
commons as a dependency.
2015-05-13 16:54:17 +10:00
Peter Serwylo
41b3eab1fd WIP: Bluetooth successfully sending entire HTTP responses to GET requests.
Now to move the code into a BluetoothDownloader and decide how best
to handle connections, error handling, multiple downloads over one
socket, etc.
2015-05-13 16:54:16 +10:00
Peter Serwylo
7dff9a9499 WIP: Bluetooth communication between devices is up and running (not finished).
Devices now make themselves discoverable, and the client sends a test ping.
They UI is not styles properly though, and it doesn't handle the case where
somebody chooses to make their device not-discoverable (because the desired
peer is already paired and it is unneccesary). It also doesn't handle failure
anywhere.
2015-05-13 16:53:10 +10:00
Peter Serwylo
fba02e32b5 WIP: Bluetooth list of paired devices. 2015-05-13 16:39:10 +10:00
Peter Serwylo
45a3efa2b3 WIP: Started to implement the general concept of BluetoothDownloader
I'm not 100% sure it is the right architecture yet, there wil no doubt be
things that crop up as I continue to implement it. However it seems to
be alright to work with so far.
2015-05-13 16:37:41 +10:00
Peter Serwylo
92e4d99c1c Added material icons from CC licensed "Google material icons" set.
Fixes #240.

To make this easier, I added a script to aid in downloading icons.
Checkout F-Droid/tools/download-material-icon.sh for more details.

The icons are licensed under the CCv4 attribution license, which I
added a shout out to under "License" in the README.md.
2015-05-12 01:26:31 +10:00
Peter Serwylo
1203cacbe4 Made swap button text white. 2015-05-11 16:27:41 +10:00
Peter Serwylo
96bffff8ac Updated support libraries to 22.1.0 2015-05-11 15:54:19 +10:00
Peter Serwylo
239ccbf0f3 Updated changelog
Added comment about preventing addition of the same repo multiple
times.

More specific comment about pname et al, so that people don't think
they can use the regular search feature of F-Droid to search by
package name with a pname: prefix. Instead, it is only applicable to
incoming intents.
2015-05-11 09:14:18 +10:00
Peter Serwylo
c33cacedaf Merge branch 'master' into 'master'
improved, but still rudimentary, hotspot handling in swap

My previous merge request fdroid/fdroidclient!78 was based on one broken assumption: `WIFI_STATE_UNKNOWN` means that the hotspot is active.  Apparently, that's not always the case.  Also, sometimes when the hotspot is active, its `WIFI_STATE_DISABLED`.  Even worse, there is no broadcast message sent on final config of the hotspot.  There is only a `WIFI_STATE_DISABLING` from turning off the wifi, but then never a broadcast for `WIFI_STATE_UNKNOWN` and/or `WIFI_STATE_DISABLED`.  But I found some tricks that seem to work for now.  We'll need to use your library, @mvdan, to really get good support of hotspots.

This also includes some basic UI tweaks to represent the hotspot mode in the swap wifi screen.

See merge request !79
2015-05-10 22:39:12 +00:00
Daniel Martí
da9396fff1 Remove unnecessary and confusing import 2015-05-10 16:08:43 +02:00
Peter Serwylo
3df03bbb1e Fix #250. Fix #251. Normalize URLs before saving, and disallow invalid URLs.
Removes trailing slashes from URLs, replaces multiple consecutive forward
slashes in the path with a single slash. Canonicalizes the URL.

If the URL is invalid, display a message to the user and don't let it get
added.

NOTE: This does *not* normalize existing URLs in the database.
2015-05-10 23:22:35 +10:00
Peter Serwylo
93339cbbfb Fix issue 246: Rewrite process for verifying existing repos.
Previously it would only compare the details of a new repo to existing
ones if the new repo came via an intent. Now it does it whenever you
change the text in the new repo dialog (shouldn't be too much of a
performance hit, it isn't doing very much).

The things it (still) doesn't do is:
 * verify that the url looks like a url
 * sanitize the newly input uri and compare it to sanitized saved repos

The second point means that you can end up with:
 http://10.0.1.50/ and
 http://10.0.1.50

both in the list. I'm going to log an issue for this, because it should
be fixed, but doesn't need to hold this up.
2015-05-10 21:56:40 +10:00
Hans-Christoph Steiner
12b3a5af12 initial sketch of how to display hotspot mode on the swap wifi screen
This is really just a placeholder, there is lots of work to be done here.
Really, this screen should have the SSID of the hotspot, but we need to use
a private API to get that.  Coming soon...

The icon is free software from:
https://commons.wikimedia.org/wiki/File:Wifi.svg
2015-05-10 00:37:05 -04:00
Hans-Christoph Steiner
962a2fb3d6 improve detection of hotspot mode
hotspot mode is not well represented with the WifiState stuff.  It can be
active when the WifiState is DISABLED or UNKNOWN.  Also, when switching
from active wifi to hotspot mode, WIFI_STATE_DISABLING broadcasts will be
sent, but WIFI_STATE_DISABLED/WIFI_STATE_UNKNOWN will not.
2015-05-10 00:37:05 -04:00
Daniel Martí
0db225e07c Bump to 0.89-test 2015-05-09 22:34:04 +02:00
Daniel Martí
05332409be Suppress fallthrough java warning 2015-05-09 22:24:41 +02:00
Hans-Christoph Steiner
96b7c35a2a rework WifiStateChangeService to support hotspots (aka WiFi AP on device)
When a device is setup as a WiFi Access Point aka "hotspot", the standard
API for getting the WiFi settings returns nothing.  We have to use a
separate API to get the IP address of the WiFi AP.  As far as I could tell,
there is no public API for getting the SSID/BSSID of the WiFi AP, so for
now that is left blank.  That means the wifi screen in swap is confusing
because it will say it is not attached when the device is a hotspot

@mvdan's https://github.com/mvdan/libaccesspoint should help there

#193 https://gitlab.com/fdroid/fdroidclient/issues/193
2015-05-09 13:41:30 -04:00
Hans-Christoph Steiner
edb3564e29 unified IP/Wifi state handling in WifiStateChangeService
To handle hotspots, this code will become more complicated.  Therefore,
first simplify things by putting all of the logic into one place, rather
than spread out across FDroidApp, the receiver, and the service
2015-05-09 13:41:30 -04:00
Hans-Christoph Steiner
2b59644e02 eliminate nested try/catch blocks for clearer code 2015-05-09 13:41:30 -04:00
Hans-Christoph Steiner
6703fa3652 rename to FDroidApp.restartLocalRepoServiceIfRunning() for clarity
This method handles checking if the service is running, and only restarts
it if it was running.
2015-05-09 13:41:30 -04:00
Hans-Christoph Steiner
c1b0b854fc on launch, check wifi if WIFI_STATE_ENABLED, the receiver handles the rest
On launch, we need to get the current state of the Wifi.  We only need to
start the WifiStateChangeService on WIFI_STATE_ENABLED, since any other
wifi state will be received by WifiStateChangeReceiver, which will launch
WifiStateChangeService when appropriate.

This reduces the chance that WifiStateChangeService will start when it is
not needed.
2015-05-09 13:41:29 -04:00
Hans-Christoph Steiner
bdc190a7d6 reset swap wifi info if it is not connected
Before, it was keeping the last active wifi, which is confusing when you
are not connected.
2015-05-09 13:41:29 -04:00
Daniel Martí
29b78df530 Remove "fdroid." from TAGs, add a comment on filtering by packagename 2015-05-08 23:28:32 +02:00
Hans-Christoph Steiner
0702183210 merge Fragment into ConnectSwapActivity to fix crash on rotate
I was getting frequent crash-on-rotate NullPointerExceptions after scanning
QR Codes.  This fixes it for me.

ConfirmReceiveSwapFragment is only ever used once in ConnectSwapActivity,
so it is a pointless abstraction.  It makes the code a lot more complicated
and also creates very complicated situations to handle when the screen is
rotated.  All of this gets much easier when everything is just included in
the Activity, since there is no problem being solved by the Fragments.
Fragments are for reusing chunks of UI in multiple places, or for showing
multiple chunks of UI in the same Activity.  Both of those cases can also
be handled, arguably better, without using Fragments:
https://corner.squareup.com/2014/10/advocating-against-android-fragments.html
2015-05-08 15:44:11 -04:00
Hans-Christoph Steiner
367387f967 move RepoUpdaterTest to the same package as RepoUpdater 2015-05-08 12:51:46 -04:00
Hans-Christoph Steiner
6e5912a633 move RepoUpdater from .updater package next to RepoXMLHandler
This gets rid of the .updater package, which now only contains RepoUpdater
2015-05-07 22:11:05 -04:00
Hans-Christoph Steiner
157b1e242f remove support for unsigned repos
This has been discussed quite a bit now.  It is very easy to generate a
signed repo on the server, and supporting unsigned repos adds complexity
and security issues, including "BZ-01-002 TOFU Requests too easy to
recognize and intercept" from the audit.

https://gitlab.com/fdroid/fdroidserver/merge_requests/48
closes #12 https://gitlab.com/fdroid/fdroidclient/issues/12
2015-05-07 22:11:05 -04:00
Hans-Christoph Steiner
1c5256a5d7 remove importRepo() method, it is very short and only used in one place 2015-05-07 22:11:05 -04:00
Hans-Christoph Steiner
4820ab3694 add forgotten import (I'm better at merge requests than direct pulls) 2015-05-07 22:10:38 -04:00
Daniel Martí
f4d9191ed5 Merge branch 'small-swap-repo-fixes' of https://gitlab.com/eighthave/fdroidclient 2015-05-08 00:34:49 +02:00
Daniel Martí
91541748a2 Update changelog 2015-05-08 00:33:49 +02:00
Hans-Christoph Steiner
a32154cacb don't operate on null string :( fixes previous commit 2015-05-07 18:23:04 -04:00
Hans-Christoph Steiner
281b2ce450 support market: search links that contain pname: and pub: in the query
* pub: is for searching by "Publisher Name":
  market://search?q=pub:Guardian%20Project

* pname: is an old way to specify "Package Name":
  market://search?q=pname:org.torproject.android

https://developer.android.com/distribute/tools/promote/linking.html
2015-05-07 18:15:19 -04:00
Peter Serwylo
ec67059128 More colours beyond colorPrimary.
Signed-off-by: Nico Alt <nicoalt@posteo.org>
2015-05-07 22:06:01 +02:00
Peter Serwylo
b57a122ac1 Made category Spinner style correctly.
Signed-off-by: Nico Alt <nicoalt@posteo.org>
2015-05-07 22:06:01 +02:00
Nico Alt
315265fbb4 fix #91: Material Design
- use 'com.android.support:appcompat-v7:22.0.0' instead of version 20.0.0
- ActionBar color: "F-Droid Blue" (also option for "F-Droid Green")
- fix invisible swap button with Material Design
- remove "Light + dark action bar" theme (as of Action Bar is always blue/green)
2015-05-07 22:06:01 +02:00
Hans-Christoph Steiner
c23d4e1988 get versionName from AndroidManifest.xml, remove duplicate strings field
No need to have the version set it more than one place!
2015-05-07 15:51:09 -04:00
Hans-Christoph Steiner
e543895940 fix adding repos via incoming URLs
This fixes bad logic introduced in c52262a4057f8a86a1082e4cfbab4e70ff195daf
2015-05-07 15:15:17 -04:00
Hans-Christoph Steiner
f79f95e25a fix support for nested repo URLs with bad QR scanner apps
These needed to be pathPattern rather than path in order to make the
IntentFilter treat the .* as a regexp rather than a string literal.
2015-05-07 14:59:57 -04:00
Daniel Martí
94096cdc95 Start changelog 2015-05-07 16:20:10 +02:00
Daniel Martí
01e6db5720 We don't need WRITE_EXTERNAL_STORAGE on api 19 or later
On api 19 or later, writing to your own private directory on the SD doesn't
require any extra dependencies. We only ever store icons, apks and index stuff
on the private repo, so we never read/write anywhere else on the SD.
2015-05-07 16:12:54 +02:00
Daniel Martí
1d225912f4 Remove a few unused variables 2015-05-04 00:14:40 +02:00
Daniel Martí
4a007698a6 Run dos2unix on all external source files 2015-05-04 00:08:36 +02:00
Daniel Martí
939efa5b17 Run "code cleanup" in Android Studio
This basically removes public, static and final from interfaces since it's
always that way.
2015-05-04 00:06:32 +02:00
Daniel Martí
46d79f24fc Fix to 26894fcb01d4: revert buildToolsVersion to the current release 2015-05-03 23:59:02 +02:00
Daniel Martí
0f36372d38 Fix to 26894fcb01d4: also bump the gradle dependency 2015-05-03 23:49:17 +02:00
Daniel Martí
4970bb8ead Merge branch 'master' into 'master'
Add missing import

Without this gradle shows an error...

See merge request !72
2015-05-03 14:29:51 +00:00
Nico Alt
054ac8b3fa add missing import 2015-05-03 12:18:39 +02:00
Simon Wörner
784e2abe37 added Android.mk with gradle build 2015-05-01 19:40:31 +02:00
Daniel Martí
45137f2f8e Also apply fixes to custom zxing code 2015-05-01 00:38:06 +02:00
Daniel Martí
e314c401e7 Fix possible NPE when using a TextView 2015-05-01 00:38:06 +02:00
Daniel Martí
bc98fd69b1 Apply a few android studio fixes 2015-05-01 00:38:06 +02:00
Daniel Martí
869662152a Fix regression in 9c6a652a02e
String.replaceAll(String, String) isn't in-place!
2015-05-01 00:16:18 +02:00
Daniel Martí
45ab80bb29 Make CommaSeparatedList.make() also take String[] 2015-04-30 20:51:19 +02:00
Daniel Martí
7b4cee35c7 Throw some more final keywords in 2015-04-30 20:42:30 +02:00
Daniel Martí
26894fcb01 Update libsuperuser to bc71c5afeb9952cd 2015-04-30 20:28:26 +02:00
Daniel Martí
c5ed7699d6 Backport changelog typo fixes from f-droid.org 2015-04-30 17:37:37 +02:00
Daniel Martí
49b954e63d Bump gradle plugin to 1.2.2 2015-04-29 22:16:14 +02:00
Peter Serwylo
1b114b6bae Merge branch 'fix-202' into 'master'
Fix issue #202 - crash due to sqlite parameter limit being hit.

*NOTE: Queuing here for merge after next stable.*

The queries which have the potential to cause crashes due to too many parameters in the `ApkProvider` are now encapsulated in `ApkProvider` and can only be accessed by safe helper methods, which alleviate the problem by breaking big requests down into many smaller requests.

This will probably have to be done for the `ApkProvider`, but leaving for now because the limit is twice as big.

See merge request !70
2015-04-28 21:35:46 +00:00
Peter Serwylo
833db3b5ce Merge branch 'fix-220' into 'master'
Cache files to SD card again (if preference set).

**NOTE: Queueing here to be merged after next stable**

A previous security fix meant we no longer stored apk files on the
SD card. However, this should still be a feature that people can opt
for if they want, without being insecure. As such the process is now:

 * First download: put in internal storage (to ensure it can't be
   modified before installing)

 * After download: also copy to SD card for caching.

 * On starting F-Droid:

    + Always delete internal storage apks.

    + Only delete other, cached apks if cache preference is false.

To make the code simpler and less prone to bugs, I had to consider
the fact that if people did not have an accessible SD card, then the
path to a cached apk and a "downloaded but transient" apk cannot be
the same. While possible, it means many checks to see if they are
the same, thorough permission management to prevent security issues,
and makes it harder to clear transient apks when F-Droid starts.

See merge request !71
2015-04-28 21:34:05 +00:00
Daniel Martí
7267736166 Bump to 0.88 2015-04-28 23:14:55 +02:00
Daniel Martí
3ab6bd84f9 Fix copy/paste error in 14ae586
This led to devices incorrectly flagging packages as non-compatible. With this
fix everything works as before.
2015-04-24 01:16:56 +02:00
Daniel Martí
11dc9f6460 Revise changelog in preparation for stable 2015-04-22 13:28:23 +02:00
Daniel Martí
dcd425edc0 Clarify that we now ignore trailing spaces in searches 2015-04-22 13:24:03 +02:00
Daniel Martí
fa5eac0b72 Bump to 0.87-test 2015-04-21 19:29:06 +02:00
Daniel Martí
e367265396 Some style/format fixes suggested by AS 2015-04-21 19:27:10 +02:00
Daniel Martí
14ae58690c Simplify compat.SupportedArchitectures 2015-04-21 19:27:03 +02:00
Daniel Martí
a3c78e4d02 "updated" bools in App and Apk are now unused 2015-04-21 19:09:30 +02:00
Daniel Martí
76a489c492 Don't hardcode tab indexes in multiple places 2015-04-21 19:09:14 +02:00
Daniel Martí
7945c0dead Rename ignored catched exceptions to "ignored" as per AS 2015-04-21 18:59:41 +02:00
Daniel Martí
ab8a180141 Optimize imports via Android Studio 2015-04-21 18:56:52 +02:00
Daniel Martí
b7b42b77e9 Remove fix-formats.sh - should be done in the translation system 2015-04-21 17:36:13 +02:00
Daniel Martí
ec4b2bf331 Slightly simplify declarations in Utils.java 2015-04-21 17:33:52 +02:00
Daniel Martí
b84e8ef7d6 Add some more final keywords 2015-04-21 17:24:19 +02:00
Daniel Martí
cf4a1a436f Run remove-empty-trans 2015-04-21 17:18:03 +02:00
Daniel Martí
4431d25793 Run fix-ellipsis 2015-04-21 17:17:23 +02:00
Daniel Martí
4a5bb059de Remove trailing empty line in file 2015-04-21 17:16:54 +02:00
F-Droid Translatebot
6a87a372fb Translation updates 2015-04-21 16:10:00 +01:00
Peter Serwylo
72ff2b8805 Cache files to SD card again (if preference set).
A previous security fix meant we no longer stored apk files on the
SD card. However, this should still be a feature that people can opt
for if they want, without being insecure. As such the process is now:

 * First download: put in internal storage (to ensure it can't be
   modified before installing)

 * After download: also copy to SD card for caching.

 * On starting F-Droid:

    + Always delete internal storage apks.

    + Only delete other, cached apks if cache preference is false.

To make the code simpler and less prone to bugs, I had to consider
the fact that if people did not have an accessible SD card, then the
path to a cached apk and a "downloaded but transient" apk cannot be
the same. While possible, it means many checks to see if they are
the same, thorough permission management to prevent security issues,
and makes it harder to clear transient apks when F-Droid starts.
2015-04-21 22:53:32 +10:00
Peter Serwylo
424839c793 Encapsulate functions which can produce invalid SQL.
Now the other content provider functions which can result in broken SQL
due to the number of arguments is private, and can only be accessed
from a public helper method which ensures that limit is never hit.
2015-04-21 22:27:58 +10:00
Peter Serwylo
898f331bfd Fix #202: Deleting more apks than sqlite can handle in one query.
The static delete helper function in ApkProvider now supports
recursively reducing the size of the list of apks to delete, until
it is under the threshold that sqlite can handle.
2015-04-21 18:38:03 +10:00
Daniel Martí
249af82d7d Merge branch 'fix-231' into 'master'
Fixes #231 - category translations were reverting to english.

Minor fix - feel free to hold off before stable (and then we can do a 0.88-test pretty soon after stable with my other change, as we did last time), or feel free to merge beforehand and do another -test.

There are two places where translations get populated. One of them (when the fragment is initialized) translates the categories. The other place (when the "installed app cache" background process completes) did not translate the category names. They are now both translated.

See merge request !69
2015-04-20 22:42:45 +00:00
Peter Serwylo
cdb8100819 Fixes #231 - category translations were reverting to english.
There are two places where translations get populated. One of them (when
the fragment is initialized) translates the categories. The other place
(when the "installed app cache" background process completes) did not
translate the category names. They are now both translated.
2015-04-20 13:19:21 +10:00
Daniel Martí
928d3e8c9a Bump to 0.86-test 2015-04-18 00:06:13 +02:00
Daniel Martí
3ed414cf96 Don't use + in gradle deps to make the build reproducible
20.0.+ equals 20.0.0 since there wasn't a 20.0.1
2015-04-17 11:45:49 +02:00
Daniel Martí
a2e1ce0fe2 Simplify if (cond) return true; else return false; 2015-04-16 19:12:44 +02:00
Daniel Martí
8737f4a9fc Remove more unused imports 2015-04-16 19:08:17 +02:00
Daniel Martí
250749a3cd Remove unused variable left from the intent rewrite 2015-04-16 19:08:00 +02:00
Daniel Martí
39c2aeb19a updateEmptyRepos is now in views/fragments/AppListFragment 2015-04-16 19:04:14 +02:00
Daniel Martí
5e7146d19a Drop unnecessary elses after returns 2015-04-16 18:51:29 +02:00
Daniel Martí
e1a6e2386f Style all switches equally, without indentation 2015-04-16 18:41:39 +02:00
Daniel Martí
d6a8ef9e59 Compact very simple getters in a single line 2015-04-16 18:35:22 +02:00
Daniel Martí
33fd77e3b8 style fix: no spaces before post-increment 2015-04-16 18:25:13 +02:00
Daniel Martí
9c6a652a02 Avoid NPE when fetching the Wifi SSID
Fixes #220
2015-04-16 16:49:39 +02:00
Peter Serwylo
dccd0256d3 Reworded help string for cache apk preference.
There was some confusion about the "SD Card" portion of the string.
Sometimes it will not store on the SD card, e.g. if the SD card is
not mounted, or inaccessible to F-Droid.
2015-04-16 17:00:23 +10:00
Peter Serwylo
280a5e7279 Merge branch 'master' into 'master'
translation fixes for swap

I just had a Spanish-speaker test out the swap, and these are the fixes related to their bug reports.

See merge request !68
2015-04-15 21:32:54 +00:00
Peter Serwylo
0dd31c287c Merge branch 'defaultValues' into 'master'
Change some "defaultValue"s

Key "theme": I also use the dark version of F-Droid but I think the most users would prefer the light version. This is also standard in the
most used apps on Android, I think, see GApps, Flym, K-9, Telegram, ...

Key "localRepoBonjour": I never used this function and I think it's better, if the user manually activates it when he wants to use it.

Key "localRepoHttps": I see no reason why it should not use https over http, it's better of security view, I think.

Key "cacheDownloaded": The most smartphones today have enough storage available to allow to enable this function. This would decrease the
traffic on both sides, as the user does not have to download a app and the F-Droid server does not have to send it multiple
times.

This is somehow related to #221, I think.

See merge request !67
2015-04-15 21:29:29 +00:00
Peter Serwylo
6568f9fcbc Fixed crash on slow device due to database being locked.
The error below was happening on my crappy slow phone, I suspect because
the database upgrade check was locking the database, while this was
scheduled and started running on a different thread. Given it is a very
low priority task (it notifies F-Droid if apps were installed by a method
other than F-Droid) it is now delayed by 10 seconds.

E  FATAL EXCEPTION: AsyncTask #1
E  java.lang.RuntimeException: An error occured while executing doInBackground()
E      at android.os.AsyncTask$3.done(AsyncTask.java:200)
E      at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
E      at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
E      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
E      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
E      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
E      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
E      at java.lang.Thread.run(Thread.java:1019)
E  Caused by: android.database.sqlite.SQLiteException: database is locked: BEGIN EXCLUSIVE;
E      at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
E      at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1763)
E      at android.database.sqlite.SQLiteDatabase.beginTransactionWithListener(SQLiteDatabase.java:527)
E      at android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:481)
E      at org.fdroid.fdroid.data.FDroidProvider.applyBatch(FDroidProvider.java:58)
E      at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:217)
E      at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:95)
E      at android.content.ContentResolver.applyBatch(ContentResolver.java:639)
E      at org.fdroid.fdroid.data.InstalledAppCacheUpdater.updateCache(InstalledAppCacheUpdater.java:98)
E      at org.fdroid.fdroid.data.InstalledAppCacheUpdater.update(InstalledAppCacheUpdater.java:64)
E      at org.fdroid.fdroid.data.InstalledAppCacheUpdater$Worker.doInBackground(InstalledAppCacheUpdater.java:163)
E      at org.fdroid.fdroid.data.InstalledAppCacheUpdater$Worker.doInBackground(InstalledAppCacheUpdater.java:159)
E      at android.os.AsyncTask$2.call(AsyncTask.java:185)
E      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
E      ... 4 more
2015-04-16 07:24:58 +10:00
Peter Serwylo
de3e34060c Fixed issue #226 - preferences don't crash.
Use custom code rather than "Locale.forLanguageTag" (which is android-21
specific). Also fixed the actual setting of the language, by modifying
the code in FDroidApp to respect the country code (rather than just the
language code).
2015-04-16 07:08:39 +10:00
Daniel Martí
f69985d8df Log messages of waiting threads belong to Log.d
Fixes #227
2015-04-15 18:15:57 +02:00
Daniel Martí
e36ed7f941 FileNotFoundException is already part of IOException 2015-04-15 18:06:44 +02:00
Daniel Martí
1d16a6edee Remove some useless null checks 2015-04-15 18:02:09 +02:00
Daniel Martí
801ec4e7fa sendBt might be null 2015-04-15 18:00:45 +02:00
Daniel Martí
fae80fbb26 swapRepos are never used 2015-04-15 17:58:52 +02:00
Daniel Martí
2365d314c6 Simplify some catch logic 2015-04-15 17:56:40 +02:00
Daniel Martí
13c9a14a50 Remove unused imports 2015-04-15 17:49:21 +02:00
Hans-Christoph Steiner
571e4a18e4 move all text bits to strings.xml so they are translatable
Inline text is not translatable, it is important to heed the lint warnings
about:

Hardcoded string "Swap success!", should use @string resource
2015-04-14 18:08:03 -04:00
Hans-Christoph Steiner
3d203f628f use official Android methods to mark strings as "do not translate"
Android's lint will give warnings for all strings that are not translatable
or translated.  Some strings like repo name/description and language codes
should never be translated.  Here's how to officially mark as "do not
translate":

* for individual strings, include: translatable="false"
* for the entire file, name it: donottranslate.xml

http://tools.android.com/recent/non-translatablestrings
https://code.google.com/p/android/issues/detail?id=75163
2015-04-14 18:08:03 -04:00
Nico Alt
ccc9978540 change some "defaultValue"s
Key "theme": I also use the dark version of F-Droid but I think the most users would prefer the light version. This is also standard in the
most used apps on Android, I think, see GApps, Flym, K-9, Telegram, ...

Key "localRepoBonjour": I never used this function and I think it's better, if the user manually activates it when he wants to use it.

Key "localRepoHttps": I see no reason why it should not use https over http, it's better of security view, I think.

Key "cacheDownloaded": The most smartphones today have enough storage available to allow to enable this function. This would decrease the
traffic on both sides, as the user does not have to download a app and the F-Droid server does not have to send it multiple
times.
2015-04-14 23:32:40 +02:00
Daniel Martí
68ace5af24 Ignore all proguard-project.txt files 2015-04-14 22:35:09 +02:00
F-Droid Translatebot
b1b406e2d0 Translation updates 2015-04-14 20:18:41 +01:00
Ciaran Gultnieks
b0d0d66790 Remove redundant en-gb translation 2015-04-14 16:31:44 +01:00
Daniel Martí
f58f008a63 Bump to 0.85-test 2015-04-12 23:57:54 +02:00
Peter Serwylo
0174b4ca00 Don't show empty list message until cursor finishes loading.
Also forceably hid the "update all" button in the update tab.
This is because on my crapy LG Tracphone android-10 device, it is slow
enough that I can see that button appear and then disappear.
2015-04-12 10:48:02 +10:00
Peter Serwylo
8b7a9f215c Updated changelog with 2-way-swap and locale preference. 2015-04-11 23:17:08 +10:00
Peter Serwylo
7f929f96a1 Added en-US locale to preferences.
Also changed the way locales are loaded. Now it deals well with language
codes that are followed by country codes (e.g. "en-US" rather than just
"en").
2015-04-11 23:04:37 +10:00
Peter Serwylo
04a05e3c52 Merge branch 'fix155' into 'master'
Change client language from the app options (#155)

Bug: ActionBar Language does not change.

Edit: To make it more clear, you have to restart the app manually for the action bar language to be changed.

See merge request !65
2015-04-11 06:04:24 +00:00
Peter Serwylo
15b0beba17 Wifi swap client now requests swap server to connect back.
It does this by sending a HTTP POST request to /request-swap on the
swap server. That listens for a POST to this path, and responds by
popping open a confirmation message to the user on the server device.
2015-04-11 10:55:48 +10:00
Daniel Martí
3e9aca4137 Logging fixes
* Make expensive Log.d calls (inside loops) only in DEBUG
* Always make TAG private to make sure it doesn't use a parent's TAG
2015-04-10 13:58:26 +02:00
Daniel Martí
8f0488aa6a Some minor cleanups 2015-04-09 23:55:02 +02:00
Nico Alt
082c9117a2 move "Language" to "Display" (Preferences) 2015-04-09 11:58:31 +02:00
Peter Serwylo
1a114c6c45 Show app categories correctly. Fixes #214.
The categories were previously selected in the Spinner, then passed
directly to the database. Once the categories became translated, this
meant we were sending the translated category to the database.
However, the database only knows about English categories, and so we
instead need to look up the English translation for the selected
category before passing to the database. This is done by keeping
a list of original category names which is indexed the same as the
translated ones.
2015-04-09 15:47:00 +10:00
Daniel Martí
51a091fe44 Add a few changelog items 2015-04-09 00:25:42 +02:00
Daniel Martí
db19842ce0 Add support for amazon search links 2015-04-09 00:17:21 +02:00
Daniel Martí
c52262a405 Handle all app and search links via the main activity
Closes #208.
2015-04-09 00:13:40 +02:00
Nico Alt
14adb2a302 change client language from the app options (#155)
Bug: ActionBar Language does not change.
2015-04-08 20:53:04 +02:00
Daniel Martí
b751594bfe Centralise int and date parsing and formatting in Utils 2015-04-07 15:00:34 +02:00
Daniel Martí
c92970a3ed Use switches more often 2015-04-07 12:57:17 +02:00
Daniel Martí
c54c905d2e Some more small code refactors 2015-04-07 12:38:21 +02:00
Daniel Martí
0f18a0979d Run Android Studio's import optimizer
* Remove all wildcard imports
* Reorder alphabetically and by source
* Remove unused imports
2015-04-07 11:58:22 +02:00
Daniel Martí
e3175530ed Apply a bunch of Android Studio fixes 2015-04-07 11:43:07 +02:00
Daniel Martí
a67fdfeb89 Remove overrides that didn't do anything 2015-04-07 11:21:56 +02:00
Daniel Martí
0a11c4cd3e Optimize imports a bit 2015-04-07 10:47:24 +02:00
Daniel Martí
3d55c0b45b Remove unused jdk* spongycastle source files 2015-04-07 10:47:24 +02:00
Daniel Martí
c7b16c6713 Only use 3.X workarounds on 3.X 2015-04-07 10:44:33 +02:00
Daniel Martí
2f80d37c24 Add name for 5.1 (22) 2015-04-07 10:44:33 +02:00
Daniel Martí
b18231c25d Don't shadow PreferenceFragment class name
I chose PreferencesFragment (plural) in concordance with PreferencesActivity.
2015-04-07 10:44:28 +02:00
Daniel Martí
dc86129cca More final keywords 2015-04-06 17:54:28 +02:00
Daniel Martí
14a38f2f50 Better explain our code style 2015-04-06 17:54:28 +02:00
Daniel Martí
81c44ef4ae Merge branch 'fix168' into 'master'
Fix #168: Not enough space for version number and license

downgrade weight from 2 to 1 and from 1 to 0

See merge request !62
2015-04-05 16:57:11 +00:00
Daniel Martí
9261f60225 Merge branch 'fix127' into 'master'
Fix #127: Add text wrapping in application view

Similar fix like in #168.

See merge request !63
2015-04-05 16:56:34 +00:00
Nico Alt
b017f35010 fix #127: Add text wrapping in application view 2015-04-04 22:30:18 +02:00
Nico Alt
d6cac24fed fix #168: Not enough space for version number and license
downgrade weight from 2 to 1 and from 1 to 0
2015-04-04 22:11:10 +02:00
Daniel Martí
8dfeabcf18 Fix broken link (spongycastle java file moved/gone) 2015-04-03 00:08:21 +02:00
Daniel Martí
d70252a3f2 Add HACKING md file 2015-04-02 09:57:47 +02:00
Daniel Martí
822a75258c Shorten some logging tags 2015-04-02 09:46:32 +02:00
Peter Serwylo
d62a3c711d Correctly select swappable apps from list.
Previously, there was a bug with an off-by-one error, as android-11
or later was treating the headerView different to android-10 and
earlier. They now both have the same understanding about the header
view.
2015-04-02 16:20:23 +11:00
Peter Serwylo
9db556f4b7 Hack to get layouts working on API > 16
For some reasono specify different layout-v* directories to inflate
views based on the android version is  not working as desired.
Previously there was a "layout", "layout-land" and "layout-v11" dir.
Only "layout" and "layout-v11" had the "select_local_apps_list_item.xml"
layout in them, the "layout-v11" version did _not_ have a checkbox,
whereas the other vanilla one did.

This worked on a android-16 emulator. It would correctly pick up the
view from "layout-v11". However, on a android-19 device, android-19
emulator, android-21 device and android-21 emulator, they all picked
up the view from the "layout" dir - with checkbox and all.

I couldn't figure out for the life of my why this was happening, so
I started to figure out which one it _would_ work with. I added
a layout-v* for every single version, and in each, put a text view
telling me which version it was. That way, viewing the list of apps to
swap, the list would inflate a view, and tell me which layout-v* dir it
inflated it from. It worked for layout-v17 and higher, but was unable
to inflate layouts from layout-v11 to layout-v16. So I deleted all
except layout-v17, and it now works for android-16, 19 and 21 as per my
tests.
2015-04-02 14:37:40 +11:00
Peter Serwylo
ead4f449d6 Fix #211 - don't force every incoming intent to be a repo intent. 2015-04-02 09:42:48 +11:00
Daniel Martí
0a515dfae1 Bump to 0.84-test 2015-04-01 20:56:47 +02:00
Daniel Martí
4fb12261e4 Simplify some spongycastle symlinks 2015-04-01 20:55:41 +02:00
Daniel Martí
1845e392d2 Ignore stuff from imported libs 2015-04-01 20:52:48 +02:00
Daniel Martí
2cd026b34b Forgot to update the support-v4-preferencefragment paths in ant 2015-04-01 20:35:26 +02:00
Daniel Martí
9e82463e46 More final keywords 2015-04-01 17:12:52 +02:00
Daniel Martí
05aa6a39fa Small cursor null, count and close() 2015-04-01 17:04:51 +02:00
Daniel Martí
0506160f7b Make use of List.contains(o) since it already does .equals() 2015-04-01 16:57:16 +02:00
Daniel Martí
ea559d0675 Add some final keywords
Especially in constants within classes, which allows for inlining.
2015-04-01 16:17:34 +02:00
Daniel Martí
bdbb6ce03a Outdent all switch cases 2015-04-01 13:27:23 +02:00
Daniel Martí
1295158de2 Small style fix to the last commit 2015-04-01 13:14:28 +02:00
Daniel Martí
b0e4f59f43 Use string switches from Java 1.7
Advantages:
 * Greatly simplifies code
 * No variable name duplication
 * Potentially more efficient bytecode
2015-04-01 13:09:02 +02:00
Daniel Martí
3eddb1402c Infer more types taking advantage of java 1.7 to simplify code 2015-04-01 12:11:23 +02:00
Daniel Martí
d9590743d9 Get rid of root build.gradle hacks again
Now that we controll all lib build.gradle files, we can finally do it.

If we want to build support-v7 from source again with gradle, we'll import the
build.gradle and "fix" it like the rest.
2015-04-01 11:59:31 +02:00
Daniel Martí
94eb8c7084 Update support-v4-preferencefragment aar 2015-04-01 11:32:39 +02:00
Daniel Martí
5fef0d012f Clean v4-preferencefragment build.gradle 2015-04-01 11:28:51 +02:00
Daniel Martí
2ce62aac65 Adapt our gradle setup to the new v4-preferencefragment location 2015-04-01 11:28:36 +02:00
Daniel Martí
6159013b36 Replace support-v4-preferencefragment submodule with checked in code 2015-04-01 11:24:09 +02:00
Daniel Martí
2f2a3a7755 Clarify that we're using a slightly different spongycastle 2015-04-01 11:22:09 +02:00
Daniel Martí
274013ad68 Update spongycastle to open-keychain/spongycastle master
Current master (HEAD) is 2c744ebade816d2e4f65f3734db373e4c19c2e4f
2015-04-01 11:16:37 +02:00
Daniel Martí
893e68b3da Don't use older jmdns when not building from source 2015-04-01 10:57:39 +02:00
Daniel Martí
ee287220b8 Forgot to bump zxing maven dep after bumping the source dep 2015-04-01 10:49:46 +02:00
Peter Serwylo
0db2499666 Merge branch 'swap/refinement-towards-stable' 2015-04-01 16:52:49 +11:00
Peter Serwylo
e3b73ff49a Update changelog to specify swap stuff is fixed. 2015-04-01 16:51:44 +11:00
Peter Serwylo
a2be7d9013 Fix update count, breakage from rebase, and broken tests.
The update count was broken because I added the join onto the
apk table, and in the process, forced a GROUP BY on the AppProvider
queries. This group by made the COUNT(*) actually count the number
of apks for each app, not the total rows.
2015-04-01 16:20:20 +11:00
Peter Serwylo
2a481f6889 Correctly navigate "up" to the swap list.
When viewing app details from a swap list, we need to return to the
swap list when pressing "up". Previously it would go to the main list
of apps, and only return to the swap list when pressing "back".

Now, a subclass of AppDetails is used when in swap mode, which knows
how to navigate up to the correct task.
2015-04-01 15:34:40 +11:00
Peter Serwylo
a16bc22c4a Fixed broken + commented out tests.
They were all due to the addition of "application label" to the
installed app cache. This commit adds a mock ApplicationInfo
to the mock package manager and also specifies the label while
inserting into the test content provider.
2015-04-01 15:33:58 +11:00
Peter Serwylo
9dfa18aead Make F-Droid tests runnable from Gradle.
This also makes AndroidStudio integration work better, which makes
running and debugging tests much nicer than the CLI.

Also cleaned up imports in one test, and made the symlink tests not
fail on older devices below API 19.
2015-04-01 15:33:51 +11:00
Peter Serwylo
da566b44ce Don't show swap apps in the main list of apps.
Achieve this by joining the fdroid_app table onto fdroid_apk and then
fdroid_repo, then checking if fdroid_repo.isSwap is 1.
2015-04-01 15:32:38 +11:00
Peter Serwylo
85300331e0 Minor cleanup after CR.
Formatting, spelling, NonNull/Nullable annotations, removing unused
imports, and adding SuppressWarning for unused logging "TAG" properties.
2015-04-01 15:32:36 +11:00
Peter Serwylo
f5ce318be7 Fix for fragment not displaying on 2.3 device.
Also, app details now goes to the "Swap app list" rather than the main list of
apps after hitting the "Up" button from the ActionBar.
2015-04-01 15:30:57 +11:00
Peter Serwylo
842ddb5e24 Trying to make LocalRepo stuff have less subtle side effects.
I had trouble wrapping my head around which point in time the fdroid/repo
directories are created, when they are populated with .html files, and
when the index.xml is put there. I did some minor cleaning up to make
it a bit easier to manage this in the future.
2015-04-01 15:30:21 +11:00
Peter Serwylo
20f17da913 Clean after merge. Refactor swap index.xml generation (to work with API 7).
Althought the construction of the XML document was fine witn Android 7,
the actual serialization of it was limited to 8 or higher. Try as I might,
I couldn't find a way to figure out how to serialize a DOM tree on API 7.

Turns out that the "PullParser" API is able to build and serialize XML
trees on API 7. It's a little clunkier than the DOM alternative, so I
refactored out the generation into a subclass to make it clearer what
it is doing and when.
2015-04-01 15:30:21 +11:00
Peter Serwylo
5036deb61e Swap apps more robust on API < 11. Only show swap repos sometimes.
* Selecting apps to swap fixed

Before the checking of a list item would not actually register it to
be included in the swap. This has been rectified.

 * Added a new property to repos for "isSwap"

Repositories with this property are not shown in the Manage Repos
activity, as there is not much benefit to having this happen.

 * More robust error handling when symlinking files

Before it would check for stdout or stderr and then throw an exception.
This happened even on successful symlinks on my 2.3.3 device. As such,
I've put the error checking after the shell command has completely finished
(just in case there were any race conditions), and more importantly, checked
for the presence of the file being linked - rather than just stdout or
stderr.

 * More code cleanup

Generics <> operator, Nullable annotations, removal of dead code.
2015-04-01 15:30:19 +11:00
Peter Serwylo
c6705e2cb9 Fixed all warnings from LocalRepoManager.java
* Removed dead code
 * Added some Nullable/NonNull annotations to prevent future misuses of variables.
 * More verbose errors when an error occurs creating directories/files.
2015-04-01 15:27:26 +11:00
Peter Serwylo
23ed692436 "Select apps for swap" screen work on API <= 10.
* Provide CheckBox for selected items

Newer API's highlight the background using the "activated" state. Older
APIs need this to be implemented differently, so there are now checkboxes
on the left of the list view items to provide this functionality.

 * Clean up IDE warnings

Diamond operator for generics, remove unused imports and unused method.

 * Adapter class created for installed apps

Cleaned up the code to do with binding views to the adapter in this view.
Previously it made quite a few assumptions about the structure of the layout,
e.g. "layout.getParent().getParent() is a LinearLayout", which would cause
crashes if the layout changed slightly.
2015-04-01 15:27:24 +11:00
Peter Serwylo
4711b50836 Swap works on 2.3 devices.
* Cleaned up text alignment styles for API < 17.

API v17 has a textAlignment style, wherease previous verisons rely on
the "gravity" property. This change includes gravity="center" where there
was previously only textAlignment="center".

 * Fragments get added properly on 2.3 device.

For some reason, when adding the fragment to android.R.id.content, it
wouldn't work on my 2.3 device. This change includes a (almost) empty
activity layout with a single FrameLayout. The fragments are added to
this rather than "content", and it works better. It is not perfect - it
still adds the fargments behind the action bar, and so the action bar
appears blue. But at least they are there :)

 * Added translatable strings where constants were used before.

Not related to v2.3 support, but stil important for a stable release,
that is fully translated.
2015-04-01 15:26:10 +11:00
Peter Serwylo
7fb2de4bae Select F-Droid correctly during swap process. Fixes #141.
Bug in the code which decides which apps to select for swapping.
Due to the way in which Adapters and ListViews work together to provide
"header" and "footer" functionalities for lists, there is a mismatch between
the index in our original adapter, and the actual index on the list. It is
up to us to maintain this correctly, which was not done, hence the off by
one error.
2015-04-01 15:26:10 +11:00
Peter Serwylo
953d3ed8d7 Added search functionality to "add apps to swap" screen.
This was present in the old local repo implementation, and the skeleton
code for implementing it was copied to the swap fragment. The only change
neccesary was to add a search button to the menu and make it have a
SearchView as its action view.
2015-04-01 15:26:10 +11:00
Daniel Martí
3db689b782 Use setBacground(Drawable) on newer apis
setBacground(Drawable) might not just call setBackgroundDrawable(Drawable) in the future
2015-04-01 00:47:23 +02:00
Daniel Martí
990deab398 Suppress all serial warnings
http://stackoverflow.com/questions/7823477/warning-serial-serializable-class-someclass-has-no-definition-of-serialversio

Fixes some of #210
2015-04-01 00:40:18 +02:00
Daniel Martí
f948112e42 Require that any column match ALL the words
Fixes #58 for good
2015-04-01 00:28:27 +02:00
Daniel Martí
11205dcf72 Don't duplicate sql string code as suggested by pserwylo 2015-04-01 00:28:09 +02:00
Daniel Martí
3db3a516eb No need to clean search keywords when matching labels 2015-04-01 00:23:10 +02:00
Daniel Martí
a7d8bbf26f Fix ant build 2015-03-31 23:45:17 +02:00
Peter Serwylo
7569a58f97 Merge branch 'issue-2/notification-improvements' 2015-04-01 08:17:29 +11:00
Peter Serwylo
f1655496d8 Fix issue #2: better notifications on ICS+ devices.
Shows an expandable notification on devices that support it (4.1+
I believe). The support library does most of the job of handling
incompatibilities between platforms.
2015-04-01 08:17:05 +11:00
Daniel Martí
48c3e1f747 Revert "Remove now unneeded hacks from root build.gradle"
This reverts commit c4f416396a3aa35fa81ccfb0415d9e01135ae8a8.
2015-03-31 21:25:02 +02:00
Daniel Martí
73bef92f42 Bump all buildTools versions 2015-03-31 21:24:36 +02:00
Daniel Martí
eb6df43384 Bump support-v4-preferencefragment 2015-03-31 21:20:21 +02:00
Daniel Martí
c4f416396a Remove now unneeded hacks from root build.gradle 2015-03-31 20:47:19 +02:00
Daniel Martí
871f1f2d90 spongycastle/pg is not used 2015-03-31 20:47:19 +02:00
Daniel Martí
246d1c5f32 Remove MemorizingTrustManager, not used right now 2015-03-31 20:47:19 +02:00
Daniel Martí
c81eb9ec69 Replace nanohttpd submodule with checked in code 2015-03-31 20:24:34 +02:00
Daniel Martí
3784e58fc4 Add gradle support to UniversalImageLoader 2015-03-31 20:19:04 +02:00
Daniel Martí
ad1819c10e Replace UniversalImageLoader submodule by checked in code 2015-03-31 20:16:11 +02:00
Daniel Martí
6f91fb41f8 Clean up spongycastle build.gradle files 2015-03-31 20:08:15 +02:00
Daniel Martí
93c5bd4a95 Replace spongycastle submodule with checked in code 2015-03-31 20:05:17 +02:00
Daniel Martí
4258ea1c40 Replace jmdns submodule with checked in code 2015-03-31 19:47:12 +02:00
Daniel Martí
6deac28a8b libsuperuser: remove maven and bintray stuff 2015-03-31 19:38:25 +02:00
Daniel Martí
c64c1a19b7 Replace libsuperuser submodule by checked in code 2015-03-31 19:36:51 +02:00
Daniel Martí
89673dfd2d Replace AndroidPinning submodule by checked in code 2015-03-31 19:32:24 +02:00
Daniel Martí
be2cb0cc43 Ignore generated proguard-project.txt files in libs 2015-03-31 19:20:39 +02:00
Daniel Martí
de3c224b02 Move zipsigner deps into its own build.gradle 2015-03-31 19:14:26 +02:00
Daniel Martí
f8f77babe8 Replace zipsigner submodule by checked in code 2015-03-31 19:10:39 +02:00
Daniel Martí
474cc194ca Update zxing-core to 3.2.0 2015-03-31 19:04:21 +02:00
Daniel Martí
dd1853cab3 Replace zxing submodule by checked in code 2015-03-31 19:04:10 +02:00
Daniel Martí
67407e1095 Fix FieldGetter lint warning 2015-03-31 17:28:08 +02:00
Daniel Martí
c0c80919f7 tools:replace no longer needed to make gradle work 2015-03-31 17:22:36 +02:00
Daniel Martí
713e33bf57 Remove unnecessary "new Type[]" when declaring arrays 2015-03-31 02:24:39 +02:00
Daniel Martí
0fde562b32 Add search changelog item 2015-03-31 02:16:21 +02:00
Daniel Martí
db803bfb0c Split up search terms by whitespaces. Fixes #58 2015-03-31 02:13:15 +02:00
Daniel Martí
60cd63c274 Forgot to fix up the receiver package names 2015-03-30 21:18:43 +02:00
Daniel Martí
ac820baf72 Don't use ArrayList over List unless necessary 2015-03-30 21:07:58 +02:00
Daniel Martí
e1df9c600c Move receivers into subdir 2015-03-30 20:57:31 +02:00
Daniel Martí
82f4a975bb Don't inline log tags, add missing TAG constants 2015-03-30 20:52:40 +02:00
Daniel Martí
fdfdb0935f Remove apparently useless uri logs 2015-03-30 20:37:01 +02:00
Daniel Martí
c1cdd5dce1 Remove unused imports 2015-03-30 20:25:37 +02:00
Daniel Martí
bc1b057324 Remove empty lines at beggining of java files 2015-03-30 20:14:52 +02:00
Daniel Martí
e887379dc2 Small style fix 2015-03-30 20:12:20 +02:00
Daniel Martí
d90ea02b50 Add feature requested in #154 to the changelog 2015-03-30 19:12:53 +02:00
Daniel Martí
e6efffb981 Add support for amazon app links 2015-03-30 19:02:16 +02:00
Daniel Martí
8239f12ff7 Add support for play.google.com search urls 2015-03-30 18:36:32 +02:00
Daniel Martí
53aa7ec849 Add support for play.google.com app links
As requested in #154
2015-03-30 18:07:03 +02:00
Daniel Martí
d22c714dbd Ignore leading and trailing whitespaces in search keywords
As reported in #58
2015-03-30 17:41:35 +02:00
Daniel Martí
85d7752d0a Use the same logging tag scheme everywhere
We were using different methods and violating the correctness error
"Log tags are only allowed to be at most 23 tag characters long." as reported
by lint.

Changes:

* Always start tags by "fdroid." (even though it's a bit redundant)
* Replace "org.fdroid.fdroid." by "fdroid."
* Don't include "compat.", "data." "views.fragments." et al (these didn't and
  shouldn't be namespaces really, only for file/code organisation)
* Do include parent classes for subclasses, e.g. "fdroid.RepoProvider.Helper"
  since these can conflict
2015-03-30 17:16:56 +02:00
Daniel Martí
97b93aaa2b Start changelog for the upcoming release 2015-03-30 16:59:37 +02:00
Daniel Martí
76396f224f Bump gradle plugin to 1.1.3
We also no longer depend on the undocumented internal variable sdkFolder
2015-03-30 16:49:56 +02:00
Daniel Martí
cd667371e6 Merge branch 'fix-85/remove-downloaded-index-files' of https://gitlab.com/pserwylo/fdroidclient 2015-03-30 16:39:45 +02:00
Daniel Martí
ebacde9631 Bump build-tools to 22.0.1 2015-03-30 16:38:11 +02:00
Daniel Martí
bd4cd81f50 Merge branch 'fix/issue-34-empty-list' of https://gitlab.com/pserwylo/fdroidclient 2015-03-30 16:22:22 +02:00
Daniel Martí
c11fdd11d8 Bump to 0.83 2015-03-26 19:07:25 +01:00
Daniel Martí
f1084452d4 Add remove-empty-trans script and run it 2015-03-26 19:05:36 +01:00
Daniel Martí
0ced75d451 Bump to 0.82 2015-03-23 16:44:45 +01:00
Daniel Martí
bb775bde08 Run translation fixing scripts 2015-03-23 16:43:38 +01:00
Daniel Martí
61f9d3ac86 Run fix-apostrophes 2015-03-23 12:21:08 +01:00
F-Droid Translatebot
cb9ef84027 Translation updates 2015-03-23 08:55:31 +00:00
Daniel Martí
bc69c8d6ed Run fix-apostrophes 2015-03-19 19:43:18 +01:00
F-Droid Translatebot
0736aef5fc Translation updates 2015-03-19 18:37:46 +00:00
Daniel Martí
40308ce8cb Prepare changelog for release 2015-03-19 19:35:12 +01:00
Peter Serwylo
eaea0e2c23 Fix #85: Remove downloaded index files that hang around.
If the download process is interrupted, a "dl-" file hangs around in
F-Droid's cache directory. If the download succeeds, extracts an xml
file from the downloaded .jar file, and then the rest of the process
is interrupted, then a "index-*.xml" file hangs around in F-Droids
files directory.

This fix removes these two types of left over files when F-Droid
is started. In addition, it also makes it so that the downloaded
repo indexes are now more clearly named "index-*-downloaded" (with no
extension, because the code which does it doesn't know whether it is
a .jar or .xml file, and it doesn't matter anyway). Also, it extracts
the .xml files to the cache directory too (instead of the files dir)
and names them "index-*-extracted.xml".

There is some code which removes the old "dl-" files that will become
redundant after the first time it is executed on a users device after
upgrading F-Droid. It is a very small amount of code run on startup,
so I am not concerned about the performance implications of leaving it
there, but I put a comment explaining that it can be removed in the
future.

Includes minor formatting changes, and a few annotations.
2015-03-19 07:38:54 +11:00
Daniel Martí
8e394563e4 A couple more things in the changelog 2015-03-16 20:28:24 +01:00
Peter Serwylo
3abb426fc3 Added a message when any of the app lists are empty.
Previously, a few people have been confused by an empty list when they first
open F-Droid (e.g. if they are not connected to the internet, and repos didn't
update). This provides some feedback so that there is never a blank screen.

Fixes Issue #34.
2015-03-16 21:42:10 +11:00
Daniel Martí
c2eb9a9b67 Bump to 0.81-test 2015-03-15 19:14:04 +01:00
Daniel Martí
f77f9c5435 Run remove-partial-arrays 2015-03-15 19:13:30 +01:00
Daniel Martí
8b03a0c196 Update the changelog with recent fixes/changes 2015-03-15 17:29:11 +01:00
Daniel Martí
680a468b6c Don't use fragment adapter if it's null (fixes #82) 2015-03-15 17:13:42 +01:00
Daniel Martí
06ae1bc044 Merge branch 'fix/issue-5-guess-repo-path' of https://gitlab.com/pserwylo/fdroidclient 2015-03-15 16:58:06 +01:00
Peter Serwylo
09029dd193 Merge branch 'refresh_header_161' into 'master'
Refresh AppDetails header on package state change (fix #161)

Update the application details to display the correct state on
application install/uninstall.

Should fix issue #161
https://gitlab.com/fdroid/fdroidclient/issues/161

See merge request !56
2015-03-13 14:03:25 +00:00
Romain Vimont
f0a8780755 Use the same fragment id for portrait & landscape
To refresh the header, we retrieve the fragment from its id.

But the landscape layout used another id for the same fragment, so it
could not be retrieved, leading to a NullPointerException in landscape.

Therefore, use the same fragment id as in the portrait layout.
2015-03-13 14:48:58 +01:00
Romain Vimont
cb3b2e0d8e Refresh AppDetails header on package state change
Update the application details to display the correct state on
application install/uninstall.

Should fix issue #161
https://gitlab.com/fdroid/fdroidclient/issues/161
2015-03-13 14:48:58 +01:00
Peter Serwylo
74b285a77f Fix Issue #5: Guess at common repo paths (/, /fdroid/repo, /repo)
When adding repositories using the Manage Repos activity, firstly look
for an /index.jar appended on the URL provided by the user. If that
doesn't work (HTTP status code other than 200) then it will try
/fdroid/repo/index.jar, then /repo/index.jar. If it can't establish a
connection to the server, or if none of the above attempts results
in a 200, then the path provided by the user is kept (even though we
have a hunch it might be wrong).

This is to cover for the case where people arn't connected to the net.
Another way to deal with no internet connectivity is provided by a
"Skip" button on the dialog while searching for the index.jar.

The searching for index.jar is done by doing a HTTP HEAD request, so
the entire jar needn't be downloaded.

Finally, to make this happen in a clean sort of way, I refactored the
ManageReposActivity a little bit to encapsulate all of the add repo
dialog handling into a subclass. This way, the outer class doesn't
need to know things like: Is the dialog showing, what state is it in,
is the background task to search for index.jar files running, how and
when to cancel that task, etc.
2015-03-14 00:44:17 +11:00
Peter Serwylo
d7c19c76c9 Merge branch 'npe_135' into 'master'
Do not manually call onChange() (fix NPE)

If the AppDetails activity has been destroyed by the system during an
application installation/remove, it is recreated once it should be
displayed again (this behavior can be forced by enabling "Don't keep
activities" in Android developer options).

In onCreate(), it passes its instance of myInstallerCallback to an
Installer. In onActivityResult() (which is called before onResume()),
this installer calls a method (onSuccess() or onError()) on this
callback. The implementation of these methods (the anonymous inner class
assigned to myInstallerCallback) dereference myAppObserver, which is
still null, because it will be initialized in onResume(), so a
NullPointerException is thrown.

However, the problem is not only that myAppObserver.onChange() is called
when myAppObserver is null, but that it should not be called manually at
all: it is a ContentObserver, so it is automatically called when
registered to the content resolver. As a consequence, this callback was
called twice.

Removing these calls fix both problems.

Should fix issue #135
https://gitlab.com/fdroid/fdroidclient/issues/135

See merge request !58
2015-03-13 12:37:34 +00:00
Romain Vimont
eef1e0a406 Externalize application changed actions
When we receive notifications indicating that the app has changed, the
App object needs to be changed and the view updated.

These notifications can be received from two sources:
 - the ContentObserver;
 - onActivityResult().

Thus, the implementation should not be related to the ContentObserver
(in theory, we might want to keep only the onActivityResult()
notification). Therefore, move it to a separate method in AppDetails.

This also preventively avoids bugs when the ContentObserver is null.
2015-03-13 10:57:29 +01:00
Romain Vimont
578084ff96 Revert "Do not manually call onChange() (fix NPE)"
This reverts commit 47e065442edc108d4bb38f9daaa7cdb3fff26b49.

Now that the ContentObserver is created when activity is started (even if not
resumed), then it will be non-null during onActivityResult(). Therefore,
the calls to onChange() will not lead to NullPointerException anymore.

The reason why we want to manually call onChange() is that the
ContentObserver notifications may happen several seconds later:
https://gitlab.com/fdroid/fdroidclient/merge_requests/58#note_948719
2015-03-13 10:26:42 +01:00
Romain Vimont
cda80f5de6 Register ContentObserver when activity is started
The ContentObserver was registered only when the activity was in resumed
state. However, in started but paused state (when the activity is
visible but not in focus), we still want to receive these notifications
to update the view.

Therefore, register it on start and unregister it on stop.

As a consequence, myAppObserver will be non-null during
onActivityResult().
2015-03-13 10:22:06 +01:00
Romain Vimont
4e2ab4c048 Call super.onPause() first
super.onPause() should always be called first:
http://developer.android.com/training/basics/activity-lifecycle/pausing.html#Pause
2015-03-13 10:18:26 +01:00
Romain Vimont
47e065442e Do not manually call onChange() (fix NPE)
If the AppDetails activity has been destroyed by the system during an
application installation/remove, it is recreated once it should be
displayed again (this behavior can be forced by enabling "Don't keep
activities" in Android developer options).

In onCreate(), it passes its instance of myInstallerCallback to an
Installer. In onActivityResult() (which is called before onResume()),
this installer calls a method (onSuccess() or onError()) on this
callback. The implementation of these methods (the anonymous inner class
assigned to myInstallerCallback) dereference myAppObserver, which is
still null, because it will be initialized in onResume(), so a
NullPointerException is thrown.

However, the problem is not only that myAppObserver.onChange() is called
when myAppObserver is null, but that it should not be called manually at
all: it is a ContentObserver, so it is automatically called when
registered to the content resolver. As a consequence, this callback was
called twice.

Removing these calls fix both problems.

Should fix issue #135
https://gitlab.com/fdroid/fdroidclient/issues/135
2015-03-12 16:21:19 +01:00
Daniel Martí
070054892e Run optipng -o9 on all png images 2015-03-11 23:35:03 +01:00
Daniel Martí
bd6e2a3046 Bump gradle plugin to 1.0.1
I tried 1.1.3, but it failed. Needs further investigation.
2015-03-11 23:32:05 +01:00
Daniel Martí
6eff521459 Bump build-tools to 22.0.0 2015-03-11 23:09:42 +01:00
Daniel Martí
186c1fecea Merge branch 'crash_uninstall_167' of https://gitlab.com/rom1v/fdroidclient 2015-03-11 23:05:16 +01:00
Romain Vimont
89bedfda13 Do not crash on app uninstall
Immediately after an app uninstall, the associated App will be updated
by a call to reset() in the AppObserver.onChange().

But before receiving this event, the activity and the fragments resume,
leading to a call to getInstalledStatus(…). At this stage, we don't know
that the app has been removed yet, but the package manager already
removed it. Therefore, PackageManager.getInstallerPackageName(…) throws
an IllegalArgumentException.

In that case, consider that the application has been uninstalled.

Should fix issue #167
https://gitlab.com/fdroid/fdroidclient/issues/167
2015-03-11 20:32:15 +01:00
Daniel Martí
ba544cf5f1 Merge branch 'fix_compilation' into 'master'
Escape apostrophe in resources

In XML resources files, apostrophes must be escaped.

(fix compilation)

See merge request !55
2015-03-11 18:22:40 +00:00
Romain Vimont
0570c85133 Escape apostrophe in resources
In XML resources files, apostrophes must be escaped.

(fix compilation)
2015-03-11 15:50:03 +01:00
Daniel Martí
4a5d732c01 Run remove-unused-trans 2015-03-10 16:14:10 +01:00
Daniel Martí
116947082a Run fix-ellipsis 2015-03-10 16:12:23 +01:00
F-Droid Translatebot
d88ad55504 Translation updates 2015-03-10 16:00:42 +01:00
Daniel Martí
d338046329 Bump to 0.80-test 2015-03-08 20:38:44 +01:00
Daniel Martí
00195be469 lint text output is no longer useful 2015-03-08 20:37:36 +01:00
Daniel Martí
996f81ced2 Run remove-partial-arrays 2015-03-08 20:34:58 +01:00
Daniel Martí
d76f7e13b3 Add script to remove partially translated arrays
They may crash the client, so better use the original english instead
2015-03-08 20:34:56 +01:00
Daniel Martí
7bb9615355 Rewrite reomve-unused-trans in python
This makes it no longer depend on lint, and also adds support for arrays
2015-03-08 20:29:05 +01:00
Daniel Martí
8c7a821e8d Place some xml closing tags separate for readability
This also means that diffs will get better if more lines are added to the end
of each attribute list
2015-03-05 16:06:10 +01:00
Daniel Martí
27f5793fd8 Run tools/remove-unused-trans.sh 2015-03-05 14:13:39 +01:00
Daniel Martí
8ed63c7e7a Run tools/fix-ellipsis.sh 2015-03-05 14:13:22 +01:00
Daniel Martí
911b95dc87 Add tools/fix-apostrophes.sh and run it 2015-03-05 14:11:33 +01:00
F-Droid Translatebot
f062de9092 Translation updates 2015-03-05 11:58:10 +01:00
Peter Serwylo
d3a22d0876 Merge branch 'feature/optional-jar-dependencies' into 'master'
Default to building F-Droid with precompiled dependencies, with option for source dependencies.

I hope this isn't to controversial, I've tried to very clearly articulate my thinking behind it in the commit message for 6594357c and also document the feature in detail in F-Droid/libs/README.md.

When I first contributed to F-Droid, it had zero dependencies, and so was a matter of checking it out and running `ant debug`. I'd like future contributors to be able to experience this too, by checking out the code and then running `gradle assembleDebug`.

I've ensured that the premise of building libraries from source is still front and centre though, and building from source is a matter of running `gradle -PsourceDeps assembleDebug` as documented in F-Droid/libs/README.md.

I'd appreciate if somebody (hopefully with all of the dependencies already checked out and building) would be able to test this for me, and provide feedback. Happy to answer any questions which remain unanswered after reading the commit message and the F-Droid/libs/README.md file.

See merge request !49
2015-03-04 23:10:19 +00:00
Peter Serwylo
ccdb161de4 Final fixup before merge. Rebuild binary deps, minor fixes.
Binary deps were not getting build and cleaned from the binaryDeps
subdirectory of "libs". Also, reverted the android support appcompat
library target to android-19, as there was no need to change it.
2015-03-03 18:44:36 +11:00
Peter Serwylo
aa38418c91 Bump support libraries to v20. Gradle doesn't build them by source for now.
The support libraries expect to be using the gradle plugin version 0.10.0.
We are currently on version 1.0.0. They use APIs in their build script which
have moved or been removed, and so the build just breaks when we run it with
the 1.0.0 plugin. I tried some magic to make it work in various ways, but
kept failing. As such, I've reverted the `gradle -PsourceDeps` build to not
build the support libraries from source. In the future, we should be able to
change this if they change the plugin version to a more recent one.

Note that the ant build script still hasn't been modified, and so will be
using the binary support-v4 library, but should build appcompat-v7 from source.

Was going to bump to Support v21, however there is some behaviour change which
causes a crash. They have removed the progress view from the toolbar/actionbar.
This breaks the AppDetails activity. As such, I'll leave that for the future.

For now, there will be a slight difference between building with
ant (which uses support v-almost-21) and gradle (which uses v20).
This will stay the case until we get around to completely porting
the app to v21, and fixing any bugs or UI sadness that arises.
2015-03-03 00:46:43 +11:00
Peter Serwylo
eec57945c0 Default to binary dependencies, with option for source builds.
NOTE: This commit does not touch the ant build system at all,
only gradle.

There are currently 23 gradle projects which require configuration,
let alone building, in order to build F-Droid. This takes a non-trivial
amount of time/memory/cpu. Additionally, it also provides difficulties
when importing the project into Android Studio - which is the IDE that
many potential contributors will be using. Finally, I have over 100mb
of data in the extern/ folder, and the support libraries require almost
every single Android SDK to be installed, which is several GB. This is
not a friendly environment to encourage people to submit merge requests.

However, I'm very mindful of the need for an open source project such
as F-Droid to be able to be built from source. So to make sure we have
the best of both worlds, I've ensured that building all dependencies
from source is still possible.

The F-Droid/libs/README.md file explains in greater detail how to
do this (i.e. "gradle -PsourceDeps build").

As much as possible, I've tried to make the binary dependencies fetched
from jcenter. However there are still libraries which either haven't
integrated required changes for F-Droid back upstream, or don't have
mavenCentral/jcenter binaries available.

Android preference fragment has been changed to the original
upstream repository. The one we had before was because upstream
hadn't merged a MR for gradfle support yet. However, that has
now been merged. This version still doesn't exist in jcenter though.

In order for libsuperuser to build from upstream, using
`gradle -PsourceDeps`, we need to include a few gradle plugins
from jcenter which are never actually used (used by upstream to
release to jcenter).

Even though support-v4 is included through jcenter, it is kept in
the libs directory, so that ./ant-prepare.sh can use it.

Update support preference fragment to newer version. There has been
bugfixes commited, so lets include them in the version we are using.
2015-03-01 10:21:51 +11:00
Peter Serwylo
2da1a5acd4 Merge branch '172-typo' into 'master'
Fix #172:  typo in English strings

Fix typo in English string (Do you ant >> Do you want)

See merge request !54
2015-02-28 22:42:10 +00:00
Daniel Martí
2495251a22 Run remove-unused-trans 2015-02-25 20:42:34 +01:00
Daniel Martí
ada40cd746 Fix remove-unused-trans script 2015-02-25 20:35:21 +01:00
Daniel Martí
c09708a09e Get rid of "on/off" descriptions for checkbox prefs
Closes #149
2015-02-25 19:52:11 +01:00
Ciaran Gultnieks
da01be7986 Merge branch 'update_interval' into 'master'
Repository update interval (#158)

This is issue #158 https://gitlab.com/fdroid/fdroidclient/issues/158

I have modified the update interval to include "weekly" and "Every 2 Weeks" and removed "Hourly" as update frequencies. THe maximum interval was daily which was still too often for me. I have removed "Hourly" as you probably have to pay for your bandwidth and that is insanely often :-). Every 4 hours should still be plenty often.

2 Languages did not have the right amount of options there anyway, and I fixed those.

Please check, test, judge and ... hopefully ... merge.

See merge request !52
2015-02-25 16:02:42 +00:00
Laura Arjona Reina
2da1e14374 Fix typo (#172) 2015-02-23 15:44:50 +01:00
Daniel Martí
89575a4591 Switch from dschuermann/libsuperuser to Chainfire/libsuperuser 2015-02-20 17:43:07 +01:00
Hans-Christoph Steiner
e0aae7d797 ant-prepare.sh: add ANDROID_HOME/tools to PATH if it is not there
This makes this script more likely to run on various setups, since it does
three checks for finding where the `android` utility is:

1. is it in the PATH already?
2. is ANDROID_HOME set?
3. does ~/.android/bashrc exist?

This also copies ~/.android/ant.properties into the project for anyone who
wants to setup automated tests of `ant release` builds.
2015-02-17 14:29:04 +01:00
Daniel Martí
63a86df035 Bump to 0.79-test 2015-02-16 08:38:00 +01:00
Peter Serwylo
6e26e20f66 Merge branch 'feature/cache-to-internal' 2015-02-01 23:17:40 +11:00
Sebastian Spaeth
1895d2f909 Allow to check repositories less often
The maximum interval to check repositories was "Daily". Allow to also
update weekly and bi-weekly and remove the "hourly" option (someone has
to pay for all that bandwidth after all). I was considering to even remove
the "Every 4 hours" option, but did not dare do it.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2015-01-30 16:15:45 +01:00
Peter Serwylo
2fe91bc35e Prevent VerifyError when loading FileCompat.
Classes which contain calls to platform specific methods cause
problems, because the dexer will go looking for that method even
if you put a guard condition checking the build number. However,
if you lazily load a class depdending on the version number, then
older API devices wont try and load it, and no VerifyError occurs.
2015-01-27 23:24:00 +11:00
Peter Serwylo
08af7ee157 Change symlink implementation to use best available impl per platform.
* Android-21 introduced an API for symlinking.
 * Android-19 has an API which can be used via reflection.
 * Earlier versions use Runtime.exec('/system/bin/ln')

This also extends the SanitizedFile stuff so that the android < 19 can
safely use Runtime.exec() with less fear of command injection vulnerabilities.

Finally, some tests for the SanitizedFile and symlink stuff was added.
2015-01-27 22:47:32 +11:00
Peter Serwylo
afef5ea233 Added test for SanitizedFile class. 2015-01-26 13:53:16 +11:00
Peter Serwylo
37b3f1ff57 Cache .apks in internal storage before installing.
This prevents an app with "write external storage" permission from
being able to switch the legit app with a dodgey one between F-Droid
requesting an install, and the package manager actually showing the
install dialog to the user.

In order to make the file in private internal storage readable by
the package manager, its parent directories need to be world-executable,
and the file itself needs to be world-readable. It seems that the
"/data/data/org.fdroid.fdroid/cache" dir provided by the Context is
already world executable, but the "apks" subdirectory does not default
to this.

Also, to be compatible with android-8, a Runtime.getRuntime().exec()
call was added for such devices, which invokes /system/bin/chmod.
The effect of this was to require some level of file sanitization to
be made available using the Java type system to prevent command injection
attacks from weird apk names (as people are free to download metadata
from random internet people).
2015-01-26 09:36:56 +11:00
Dominik Schürmann
7ff4b9b4cd Update README for gradle and AS 2015-01-21 10:05:20 +01:00
Dominik Schürmann
bfc35691b6 Fix gradle build: dont abort on lint errors 2015-01-21 10:03:45 +01:00
Daniel Martí
85b7e77324 Some code formatting fixes in AppDetails 2015-01-20 11:37:16 -05:00
Dominik Schürmann
e52c17f586 Remove colon after :F-Droid include 2015-01-20 03:39:14 +01:00
Hans-Christoph Steiner
467d96b9ee Merge branch 'superfdroid-fixes' into 'master'
Superfdroid fixes

Package names and apk file names should only contain letters, numbers, dots,
and underscores. This is now checked in RootInstaller before executing 'pm
install' or 'pm uninstall'.

See merge request !48  https://gitlab.com/fdroid/fdroidclient/merge_requests/48
2015-01-19 19:56:57 +01:00
Dominik Schürmann
2392507634 Accept same set of characters for apk file names for 'pm install' like for package names 2015-01-19 19:47:18 +01:00
Dominik Schürmann
d941ac5eb0 Only accept valid package names as parameter for 'pm uninstall' 2015-01-19 19:47:16 +01:00
Dominik Schürmann
1f2fe25cd4 RootInstaller: Put quotes around filenames and package names 2015-01-19 19:47:13 +01:00
Dominik Schürmann
521218a45c Code cleanup and simplifications 2015-01-19 19:47:10 +01:00
Daniel Martí
70b392996c Start writing the changelog 2015-01-04 01:03:33 +01:00
Daniel Martí
27525122b8 Update to plugin version 1.0.0 2015-01-04 00:32:30 +01:00
Daniel Martí
7e7f0fe6f2 Fix some indentations in AppDetails 2015-01-04 00:24:55 +01:00
Daniel Martí
2bd05dec38 Remove unnecessary spaces 2015-01-04 00:23:19 +01:00
Daniel Martí
c6c472402d More final keywords 2015-01-03 20:46:31 +01:00
Daniel Martí
d2ade5c69b Don't show "not installed" for apks installed from someplace else
Fixes #107.
2015-01-03 20:27:28 +01:00
Daniel Martí
1405705fd5 Add some final keywords 2015-01-03 19:38:54 +01:00
Daniel Martí
623748091d Also explicitly state telephony as not required 2015-01-03 18:13:35 +01:00
Daniel Martí
bfc79f3a79 Supress deprecation warnings of compat CPU_ABI* usage 2015-01-03 18:05:04 +01:00
Daniel Martí
55c1bd0572 Support devices with more than two ABIs on >=21
Also, start using String[] like Android's SUPPORTED_ABIS instead of
Set<String>. Said list of ABIs will always be very short, at most containing a
handful of elements.
2015-01-03 17:53:36 +01:00
Daniel Martí
a03053e80a Replace the deprecated FILL_PARENT by MATCH_PARENT 2015-01-03 17:35:01 +01:00
Daniel Martí
bbca04c79b Fix comments on project.properties 2015-01-03 17:04:50 +01:00
Daniel Martí
2d44c35951 Remove more trailing whitespaces 2015-01-03 17:00:11 +01:00
Ciaran Gultnieks
abefe3d389 Merge branch 'fix-readme' into 'master'
Fix README.md

- change Gitorious to Gitlab
- add link to Merge Requests

See merge request !45
2014-12-31 12:17:32 +00:00
Nico Alt
bbe7475f75 fix README.md
- change Gitorious to Gitlab
- add link to Merge Requests
2014-12-31 11:05:52 +01:00
Daniel Martí
30385baf16 Bump to 0.78 2014-12-31 01:04:15 +01:00
Daniel Martí
37cf054d8d Don't end changelog entries with periods 2014-12-31 01:01:42 +01:00
Daniel Martí
e16ab9e74d Remove more trailing whitespaces 2014-12-31 01:00:31 +01:00
Peter Serwylo
5a99249920 Updated changelog with "swap" user interface stuff. 2014-12-31 23:38:24 +11:00
Daniel Martí
bcba0e3f47 Add changelog for 0.78 2014-12-31 00:41:46 +01:00
Daniel Martí
b42de49cb4 Fix default locale lint warning 2014-12-31 00:25:27 +01:00
Daniel Martí
e6d784368f Fix a StringFormatInvalid error 2014-12-31 00:15:20 +01:00
Daniel Martí
0f5a49fdd4 Adapt remove-unused-trans to gradle, yet to be tested 2014-12-31 00:11:33 +01:00
Daniel Martí
5dd4b8de1c Fix lone tabbed line 2014-12-31 00:10:09 +01:00
Daniel Martí
30bebd8361 Also generate txt lint report for script usage 2014-12-31 00:09:58 +01:00
Daniel Martí
5b2d75c018 Run fix-ellipsis 2014-12-31 00:00:20 +01:00
Daniel Martí
5af7cac4b7 Remove all trailing whitespaces in source files 2014-12-30 23:48:36 +01:00
Daniel Martí
69cc6ee3bb Merge branch 'gradle-improvements' of https://gitlab.com/pserwylo/fdroidclient 2014-12-30 23:45:19 +01:00
F-Droid Translatebot
ddc4181bba Translation updates 2014-12-30 22:37:50 +00:00
Peter Serwylo
d39ca46953 Clean up build scripts to make it harder to fail.
* Don't apply android plugin in root project

This results in the root project being treated like and Android project.
That is, gradle will expect an AndroidManifest, a targetSdk property, and
all sorts of stuff that is not relevant to the root project.

Perhaps more importantly, this breaks integration with Android Studio,
which is the tool that many potential contributors will be using.

Finally, it also allows runing gradle tasks in the root project, rather
than having to cd into the F-Droid directory, which is a minor nicety.

The reason it was there in the first place was to make it so that we could
find the location of the Android SDK using the same mechanism that the
plugin used. To deal with this, this commit adapts the SDK finding code
from the gradle plugin.

 * Make gradle error out when missing depenencies.

The support v4 library requires some obsolte SDKs that are likely
not installed. It caused non-intuitive errors to come up for me,
so I've made gradle tell the user when this occurs.

 * Documented the main build.gradle file

This is primarily to explain the hacks we use in order to build the
Android support libraries.
2014-12-29 01:38:51 +11:00
Peter Serwylo
e7e07bd03b Merge branch 'for-mainline' into 'master'
For mainline

See merge request !43
2014-12-28 01:48:58 +00:00
Peter Serwylo
405a31a415 Added support annotation library dependency.
The specific reason for this is that it provides @Null and @NotNull
annotations which should increase the safety of our code. Many of the
bugs which get filed are due to NullPointerExceptions, which could be
avoided by tooling using these annotations. The goal is to statically
catch this specific class of errors in as many situations as possible,
rather than waiting for them to occur at runtime.
2014-12-27 11:10:43 +11:00
Daniel Martí
c8a62a8e79 Warnings are from Android's lint, not java 2014-12-21 14:00:00 +01:00
F-Droid Translatebot
3a7e68da9e Translation updates 2014-12-18 11:02:35 +00:00
F-Droid Translatebot
442651b6fe Revert "Translation updates" - zh-hk is not valid for Android
This reverts commit f681eaac975d4d643588a61298f6d22078f7f574.
2014-12-18 11:01:05 +00:00
F-Droid Translatebot
f681eaac97 Translation updates 2014-12-18 10:44:03 +00:00
F-Droid Translatebot
ff87f0a77f Revert "Translation updates"
This reverts commit 0a77a9d210b88bc1e5e8994c391b7abf071b047d.
2014-12-18 10:40:14 +00:00
F-Droid Translatebot
0a77a9d210 Translation updates 2014-12-18 10:36:57 +00:00
Kees Jongenburger
c02194d894 Update README after F-Droid file move.
The README documentation was not updated after the move of the f-droid client
code to the F-Droid directory. The instruction where therefore wrong

The troubleshooting documentation about determining the used Android versions
in the project was also outdated. While the script was made functional the tip
to install the various sdk from the command line did does not work for me.
2014-12-16 15:36:16 +01:00
Daniel Martí
ce1ffb83cf Merge branch 'master' of https://gitlab.com/eighthave/fdroidclient 2014-12-14 15:53:45 +01:00
Daniel Martí
7d1bfd9ae0 Bump toolVersion 2014-12-14 15:52:54 +01:00
Hans-Christoph Steiner
d00888e6a3 move Jenkins script back to ./jenkins-build
This script should be in the root of the git repo so that the config in
Jenkins' web interface is always just:

    ./jenkins-build

This commit also includes a little code to make it easier for people to run
this script on their own machines, if they want to reproduce the Jenkins
build setup.
2014-12-12 10:47:04 +01:00
Hans-Christoph Steiner
851e13f485 move all ant settings to project.properties
No need in having them scattered across multiple files.
2014-12-11 13:59:29 +01:00
Hans-Christoph Steiner
8b9e5e5e5a simplify Eclipse setup by making direct imports of submodules work
These two changes make it so that the submodules can be directly imported
into Eclipse, and they'll be all setup to just work.
2014-12-11 13:52:40 +01:00
Hans-Christoph Steiner
a6b75ce822 rename script for building flash zip to make distinct from embedded scripts 2014-12-11 13:51:35 +01:00
Hans-Christoph Steiner
9f50a0003c zip-build: fix script to work when called from anywhere
This now figures out the root of the fdroidclient project and works there,
rather than just working in the root on the project.  So it can be run like
./tools/zip-build.sh or (cd tools && ./zip-build.sh) or whatever.

I also removed the pointless function, since it is only called once in the
script.
2014-12-11 13:50:14 +01:00
Hans-Christoph Steiner
f538e0da8c add tests for RepoXMLHandler
This is a basic set of tests. These tests should be extended in three ways:
* make sure all of the apps are parsed
* make sure all of the APKs are parsed
* make sure the ProgressListener is called
2014-12-11 13:50:05 +01:00
Hans-Christoph Steiner
8a06aa1c9b remove newlines and extra spaces when parsing repo name and description
The formatting of these texts should happen in the Android layouts, not
with inline whitespace characters.
2014-12-11 13:49:56 +01:00
Daniel Martí
e085bcd54c Use the newer plugin form 'com.android.application' 2014-12-10 10:53:37 +01:00
Daniel Martí
9d2a4eb999 Enable all java lint warnings 2014-12-10 10:50:08 +01:00
Daniel Martí
c7e9e16a6b Bump to 0.77-test 2014-12-09 15:55:13 +01:00
Daniel Martí
fa9690886b Merge branch 'gradle-structure'
As described on https://f-droid.org/forums/topic/gradle-directory-structure/.

This will keep things a bit weird with git for a bit, but you can always use
--follow to make it take renames into account for the commit history.

I tweaked both the ant and gradle build setups and both of them work in the
new structure. And gradle is much faster since e.g. now an 'assemble' inside
F-Droid assembles only the client, without including all the subprojects as it
happens in master.
2014-12-09 15:37:14 +01:00
Daniel Martí
06dd4c8dcb Move F-Droid project into subdir, keeping a root gradle project
Also improved .gitignore a tad
2014-12-09 15:36:07 +01:00
Peter Serwylo
f0dba2f6e7 Merge branch 'fix-111/lollipop-sadness' into 'master'
Fix issue #111 (Doesn't work on lollipop devices)

See Issue #111 (monster comment https://gitlab.com/fdroid/fdroidclient/issues/111#note_379713) for details of fix.

See merge request !41
2014-12-03 10:37:12 +00:00
Peter Serwylo
6d0207c32e More robust failure conditions for local repo keystore.
Was experiencing some problems with local repo keystore on Android 2.3.4.
Previously, the local repo keystore could fail to create, but would still
return a LocalRepoKeyStore instance to be used. Now it throws a checked
exception, and is dealt with in the relveant places.

Also cleaned up some calls to "e.printStackTrace()" and replaced with
more informative logging messages.
2014-11-29 03:58:43 +11:00
Peter Serwylo
0a4725b962 Disable spongycastle before verifying jar files.
Fixes issue #111. This is a workaround rather than a full solution,
but it solves the problem. There is a bug in Lollipop, whereby including
spongycastle as a security provider causes problems verifying .jar files.
As a result, it is now disabled when actually performing verification,
so that the libraries provided by Android do the work, and then re-enabled
afterwards.

There is an ever so slight chance that the period when this is disabled
may align with the period when spongycastle may actually be required
(i.e. for signing a local repo index). This is a risk which I cnanot
see how to avoid, and will likel7 cause either the signing to fail
due to the unavailability of the relevant security classes. However
this is very minimal, hard to reproduce (I couldn't get it to happen)
and also has the effect of the local repo failing, rather than the updating
of apps failing (which is arguably more important) and so is worth it in
my opinion.

See comments at https://gitlab.com/fdroid/fdroidclient/issues/111
for much greater detail.
2014-11-28 06:48:38 +11:00
Daniel Martí
2d78fa802f Remove values-zh-hk as it is making builds error 2014-11-15 22:13:42 +01:00
Daniel Martí
afad8fb85a Run fix-ellipsis.sh 2014-11-15 20:37:38 +01:00
F-Droid Translatebot
8de3842285 Translation updates 2014-11-14 12:12:16 +00:00
Daniel Martí
9b108e36d8 Bump build.gradle tools and plugin versions 2014-11-14 12:10:56 +01:00
Daniel Martí
eb83736dce Better fallback for sdk levels we don't yet know about 2014-11-14 12:10:07 +01:00
Daniel Martí
1248bd0523 Fix more RTL issues 2014-11-05 21:52:33 +01:00
Daniel Martí
216ec24680 Bump target sdk to 21 2014-11-05 21:44:36 +01:00
Daniel Martí
9ab4b55de1 Fix select_local_apps_list_item layout on <17 2014-11-05 21:38:55 +01:00
Daniel Martí
a845f66099 Don't abort on lint errors 2014-11-05 21:36:35 +01:00
Daniel Martí
c6811d83b2 Bump gradle plugin version to 0.14.1, upgrade properties 2014-11-05 21:31:25 +01:00
Daniel Martí
e6bce05bd2 Bump toolVersion 2014-11-05 21:16:16 +01:00
Daniel Martí
3e0df70c56 Bump support library submodule to v21.0.1 too
Assuming that the HEAD at October 30th, 2014 is what was used to release
21.0.1. We can't know for sure since it wasn't tagged.
2014-11-05 21:07:00 +01:00
Daniel Martí
9f0873a3af Update support-v4 to 21.0.1 2014-11-05 20:59:04 +01:00
Daniel Martí
c3af53a18d Update UIL to 1.9.3 2014-11-05 20:46:07 +01:00
Daniel Martí
aa0abaeb70 Add 20 and 21 to getAndroidVersionName, better out of bounds check 2014-11-05 19:57:09 +01:00
Ron Rieve
8e3b064786 On update errors, actually display an error
Previously the update silently failed, and even showed "No Repository has any package updates". The commit relays one error message per repo and adds a localized message when only a part of the repo updates failed. Also, the error message for more severe errors is made more verbose.

Also removed the "errmsg" variable.
2014-11-04 21:50:44 +11:00
Peter Serwylo
6d1801c0fd Merge branch 'feature/swap-ui-implementation' into 'master'
Initial "swap" UI implementation

This is a major rejigging of the "Local Repo" user interface, to make it easier for lay people to use F-Droid to swap their apps with their peers. I wont mention too much here, because the individual commits have more detailed information. However, it is worth  noting that major things that probably deserve testing are:
 * Going through the proccess of creating a swap
 * Scanning the QR code from another users F-Droid "swap" screen
 * Scanning the QR code from their barcode scanner
 * Entering the URL shown below the QR code into the browser and following the steps
 * Installing an app from the "Swap" success screen
 * Using NFC to add swap (I couldn't test this as only have 1 NFC device in the house)

I've actually had trouble installing from the swap screen after upgrading to Android 4.3.1 (CM) on my Nexus 4. However that issue seems to be present on the current stable "Local Repo" implementation too, so will stop banging my head against the desk in the interest of getting this initial swap implementation out.

Subsequent work will go towards refining edge cases. I'm cataloging these in my fork of fdroidclient on github. The type of things which I still need to work on include :
 * i18n all of the strings
 * Enabling NFC
 * Dealing with WIFI disconnects
 * Support WIFI AP
 * Adding back the "search" functionality in the "create swap" screen
 * ... and no doubt others will arise ...

A major feature which is missing is Bluetooth, but some earlier work has been done on that which will make it less of a burden to implement. As this is getting reviewed for merging, I will start working through these other issues.

See merge request !28
2014-10-22 12:45:00 +00:00
Peter Serwylo
58db8a1f00 Correct handling of back button presses during swap workflow.
When electing to "Swap Apps" from the main menu, and a LocalRepoService
is already running, then it jumps straight to the wifi QR fragment.
However, it didn't play nice when pressing the "back" button. This is
now fixed, by manually recreating the backstack in this situation.

It also fires up the NFC push message if NFC exists.
2014-10-22 18:08:32 +10:30
Peter Serwylo
92f71ca13a Ability to cancel swap. Made QR code larger.
Added a "Cancel" button to the swap QR code screen.
Also changed how the LocalRepoService deals with onDestroy(). Previously, it
would invoke `stopNetworkServices()` on the UI thread, blocking for a
significant portion of time (enough to cause ANR messages on my devices).
Now, it does this on a new thread.

As for the QR code size, it was getting quite small on my nexus 4,
which I think has a large screen (even though there is much larger about).
As a result, it couldn't be scanned properly using barcode scanner.
This is the first major diversion from carries mockups, in that the qr
view is now in a scroller, which means the "Open QR Code Scanner" button
may well not be visible on the main screen on small devices. Not sure about
how to manage this tradeoff between biggish qr code but everything
viewable on one screen.
2014-10-22 18:08:32 +10:30
Peter Serwylo
de74d6457d Local repo notification directs to swap wifi connect screen.
Previously it would direct to the LocalRepo screen, then when that code
was ported to the swap workflow, it did nothing :( Now it does as one
might expect, and actually directs the user to the swap screen.
2014-10-22 18:07:46 +10:30
Peter Serwylo
ddb9791e11 Incoming swap URI's (from the web browser) go to correct place.
The
2014-10-22 18:07:46 +10:30
Peter Serwylo
b0586384f8 Handle barcode scanner when user selects "back".
Previously, it would receive a valid response, but the resulting content
of the scan was null.
2014-10-22 18:01:25 +10:30
Peter Serwylo
4857ed2d45 Fixing merge saddness after rebasing my changes over master.
I had a couple of months of changes which I rebased over master.
It made me sad. After doign what I thought was required to resolve
conflicts, I've now gone and fixed a few bits here and there.

This arose because I didn't try and compile after each merge conflict.
I'll take the lesson onboard and try to remember to do this in the
future :)
2014-10-22 18:01:25 +10:30
Peter Serwylo
a299340db7 Show a different list of apps after swap is ready, rather than the default.
Previously, we would redirect to the main list of apps. Now, the swap
thing will show the specific apps in the "LocalRepo" category. It also
shows the "Swap complete" message with a nice icon carrie designed.
2014-10-22 18:01:25 +10:30
Peter Serwylo
bcb47c9490 Update the "next" button label correctly during swap workflow.
Instead of always showing "swap", sometimes it shouldn't be shown
at all (i.e. on the first and last screen) and on the NFC screen,
it says "skip".

There is a translated string called "skip_button_label" available
in the AndroidPreferenceFragment library, but I don't want to rely
on that. Prefer to have our awesome translators be in charge of
that label.
2014-10-22 18:01:24 +10:30
Peter Serwylo
6d006e70b3 Always attempt to push swap repo via NFC.
Previously, swap would only enable this if the user hadn't previously
said "Don't show NFC message again". However, we really want people
to be able to swap regardless of whether the actual UI message is shown
or not.

Refactored NfcBeamManager to NfcHelper, to allow extra utility methods
to live there. Specifically, the process of sending a URI over NFC.

Removed some superfluous debugging calls to Log.i().
2014-10-22 18:01:24 +10:30
Peter Serwylo
6b27568ac4 Correct theme applied to swappable apps list.
Took a while to figure out, but the problem was that the support
libraries ListFragment would only ever use getActivity() when
creating widgets. What we really needed was the ability to use
an alternative context, namely a ContextThemeWrapper. If this is
passed to the constructor of a widget, it is themed appropriately.

To make it work, we now create our own list view in onCreateView()
(which is really a copy of the code from the android list_content.xml
file anyway). There are also some workarounds for a bug in the
support library with regards to using your own view.
2014-10-22 18:01:24 +10:30
Peter Serwylo
3eee4f115a Make "Open QR scanner" button work for swap connect screen.
I did the same as some previous code which copied code from the zxing
library and put it in the com.google.zxing namespace (but left the license
in tact - is this okay for Apache 2.0 stuff?). The reason was that they
encourage copying the relevant two files into your project and modifying
as neccesary. In this case, it wasn't about modifying for functionalities
sake, but rather for android support libraries sake. The upstream version
doesn't support android.support.v4.app.Fragments, only android.app.Fragments.

Hooking up the intent integrator from zxing almost removes the need for
the refactoring which made FDroid.java responsible for handling "new repo"
intents. However, there is still the one case of the user not using
the QR code, but rather a web browser to connect to a swap. That is, they
will click a link on the other phones web browser, which directs them to
initiate the swap. Thus, we still need FDroid.java to be able to distinguish
between a "swap" new repo request, and a regular "add repo" new repo request.

In the process, I also commented out the "It's not working" button.
2014-10-22 18:01:24 +10:30
Peter Serwylo
b841c4b4c9 Remove public/private/hotspot icons (Fixes issue #9)
These have been temoprarily moved to an unused layout. The reason
it wasn't removed completely was because the layout still adheres
to the spec from carrie (and I couldn't be bothered looking through
the git history to find it later on when it is time to re-implement
it :)

I've also commented out the "Learn more about wifi" and "use
bluetooth instead" buttons for now.
2014-10-22 18:01:24 +10:30
Peter Serwylo
80205e94fb Implemented client connection for swap.
Listen for a new intent, show a screen to the user mentioning
they are about to start a swap. Make FDroid receive repo intents,
then dispatch to relevant Activity.

Previously manage repo always got the intents. Now FDroid does, and
chooses whether to give to ManageRepos or Client connect.
Not sure if it is required to do it this way or not, but it seems to
work.

I had a bit of an issue getting the "Welcome to F-Droid" string to
fit on one line, because it was breaking on the hyphen. That is still
not resolved in this commit.

Still need to:
 * Show error messages instead of the "connect" description
 * Jar signing seems not to work when connecting to other repo.

In order to handle returning to F-Droid after connecting (or saying no)
I tagged the intent with a "handled" extra value. That way, I can ignore
trying to connect to a repo if we've already handled that event.

Finally, I also fixed an issue regarding downloading of signed
index.jar files with an uppercase fingerprint.
The fingerprint from the jar differed from that in the swap url,
in that one was upper case and the other was lower case.
This uses an .equalsIgnoreCase check instead. It also adds an
extra guard in case the repo doesn't have a fingerprint. Although
it may not even use the signed repo updater if both the pubkey
and fingerprint are null, it is nice to have the extra assurance.

Fixes issue #19.

I also left some more TODO's around. I should put them in issues,
but I'm in a bit of a hurry.
2014-10-22 18:01:24 +10:30
Peter Serwylo
2a22a8b6cb Move "Start local repo" to the SwapActivity, rather than WifiQrFragment.
By starting the repo in the activity, both the NFC and wifi fragments
have access to it. In the future, it will make it easier to move some
of the static stuff from FDroidApp (to do with "selected apps") into
the SwapActivity, as it will not really be needed anywhere else.
2014-10-22 18:01:24 +10:30
Peter Serwylo
e84e9c15e2 Support "back" button navigation during swap process. Start service at end of swap.
The back button will take you back through each step of the swap
process now, and remove the swap Activity completely if you press
back from the first screen. Also, when the WiFi QR code is shown,
the local repo manager actually starts the relevant service.
2014-10-22 18:01:24 +10:30
Peter Serwylo
87b82a6751 Bring the swap website (hosted on the phone) in line with new designs.
The website now also has icons which it needs to worry about copying
across to the webroot, so I refactored the "symlink webroot to other
folders - such as /fdroid and /fdroid/repo".
2014-10-22 18:01:24 +10:30
Peter Serwylo
6d807793c2 Moved code from LocalRepo to the Swap UI to reuse it.
Along with a bunch of networking stuff, a lot of UI to do with selecting
apps to swap was also moved. The background on the list is transparent,
which allows blue to shine through. Also, the text on the list items is
white, which will not work with a white background.

I've temporarily dropped support for searching this list too, until
I get some feedback from carrie et al.

NOTE: This stuff was written before hans fixed apcompat problems with
LocalRepoActivity, but then rebased over it later. As such, it doesn't
contain his fixes. Will need to do that before a stable release. i.e.
Still has a bit of a dependency on API 11 which needs to be resolved.
2014-10-22 18:01:24 +10:30
Peter Serwylo
ae9cb5b89b Beginnings of an implementation for Swap.
The Fragments and an Activity which tie all of the swap views together
has begun. The first bit of implementation is to get the current
wifi network displayed, which worked out alright.

This commit contains a lot of theme related stuff, particularly
involving taking assets from carries mockups and making them suitable
to use as drawables. The process for doing this is a story for another
day, but I'll document it and put it on the wiki in the future. carrie
showed me a script that a mate of hers used on another project, and
I've adapted it a little to make it work nicely here (note - it isn't
in this commit).

The button is blue, and always shown with associated text in the
ActionBar. This required a custom drawable which was set as the
background in the styles.xml.
2014-10-22 18:01:24 +10:30
Daniel Martí
b14bffa1c5 Replace a few tabs by space indents 2014-10-16 17:18:08 +02:00
Daniel Martí
2fd8982485 Fix some formatting across the java code
A good reference is:
https://google-styleguide.googlecode.com/svn/trunk/javaguide.html

Unfortunately, since there is no checkstyle file for it, we can't check for it
programmatically.
2014-10-16 17:15:47 +02:00
Daniel Martí
93c9abb887 Use interface types where possible 2014-10-16 16:55:07 +02:00
Daniel Martí
10009dc1fe Bump to 0.76 2014-10-09 00:43:53 +02:00
Peter Serwylo
4ba45ba66f Merge branch 'stable-fixes' into 'master'
fix crasher bug in 0.75

    fix divide-by-zero crash when a repo has less than 25 apps in it

    This was introduced in e4401ed22c0f65db5d4f1a1f0e1222b061e471af

See merge request !39
2014-10-07 21:27:40 +00:00
Hans-Christoph Steiner
0a10e44778 don't check incoming repo URI is on same wifi if device does not have wifi
Fixes this crash:
              dalvikvm  W  threadid=1: thread exiting with uncaught exception (group=0xb68df4f0)
        AndroidRuntime  E  FATAL EXCEPTION: main
                        E  java.lang.RuntimeException: Unable to resume activity {org.fdroid.fdroid/org.fdroid.fdroid.views.ManageReposActivity}: java.lang.NullPointerException
                        E      at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2120)
                        E      at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2135)
                        E      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1668)
                        E      at android.app.ActivityThread.access$1500(ActivityThread.java:117)
                        E      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
                        E      at android.os.Handler.dispatchMessage(Handler.java:99)
                        E      at android.os.Looper.loop(Looper.java:130)
                        E      at android.app.ActivityThread.main(ActivityThread.java:3683)
                        E      at java.lang.reflect.Method.invokeNative(Native Method)
                        E      at java.lang.reflect.Method.invoke(Method.java:507)
                        E      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
                        E      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
                        E      at dalvik.system.NativeStart.main(Native Method)
                        E  Caused by: java.lang.NullPointerException
                        E      at org.fdroid.fdroid.views.ManageReposActivity.checkIfNewRepoOnSameWifi(ManageReposActivity.java:466)
                        E      at org.fdroid.fdroid.views.ManageReposActivity.addRepoFromIntent(ManageReposActivity.java:455)
                        E      at org.fdroid.fdroid.views.ManageReposActivity.onResume(ManageReposActivity.java:144)
                        E      at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1150)
                        E      at android.app.Activity.performResume(Activity.java:3832)
                        E      at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2110)
                        E      ... 12 more
2014-10-07 17:03:06 -04:00
Hans-Christoph Steiner
47d6bb095b fix divide-by-zero crash when a repo has less than 25 apps in it
This was introduced in e4401ed22c0f65db5d4f1a1f0e1222b061e471af
2014-10-07 16:47:28 -04:00
Peter Serwylo
cf03ad3edb Merge branch 'master' into 'master'
README: more on installation and troubleshooting

android SDK commands to compare locally installed targets with git fetched libraries and additional code snippets to install missing targets.

See merge request !38
2014-10-04 05:56:34 +00:00
Daniel Martí
669a7bc1cf Bump to 0.75 2014-10-03 22:36:23 +02:00
Daniel Martí
acd61b7a68 Completely disable proguard 2014-10-03 22:31:01 +02:00
Anatoly Pugachev
8f1d4d3b6f troubleshooting, more on android targets and installation 2014-10-01 22:11:54 +04:00
Peter Serwylo
b655b54890 Merge branch 'master' into 'master'
updated README

minor README edit for a newbies (as like me)

See merge request !37
2014-09-30 13:34:42 +00:00
Anatoly Pugachev
09fc1c5545 added sdk CLI for a target platform and SDK URL 2014-09-30 16:08:43 +04:00
Daniel Martí
fdb710dfd1 Merge branch 'master' into 'master'
do not run proguard in `ant debug` builds, it breaks the tests

The whole Android ant build system was built around the assumption that proguard is only run on the release builds.  Running proguard on the debug builds breaks the test instrumentation, which does something like insert the emma methods into each class.  In theory, this could be fixed, but I think its a bad idea to heavily customize the ant build system since its basically deprecated in favor of gradle.

Here's the proguard warning message:
`[proguard] Warning: can't find referenced class com.vladium.emma.rt.RT`

Instead, there is probably a way to test the release build. For example, in the Jenkins build, I added `ant clean release`, then it installs the APK, and runs the "monkey tester" on it.

See merge request !36
2014-09-23 08:00:53 +00:00
Peter Serwylo
e4401ed22c Don't show progress for every app being processed from index.xml.
Rather, only show 25 progress events. I went with "25 events" rather
than "every X apps" because then it will be nice for both large repos
(e.g. F-Droid will update every ~50 apps) and small repos (something
with 20 apps will update for every one, but not add much overhead).

On my testing with an API 11 emulator here, it went from ~32s to
process ~1100 apps to ~20s. When no progress events are sent, then it
also takes ~20s, so this essentially is a 50% improvement for this part
of the update process.
2014-09-18 14:01:20 +10:00
Hans-Christoph Steiner
c330362cf0 do not run proguard in ant debug builds, it breaks the tests
The whole ant build system was built around the assumption that proguard is
only run on the release builds.  Running proguard on the debug builds
breaks the test instrumentation, which does something like insert the emma
methods into each class.  In theory, this could be fixed, but I think its a
bad idea to heavily customize the ant build system since its basically
deprecated in favor of gradle.

Here's the proguard warning message:
 [proguard] Warning: can't find referenced class com.vladium.emma.rt.RT
2014-09-16 18:58:01 -04:00
Daniel Martí
481cd91646 Fix installer warning logs logic 2014-09-15 10:59:54 +02:00
Daniel Martí
4f06d0081e Prepare for 0.74 2014-09-11 23:23:31 +02:00
Peter Serwylo
69fd955360 Merge branch 'master' into 'master'
Save updated repo data at the end of the update

This fixes #84.

See merge request !34
2014-09-11 03:51:24 +00:00
Ron Rieve
692a25abcb Save new repo data at end of update
Saves the new data for the repo at the end of the update process to enable the user to re-trigger the update in case the update exited prematurely.
Fixes #84.
2014-09-11 05:27:06 +02:00
Peter Serwylo
c7145a63cb Prevent android.support.v7.SearchView from being excluded by proguard.
There is a bug where the android.support.widget.SearchView gets
removed by proguard which causes breakage. This prevents that
from occuring by a bit of a brute force approach. While it would
be possible to keep only the class in question, this may leave
us open to other bugs in the future. Better to be safe than sorry.

http://stackoverflow.com/questions/22136032/action-bar-search-view-android-null-error
2014-09-11 10:55:24 +09:30
Hans-Christoph Steiner
008752ae74 fix stupid crasher bug introduced in 4f7f87be0a0487aad19c78a2a44faa1c2f008361 2014-09-10 18:02:46 -04:00
Daniel Martí
6b12a006fb Prepare 0.73
0.72 had proguard issues and 0.71 had HTTPS issues.
2014-09-08 23:09:51 +02:00
Daniel Martí
ea6482b94b Merge branch 'master' of https://gitlab.com/rrieve/fdroidclient 2014-09-08 08:44:29 +02:00
Daniel Martí
59f21c8561 Fix gradle build by bumping plugin version
Also add tools:replace since it's now needed as part of the manifest merger
2014-09-08 08:39:07 +02:00
Daniel Martí
9959becc09 Run proguard on debug builds to avoid future debug vs release issues 2014-09-08 08:25:47 +02:00
Ron Rieve
04f7b4a5a9 Toast if there are no updates
When the user updates the repo and all packages are recent, the update dialog exited so fast, that some users might have thought that the repo didn't update. To notify them that no new updates were found, the user now gets a toast.
2014-09-08 00:43:52 +02:00
Daniel Martí
36ee32d82c Remove all string-array translations missing items 2014-09-07 20:41:11 +02:00
Daniel Martí
db21ad2d3c Merge branch 'master' of https://gitlab.com/rrieve/fdroidclient 2014-09-07 19:00:35 +02:00
Ron Rieve
3a3a480429 Ask proguard to keep SystemInstaller observers
Proguard removed the method org.fdroid.fdroid.installer.SystemInstaller$PackageInstallObserver$packageInstalled,
resulting in an AbstractMethodError crash.
Fixes issue [79](https://gitlab.com/fdroid/fdroidclient/issues/79).
2014-09-07 18:49:03 +02:00
Daniel Martí
71e11027d0 Merge branch 'feature/proguard-keep-spongycastle' of https://gitlab.com/pserwylo/fdroidclient 2014-09-07 17:25:07 +02:00
Peter Serwylo
785dd036d1 Include all spongycastle classes when running proguard.
This increases the size of the .apk by ~800kb, which is clearly
undesirable. However, the nature of the Java security suite
implementations are that they use a lot of reflection to instantiate
classes. The end result is that proguard excludes classes which
may be required, depending on the security algorithms required
by certain certificates.

Fixes issue #88
2014-09-08 00:36:02 +09:30
Daniel Martí
cd0617d0f6 Release 0.72 2014-09-05 21:24:17 +02:00
Daniel Martí
f60f2c160a Run fix-ellipsis.sh 2014-09-05 21:20:20 +02:00
Daniel Martí
78ed3cee96 Fix values dir name 2014-09-05 21:19:54 +02:00
F-Droid Translatebot
9384466c29 Translation updates 2014-09-05 19:31:27 +01:00
Daniel Martí
c2350cbb73 Prepare changelog for 0.72 2014-09-05 16:35:12 +02:00
Peter Serwylo
d8653d8345 Merge branch 'master' into 'master'
revert to plain CA-based HTTPS verification

This is to address #80 so we can get a stable release out.  Then we should revisit #80 and actually get the pinning and TOFU working properly.

See merge request !30
2014-09-05 11:59:14 +00:00
Hans-Christoph Steiner
0429b3f7dd remove HTTPS pinning and TOFU until the bugs get worked out
This reverts to only using standard HTTPS verification based on Certificate
Authorities.  This means that self-signed certificates will not work at all
since that is what MemorizingTrustManager was providing.  It seems to me
that this was originally working because MemorizingTrustManager was not
correctly validating.  I couldn't figure out why PinningTrustManager alone
was not working. But we need to get good stable release out!

I'm leaving all the plumbing in place because this stuff should be included
once its all fixed and working properly.  You can see where it was added
here: 254327f9a7700c8196e61f53801f1f12ac825806

refs #80 https://gitlab.com/fdroid/fdroidclient/issues/80
2014-09-05 00:00:37 -04:00
Peter Serwylo
c9b08ffdd7 Prevent crash when changing categories. Fixes #72.
The problem arose when we start with no categories other than the
three defaults, then add a repo with multiple categories. The exact
issue was that although the category spinner itself was updated,
the listener for onChange was referencing the list of categories
from before (with only three categories). Changed it to use data
from the category spinner adapter, that way it is always up to
date.

Also fixed some warnings in the file. Instance access of a static
object, and deprecated method warning.
2014-09-05 06:59:19 +09:30
Hans-Christoph Steiner
2b03fb49be Merge branch 'master' into 'master'
Fix issue #56 -- update.zip

Creates a script create a update.zip file that installs F-Droid to `/system/app` or `/system/priv-app` depending on the android version. Also creates a remove.zip to remove F-Droid. Generates a zip file for every apk in the bin directory, to work with both signed and unsigned apks. Fixes issue #56.

See merge request !29
2014-09-03 16:52:17 +00:00
Ron Rieve
3e5f3d45a6 Create zips to install and remove F-Droid as system app
Adds a script zip-build.sh which creates CWM-flashable zips to install/update and remove F-Droid as system/privileged app.
2014-09-03 01:47:32 +02:00
Ciaran Gultnieks
77419183ec Declarative dependencies for proxy settings too 2014-08-28 17:46:23 +01:00
Ciaran Gultnieks
b4d8ee08dc Specify preferences dependencies declaratively 2014-08-28 17:39:34 +01:00
Ciaran Gultnieks
9cfa079e46 Restrict root/superuser install options to Experts
These two options are only enabled when Expert Mode is switched on.
They're far too incomplete and risky currently, unless you know what
you're doing.
2014-08-28 12:36:53 +01:00
Ciaran Gultnieks
3fc53c21d2 Add new f-droid.org cert pin 2014-08-28 12:36:49 +01:00
Ciaran Gultnieks
7f9a03822c Revert "Add new f-droid.org cert pin"
This reverts commit 0d7e7e4009abdb421c3e605065c178d5a31e860b.
2014-08-28 12:35:24 +01:00
Ciaran Gultnieks
0d7e7e4009 Add new f-droid.org cert pin 2014-08-28 12:08:09 +01:00
Peter Serwylo
87c3cd456e Merge branch 'fix/progress-indicator-and-root-installer' into 'master'
Fix issues #74 and #75

The indeterminent progress indicator in the `AppDetails` view is now hidden by default on Android 4.0.3 (which is the only reproducing device I had access to). Had to replace a bunch of calls with those provided by appcompat.

As for the "(De-)Installation Error" message when using the root installer, it was due to the timeout being set to 5 seconds for the superuser shell. Note that just accepting the super user prompt takes a minimum of 3 seconds, plus the install time. I changed the timeout to 30 seconds, for reasons explained in the commit.

NOTE: @mvdan, I noted that you mentioned you were not interested in client development any more, so I'm not quite sure if it is worthwhile me submitting this as a MR (FYI - thanks for all the help on the client, also happy that your able to spend more time on build recipies and fdroidserver stuff. Great to see all that moving along). Perhaps @CiaranG, if you had the time to review it you could give it the thumbs up or down? Otherwise, I'll merge it myself.

See merge request !27
2014-08-20 11:52:45 +00:00
Peter Serwylo
82fed66a8a Increase root installer timeout from 5 to 30s. Fixes Issue #74.
The superuser shell has a timeout that can be specified. The timeout
was set to 5 seconds, thus the exit code from the shell is -1 (a
reserved exit code used by libsuperuse to indicate timeout).

By my estimate, it is more likely that a user will hit this error
message and get annoyed, compared to actually hitting a genuine timeout
because of some issue with superuser. Especially when we factor in slow
devices and large apps to install. Thus, the timeout has been bumped
to a more generous 30 seconds.
2014-08-19 08:12:47 +09:30
Peter Serwylo
3a3ea52077 Default AppDetails progress indicator to hidden. Fixes issue #75.
Replaced progress indicator methods with their "support" equivalents.

Also, it seems that on Android 4.0.4 and 4.0.3 if you request a
progress indicator in your ActionBarActivity (from the support
library), that it is set to visible to begin with. At least, that is
the conclusion I have come to, seeing as the only places it is set to
visible is on installApk() and removeApk(). Setting it to hidden in
onCreate seemed to do the trick (Couldn't use onResume, because we come
back from the "Request super user permissions" dialog, which causes
onResume to be invoked).
2014-08-19 08:08:46 +09:30
Daniel Martí
08c089b25c Remove leftover files 2014-08-13 13:25:46 +02:00
Daniel Martí
5ea37b0d12 FDroid -> F-Droid in the changelog 2014-08-13 13:22:30 +02:00
Daniel Martí
2b0b220e4d Add a couple of missing changelog items for 0.71 2014-08-06 19:59:03 +02:00
Daniel Martí
4cddb8d6ea Mark the changelog for 0.71 2014-08-06 17:25:04 +02:00
Daniel Martí
916afe1627 Bump to 0.71 2014-08-05 23:57:37 +02:00
Daniel Martí
6b7df1e46e Run fix-ellipsis 2014-08-05 23:45:31 +02:00
F-Droid Translatebot
0c1420ab2e Translation updates 2014-08-05 22:43:01 +01:00
Daniel Martí
62056648ee Update spongycastle 2014-08-05 15:09:55 +02:00
Daniel Martí
5cd6285ce0 Update MTM and UIL 2014-08-05 13:30:31 +02:00
Daniel Martí
2f7ee04032 Make it possible to fetch the current theme directly 2014-08-05 12:53:28 +02:00
Daniel Martí
05e99c666d Merge branch 'master' of https://gitlab.com/eighthave/fdroidclient 2014-08-05 12:36:38 +02:00
Hans-Christoph Steiner
7b5e831b66 darken category menu button on the dark theme to match the theme
This commit uses alpha to make the category menu button appear darker to
match the rest of the dark theme.  Since the background is black, the alpha
makes it darker.  It is only used on the dark theme since alpha would
lighten the menu button on the light themes, and that would make it a worse
match.
2014-08-04 18:53:48 -04:00
Hans-Christoph Steiner
b695bbc4b1 fix crash after MemorizingTrustManager's TOFU/POP Always/Once/Abort prompt
If there is an unknown HTTPS certificate, MemorizingTrustManager puts up a
prompt to ask whether the user wants to trust the certificate.  It comes at
a weird time in the lifecycle of the dialogs, so the previous dialog might
be null.  Therefore add a null check.

This situation should probably be improved and better integrated.
2014-08-02 00:30:46 -04:00
Hans-Christoph Steiner
249e38c32f include relevant sites in list of HTTPS pins
The current HTTPS trust model is to first check if a site's key is TOFUed,
then check if it is pinned and check the CA, then prompt the user.  There
is currently no way to only check the CA for validity.  Ultimately, that
should probably not be needed if the repo URLs can include the HTTPS pin
info in the same way that the repo fingerprint is specified.  Then it can
be added to the TOFU/POP keystore when the user accepts the Add Repo dialog

Since that idea does not exist yet, this commit adds the sites that are
likely to run their own repos in the near future:

https://f-droid.org
https://guardianproject.info
https://s3.amazonaws.com  # multiple orgs use this
https://panicbutton.io    # Amnesty International's app
https://psiphon.ca        # circumvention tool
2014-08-02 00:30:46 -04:00
Hans-Christoph Steiner
d2e32631d0 fix incorrect lazy initialization of the list of HTTPS pins
findbugs tells us:

Incorrect lazy initialization and update of static field org.fdroid.fdroid.
FDroidCertPins.PINLIST in org.fdroid.fdroid.FDroidCertPins.getPinList().
This method contains an unsynchronized lazy initialization of a static
field. After the field is set, the object stored into that location is
further updated or accessed. The setting of the field is visible to other
threads as soon as it is set. If the futher accesses in the method that set
the field serve to initialize the object, then you have a very serious
multithreading bug, unless something else prevents any other thread from
accessing the stored object until it is fully initialized.

Even if you feel confident that the method is never called by multiple
threads, it might be better to not set the static field until the value you
are setting it to is fully populated/initialized.
2014-08-02 00:30:46 -04:00
Hans-Christoph Steiner
9870fd13b6 ignore TrulyRandom lint warnings, fdroid already includes the fix
PRNGFixes.apply() is run in FDroidApp.onCreate().  This is enough,
according to Google, and their instructions say to disable this lint
warning once the workaround is included since lint cannot detech whether
the workaround is applied.

This the code format was also automatically corrected by the Eclipse plugin
2014-08-02 00:30:46 -04:00
Hans-Christoph Steiner
df3ba4c751 only provide AndroidPinning TrustManager to MemorizingTrustManager
The third parameter in the MemorizingTrustManager constructor was not good
apparently. Here's the email from Ge0rg, the MemorizingTrustManager author:

As you added MTM into the f-droid client, I'm writing to inform you that
the MTM constructor API was incorrect, and has been changed in current
git master:

When using the three-parameter constructor, the second parameter, a
trustmanager, was only used until the user stored a certificate into
MTM, and was overwritten after that.

Please use the new MTM constructor, and pass it the pinMgr as the only
trust manager parameter.
2014-08-02 00:30:46 -04:00
Hans-Christoph Steiner
ac83a5a138 update to latest MemorizingTrustManager to get TrustManager bug fixes 2014-08-01 11:16:18 -04:00
Ciaran Gultnieks
cf53f07e1f Merge branch 'master' into 'master'
bug fixes for 0.71

I fixed the compact layout to make more sense.  There seems to be something about the appcompat stuff that is preventing it from being short as it was before.  There are some other bug fixes here, and I also included the Guardian Project repo by default, but disabled.  @CiaranG proposed doing that a while back, now I finally did it!.

See merge request !25
2014-07-30 14:22:31 +00:00
Hans-Christoph Steiner
4f7f87be0a assign static var FDroidApp.selectedApps only after HashSet is built
This should help is there is ever multithreaded access to this variable.
This is an unlikely scenario, but the fix is easy.

findbugs reported this issue like this:

Incorrect lazy initialization and update of static field org.fdroid.fdroid.
FDroidApp.selectedApps in org.fdroid.fdroid.views.fragments.
SelectLocalAppsFragment.onActivityCreated(Bundle)

This method contains an unsynchronized lazy initialization of a static
field. After the field is set, the object stored into that location is
further updated or accessed. The setting of the field is visible to other
threads as soon as it is set. If the futher accesses in the method that set
the field serve to initialize the object, then you have a very serious
multithreading bug, unless something else prevents any other thread from
accessing the stored object until it is fully initialized.
2014-07-30 00:07:02 -04:00
Hans-Christoph Steiner
af3a6369cc LocalRepoManager: fix null check when copying APKs
findbugs found this problem and reported it like this:

Nullcheck of org.fdroid.fdroid.data.App.installedApk at line 191 of value
previously dereferenced in org.fdroid.fdroid.localrepo.LocalRepoManager.copyApksToRepo(List)

A value is checked here to see whether it is null, but this value can't be
null because it was previously dereferenced and if it were null a null
pointer exception would have occurred at the earlier dereference.
Essentially, this code and the previous dereference disagree as to whether
this value is allowed to be null. Either the check is redundant or the
previous dereference is erroneous.
2014-07-30 00:07:02 -04:00
Hans-Christoph Steiner
bc5cf590c7 fix Compact Layout post appcompat
This restores the Compact Layout being smaller than the normal layout, and
properly centers the icon in both.  This stuff could use some refactoring
to work better with all the appcompat styles.

fixes #61 https://gitlab.com/fdroid/fdroidclient/issues/61
2014-07-30 00:07:02 -04:00
Hans-Christoph Steiner
be3f7900e8 rename default repo variables for clarity
default_repo_count is not used at all, and the numbering scheme is just a
vestige of that.  This switches all the variables to have clear names of
what they are representing.
2014-07-29 17:49:23 -04:00
Hans-Christoph Steiner
14824daa21 include Guardian Project official repo, disabled by default
This pre-configures the official Guardian Project repo to make it very easy
for people to use that repo without having to verify keys.

fixes #63 https://gitlab.com/fdroid/fdroidclient/issues/63
fixes #2604 https://dev.guardianproject.info/issues/2604
2014-07-29 17:49:23 -04:00
Hans-Christoph Steiner
78558ca86e make method for inserting default repo name/description
Instead of copy-pasting a block of code, use a method! :-D.  This will be
useful when adding more default repos... (coming soon!).
2014-07-29 17:49:22 -04:00
Hans-Christoph Steiner
aa877fd85a Category Spinner should always look like a dropdown menu
On Android 4.x, the category menu is showing up as pure black, and looks
very much like an app list item.  I've personally witnessed many new users
struggle to find an app because the category is on "What's New" by default
and the app they are looking for is not new.  Some even had troubles
remembering about the category menu after I told them.  This small change
makes the category dropdown look the same on all Android versions, and
makes it a lot more apparent on newer Android releases.

This is a temporary usability fix until we can do something much better
than the category dropdown menu.
2014-07-29 17:49:22 -04:00
Dominik Schürmann
602991767c Update libsuperuser lib (old repo has been deleted, new fork created) 2014-07-26 14:29:58 +02:00
Daniel Martí
8fc125a1c5 Merge branch 'appcompat-porting-and-fixes' of https://gitlab.com/eighthave/fdroidclient
This merge request is a lot of porting code to use Android Support
appcompat-v7, now that it is in place. There are places where old custom
compat layers are replaced by appcompat, and other places like the local repo
stuff, where appcompat allows for full support on platforms older than 11.
2014-07-18 13:26:48 +02:00
Hans-Christoph Steiner
bbb91e8eca fix bug where "app repo" dialog gets created twice for an incoming Intent
onNewIntent() is called because ManageReposActivity is set to "singleTask"
launchMode, but it is only called if ManageReposActivity is already
running.  onResume() is always called, and called after onNewIntent() if it
is called, so use onNewIntent() only to set the current Intent, then parse
the Intent only in onResume().

Here is how to reproduce the original bug:

1. Close F-Droid properly and start it again.
2. Click on https://guardianproject.info/fdroid/repo in a browser (and tell
   it to open with F-Droid)
3. Hit cancel on the add repo dialog
4. Leave F-Droid open and switch back to the browser
5. Open that link again.

This should result in two dialogs on top of one another. Happened from both
Firefox, Chrome, and Android browsers.
2014-07-15 12:28:41 -04:00
Hans-Christoph Steiner
182aea0f98 support 1 and 2 level nested repos in QR Code URLs
This adds support for QR Code URLs nested in dirs 1 or two levels deep.
This supports things like the Amazon S3 URLs.
2014-07-15 12:28:41 -04:00
Hans-Christoph Steiner
13f52e1b50 change title to "F-Droid" for VIEW Intent receiver chooser
When someone clicks on a URL that F-Droid can accept, i.e. a repo URL, then
Android puts up a chooser where the user can select which app to VIEW the
URL with.  That was showing up with the title "Repositories", which is the
title used for that Activity when viewing it.  This keeps the Activity
title the same while changing the title in the chooser.
2014-07-15 12:28:41 -04:00
Hans-Christoph Steiner
56933cdbd6 sanitize URL from clipboard and parse fingerprint (fixes #50)
Instead of just sticking whatever URL is in the clipboard into the "Add
Repo" dialog, this attempts to sanitize the URL in case it has some garbage
or came from a QR Code, and therefore was all uppercase (that makes for
smaller QR Codes).  It also checks if there is a fingerprint in the query
string of the URL, and sticks that into the fingerprint box.

fixes #50 https://gitlab.com/fdroid/fdroidclient/issues/50
2014-07-15 12:28:41 -04:00
Hans-Christoph Steiner
a525bca1cf split out new, incoming repo configs into a separate class: NewRepoConfig
The swap stuff will also need to handle incoming Intents that represent
new repos, so the parsing logic is now its own class NewRepoConfig, which
is something like the Repo class, but using getters instead of properties.
Since the new repo data does not change once FDroid receives it, the only
way to set the values of a NewRepoConfig is via the constructor.

This is based on some incomplete work from @pserwylo:
71cb12ef5c (diff-6)
and
71cb12ef5c (diff-7)
2014-07-15 12:28:41 -04:00
Hans-Christoph Steiner
92199f2f01 merge dimen.xml into dimens.xml (the standard name)
'dimen' resources go in dimens.xml, 'color' resources go into colors.xml,
etc. etc.
2014-07-15 12:28:41 -04:00
Hans-Christoph Steiner
c1e5e287b7 rename AppListFragmentPagerAdapter to fix typo
AppListFragmentPageAdapter is a subclass of FragmentPagerAdapter, so it
should include the same spelling to make that clear and easy to trace,
grep for, etc.
2014-07-15 12:28:40 -04:00
Hans-Christoph Steiner
0945661c9d ManageReposActivity: move as much out of the Fragment; use appcompat menu
Now that the Fragment is embedded in the Activity, and the menu has been
moved to the Activity in ActionBar style, most of the utility functions and
the Dialogs can be based out of the Activity, which is how they are
designed to work.  This makes things work a lot easier.

fixes #3 https://gitlab.com/fdroid/fdroidclient/issues/3
2014-07-15 12:28:40 -04:00
Hans-Christoph Steiner
d41499d656 move RepoListFragment into ManageReposActivity
This will make it a lot easier to deal with the ActionBar menu and handling
rotations when the "add repo" dialog is showing.
2014-07-15 12:28:40 -04:00
Hans-Christoph Steiner
7a08ab532f run code formatter on ManageReposActivity and RepoListActivity
This should ease future comparisons after these two files are merged into
one.
2014-07-15 12:28:40 -04:00
Hans-Christoph Steiner
83072bc2c4 rename ManageRepo.java to be with all the rest of the Activity files
This moves it to the org.fdroid.fdroid.views package and names it in the
same style as the Activities in that package.
2014-07-15 12:28:40 -04:00
Hans-Christoph Steiner
cba8f3b68f convert main menu to appcompat ActionBar style
This allows the main menu to act like a proper ActionBar using appcompat.
It also allows for making the search happen live on the ListView, rather
than having to launch a separate Activity to show the results.
2014-07-15 12:28:40 -04:00
Hans-Christoph Steiner
b06792524e port everything to appcompat-v7 (#42, #51)
I went through all of the source code replacing anything that is now
possible using appcompat-v7.  appcompat-v7 is the official way to handle
backwards compatibility, and it is supported by Google and others. Using it
as much as possible should make the code more maintainable and readable by
others since they'll be used to seeing the appcompat-v7 patterns from other
projects.

fixes #51 https://gitlab.com/fdroid/fdroidclient/issues/51
fixes #42 https://gitlab.com/fdroid/fdroidclient/issues/42
2014-07-15 12:28:23 -04:00
Hans-Christoph Steiner
3fef37a5f4 added test of "Master Key"-style exploit based
This does not seem affected, I made a quick and dirty zip with two
index.xml files in it following these instructions:
http://www.saurik.com/id/17

refs #39 https://gitlab.com/fdroid/fdroidclient/issues/39
2014-07-10 13:30:44 -04:00
Daniel Martí
8af69afba6 Merge branch 'fix/issue-51-search-action-compat' of https://gitlab.com/pserwylo/fdroidclient 2014-07-06 11:22:59 +02:00
Daniel Martí
96333c1cba Merge branch 'fix/issue-3-repo-update-rotate' of https://gitlab.com/pserwylo/fdroidclient 2014-07-06 11:13:26 +02:00
Peter Serwylo
c6e86392ff Fix issue #51. Made SearchView stuff use appcompat-v7.
Previously, it was using the native android.widget.SearchView.
Now it uses the widget from appcompat. For good measure, I also
made it so that the search button is always in the action bar,
rather than being hidden behind a menu sometimes.
2014-07-06 01:11:14 +09:30
Peter Serwylo
5ff0ef8de7 Fix issue #3: Retain progress dialog for repo update during orientation change
Do so by:

 - Making RepoDetailsFragment/RepoListFragment retain their instances
 - Move the management of the update repo dialog to UpdateReceiver
 - Let the fragments tell the UpdateReceiver when to show/hide
2014-07-05 22:45:15 +09:30
Daniel Martí
eb841a88ca Update build-tools version 2014-07-02 14:04:05 +02:00
Daniel Martí
4e52611d36 Prepare for 0.70-test 2014-06-26 13:23:50 +02:00
Daniel Martí
72f238ac84 Remove useless LinearLayout that only holds a RelativeLayout 2014-06-26 13:22:05 +02:00
Daniel Martí
216acf5ae8 Run fix-ellipsis 2014-06-25 11:42:56 +02:00
Peter Serwylo
1d4581a78e Reverted layout of app details to what it was before. 2014-06-24 08:30:25 +09:30
F-Droid Translatebot
a030c25f4f Translation updates 2014-06-19 23:05:53 +01:00
Daniel Martí
98a333b7fa "Other" should be the last preferences category 2014-06-19 10:20:01 +02:00
Daniel Martí
4c94203fd9 Clean up changelog 2014-06-19 10:04:19 +02:00
Peter Serwylo
d13a8c101a Merge branch 'proxy-and-jenkins-script' into 'master'
HTTP Proxy preference for Tor, I2P, etc; add jenkins script

This adds a preference to set the HTTP Proxy so that FDroid can funnel all traffic through Tor, I2P, psiphon, or any other HTTP proxy.

Also, there is a script for jenkins to run before calling `ant clean debug` for the whole setup process.  This script sets the `versionCode` to the UNIX time in seconds, and adds the date/time to the `versionName` so that the debug builds are very clearly marked from real builds, and they will automatically update when included in a debug repo:
https://dev.guardianproject.info/issues/2601
2014-06-16 20:45:30 +00:00
Hans-Christoph Steiner
b7f0195234 add "HTTP Proxy" preference to support Tor, I2P, or any other proxy
This is the most basic support for channeling all downloads through Tor or
I2P.  This does not include Orbot integration, so the use will have to know
to start Orbot before using this.  I don't know anything about I2P.

closes #2367 https://dev.guardianproject.info/issues/2367
https://f-droid.org/repository/issues/?do=view_issue&issue=404
https://f-droid.org/repository/issues/?do=view_issue&issue=424
2014-06-05 17:23:44 -04:00
Hans-Christoph Steiner
ff5d2b571f include script for jenkins to run for setting up the ant build
Jenkins will then call ant directly after running this script.  This then sets
the debug builds made by Jenkins to have a versionCode of the UNIX time in
seconds and adds the data to the versionName.  This clearly marks these as
debug builds and also makes it possible to have an fdroid repo of debug builds
that will automatically update after each build.
2014-06-05 17:23:44 -04:00
Daniel Martí
2f9c3b8056 Switch to java 1.7
Taken from the gradle plugin user guide:

With Android KitKat (buildToolsVersion 19) you can use the diamond operator,
multi-catch, strings in switches, try with resources, etc.

Note that you can use minSdkVersion with a value earlier than 19, for all
language features except try with resources. If you want to use try with
resources, you will need to also use a minSdkVersion of 19.

You also need to make sure that Gradle is using version 1.7 or later of the
JDK. (And version 0.6.1 or later of the Android Gradle plugin.)
2014-06-05 10:32:57 +02:00
Daniel Martí
5dac28f882 Make it explicit that we're using 1.6
Can be bumped to 1.7 if minsdk is bumped to 8
2014-06-05 10:23:55 +02:00
Daniel Martí
67b608e4e5 Set the gradle project name to F-Droid like ant 2014-06-05 10:20:06 +02:00
Daniel Martí
ce42783583 Move support-v4 jars around in ant-prepare 2014-06-05 10:15:26 +02:00
Daniel Martí
4929a8c15d Remove now unnecessary -pre-build from ant 2014-06-05 09:49:41 +02:00
Daniel Martí
5d3372207a Hard-code v7-appcompat target to android-19
Taken from v7/appcompat/build.gradle
2014-06-05 09:47:56 +02:00
Peter Serwylo
5af5306311 Merge branch 'appcompat-on-top-of-pserwylo' into 'master'
Appcompat on top of pserwylo

This is a refactor of @pserwylo's !19 to get appcompat building with `ant` and Eclipse.  I reviewed @pserwylo's commits and they are ready to go as they are in this merge request.
2014-06-05 05:38:53 +00:00
Hans-Christoph Steiner
81cbef82b4 finish ant/gradle build for appcompat-v7
Both preferencefragment and appcompat-v7 submodules need the
android-support-v4.jar to be included in their respective libs/ dirs in
order for ant to build those projects.
2014-06-04 23:19:54 -04:00
Peter Serwylo
208146882e Fixed light theme on API > 11
Forgot that it also needed to go in the values-v11 styles file.
2014-06-04 23:19:54 -04:00
Peter Serwylo
b82be525b9 Rotation of app details with fragments implemented.
This was a bit more complex than all the other views, because it supports
rotation, and different views for when it is rotated. The end result is
that the way in which the views were constructed needed to be completely
redone.

In the process, I also moved the layout of the app summary to a Relative
Layout. This adds more flexibility, and is also the suggested layout
for complex views (as apposed to nested linear layouts). I believe this
is due to the performance of relative vs linear layotus.

It was aprticularly hard to figure out what was going on
when rotating an Activity which had a list fragment
that had another fragment as a header. I don't think fragments
were designed to work like this, but I believe it is all working
as expected now.

Conflicts:
	src/org/fdroid/fdroid/Preferences.java
2014-06-04 23:19:54 -04:00
Peter Serwylo
659b46fd4e Fix to sdkLoc in build. Added light (without dark action bar) theme.
NOTE: I don't know how android will go with adding a new property
to a string-array resource, but not having it translated everywhere.
Will it struggle because the EN version has three values for "theme",
but other translations only have two?
2014-06-04 23:19:54 -04:00
Peter Serwylo
3050e3dbc5 Migrating activities to appcompat-v7
The only remaining activity is the AppDetails acvitity, which will require
a little more than just making it extend ActionBarActivity. Currently,
it extends ListActivity. To support appcompat-v7, it really should have
two fragments - the details one and the list one. Then, when the orientation
is changed, it should load a different layout with the fragments side by side.

Although Google is encouraging people to make old devices run apps
with the action bar (via appcompat-v7), they haven't provided a way
for people to create preference/setting screens with an action bar.

There are plenty of issues in the Android issue tracker relating
to this, but it doesn't yet seem to be on the radar of the Android
devs.

Until there is a native implementation of PreferenceFragment in
the appcompat-v7 support library, this submodule provides is a 3rd
party solution. It is actually a fork of the first repo in github,
though that was a bit of an upload and dump, without accepting MR's.
This fork includes gradle support.
2014-06-04 23:19:37 -04:00
Peter Serwylo
59b9fd6a8c add PreferenceFragment lib since appcompat lacks such a thing
Although Google is encouraging people to make old devices run apps
with the action bar (via appcompat-v7), they haven't provided a way
for people to create preference/setting screens with an action bar.

There are plenty of issues in the Android issue tracker relating
to this, but it doesn't yet seem to be on the radar of the Android
devs.

Until there is a native implementation of PreferenceFragment in
the appcompat-v7 support library, this submodule provides is a 3rd
party solution. It is actually a fork of the first repo in github,
though that was a bit of an upload and dump, without accepting MR's.
This fork includes gradle support.
2014-06-04 23:16:26 -04:00
Peter Serwylo
92421bac05 WIP: Migrating activities to appcompat-v7.
Conflicts:
	src/org/fdroid/fdroid/FDroidApp.java
	src/org/fdroid/fdroid/views/LocalRepoActivity.java
	src/org/fdroid/fdroid/views/QrWizardDownloadActivity.java
2014-06-03 08:13:53 +09:30
Peter Serwylo
58ff02a3f4 Build with dependency on support-appcompat-v7.
Thanks to the awesome work of mvdan, this was mostly ready to roll.
However, I had to wrestle for a while for two reasons:

 1) I forgot to add the dependency in the build.gradle file (it was
    already present in settings.gradle)
 2) My IDE was unable to read the ANDROID_HOME env variable, and
    despite my internet-search-fu, I couldn't figure out how to
    make IntelliJ specify env variables for a gradle build. It took
    a while to figure out, because it was failing silently in weird
    ways.

After slaving away on a nice method to parse both the ANDROID_HOME
and the local.properties file (looking for sdk.dir), and then emmiting
nice error messages if neither were found or pointed to an invalid
location, I discovered it had already be done:

android.plugin.sdkDirectory ends up here:

https://android.googlesource.com/platform/tools/build/+/master/gradle/src/main/groovy/com/android/build/gradle/internal/Sdk.groovy#161

Which does exactly all that and more. So now sdkLoc is initialized to
the value of android.plugin.sdkDirectory.
2014-06-03 08:11:59 +09:30
Daniel Martí
728d1467b9 Prepare for 0.69-test 2014-06-01 18:38:04 +02:00
Peter Serwylo
95180512c7 Merge branch 'jmdns-fixes-and-tor-onion-support' into 'master'
Jmdns fixes and tor onion support

There are three groups of work in this collection of commits:

* improvements to the `WifiStateChangeService` and related activities like JmDNS to eliminate problems that happen when there are a lot of wifi change events.

* add rework the `.net.Downloader` stuff to add Tor support and lay the groundwork for Bluetooth support

* add support for repos on Tor Hidden Service .onion addresses
2014-05-31 02:25:19 +00:00
Hans-Christoph Steiner
c1b5bf5279 implemented IconDownloader for UIL downloads with FDroid classes
This lets UniversalImageLoader (UIL) use FDroid's generic Downloader
infrastucture so that connection configuration all happens based on the URL
in DownloaderFactory.

refs #2598 https://dev.guardianproject.info/issues/2598
refs #2367 https://dev.guardianproject.info/issues/2367
2014-05-30 15:23:33 -04:00
Hans-Christoph Steiner
d19e77049a rename Downloader.inputStream() to getInputStream()
This follows:
URLConnection.getInputStream()
BaseImageDownloader.getStream()
2014-05-30 15:23:33 -04:00
Hans-Christoph Steiner
b619716669 add TorHttpDownloader for handling repos on Tor Hidden Services
Tor Hidden Services are on domain names that always end in .onion, so there
is a URL pattern matcher that chooses which Downloader subclass to use
based on testing for .onion.  This is a quick, dumb implementation.  It
does make any attempt to see if Tor is running or even installed.  That
can come once NetCipher is easy to handle in the context of FDroid.

refs #2367 https://dev.guardianproject.info/issues/2367
2014-05-30 15:23:33 -04:00
Hans-Christoph Steiner
910f9a68a6 make DownloaderFactory for creating any kind of Downloader
This will ultimately be used to create the right Downloader subclass
instance based on the URL of the file to download (i.e. rfcomm://, .onion
address, ssh://, new socket protocols, etc).

Also delete unused constructors, they can trivially be readded if they are
ever used, and they are currently just clutter.
2014-05-30 15:23:33 -04:00
Hans-Christoph Steiner
91e06b8496 new Wifi event cancels active processing of previous event
If a new "wifi connected" event comes in while a previous one is still
being processed, then cancel the current one as soon as possible.  This
prevents the events from being processed in an interleaved manner, causing
chaos and crashes.  Hopefully this will fix the jmdns crashes, since that
is triggered by onPostExecute() via FDroidApp.restartLocalRepoService().

java.lang.IllegalStateException: A service information can only be registered with a single instamce of JmDNS.
   at javax.jmdns.impl.JmDNSImpl.registerService(JmDNSImpl.java:1005)
   at org.fdroid.fdroid.localrepo.LocalRepoService$5.run(LocalRepoService.java:239)
   at java.lang.Thread.run(Thread.java:856)
2014-05-30 15:23:33 -04:00
Hans-Christoph Steiner
f51d192e13 move all mDNS service creation into the Thread
Upon looking at this, ServiceInfo.create() also might take a while to run
so might as well run it in the Thread with the other JmDNS stuff.
2014-05-30 15:23:33 -04:00
Hans-Christoph Steiner
ba028408a1 registerMDNSService() overwrites any existing registration
There is only ever a single service to advertise via mDNS, so when a new
registration is requested, remove any existing ones.  This should eliminate
these stacktraces:

java.lang.IllegalStateException: A service information can only be registered with a single instamce of JmDNS.
    at javax.jmdns.impl.JmDNSImpl.registerService(JmDNSImpl.java:1005)
    at org.fdroid.fdroid.localrepo.LocalRepoService$5.run(LocalRepoService.java:239)
    at java.lang.Thread.run(Thread.java:856)
2014-05-30 15:23:32 -04:00
Hans-Christoph Steiner
fdaa2ad106 update IP-related settings whenever the HTTPS pref changes
WifiStateChangeService handles updating lots of IP-related things, then
things that depend on it listen to the broadcast from that Service. The
most straightforward way to update HTTPS or HTTP throughout the app is to
trigger this Service.  It runs its stuff in an AsyncTask so it is all low
priority.
2014-05-30 15:23:32 -04:00
Hans-Christoph Steiner
c4b059502c better LocalRepoService singleton enforcement
We only ever want a single LocalRepoService.  Use the values returned by
the standard methods for start/stop and bind/unbind as the test for whether
the Service is indeed running.
2014-05-30 15:23:32 -04:00
Hans-Christoph Steiner
2c594cae5d Eclipse: hide warnings from submodules
There are about 4000 warnings from all the included submodules included as
symlinks.  This hides them all so Eclipse only shows the warnings for
FDroid itself.
2014-05-28 19:24:43 -04:00
Daniel Martí
ed630454a5 Update UIL 2014-05-28 22:17:38 +02:00
Daniel Martí
a085515b3d Add the rest of the srcDirs to UIL 2014-05-28 09:07:15 +02:00
Daniel Martí
9ea7959dc1 Fix typo in UIL config 2014-05-27 23:14:01 +02:00
Daniel Martí
a08963f0e5 Merge branch 'feature/refactor-downloaders-async' of https://gitlab.com/pserwylo/fdroidclient 2014-05-27 19:20:10 +02:00
Daniel Martí
bfb04648f8 Fix extra android namespaces in layout/about.xml 2014-05-27 17:59:19 +02:00
Daniel Martí
7351584697 Fix inconsistency in local_repo_https default state
+mvdan | _hc: you put https to default true in preferences.xml, but false in Preferences.java
   _hc | mvdan:  it should be off/false by default
2014-05-27 17:53:56 +02:00
Daniel Martí
4cbf97b499 Merge branch 'implement-signed-repos-and-https' of https://gitlab.com/eighthave/fdroidclient 2014-05-27 16:17:27 +02:00
Hans-Christoph Steiner
09db3524cf use getApplicationContext() when storing a passed in Context
getApplicationContext() returns the Context of the application, which is
guaranteed to have the same life as the app itself.  Other Contexts, like
an Activity, might go away during runtime.
2014-05-25 22:53:19 -04:00
Hans-Christoph Steiner
09fb7969b4 do not include URL in index.xml because it will get out of date
As far as I can tell, the 'url' metadata in index.xml is not used at all by
the client.  In order to keep it up-to-date in the local repo, it would
have to regenerate index.xml and index.jar each time the IP address
changed.  That would mean a decent amount of work happening in the
background, all the update an unused field in index.xml.
2014-05-25 22:53:19 -04:00
Hans-Christoph Steiner
0c039a6b5e make writeIndexJar() call writeIndexXML(): only create signed repos!
There is no longer a reason to expose writeIndexXML() since FDroid should
always generate a signed repo.  So make writeIndexXML() be called as part
of writeIndexJar().
2014-05-25 22:53:19 -04:00
Hans-Christoph Steiner
91fc0f5383 generate HTTPS certificate after wifi change
Since the HTTPS certificate includes the current IP address in it, it needs
to be regenerated each time that the IP address changes.  It also can take
a long time to run, especially on the first time, since it had to do things
like create a key pair and make the certificate.  Therefore it should be in
a Service/AsyncTask.
2014-05-25 22:53:19 -04:00
Hans-Christoph Steiner
b70986ef16 LocalRepoKeyStore.setupHTTPSCertificate() handles all exceptions itself
Since there is nothing happening with the Exceptions anyway, they should be
handled in this method so that this method is easy to use elsewhere.
2014-05-25 22:53:19 -04:00
Hans-Christoph Steiner
d5488fc5f1 LocalRepoKeyStore move all creation logic to the constructor
This just makes the code clearer, and the get() method dead simple.
2014-05-25 22:53:19 -04:00
Hans-Christoph Steiner
b7aad893a3 convert LocalRepoManager to a proper singleton
This gives us lazy initialization that happens the first time an instance
is needed.  And Peter asked to have this more this way :)
2014-05-25 22:53:19 -04:00
Hans-Christoph Steiner
ab165a4d7b omit unused spongycastle packages from eclipse/ant build
Many of the classes in spongycastle are entirely unused in FDroid and
dependencies.  So remove them from the Eclipse/Ant build to speed things up
and make the binaries smaller.
2014-05-25 22:53:18 -04:00
Hans-Christoph Steiner
36de588497 add Bazaar/Kerplapp work to the changelog 2014-05-25 22:53:18 -04:00
Hans-Christoph Steiner
568e82c07e if LocalHTTPD fails to instantiate, log error and stop trying 2014-05-25 22:53:18 -04:00
Hans-Christoph Steiner
b7339e9423 support HTTPS:// for local repo in a preference
Allow the local repo to use HTTPS:// instead of HTTP://.  This is currently
default off since handling the self-signed certificate is not currently
graceful.  In the future, the SPKI that AndroidPinning uses should be
included in the repo meta data, then when someone marks a repo as trusted,
that local repo's SPKI should be added to the list of trusted keys in
AndroidPinning.

fixes #2960 https://dev.guardianproject.info/issues/2960
2014-05-25 22:53:18 -04:00
Hans-Christoph Steiner
5f2efbb72a sign local repo based on key generated using spongycastle
This makes it so the local repo is always signed by a locally generated and
stored key.  That key will become the unique ID that represents a given
local repo.  It should seamlessly upgrade any existing unsigned local repo
next time that the user makes any changes to their local repo.

fixes #3380 https://dev.guardianproject.info/issues/3380
2014-05-25 22:53:18 -04:00
Hans-Christoph Steiner
22fb0337b9 clean up LocalRepoKeyStore code format
Make it match standard Java style.
2014-05-25 22:53:18 -04:00
Hans-Christoph Steiner
e41ae50812 make LocalRepoKeyStore into a proper singleton
Hopefully this makes Peter happy ;-)
2014-05-25 22:53:18 -04:00
Hans-Christoph Steiner
544b924ab9 copy org.fdroid.fdroid.localrepo.LocalRepoKeystore from Kerplapp
This is the keystore used for both the index.jar signing key and the key
and certificate needed to support HTTPS connections.

https://github.com/guardianproject/Kerplapp

refs #3380 https://dev.guardianproject.info/issues/3380
2014-05-25 22:53:18 -04:00
Hans-Christoph Steiner
b0c27869b6 new tricks to improve mDNS/Bonjour resolution
Before, it didn't seem to find anything unless I ran this on my laptop:
`avahi-browse -a -v`

So added two recommended practices from other jmdns code for Android:

* force full resolution on receiving serviceAdded()
* feed the WiFi's IP address to jmdns when creating an instance

fixes #3379 https://dev.guardianproject.info/issues/3379
2014-05-25 22:53:18 -04:00
Hans-Christoph Steiner
0ee5332c01 rename 'ant-src' to 'symlinks-for-ant-and-eclipse' for clarity
In order to make the codebase more self-documenting, rename it to more
clearly say what it is for.
2014-05-25 22:53:17 -04:00
Hans-Christoph Steiner
ed829fcfd6 make Eclipse use extern/ant-src
Eclipse can use the same symlink hack as ant, and they will both be happily
in sync.
2014-05-25 22:53:17 -04:00
Hans-Christoph Steiner
a688a029bf symlinks to build spongycastle with ant
This is all the symlinks to build what FDroid needs from spongycastle using
ant. The LDAP-related classes had to be removed because they depend on
Java 7's javax.naming, which Android does not provide. FDroid does not need
LDAP at all, so those classes can be entirely omitted.

refs #2540 https://dev.guardianproject.info/issues/2540
refs #3380 https://dev.guardianproject.info/issues/3380
2014-05-25 22:53:17 -04:00
Hans-Christoph Steiner
b95c93de59 restore symlink mistakenly deleted in 414c4e0c6768704fd5392a7db4c1fb38d9aab02f
Looks like this symlink got mistakenly deleted.  It is needed for eclipse
and ant to find the zipsigner stuff.
2014-05-25 22:52:38 -04:00
Daniel Martí
12868902e9 Forgot the ignore=dirty bits in .gitmodules 2014-05-25 13:52:17 +02:00
Daniel Martí
414c4e0c67 Use zxing-core from source in both ant and gradle
Also, temporarily remove zipsigner from ant until spongycastle is added to it
so that ant builds work
2014-05-25 13:39:56 +02:00
Peter Serwylo
b2c63c6dc7 More robust multi-threaded downloading.
ApkDownloaders keep track of a unique id. This id is passed through with
each event coming from the downloader. When progress events are received,
if they don't have the same id as the current downloader, they are ignored.

When returning to the app details screen after leaving, if a download
completed in the mean time, automatically show the install screen. Otherwise,
when you, e.g. return to your devices home screen during a download, the
download keeps occuring in the background, but we are unable to make use of
the resulting downloaded file.
2014-05-24 08:42:49 +09:30
Peter Serwylo
009c8a6be5 Don't show progress in AppDetails when using a cached download.
The ApkDownloader now returns true or false depending on whether it
is using a cached version on disk, or hitting the network.
I was also a little more defensive about checking for if downloadHandler
is null before deciding to show a progress dialog.
2014-05-24 07:20:41 +09:30
Peter Serwylo
2f7d6f6452 Made constructor of ApkDownloader public.
Previously it was in the org.fdroid.fdroid package, along with
most other things. As such, it only need a package-local constructor.
However, now it has moved to the .net subpackage, and needs to be
made public.
2014-05-24 07:20:41 +09:30
Peter Serwylo
d9e5b07054 Removed unneeded todo's, add docs. 2014-05-24 07:20:41 +09:30
Peter Serwylo
75586ec4e5 Moved ApkDownloader to .net package
This is where it belongs, along with the other downloader code.
2014-05-24 07:20:41 +09:30
Peter Serwylo
1e1be1e73b Support orientation changes during app download.
Keep track of the downloader after an orientation change, and
make sure that there is always UI feedback beeing shown.

Removed resetRequired after merge conflict (the content observer
now deals with this for us in a much nicer way).

Conflicts:
	src/org/fdroid/fdroid/AppDetails.java
2014-05-24 07:20:41 +09:30
Peter Serwylo
11ddf0478c Better handling of cancelling of downloads.
One thing that still annoys me is that indeterminate progress dialog
still shows "0/100" due to the number formatter being used to display
the values in the TextView. Solution (from http://stackoverflow.com/a/6784180)
is to either make a custom dialog, or at the very least, in API 11 or higher
we can set the number formatter to display nothing.

Don't show the full download path of repo.
The full path includes the path to the index.jar, as well as ?clientVersion=*.
This is undesirable, the main purpose of even showing where we are downloading
from is to differentiate between multiple repos being updated at once.
2014-05-24 07:20:40 +09:30
Peter Serwylo
3ed2cde207 Added AsyncDownloadWrapper and used it in AppDetails to download apks.
This has a very different interface to the Downloader class, because
a handful of operations need to be run off the main thread (not just
download, but also totalDownloadSize and perhaps cache tag related
stuff). The AsyncDownloadWrapper provides its own listener, more
specific than just the progress listener, which invokes functions
at different points in time (e.g. download failed, completed, cancelled).

Refactored progress events to use string types instead of ints.
This way, it is less likely that two different events from
different processes will clash with each other.

Conflicts:
	src/org/fdroid/fdroid/AppDetails.java
2014-05-24 07:20:40 +09:30
Peter Serwylo
0e0e042cd0 Change DownloadHandler from using runOnUiThread() to send/handleMessage().
It still executes the download on another thread, and receives progress
events on that thread. However it now posts those events to the main UI
thread for them to get handled.

Also refactored Downloader/HttpDownloader a tad further. Some caching
stuff was pushed down from HttpDownloader -> Downloader (renamed from
eTag to just cacheTag). HttpDownloader.download() was recursively calling
itself, so I made the base class download() method abstract, and instead
the stream downloading is done in "protected void downloadFromStream()"

Other minor stuff:
 * Prefixed some log TAGs with package names, to make them easier to grep.
 * Removed a little bit of unused code (parameter to DownloadHandler).
2014-05-24 07:20:40 +09:30
Hans-Christoph Steiner
91f2f1014e SKETCH - DOES NOT WORK: move HTTP code into HttpDownloader
This is the beginning of moving to a Downloader class and subclasses that
are used everywhere for downloading APKs, indexes, and icons.

I think that the ETag value can probably be used everywhere as the
unique ID for testing whether to download content, so I moved that to the
super class Downloader. But that's just a guess as of now...
2014-05-24 07:20:40 +09:30
Hans-Christoph Steiner
084a048740 ApkDownloader: rename remoteFile() to getRemoteAddress()
Since it doesn't return a java.io.File but a String with the remote address
2014-05-24 07:20:40 +09:30
Peter Serwylo
19e722a9d7 wire up ProgressListener to new ApkDownloader structure
Conflicts:
	src/org/fdroid/fdroid/AppDetails.java
2014-05-24 07:20:40 +09:30
Hans-Christoph Steiner
9588f30778 normalize null checks for ProgressListeners
This removes the RepoUpdater.isInteractive() method to normalize the code
used to check whether a ProgressListener is null throughout the project.
2014-05-24 07:20:40 +09:30
Hans-Christoph Steiner
d9f9b682d4 simplify ProgressListener.Event creation and use
This aims to simplify the creation and use of Event objects among classes
that implement the ProgressListener Interface.  This is also needed in
order to split out the downloading support from various places and put it
all into a centralized

refs #2598 https://dev.guardianproject.info/issues/2598
https://gitorious.org/f-droid/fdroidclient/merge_requests/29
2014-05-24 07:20:39 +09:30
Peter Serwylo
a44ce0e4e7 Rough guess at what ApkDownloader refactor could look like. 2014-05-24 07:20:39 +09:30
Hans-Christoph Steiner
c4b0eb9b51 .Downloader --> .ApkDownloader to distinguish from .net.Downloader
org.fdroid.froid.Downloader is only used for downloading APKs, so name it
appropriately.

refs #2598 https://dev.guardianproject.info/issues/2598
2014-05-24 07:20:39 +09:30
Peter Serwylo
2c80f1a758 Split net.Downloader into abstract Downloader and concrete HttpDownloader.
This will allow the more general, non HTTP related stuff (progress events,
stream copying) to occur in a separate base class. HTTP specific stuff
(HTTP status codes, etag cache checking) is done in the HTTPDownloader
base class.
2014-05-24 07:20:39 +09:30
Daniel Martí
d850ae2307 Start the next changelog entry 2014-05-23 11:13:58 +02:00
Daniel Martí
8b0f45f878 Fix gradle build by compiling spongycastle as a zipsigner dependency 2014-05-23 11:06:32 +02:00
Daniel Martí
e2c3811f4d Update zipsigner to include lib-optional 2014-05-23 09:10:21 +02:00
Daniel Martí
f841a179d1 spongycastle pgp is not used by kerplapp 2014-05-21 11:43:07 +02:00
Daniel Martí
cbc28ea53a Bump gradle to 1.12 (plugin 0.10)
Also, android.plugin.sdkDirectory is gone, so use sdkLoc
2014-05-21 11:42:46 +02:00
Daniel Martí
2beee93e07 Replace nanohttpd with _hc's fork again for https 2014-05-21 08:58:42 +02:00
Daniel Martí
08efdaf135 Suppress some more proguard warnings that we don't care about 2014-05-21 08:53:59 +02:00
Daniel Martí
8e4ef71168 Also add ant src link for jmdns 2014-05-21 08:48:45 +02:00
Daniel Martí
ed4b9fa1d2 Don't make javax.naming normal warnings stop gradle 2014-05-21 08:48:17 +02:00
Daniel Martí
8c75c3694b Forgot to re-add jmdns as a dep 2014-05-21 08:48:13 +02:00
Peter Serwylo
4779b753e6 Merge branch 'find-local-repos-with-jmdns' into 'master'
Find local repos with jmdns

This enables users to find local repos on local wifi using mDNS.  Local repos can be advertized according to a preference, and you can find local repos by browsing via mDNS in `ManageRepos` under the "Find Local Repos".

This also includes fixes for the `SignedRepoUpdater` tests, and comments out other tests that have not yet worked.
2014-05-20 23:02:13 +00:00
Hans-Christoph Steiner
146046a1ff add description of app to manifest for p2p users
The local repo generation code will take the description from the manifest
and include it in the repo meta data.  So FDroid itself should also include
this description.  Indeed every app should... perhaps this should also be
an `fdroid lint` item.
2014-05-20 18:44:47 -04:00
Hans-Christoph Steiner
0216de670c tests: try everything to find a folder to write to, otherwise skip
The tests of the jar signatures require working on files, but some
emulators make that very difficult.  So try all possible paths for writing
to, and otherwise just skip the tests.
2014-05-20 18:44:47 -04:00
Hans-Christoph Steiner
e782730455 comment out incomplete, failing tests
These are tests that @pserwylo was working on, but hasn't had the time to
complete yet. As far as I know, they have never passed.
2014-05-20 18:44:47 -04:00
Hans-Christoph Steiner
8ebce69d5d use mDNS TXT records to detect FDroid repos, path, etc.
FDroid repos are advertised via Bonjour as plain HTTP or HTTPS services,
since they are browseable with a standard Web Browser. The "Find Local
Repos" browser in FDroid should only show FDroid repos, not any website,
so that is detected using a "type" TXT record in the FDroid broadcasts.
2014-05-20 18:44:47 -04:00
Hans-Christoph Steiner
30ecc1c9f6 use MulticastLock for better Bonjour/mDNS performance
Multicast transmission is subject to heavy power management on Android,
because it apparently can be a battery drain.  mDNS/Bonjour is based
entirely on multicast, so in order to have good Bonjour performance, there
needs to be good multicast performance.  MulticastLock provides that.

fixes #3381 https://dev.guardianproject.info/issues/3381
2014-05-20 18:44:47 -04:00
Hans-Christoph Steiner
f2994b0764 replace Android NSD browsing with jmdns
Android's NSD is only included in Android >= 16, and seems to be buggy. So
This replaces the NSD code entirely with jmdns, which works on all Android
versions.

fixes #2900 https://dev.guardianproject.info/issues/2900
fixes #3379 https://dev.guardianproject.info/issues/3379
2014-05-20 18:44:47 -04:00
Hans-Christoph Steiner
b5f7c0a481 preference for the "name" of the local repo
This name is used in the RepoList, the local repo website title, the
Bonjour broadcast, etc.  By default, a name is generated using the make and
model of the phone plus a random number.
2014-05-20 18:44:47 -04:00
Hans-Christoph Steiner
248cefe1f3 fix notification launching LocalRepoActivity
It was not working on my Nexus 7 running stock 4.4.2.  This seems to be the
recommend fix:
https://code.google.com/p/android/issues/detail?id=61850
2014-05-20 18:44:47 -04:00
Hans-Christoph Steiner
d25a395936 broadcast local repo via Bonjour/mDNS to enable auto-discovery
This adds support for registering the local repo with Bonjour/mDNS so that
it is broadcast out to all devices on the local network.  This makes it
easy to discover and add local repos on the same wifi.

refs #2900 https://dev.guardianproject.info/issues/2900
2014-05-20 18:37:45 -04:00
Hans-Christoph Steiner
7ca966be05 in local repo, make relative links to the index.html page
This should make the local repo files portable, like if the app gets
moved to the SD card or things like that.
2014-05-20 18:37:44 -04:00
Hans-Christoph Steiner
54283b71fd add jmdns submodule to Eclipse config
So those of us stuck in Eclipse can built FDroid :)
2014-05-20 18:37:44 -04:00
Daniel Martí
29048a0c60 Include spongycastle 2014-05-20 19:12:29 +02:00
Daniel Martí
dd60f5cd3b Re-add nanohttpd, from upstream this time 2014-05-20 18:54:06 +02:00
Daniel Martí
b7feebddf9 Also use jmdns like a java library in ant 2014-05-20 18:52:19 +02:00
Daniel Martí
0f98042520 Remove broken support for repo and Android.mk
* The repo instructions are just a duplicate of the simple git submodules
* The Android.mk build instructions don't work and will never support what
  e.g. gradle does

Anyone wanting to bundle F-Droid in a ROM can build it with git and gradle,
and then including the resulting apk.
2014-05-20 18:39:26 +02:00
Daniel Martí
67c7c9b8b5 Don't try to use nanohttpd as an android library either 2014-05-20 18:37:20 +02:00
Daniel Martí
319e1faf3b Add zipsigner as a submodule 2014-05-20 18:22:24 +02:00
Daniel Martí
4d44f3fce8 Build support-v4 from source with gradle
v7-appcompat can be enabled/used in gradle by changing :support-v4 with
:support-appcompat-v7 in build.gradle and bumping minSdk from 5 to 7
2014-05-19 11:56:45 +02:00
Daniel Martí
9d6cabe737 Update nanohttpd 2014-05-19 08:49:56 +02:00
Daniel Martí
cdbbb9d580 Add jmdns as a submodule 2014-05-18 14:04:07 +02:00
Daniel Martí
aa52516a41 Forgot to rollback the ant-prepare nanohttp path 2014-05-18 13:44:44 +02:00
Daniel Martí
b3107eb6b2 Fix gradle support while keeping ant support
Most of this was done by pserwylo on his branch feature/gradle. The only thing
left is merging the fixes into nanohttpd.
2014-05-18 12:55:30 +02:00
Daniel Martí
d68b959856 Update UIL 2014-05-18 12:33:42 +02:00
Daniel Martí
a8f9483684 Merge branch 'master' into 'master'
UI bug fixes

This fixes a couple of crasher issues with the UI. And also a small change to allow Eclipse to find the reference files for Android Support.
2014-05-15 21:11:19 +00:00
Hans-Christoph Steiner
c819d56f18 add link to SDK references for android-support jar
I tried lots of things to make it more general, but the implementation of
this jar properties file is just too simple, so no variables can be used.

I renamed the other files related to android-support to match the naming
scheme.
2014-05-15 14:32:16 -04:00
Hans-Christoph Steiner
8a6204205f store "Add Repo" AlertDialog to prevent crash on rotation
When the "Add Repo" dialog was showing and the screen was rotated, it would
first leak the AlertDialog because it was not dismissed, then it would
crash after rotation, because the AlertDialog was trying to be restored but
no longer existed.  That's what I think was happening at least... the
solution surprised me a bit here...
2014-05-15 11:46:17 -04:00
Hans-Christoph Steiner
09cbd036fa make new instances of LocalRepoActivity show state properly
LocalRepoActivity needs to get the current state of the LocalRepoService so
it can correctly represent it in the UI.

fixes #25 https://gitlab.com/fdroid/fdroidclient/issues/25
2014-05-15 09:37:37 -04:00
Hans-Christoph Steiner
776ad3f540 use only android-14 items in SelectLocalApps until appcompat-v7 is added
Set android-14 as minimum for SelectLocalApps and make sure that everything
will work on >= 14.

fixes #26 https://gitlab.com/fdroid/fdroidclient/issues/26
2014-05-15 09:37:37 -04:00
Daniel Martí
c7e1d4af7e Switch AP to our gitlab mirror
gitlab.doeg.gy has been down for a while
2014-05-14 18:56:03 +02:00
Daniel Martí
4f51970250 Prepare for 0.68-test 2014-05-12 19:17:35 +02:00
Daniel Martí
3c9d7b67cc Merge branch 'super-fdroid' 2014-05-12 19:15:28 +02:00
Dominik Schürmann
acd3137cbc Make prefs coherent, rename them, and rename SystemPermissionInstaller to SystemInstaller 2014-05-12 18:59:03 +02:00
Dominik Schürmann
1491f7318f Merge branch 'master' into super-fdroid 2014-05-12 13:01:53 +02:00
Dominik Schürmann
2bd686dfe8 Add preference to opt-out of SystemPermissionInstaller 2014-05-12 12:55:17 +02:00
Dominik Schürmann
c65a25524c Log errors 2014-05-12 11:45:26 +02:00
Dominik Schürmann
63b0bbd120 Move root access preference down into other category 2014-05-12 11:40:25 +02:00
Dominik Schürmann
54ce7a07a6 Cleanup for getActivityInstaller 2014-05-12 11:31:25 +02:00
Dominik Schürmann
91ddc838a7 More cleanup in installer classes 2014-05-11 11:16:26 +02:00
Dominik Schürmann
aeae0bcec3 Code/doc cleanup 2014-05-11 11:13:16 +02:00
Daniel Martí
e82690f324 Do not make the Local Repo activity a launcher icon 2014-05-11 10:45:34 +02:00
Dominik Schürmann
6710e9a4b9 dont show update all button for now... 2014-05-11 02:31:53 +02:00
Dominik Schürmann
6419915d5a Strings for error dialog, cleanup 2014-05-11 02:25:50 +02:00
Dominik Schürmann
df696ed81e Installer: define all methods as abstract that need to be implemented in subclasses 2014-05-11 02:13:27 +02:00
Dominik Schürmann
04577d213c Use ContentObserver to observe install status 2014-05-11 01:38:17 +02:00
Dominik Schürmann
919f9c63b8 Merge master into super-fdroid 2014-05-11 00:38:53 +02:00
Dominik Schürmann
d250ac727b Cleanup installer code 2014-05-11 00:36:54 +02:00
Dominik Schürmann
e1d9e0f3b1 Document installer callback hack 2014-05-11 00:26:31 +02:00
Dominik Schürmann
c48dcdc785 Change callback 2014-05-11 00:03:26 +02:00
Dominik Schürmann
0887da72ed Add default installer for Android >= 4.0 2014-05-10 19:46:46 +02:00
Daniel Martí
6a4b323d06 Prepare for 0.67-test 2014-05-08 13:23:20 +02:00
Daniel Martí
96c3af5485 Add missing RTL/LTR layout attributes 2014-05-08 13:16:21 +02:00
Daniel Martí
295ef8f02a Merge branch 'swap_ux_improvements' of https://gitlab.com/eighthave/fdroidclient 2014-05-08 12:53:04 +02:00
Hans-Christoph Steiner
0a8d08aac8 ensure that "Update Repo" is always shown in the Action Mode
Otherwise, it gets confusing what is the action the user should do. Perhaps
the Action Mode "Done" button should always trigger the "Update Repo"
action, right now it means do nothing and return.
2014-05-08 01:12:41 -04:00
Hans-Christoph Steiner
efacc22c10 include app icons in the SelectLocalApps view
Since we have the packageName, we can just fetch the Drawables directly.
This uses some shortcuts to try to make things run faster.  For example,
the ImageView does not have an ID, instead it is references by the index
number within the LinearLayout.
2014-05-08 00:58:42 -04:00
Hans-Christoph Steiner
107eab5eac Local Repo webserver turns itself off if it was automatically started
When you visit LocalRepoActivity, the swapping webserver is automatically
turned on, since it is required for any swapping to happen.  When it was
automatically turned on, it will automatically turn itself off after 15
minutes to make sure that it doesn't stay running forever.  If the user
manually turns it off, that cancels the automatic stop.
2014-05-08 00:58:42 -04:00
Hans-Christoph Steiner
16399b760b start the local repo webserver by default when going to LocalRepoActivity
To make it dead simple to swap repos when going to the Local Repos screen.
2014-05-08 00:58:42 -04:00
Hans-Christoph Steiner
2256cd00e1 start/stop Local Repo from any Activity
This forces the use of the Application's Context, so we can be sure the
webserver will run as long as FDroid is running.  It also checks to make
sure whether the webserver is running before trying to start it.
2014-05-08 00:58:42 -04:00
Hans-Christoph Steiner
7401366ac9 quick improvement of LocalRepoActivity layout
This is meant to try to make the on/off state of the webserver that serves
the local repo more apparent.
2014-05-08 00:58:42 -04:00
Hans-Christoph Steiner
8d3d325967 apply light/dark theme to all Local Repo related Activities 2014-05-07 21:55:37 -04:00
Hans-Christoph Steiner
914149aad2 live filtering of InstalledApps for setting up Local Repo
This implements live filtering in a SearchView so that it is easy to search
for the apps you want to include in your Local Repo.  This requires some
newer stuff, so I switched it to the android-11 Activity until appcompat-v7
is included.  All this functionality will work fine with appcompat-v7.
2014-05-07 20:49:43 -04:00
Hans-Christoph Steiner
a6de6b2932 use two text item layout with label and packageName for SelectLocalApps
Having the packageName as the minor text is useful for figuring out who the
developer of the app is.
2014-05-07 20:49:43 -04:00
Peter Serwylo
5e02404d6a Added getSearchUri() to InstalledAppProvider
This allows for searching installed app names for ones which match
a string.  It searches based on the "label" as declared in the
manifest in the <application> tag as "android:label".
2014-05-07 20:48:28 -04:00
Peter Serwylo
60f5a1441c Installed apps by application label by default, and sort order can be chosen.
Also prevented crash due to lack of applicationLabel field.
2014-05-07 19:16:45 -04:00
Hans-Christoph Steiner
584152d2fa store "App Label" for Installed Apps, to show in Local Repo setup
Most people are going to know the "label" i.e. the display name rather than
the packageName/id.  So also store the label in the database and make it
accessible via InstalledAppsProvider so SelectLocalAppsFragment can show a
list of friendly names rather than packageNames.
2014-05-07 19:16:45 -04:00
Hans-Christoph Steiner
3c005006ce zxing requires >= android-8, only gen QR Codes on >= android-8
The zxing library includes some Java 7 features, so it will only work on
Android SDK 8 (2.1) or above.  FDroid supports SDK 7 (2.0), so on 7, do not
try to generate QR Codes.
2014-05-07 19:16:45 -04:00
Hans-Christoph Steiner
47d4526f05 include new nanohttpd setup in Eclipse project 2014-05-07 19:16:45 -04:00
F-Droid Translatebot
0aadd51e71 Translation updates 2014-05-07 23:42:08 +01:00
Daniel Martí
52c61ec1ca Update nanohttpd, replace as an ant library 2014-05-07 22:02:40 +02:00
Daniel Martí
15a3d74ada Merge branch 'merge_requests/11' of https://gitlab.com/eighthave/fdroidclient 2014-05-07 20:32:22 +02:00
Hans-Christoph Steiner
06c974265e if port 8888 is in use, then use a random one
This is a quick and dirty way to deal with port conflicts
2014-05-07 14:20:39 -04:00
Hans-Christoph Steiner
2848b50f8b catch NameNotFoundException when looking up installer name
If an application was installed via ADB, then it won't have an installer
package/name set.  Therefore, looking up the label will cause a
NameNotFoundException, which should be ignored and not passed to the method
that called App() since it does not refer to the packageName that the
method is trying to look up, but instead the packageName of the missing
installer app.
2014-05-07 14:20:39 -04:00
Hans-Christoph Steiner
2aa39311c2 no need for ipAddress int to be global, so make local
This will prevent ipAddressString and ipAddress from getting out of sync.
2014-05-06 22:10:32 -04:00
Hans-Christoph Steiner
a58825d7ea split out FDroid.apk copying into its own private method
This is at the request of pserwylo, I think its unecessary.
2014-05-06 22:10:32 -04:00
Hans-Christoph Steiner
d8d8a45d88 purge appInfo property variable from App class
Expose less stuff as properties, this didn't need to be exposed, it was
only an implementation shortcut.
2014-05-06 22:10:32 -04:00
Hans-Christoph Steiner
3352d83102 make App.apks List into a single Apk instance at App.installedApk
This then serves to represent the APK that is installed for this app. It
needs to be filled out by the Providers then also.  This then becomes a
place for data specific to the an installed App, like installedVersionCode
and installedVersionName, instead of having it both stored in an App
instance and a related Apk instance.
2014-05-06 22:10:32 -04:00
Hans-Christoph Steiner
b11232b607 add summary/description to installed apps based on installed info
First try to get the description from APK, which is seems that no one sets
so it is usually null. Then get info about how it was installed, like
which app store, when it was installed and upgraded.
2014-05-06 22:10:32 -04:00
Hans-Christoph Steiner
e35a6e05c7 constructor to create App from an installed APK
Using PackageManager and Context, this will create an App instance from
the APK specified by the packageName.
2014-05-06 22:10:32 -04:00
Hans-Christoph Steiner
c1a6f545cf move getMinSdkVersion() from LocalRepoManager to Utils
This will probably be useful elsewhere.
2014-05-06 19:51:15 -04:00
Hans-Christoph Steiner
d24f94476e split out static copy/symlink methods from LocalRepoManager to Utils
They are static utility methods, so put them where they belong!
2014-05-06 19:51:15 -04:00
Hans-Christoph Steiner
5d995aa8c8 move LocalRepoService's Handler to a static subclass
This fixes this lint error:
"This Handler class should be static or leaks might occur"
2014-05-06 19:51:15 -04:00
Hans-Christoph Steiner
882e010052 create initial repo with only FDroid in it
This automatically creates a repo with only FDroid in it the first time the
user goes to the Local Repo view.  Having an empty repo is useless if the
user is trying to swap with someone.  Having FDroid in there is not a
privacy leak since FDroid is needed for the swap process, and it will then
enable people to automatically get updates from each other, and do the
bootstrap process from the web browser.

fixes #2954 https://dev.guardianproject.info/issues/2954
2014-05-06 19:51:15 -04:00
Hans-Christoph Steiner
5f31703316 init SelectLocalApps list from the apks in the local repo
When FDroid has been started, this checks the symlinked APKs in the local
repo and uses those package names to build up the list of selected local
apps.  This gives the SelectLocalApps experience continuity across app
restarts.

refs #3204 https://dev.guardianproject.info/issues/3204
2014-05-06 19:51:15 -04:00
Hans-Christoph Steiner
08346b9b18 add Activity to choose which installed apps are in the local repo
This gets the data about which apps are installed from the ContentProvider
that pserwylo recently added for data about "Installed Apps" and presents
a list view for the user to select from by touching each line.  Then if the
user chooses "Update Repo", it will regenerate the local repo based on the
current selection.  It will always include FDroid in the local repo.

fixes #3232 https://dev.guardianproject.info/issues/3232
refs #3204 https://dev.guardianproject.info/issues/3204
2014-05-06 19:51:15 -04:00
Hans-Christoph Steiner
678e2b09ea InstalledAppProvider needs _ID row so it can be used in CursorLoaders
In order to use the data from InstalledAppProvider in a lot of the high
level classes provided by Android, like CursorLoader, SimpleCursorLoader,
etc, there must be an _ID row.
2014-05-06 19:51:15 -04:00
Hans-Christoph Steiner
94dc2d019f add wizard for sending FDroid to another device via WiFi/QR
This is a little helper to direct people to get a new device to download
FDroid from another device that already has it.  It first prompts them to
join the same wifi network, and offers a QR Code to associate to the same
wifi.  The next step is a QR Code for getting the URL to the local repo.
The index.html on that local repo includes a download link for FDroid and
a repo link to the local repo.

refs #3204 https://dev.guardianproject.info/issues/3204
2014-05-06 19:51:15 -04:00
Hans-Christoph Steiner
17c42e4bd0 use class Context directly rather than storing it
Use the WifiStateChangeService.this syntax in order to eliminate
an instance variable.
2014-05-06 19:51:15 -04:00
Hans-Christoph Steiner
a9c88bb5d7 build a local repo from a list of installed APKs
Wire up the "Setup Repo" button on the Local Repo view to generate an
FDroid repo on the device that is hosted with the local webserver.  This
also generates an index.html for when people navigate to the local repo via
a browser.  This index.html will allow them to both download FDroid and to
setup the repo on the device running the webserver on the local FDroid.

refs #3204 https://dev.guardianproject.info/issues/3204
refs #2668 https://dev.guardianproject.info/issues/2668
2014-05-06 19:51:15 -04:00
Hans-Christoph Steiner
5050605f72 Activity/Service for running a local repo via http://
This is a skeleton for the upcoming local repo (aka swap aka Kerplapp).
Right now, it just provides an Activity for controlling a Service which
manages a local webserver (nanohttpd).  Next, it will be wired up to the
local repo created via a dedicated Activity for managing the list of apps
included in the local repo.

refs #3204 https://dev.guardianproject.info/issues/3204
2014-05-06 19:28:27 -04:00
Hans-Christoph Steiner
2c2d8c868c monitor Wifi changes with BroadcastReceiver/Service
The local repo will need to both have current wifi settings in order to
send the correct IP address, SSID, etc.  Also, this could be used to handle
interrupted downloads and updates, but that is not included in this commit.

refs #3204 https://dev.guardianproject.info/issues/3204
2014-05-06 11:55:52 -04:00
Hans-Christoph Steiner
db0b106656 nanohttpd submodule for supporting local HTTP repos
This webserver is the core of the kerplapp swap local repo when used over
IP connections (WiFi).  It is the smallest Java webserver we could find. It
is included as a git submodule, but then only the actual source files that
are needed are included.  They are symlinked in src/.

The git repo used is the one that we submitted upstream as a pull request.
The pull request contains changes required to support https://.  It has not
yet been accepted, so we cannot yet use the official repo.  Once the pull
request is included, this should be switched to the latest release in the
official git repo.

https://github.com/eighthave/nanohttpd
https://github.com/NanoHttpd/nanohttpd/pull/107

refs #3204 https://dev.guardianproject.info/issues/3204
2014-05-06 11:55:51 -04:00
Hans-Christoph Steiner
a89e4143c0 QR Code image generation into AsyncTask to keep things snappy
Generating the QR Code image can take some time, so do it in an AsyncTask
which then updates the ImageView once the QRCode is complete.  This will be
used for the kerplapp repo swapping process.

refs #3204 https://dev.guardianproject.info/issues/3204
refs #3201 https://dev.guardianproject.info/issues/3201
2014-05-05 19:38:40 -04:00
Hans-Christoph Steiner
3caec653e5 generate QR Codes internally based on ZXing's core.jar
This app needs to be able to generate QR Codes regardless of what other
app might be installed, so zxing's core.jar needs to be embedded in this
app.

This also includes two classes which are modified versions of ZXing classes
that allow the generation of QR Codes without the Barcode Scanner app being
installed:
https://stackoverflow.com/questions/4782543/integration-zxing-library-directly-into-my-android-application

The classes are src/com/google/zxing/encode/Contents.java which is a copy
of zxing/android/src/com/google/zxing/client/android/Contents.java; and
src/com/google/zxing/encode/QRCodeEncoder.java which is a heavily stripped
and modified version of
zxing/android/src/com/google/zxing/client/android/encode/QRCodeEncoder.java

refs #3204 https://dev.guardianproject.info/issues/3204
refs #2470 https://dev.guardianproject.info/issues/2470
2014-05-05 19:37:37 -04:00
Hans-Christoph Steiner
049cd56215 if it is not possible to make the sharing Uri, return a placeholder
The receiver of this can at least make some sense of it, versus null or a
blank string.  This prevents crashes where FDroid.repo.address is not yet
set since the wifi was never enabled or it does not have an IP address yet.
2014-05-05 19:37:37 -04:00
Hans-Christoph Steiner
1d1c682c2c fix crash when adding a repo without a fingerprint via URL/QR Code 2014-05-05 19:31:52 -04:00
Hans-Christoph Steiner
3701d7864a remove old https:// certificate pin for guardianproject.info
This secret key is no longer valid since the server was vulnerable to
Heartbleed.  Also fixed the formatting to be standard while I was at it.
2014-05-02 11:36:08 -04:00
Hans-Christoph Steiner
f483630e02 store files for tests in the fdroid cache
For some reason, on some emulators, it is failing to find a place to write
the test index files.  But on most setups, it works fine.  So instead try
writing the files to the cacheDir of FDroid itself rather than the test app
2014-05-01 21:44:27 -04:00
Hans-Christoph Steiner
b8cffa6744 add extra checks when running Utils.calcFingerprint()
These provide a sanity check when calculating a fingerprint from a X.509
certificate stored as `repo.pubkey`.
2014-05-01 13:32:49 -04:00
Daniel Martí
c288fd5534 Prepare for 0.66 release 2014-05-01 19:25:07 +02:00
Daniel Martí
c32fb3a6b7 Add gravities beside textAlignment to fix issues in <4.2
textAlignment works well for 4.2 and later, but it is ignored in 4.1 and
earlier. Seting gravity to its textAlignment equivalent fixes this.
2014-05-01 19:23:59 +02:00
Daniel Martí
a9495cd907 Merge branch 'master' of https://gitlab.com/eighthave/fdroidclient 2014-05-01 18:46:59 +02:00
Daniel Martí
253c880595 Hard-code number of UIL threads to 4
Making them dependant on the number of processors doesn't make much sense...
2014-05-01 18:45:43 +02:00
Hans-Christoph Steiner
57435aa6b6 catch IllegalArgumentException when dialog disappears before dismiss
It seems that sometimes checking dialog.isShowing() is not enough. I got a
crash on dialog.dismiss().  But since the dialog is already gone in that
case, just catch the Exception and move on. Here's the stacktrace:

 31760                 FDroid  D  Update took 45 seconds.
 31760                 FDroid  D  Invalidating preference 'lastUpdateCheck'.
 31760         AndroidRuntime  D  Shutting down VM
 31760         AndroidRuntime  E  FATAL EXCEPTION: main
 31760         AndroidRuntime  E  java.lang.IllegalArgumentException: View not attached to window manager
 31760         AndroidRuntime  E  at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:378)
 31760         AndroidRuntime  E  at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:223)
 31760         AndroidRuntime  E  at android.view.Window$LocalWindowManager.removeView(Window.java:432)
 31760         AndroidRuntime  E  at android.app.Dialog.dismissDialog(Dialog.java:278)
 31760         AndroidRuntime  E  at android.app.Dialog.access$000(Dialog.java:71)
 31760         AndroidRuntime  E  at android.app.Dialog$1.run(Dialog.java:111)
 31760         AndroidRuntime  E  at android.app.Dialog.dismiss(Dialog.java:268)
 31760         AndroidRuntime  E  at org.fdroid.fdroid.UpdateService$UpdateReceiver.onReceiveResult(UpdateService.java:124)
 31760         AndroidRuntime  E  at android.os.ResultReceiver$MyRunnable.run(ResultReceiver.java:43)
 31760         AndroidRuntime  E  at android.os.Handler.handleCallback(Handler.java:587)
 31760         AndroidRuntime  E  at android.os.Handler.dispatchMessage(Handler.java:92)
 31760         AndroidRuntime  E  at android.os.Looper.loop(Looper.java:130)
 31760         AndroidRuntime  E  at android.app.ActivityThread.main(ActivityThread.java:3687)
 31760         AndroidRuntime  E  at java.lang.reflect.Method.invokeNative(Native Method)
 31760         AndroidRuntime  E  at java.lang.reflect.Method.invoke(Method.java:507)
 31760         AndroidRuntime  E  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
 31760         AndroidRuntime  E  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
 31760         AndroidRuntime  E  at dalvik.system.NativeStart.main(Native Method)
  119                          E  Dumpstate > /data/log/dumpstate_app_error
  119         ActivityManager  W  Force finishing activity org.fdroid.fdroid/.views.RepoDetailsActivity

more info:
https://stackoverflow.com/questions/19538282/view-not-attached-to-window-manager-dialog-dismiss
2014-05-01 12:44:01 -04:00
Hans-Christoph Steiner
615bcfb666 try to find ManageRepo's Fragment before recreating it
This helps with dealing with listFragment being null after a rotation. That
was happening when an Intent was coming in from a QR Code scanner, and
the screen was rotated during the process.  This snippet was taken from
SearchResults.java

This is Peter Serwylo's idea, I just typed it up and tested it :)
2014-05-01 12:44:01 -04:00
Hans-Christoph Steiner
8395472f8d test index.jar signature checking
I got scared by seeing the Android docs' version of JarFile.getInputStream,
which didn't mention SecurityException or the signature checking. But it
seems that even tho its not in the Android docs, Android implements it the
same as Java does.  It is good to have these tests in place anyhow, since
this is an essential piece of the security process of FDroid.

* http://docs.oracle.com/javase/6/docs/api/java/util/jar/JarFile.html#getInputStream(java.util.zip.ZipEntry)
* https://developer.android.com/reference/java/util/jar/JarFile.html#getInputStream(java.util.zip.ZipEntry)

refs #2627 https://dev.guardianproject.info/issues/2627
refs #2959 https://dev.guardianproject.info/issues/2959
2014-05-01 12:44:01 -04:00
Hans-Christoph Steiner
c0166a26f8 include Apache Commons IO in test project for easy file operations 2014-05-01 12:44:00 -04:00
Daniel Martí
d80eec031c Re-enable loading of icons with fling
Reduce their thread priority to try to avoid it from lagging the scrolling
2014-05-01 16:03:56 +02:00
F-Droid Translatebot
097be4396e Translation updates 2014-05-01 09:55:18 +01:00
F-Droid Translatebot
6ba99eef87 Translation updates 2014-05-01 09:46:34 +01:00
Daniel Martí
fbf9d4b409 Merge branch 'fix/update-notification' into 'master'
Fix/update notification

In addition to making update notifications work again (fixing issue #20) I also removed an unused class, and made the update count easily accessible from the AppProvider.Helper class.
2014-04-30 23:10:35 +00:00
Peter Serwylo
826854592f Made app update notifications work again.
The update service now queries the app provider for installed
apps which can and want to be updated.
2014-05-01 07:05:14 +09:30
Peter Serwylo
3bca6d3f70 Merge branch 'package-broadcasts' into 'master'
Package broadcasts (fixes #19)
2014-04-30 20:05:04 +00:00
Daniel Martí
a0b39cd150 PREF_UPD_NOTIFY default is true, not false 2014-04-30 00:33:10 +02:00
Daniel Martí
663a95c7a9 Don't crash if a repo has zero apps/apks
Also, a couple of typo fixes
2014-04-29 23:56:06 +02:00
Daniel Martí
f4539b3803 Add icons item to changelog 2014-04-29 20:09:52 +02:00
Daniel Martí
88285b0a6b Fix: Don't always use /icons/ due to wrong SQL param order 2014-04-29 20:06:56 +02:00
Daniel Martí
7a16bf4ce5 Fix broadcast receiving of package updates
* It is PACKAGE_REPLACED, not PACKAGE_CHANGED:
  http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_CHANGED

* REMOVED and then ADDED are fired as well as REPLACED when upgrading an
  application:
  http://stackoverflow.com/questions/5217237/package-removed-then-package-added-are-fired-along-with-package-replaced-inten
2014-04-29 18:18:38 +02:00
Daniel Martí
55acd955b9 Prepare for 0.65 release 2014-04-29 11:55:29 +02:00
Daniel Martí
af2515bbf6 Run tools/repo-revisions.sh 2014-04-29 11:31:07 +02:00
Daniel Martí
f374fbbeb0 Re-run translate fixes 2014-04-29 11:30:22 +02:00
Peter Serwylo
0e64736db4 Merge branch 'master' into 'master'
security updates for added repos

These commits fix a couple of security issues with adding repos, they should be included in the 0.65 release.  Here is the bug report from Adam Pritchard, these issues should be fixed:

2.

But wait, you say? Where's the "EF" at the start? F-Droid actually shows
(and takes) a version of the fingerprint with the first byte (first two
hex) dropped. Bwah?

You can see this with Guardian's fingerprint here:
https://guardianproject.info/2012/03/15/our-new-f-droid-app-repository/
len('050C8155DCA377F23D5A15B77D3713400CDBD8B42FBFBE0E3F38096E68CECE') / 2 *
8 == 248
...But it should be 256.

On purpose?

3.

And it seems like there's a bug in F-Droid. If you enter the fingerprint
when adding the repo, the repo gets flagged with "Unsigned", but if you add
the repo without entering the fingerprint it doesn't.

Reproduction:

- Add https://guardianproject.info/repo/ and enter
050C8155DCA377F23D5A15B77D3713400CDBD8B42FBFBE0E3F38096E68CECE
- Refresh
- It's say "Unsigned" in red text under the repo name
- Delete the repo
- Add it again, but without the fingerprint
- It won't have any red text

This is surely unintended?
2014-04-29 00:26:55 +00:00
Dominik Schürmann
fb1e19e510 Merge branch 'super-fdroid' of gitlab.com:fdroid/fdroidclient into super-fdroid 2014-04-28 18:46:44 +02:00
Dominik Schürmann
033db01b9a Information about system permissions 2014-04-28 18:45:04 +02:00
Hans-Christoph Steiner
527f649fc2 move getSharingUri() to Utils for easier reuse
This method will also be used by the local repo for swapping.
2014-04-28 11:59:36 -04:00
Hans-Christoph Steiner
1018cad3b4 Utils tests: formatFingerprint() and calcFingerprint(String)
Prevent another stupid bug like what is fixed by commit
5ff177cd1884ed61def491a813363f96c5de628a

refs #2959 https://dev.guardianproject.info/issues/2959
2014-04-28 11:59:36 -04:00
Hans-Christoph Steiner
4dc2c60863 add more checks on fingerprints fed to Utils.formatFingerprint()
This is the gateway to the user, so this should present trusted info!
2014-04-28 11:59:36 -04:00
Hans-Christoph Steiner
cce393de09 "unverified" repo state for repos w/ fingerprints but not yet pubkeys
If a repo was configured with a fingerprint, but it has not yet updated and
gotten the pubkey from the index.jar, then it will be in an "unverified"
state, i.e. the signing key fingerprint is stored, but it has not yet been
used to check against the pubkey in the index.jar
2014-04-28 11:59:36 -04:00
Hans-Christoph Steiner
a0970d0720 when adding a repo with fingerprint, make sure to store the pubkey
The logic here is crufty, so I slapped a flag in there to make sure that
the pubkey gets stored when someone configures a repo and includes the
fingerprint.  When the fingerprint is set, it will first download the
index.jar and verify it against that fingerprint.  The logic for storing
the pubkey permanently happens later in the XML parsing, so there needs to
be a flag to signal to store the pubkey in this case.

Before the flow was always index.xml -> get pubkey -> index.jar.  Really,
there should no longer be support for unsigned repos, then all of this
stuff can be dramatically simplified.

fixes #2924 https://dev.guardianproject.info/issues/2924
refs #2960 https://dev.guardianproject.info/issues/2960
2014-04-28 11:59:36 -04:00
Hans-Christoph Steiner
649bfa10b7 fix silly bug in signing key fingerprint calculation for display
This was causing the first byte of the signature to be chopped off, so
therefore it would not validate since the fingerprint of the cert from
the net connection had the right fingerprint, but it was compared to the
stored, truncated version.

This also means that the database version needs to be bumped to trigger an
upgrade so that the bad 62 char fingerprints are removed from the database.
2014-04-28 11:59:36 -04:00
Hans-Christoph Steiner
aa1b9e6696 allow incoming repos via Intent when on ManageRepo view
Since before, incoming repo Intents where handled in the Fragment's
onCreate(), an Intent that was received while the Fragment was visible was
just ignored.  Activities have onNewIntent() for that, but Fragments don't
so the repo Intent handling had to be moved to the ManageRepo Activity.
That makes for a more direct relationship anyway, since ManageRepo is what
is configured as receiving all those Intents in AndroidManifest.xml.
2014-04-28 11:59:36 -04:00
Daniel Martí
7d3723fe69 Remove EXTRA_NOT_UNKNOWN_SOURCE from DefaultInstaller
Doesn't work because:
* In this installer, we are not a system app
* Our intent action is of type ACTION_VIEW, not ACTION_INSTALL_PACKAGE

The equivalent of "we are not an unknown source" would be the other
installers, such as the Root and System ones.
2014-04-28 17:43:33 +02:00
F-Droid Translatebot
625bdcebba Translation updates 2014-04-28 07:56:28 +01:00
Dominik Schürmann
53d9a15d11 Fix comment in CanUpdateAppsFragment 2014-04-27 22:30:49 +02:00
Dominik Schürmann
d7203535e7 Add update all button (no functionality yet) 2014-04-27 22:22:21 +02:00
Dominik Schürmann
b3ca915459 RootInstaller: multiple apks 2014-04-27 21:40:22 +02:00
Dominik Schürmann
588e22462b Merge branch 'master' into super-fdroid 2014-04-27 20:52:58 +02:00
Dominik Schürmann
2399f954ed Installer: Starting with better error handling, new callback design 2014-04-27 20:42:45 +02:00
Daniel Martí
e80b1e03ac AP moved to gitlab + build.gradle typo fix 2014-04-27 20:36:55 +02:00
Dominik Schürmann
fbc47c1428 Show dialog if root access was denied 2014-04-27 20:11:36 +02:00
Dominik Schürmann
36b269cd19 Clarify comment in prefs 2014-04-27 20:02:03 +02:00
Dominik Schürmann
c4e7e617b2 Add root access preference 2014-04-27 19:59:28 +02:00
Dominik Schürmann
7ed69c93fc Installation/Delete with root shell, add preference for root access, fixes to Installer classes 2014-04-27 18:56:47 +02:00
Dominik Schürmann
8f08289822 AndroidManifest: Add superuser permission, cleanup 2014-04-26 13:43:51 +02:00
Dominik Schürmann
732fb87944 Add libsuperuser as external git submodule and project dependency 2014-04-26 02:40:08 +02:00
Dominik Schürmann
7451f00534 Refactoring old code using an abstract class 2014-04-26 02:01:26 +02:00
Daniel Martí
07b79c1e06 Slightly better wording in the README. ant-prepare success prints. 2014-04-26 01:08:01 +02:00
Peter Serwylo
cfcdfebe4e Fixed typo in README troubleshooting. 2014-04-26 07:57:14 +09:30
Peter Serwylo
4d1def468f Added build troubleshooting to README (Issue #17) 2014-04-26 07:52:18 +09:30
Daniel Martí
1f154adf42 Merge branch 'master' into super-fdroid
Conflicts:
	AndroidManifest.xml
	lint.xml
	src/org/fdroid/fdroid/AppDetails.java
2014-04-25 20:20:43 +02:00
Peter Serwylo
d287dca854 Refactored SearchView into Activity + ListFragment (Fixes #11)
This allowed for the use of LoaderCallbacks which seem like a better
way at managing the lifecycle of the cursors which our ContentProviders
return.
2014-04-25 18:21:49 +09:30
Daniel Martí
3345a81077 Re-run fix-ellipsis 2014-04-25 10:23:23 +02:00
Daniel Martí
9bd33003a0 Add a script to fix format problems automatically 2014-04-25 10:22:42 +02:00
F-Droid Translatebot
82b188a2ac Translation updates 2014-04-24 21:26:43 +01:00
Peter Serwylo
71db322b6d Don't implement 'update' for installed apps, use replace (Fixes #14)
There were some weird edge cases that couldn't quite be pinned down,
whereby installing an app would result in a unique key violation being
hit. One example was when somebody was installing an apk from a file
manager. It seems that this doesn't trigger a PACKAGE_CHANGED, but
rather a PACKAGE_INSTALLED. The end result is that it attempts to insert
a record that already exists in the installed apps table. Because we
have a unique key constraing on the appId, it breaks.

This commit changes the way that we insert installed app details.
Instead of inserting some times, and updating other times, we always
insert. If we hit a unique key violation, the row is deleted, and then
the new values are reinserted.
2014-04-24 13:07:16 +09:30
Daniel Martí
d573bac5b0 Add the sharing feature by Hans to the changelog 2014-04-23 18:05:23 +02:00
Peter Serwylo
e3e726e56c Merge branch 'master' into 'master'
send any installed app via NFC/Beam or Bluetooth

Building upon the NFC+Bluetooth sending of the FDroid.apk, these two commits allow the user to send any installed app via Bluetooth or NFC/Android Beam.
2014-04-22 15:28:29 +00:00
Hans-Christoph Steiner
4a55cdf938 option to send via bluetooth any installed app on the AppDetails page
This takes the code used for sending the FDroid.apk and applies it to any
installed app.  So the user can go to the AppDetails for any installed app
and select "Send via Bluetooth" from the menu, and send the app to another
phone.
2014-04-22 11:09:49 -04:00
Hans-Christoph Steiner
0db711c08d enable sending installed APKs via NFC/Android Beam on AppDetails
If you are viewing the AppDetails screen for an installed app, this code
configures Android Beam to send the APK for that installed app if the you
initiate via NFC.

Also move the SDK checks into each method so that they are easier to use
without doing the wrong thing.
2014-04-22 11:09:49 -04:00
Hans-Christoph Steiner
52e0f373af stay in FDroid after adding a new repo via Intent
If a new repo comes in via Intent, like from clicking a link, scanning a QR
Code, etc., then stay in FDroid once the add dialog is complete.
Previously, it would sometimes stay in FDroid and sometimes go back to the
sending Activity, depending on the sending Activity.  It was confusing and
annoying behavior.
2014-04-22 10:29:09 -04:00
Peter Serwylo
fe41133d2b Modified changelog details for 'installed app cache'
Made the description a little more appropriate for lay people, rather than
developers.
2014-04-21 09:20:31 +00:00
Daniel Martí
4b3b392c01 Prepare for 0.64-test 2014-04-20 14:32:05 +02:00
Daniel Martí
c5a1fd9b1c Some translation fixes 2014-04-20 14:24:07 +02:00
F-Droid Translatebot
f93c8151fe Translation updates 2014-04-20 12:40:49 +01:00
Daniel Martí
87775be76c Update UIL, adapt to the changes 2014-04-20 12:51:50 +02:00
Peter Serwylo
4e24050760 Adding our own cache of currently installed apks in the database.
Previously the data was not stored anywhere, and each time we wanted
to know about all installed apps, we built a ridiculously long SQL
query. The query had essentially one "OR" clause for each installed
app. To make matters worse, it also required one parameter for each
of these, so we could bind the installed app name to a "?" in the query.
SQL has a limit of (usually) 999 parameters which can be provided to
a query, which meant it would fall over if the user had more than
1000 apps installed.

This change introduces a new table called "fdroid_installedApps".
It is initialized on first run, by iterating over the installed apps
as given by the PackageManager. It is subsequenty kept up to date
by a set of BroadcastReceivers, which listen for apps being
uninstalled/installed/upgraded.

It also includes tests to verify that queries of installed apps,
when there are more than 1000 apps installed, don't break.

Finally, tests are also now able to to insert into providers other
than the one under test. This is due to the fact that the providers
often join onto tables managed by other providers.
2014-04-20 16:50:22 +09:30
Daniel Martí
655f2bf7e3 Update UIL 2014-04-17 01:20:42 +02:00
Daniel Martí
57eaad7c1b Remove RelativeLayout leftovers 2014-04-17 01:20:32 +02:00
Peter Serwylo
de085f7e02 Added ApkProvider.get() to return a single apk.
This allows you to specify the Uri of a single apk, and
it will return it. Right now it is just used in a test, but
hopefully it will be useful in other situations too.
I forgot to commit this last time, and didn't review my patch
well enough before submitting.
2014-04-12 19:02:15 +00:00
Peter Serwylo
8c6ce67100 Added test for "ApkProvider.delete(..., List<Apk>)"
This was explicitly not-allowed previously, and so there was a
test that ensured it threw an exception when attempted on the
ApkProvider. However I implemented it for another feature, but
forgot to change the tests. Now the test no longer tests for
an exception. Rather, it properly tests for the correct execution
of the method.
2014-04-12 09:25:26 +00:00
Peter Serwylo
60f2be678a Merge branch 'master' into 'master'
run JUnit tests

It turns out that Jenkins was running the JUnit tests all along, but it just never reported on them.  This adds a jar to the test project that makes JUnit reports that Jenkins can parse, and the report on the results.  So now if the JUnit tests fail, people will be emailed just like build failures.

Also, I added a quick `ant javadoc` target to the main project in case anyone likes that kind of thing.
2014-04-11 21:56:39 +00:00
Hans-Christoph Steiner
d813f1ec17 run JUnit tests using android-junit-report to get XML output
Jenkins needs some kind of report from the JUnit tests in order to tell
whether the tests succeeded or not.  android-junit-report is a library to do
exactly that.  With this setup, Jenkins should now successfully understand the
status of the JUnit tests, where before it just ran them and ignored the
results
2014-04-11 14:10:26 -04:00
Hans-Christoph Steiner
bc6f3d5cd9 add ant javadoc to generate javadoc for FDroid sources 2014-04-11 14:10:25 -04:00
Daniel Martí
4db53deb42 Forgot to set the icon sizes back to normal
They got added +8 since we added paddings directly to the icon layout. Since
those paddings got removed, this has to be switched back too.
2014-04-11 19:24:46 +02:00
Daniel Martí
8ed76f47ee More improvements to the app list layout
* Don't use a RelativeLayout for the whole thing
* Use more external paddings, not per-element paddings
* Center everything vertically
2014-04-10 16:33:15 +02:00
Daniel Martí
e7f76705c8 Move "receiver" and "address" into UpdateService.EXTRA_... 2014-04-10 15:56:10 +02:00
Daniel Martí
f6707490f8 Move "from" into AppDetails.EXTRA_FROM 2014-04-10 15:52:11 +02:00
Daniel Martí
7fd3ea236e Move "appid" into AppDetails.EXTRA_APPID 2014-04-10 15:49:02 +02:00
Daniel Martí
2cdb634865 Fixes #6: Spaces before ellipsis in German are OK 2014-04-10 15:23:19 +02:00
Daniel Martí
40d873551f A bit of extra cursor safety, avoid the last missing .close() 2014-04-10 15:11:00 +02:00
Daniel Martí
f04ac83ec9 Fix build without java 1.7 compatibility 2014-04-10 15:08:29 +02:00
Peter Serwylo
fe1806b016 Merge branch 'misc_fixes' into 'master'
Localized category list
2014-04-10 03:51:58 +00:00
Peter Serwylo
2a296c0302 Merge branch 'master' into 'master'
Scroll to top on category change

Scroll to the top of the available app list when changing categories.
See: https://gitlab.com/fdroid/fdroidclient/issues/7
2014-04-10 03:46:58 +00:00
James Clark
09ccf3d428 Fix bug introduced in last commit 2014-04-10 04:14:55 +01:00
James Clark
87638363b3 Set listview to top item after category refresh 2014-04-10 03:45:17 +01:00
Peter Serwylo
d54dc0b7bb Merge branch 'master' into 'master'
fix two bugs

First bug is with lots of QR Code readers, they don't respect custom URI schemes like `fdroidrepo://` and just force all URIs to be `http://`.  A slight tweak makes it possible to use a QRCode to configure a repo using all of the major ones I could find (I tested with 8 different apps).

The second bug is a simple crasher bug.
2014-04-08 06:51:16 +00:00
Hans-Christoph Steiner
da329089fb add custom ant rules for downloading JUnit results 2014-04-08 00:16:03 -04:00
Hans-Christoph Steiner
c1d0ec43c3 fix crasher when hopping around apps and adding repos
I triggered this a few times while trying various QR Code scanning apps
with FDroid.

fixes #3222 https://dev.guardianproject.info/issues/3222
2014-04-07 21:39:50 -04:00
Hans-Christoph Steiner
407e7662e9 support QR scanners that do not respect custom URI schemes
Some QR Code scanners don't respect custom schemes like fdroidrepo://, so
this is a workaround, since the local repo URI is all uppercase in the QR
Code for sending the local repo to another device.  This way, the QR Code
can still be all uppercase and use HTTP:// and Android will still route it
to FDroid, but via the Just Once/Always chooser (fdroidrepo:// goes
directly to FDroid with no prompt, when it works)
2014-04-07 21:07:01 -04:00
Daniel Martí
a477f421cb Greatly improve app list layout
* Don't hard-code ellipsis in the code
* Separate the two rows into two linear layouts
* Don't abuse relative layouts
* Use ellipsize with weights to achieve best results
2014-04-07 19:35:04 +02:00
Daniel Martí
b731ab57b3 Release 0.63 2014-04-07 15:46:33 +02:00
Daniel Martí
ad9218d14c Fix some string formats and an ellipsis 2014-04-07 15:21:23 +02:00
F-Droid Translatebot
c717d919af Translation updates 2014-04-07 14:16:49 +01:00
Daniel Martí
34d7172ad6 Bump support lib from 19.0 to 19.1 2014-04-06 11:03:14 +02:00
Daniel Martí
d16c7fc95a Merge branch 'fix/multi-repo-updating-only-one-repo' into 'master'
Fix Multi Repo Updating Only One Repo

Java update logic has been moved to SQL, to prevent having to pull out apps fromt he database, and then iterate over them in Java.
2014-04-06 09:03:12 +00:00
Peter Serwylo
dcf3a9dae8 Fixed assumption that repo updates have all apps available.
Previously, I accidentally made the repo updater presume that it
had access to all apps in a big fat list. This meant that I was iterating
over that list, performing calculations, etc, rather than actually
querying the entire database.

The solution was to bundled all update-service related processing to one
process in AppProvider (I didn't want to have to pull every single app/apk
out of the database in order to perform the update, because that will become
more and more burdensom as the repo grows).

There is a method calcDetailsFromIndex() in the AppProvider.Helper class.
It now does three things:
 * updates compatibility flag.
 * updates suggested version (outstanding issue is documented in gitlab issue #1)
 * updates iconsUrl (fixed in this commit)

Icons from old repos will just have icons in an "icons" dir
in the same folder as the index.jar. New repos have density
specific icon dirs (e.g. "icons-240") which depend on the
device F-Droid is running on.
2014-04-06 12:34:47 +00:00
AlexanderR
04ea93cce8 Category list i18n 2014-04-05 17:08:29 +11:00
AlexanderR
c1daa99617 Use managedQuery to let Search Activity automatically dispose of it's Cursor.
Should be somehow done via Loaders someday.
2014-04-05 10:32:58 +11:00
AlexanderR
793bd618ac Fixed weird crash on emulator 2014-04-04 18:06:03 +11:00
F-Droid Translatebot
628d684ab9 Translation updates 2014-04-03 20:57:36 +01:00
Peter Serwylo
eded748ab8 Fixed the suggestedVersion calculation, now done via SQL.
The archive repo was getting updated after the regular repo.
In these situations, we didn't have every single app/apk in
memory in order to calculate the suggested version. As a
result, F-Droid ended up choosing a suggested version from
the archived versions, when terhere was actually a newer version
in the database.

This change does all of the calculations in two database queries
now. Although the implementation of the query is not hackey,
they way I get to the code in order to execute the query
is a bit hacky, so most of the implementation is private.
2014-04-03 00:32:56 +11:00
Peter Serwylo
e7eb3120cf Updated changelogs with (what is hopefully) a lay description of the ContentProvider changes. 2014-04-02 22:38:49 +11:00
Daniel Martí
8977ac6826 Prepare the changelog 2014-04-01 16:09:16 +02:00
Daniel Martí
f6cf7c9b0c Revert "Use a commit hash instead of 0.62 to test if repo works"
This reverts commit f0a40d8b6e1f165b75444353c8aac60c39c8ac68.
2014-04-01 16:06:01 +02:00
Daniel Martí
f0a40d8b6e Use a commit hash instead of 0.62 to test if repo works 2014-04-01 15:19:14 +02:00
Daniel Martí
edd2de49c3 Use HEAD instead of LAST_STABLE_TAG 2014-04-01 15:16:24 +02:00
Daniel Martí
232145eac1 Update repo snippet to latest version 2014-04-01 15:09:35 +02:00
Daniel Martí
44312bdb6c Bump version to 0.62 2014-04-01 14:40:27 +02:00
Daniel Martí
2ff0ae9550 Run translation scripts 2014-04-01 14:04:32 +02:00
Daniel Martí
6b08ab0e97 Place -hu arrays in the correct file 2014-04-01 14:02:26 +02:00
F-Droid Translatebot
4f0cba0c84 Translation updates 2014-04-01 12:16:44 +01:00
Ciaran Gultnieks
ce334e215d Add Hungarian translations by gidano 2014-04-01 11:57:10 +01:00
Peter Serwylo
5e0af1dc5b Merge branch 'feature/implement-app-removal-by-index' 2014-04-01 21:26:01 +11:00
Peter Serwylo
468b6717ee After downloading index, remove apks no longer in the index.
It adds an extra 600ms on my Nexus 4 with ~2000 apks from the
F-Droid index. But I think it is the only way, as we really need
to iterate over every single installed apk, to see if it is still
wanted. The up side is that we can query for a large amount of
them, rather than quering individually for each apk.

NOTE: I haven't added a new status message yet, because we are
about to do a stable release. After the stable release, I'll
add a new status message to cover for this > half a second
(on my relatively fast device). This will probably be part of
an overhaul of the update process in general, including a
proper progress dialog.
2014-04-01 21:19:27 +11:00
Daniel Martí
05d8e409c4 Remove TODO-before-release 2014-03-28 18:48:08 +01:00
Daniel Martí
abdd2fbb8e Bring back "Update repos" to the main menu
This can later be removed again if the user still has a way to easily update
repos manually without having to enter "Manage Repos" and exit again. A good
option would be a pull-to-refresh action.
2014-03-28 17:59:07 +01:00
Peter Serwylo
8efa9d609a Apps were not getting a current version when upstreamVersioncode not specified.
The problem was that they defaulted to 0 if not specified, however
the code checking for current version was looking for -1 for a "no upstream version".
2014-03-27 22:22:54 +11:00
Daniel Martí
ce3f210919 Run fix-ellipsis 2014-03-23 14:04:14 +01:00
Peter Serwylo
3ebad383d6 Refactored the recent MR for dynamicly adding default repos.
The idea was good: reduce the amount of copied/pasted code
where ContentValues were initialized, populated, then inserted.
I've kept the idea, by putting it in its own method which is
called twice. But the resources are not loaded dynamically any
more. This is so that the compiler will be able to pick up if
we reference a missing resource. Also, I took the opportunity
to replace the field name string literals with references to
RepoProvider.DataColumns.* constants.

Finally, changed the tests around because now we need to
have the "getInteger()" call mocked in resources correctly
(for priority/inUse).
2014-03-23 22:31:06 +11:00
Peter Serwylo
9703350f41 Update tab refreshes correctly now.
Before it was listening for changes, but we weren't notifying
of changes correctly. Now we use ContentResolver.notifyChange().
2014-03-23 21:20:03 +11:00
Peter Serwylo
bfdfb6d5ef Removed unused code from FDroidApp.
From before content providers, where we rolled our own update notification
system for when data changed in the database. I also removed the property
"ctx", because it is availble in getApplicationContext(). As a general rule,
it is usually safer to not use a member field if not neccesary. That way,
there doesn't need to be any assumptions about when it is set and what value
it has. In this case, it was only set half way through onCreate, and therefore
usage before then would break.
2014-03-23 21:20:03 +11:00
F-Droid Translatebot
3bfd5cbf0d Translation updates 2014-03-22 19:20:04 +00:00
Daniel Martí
db1adb327a Re-run fix-ellipsis 2014-03-22 13:27:16 +01:00
F-Droid Translatebot
7f315720ab Translation updates 2014-03-22 12:25:06 +00:00
Daniel Martí
53ac16fcee Run fix-ellipsis 2014-03-22 13:20:49 +01:00
Daniel Martí
19aa5eb7f7 Make fix-ellipsis remove weird spaces too 2014-03-22 13:20:36 +01:00
Daniel Martí
a6a133b885 Gradle: bump versions, cleanup 2014-03-22 13:10:46 +01:00
F-Droid Translatebot
ca2fe21beb Translation updates 2014-03-22 12:09:05 +00:00
Daniel Martí
361fbc83ba Re-organize default repos to separate and distinguish them 2014-03-22 11:24:44 +01:00
Daniel Martí
9f2de0abd7 Get rid of EXTRA_NOT_UNKNOWN_SOURCE target api warning 2014-03-22 11:22:03 +01:00
Daniel Martí
2cd17a904e Placed the TargetApis wrong 2014-03-22 11:18:42 +01:00
Daniel Martí
a1a8c06565 Start using contentDescription on ImageView elements 2014-03-22 11:12:42 +01:00
Daniel Martí
4f065492ef Unify the usage of cursors
Safer and less error-prone because:

* Always checks for null
* Checks for sizes
* Inits App/Apk lists at known capacity
* Properly closes all cursors

There are still one or two cursors that are not closed correctly and show
things like these:

W/CursorWrapperInner(19973): Cursor finalized without prior close()
2014-03-22 00:11:56 +01:00
Daniel Martí
fc4a96acd8 Don't break when updating the Apk table on devices before 3.0 2014-03-21 23:22:23 +01:00
Peter Serwylo
9c9ecc5140 Fixed issue 472, NPE on android 3.1 (and 3.0).
The Activity.getActionBar() method can only be called after
setContentView() has been invoked, as described here:

  http://blog.perpetumdesign.com/2011/08/strange-case-of-dr-action-and-mr-bar.html

I couldn't think of any way to enforce this safely
(i.e. make the compiler kick up a stink if we didn't do it). As such,
I just put a comment above each usage of the ActionBarCompat class.

Another outstanding issue is a duplicate of 474, where it crashes when you
press the "Up" button from ManageRepos, but I'll create a different issue
for that.
2014-03-22 08:29:13 +11:00
Daniel Martí
0e47ac6900 Slightly speed up getAndroidVersionName by using a static array 2014-03-21 18:18:12 +01:00
Daniel Martí
ded9b146a2 Update UIL 2014-03-20 00:09:17 +01:00
Daniel Martí
ee38ff3eea Merge commit 'refs/merge-requests/69' of gitorious.org:f-droid/fdroidclient 2014-03-20 00:03:47 +01:00
Daniel McCarney
7dd216d212 Apply Google CSRNG fixes.
The cryptographically secure random number generator exposed to Android
through the Java Cryptography Architecture is not properly initialized
on some older unpatched versions of Android. Google provides
a PRNGFixes.java class to force secure seeding of the CSRNG on all
platform versions. This comment adds the PRNGFixes class & and a call to
invoke the fixes from the FDroidApp class.

More detail is available from the Google Android Developers blogpost on
the subject:
  http://android-developers.blogspot.ca/2013/08/some-securerandom-thoughts.html
2014-03-19 18:56:42 -04:00
Daniel Martí
955087d523 Relese 0.61-test 2014-03-19 13:39:20 +01:00
Daniel Martí
ddb1cfd659 Only set NOT_UNKNOWN_SOURCE if available 2014-03-19 12:46:17 +01:00
Peter Serwylo
94300592d9 Fix missing resource issue.
When adding "default_repo_priority", it was copy/pasted from
"default_repo_pubkey" without changing the name, and so
tried to cast the string value into an int and failed.
2014-03-19 07:02:00 +11:00
Peter Serwylo
fa8052611e Don't reset "transient" tables from now on.
Instead, use:

if (oldVersion < ... && !columnExists(...))
	db.execSQL("ALTER TABLE ...")

to add/modify columns as required.
2014-03-19 06:22:09 +11:00
Daniel Martí
53a10aa44f Re-run fix-ellipsis after translatebot overwrite 2014-03-18 08:17:34 +01:00
Daniel Martí
5e30d0d218 Remove "Android App:" when sharing an application
Reasons to do so:
* Redundant
* Often noisy
* Not properly translated
2014-03-18 08:15:04 +01:00
F-Droid Translatebot
7f652f8620 Translation updates 2014-03-17 15:27:41 +00:00
Daniel Martí
aa85cddd84 Fix repo manifest for 0.58, not master 2014-03-17 14:01:17 +01:00
Daniel Martí
12a9a1cf29 New script: Update repo xml data with git repo/submodule data 2014-03-17 14:01:08 +01:00
Daniel Martí
ca0ed2844e README: Minor fixes, don't use repos differing from the ones in git submodules 2014-03-17 13:35:35 +01:00
Daniel Martí
58609a4f50 Update submodules 2014-03-17 13:20:38 +01:00
Daniel Martí
05edd59b05 Ignore UnusedResources on default_repo.xml
We iterate over them programmatically, so lint thinks we don't use them
2014-03-17 09:39:52 +01:00
Daniel Martí
3df221bc4a Don't ship third-party repos 2014-03-17 09:38:38 +01:00
Daniel Martí
a184ce7268 Make priorities configurable too 2014-03-17 09:38:11 +01:00
Daniel Martí
6284811fec Merge commit 'refs/merge-requests/68' of gitorious.org:f-droid/fdroidclient 2014-03-17 09:29:13 +01:00
Daniel Martí
2095229061 Run translation auto-correct scripts 2014-03-17 09:26:23 +01:00
F-Droid Translatebot
8acb1b9a76 Translation updates 2014-03-17 08:24:02 +00:00
Peter Serwylo
0ec4e3756d Don't show update option in list if ignored.
Related to the last bug with the update notify count. This one is
also due to the fact we didn't ask for the right data from the
provider. If these bugs keep coming in over time, I will seriously
consider guarding access to each variable with a check, and throwing
an exception if the variable hasn't been initialized. For now I'll
see if it was a once off. Hopefullly tests will catch these issues
in the future.
2014-03-17 17:43:45 +11:00
Rene Treffer
67e1020684 Add missed occurance of old repo address R.string 2014-03-16 14:20:44 +01:00
Rene Treffer
7fa25d3209 Add ROM building instructions
Android.mk enables ROM devs to bundle F-Droid. Add instruction on how to
do it.
2014-03-16 14:03:46 +01:00
Rene Treffer
1f799d1ef1 Say that f-droid is not an unknown source.
This property will be ignored if f-droid is not installed as priv-app,
but it _will_ skip the "you have to enable unknown sources" dialog if
f-droid is installed as priv-app.

There is thus no gain in keeping it as is (false).
2014-03-16 13:52:05 +01:00
Rene Treffer
61bbbf442d Make the list of default repos dynamic
This patch iterates over the configured list of repos and adds them to
the db on create. This means that the initial list of repositories is
now fully configurable. Added the guardian project repo (disabled) as a
testcase.
2014-03-16 13:50:17 +01:00
Rene Treffer
d55fc7cd69 Fix build failure with newer toolchains.
Android somehow wants every string to be externalized on newer
toolchains, let's prepare for that.

This fixes in-tree building of f-droid.
2014-03-16 13:44:25 +01:00
Rene Treffer
750da53970 Add Android.mk for building in ROMs
Android.mk is needed to build F-Droid as part of other ROMs. A ROM would
have to emulate the .gitmodules with repo.

Note: the build will fail until AndroidPinning pulls a trivial fix for
      super(null). There is also a layout bug that is fixed by the next
      commit.
2014-03-16 13:40:20 +01:00
Daniel Martí
49a3c3370f Don't finish the whole Repositores activity when cancelling "New Repository" 2014-03-10 18:36:35 +01:00
Daniel Martí
54d7849191 Get rid of lint TargetApi warnings 2014-03-10 18:30:42 +01:00
Daniel Martí
be4db93da5 Forgot the rtl fixes for layout-land 2014-03-10 18:27:43 +01:00
Daniel Martí
6fa72607b8 Fix relative layouts on <4.2, broken while trying to add RTL support 2014-03-10 18:19:15 +01:00
Daniel Martí
4454c0d261 No need to reset views in the app lists 2014-03-10 17:56:49 +01:00
Daniel Martí
0f44c5edba Fix scaling of icons on AppDetails 2014-03-10 17:56:38 +01:00
Hans-Christoph Steiner
1d3c18423b use https for fdroid.org everywhere, avoid redirects 2014-03-10 17:33:33 +01:00
Hans-Christoph Steiner
31fe8343ad fix RO translation's formats, based on lint warning
Inconsistent formatting types for argument #1 in format string
searchres_napps ('%s'): Found both 'd' and 's' (in values/strings.xml)

This lint check ensures the following: (1) If there are multiple
translations of the format string, then all translations use the same type
for the same numbered arguments (2) The usage of the format string in Java
consistent with the format string, meaning that the parameter types passed
to String.format matches those in the format string.

<string name="searchres_napps">Sa gasit o aplicatie potrivita cu %s\'</string>
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-03-10 17:32:06 +01:00
Peter Serwylo
ef17cc3489 Merge branch 'fix/update-notify-count' 2014-03-06 23:31:33 +11:00
Peter Serwylo
9fd8da42a1 Adding test coverage for "AppProvider.Helper.findIgnored()"
Also added tests for canAndWantToUpdate() while I was at it.
2014-03-06 23:31:26 +11:00
Peter Serwylo
81fcd44b66 Fixed update notification count
The update notification was not taking ignored apps into account.
This is the first manifestation of a class of bug I feared whereby
the properties of an App object are not initialized, but no error
is thrown. It occured because we were iterating over apps that were
created from the index file, rather than our database. Hence, they
had no knowledge about whether they should be ignored or not.

Also took the chance to perform a minor refactor of UpdateService
class. The onHandleIntent method was getting huge, so I extracted
two methods: verifyIsTimeForScheduledRun() and
performUpdateNotification(), as well as removing the unused "success"
flag.

The two methods should theoretically make the class more testable
later, as we can test the scheduled run code, and the update notification
code in separate tests, but we'll wait and see if that eventuates.
2014-03-06 23:31:26 +11:00
Daniel Martí
68f266d6be Remove silly values-qqq 2014-03-05 23:12:55 +01:00
Daniel Martí
91363bf753 Re-run fix-ellipsis 2014-03-05 22:58:58 +01:00
Daniel Martí
f7051a3f50 Run remove-unused-trans again 2014-03-05 22:58:38 +01:00
F-Droid Translatebot
bf040a73fa Translation updates 2014-03-05 21:44:48 +00:00
Daniel Martí
d647bfb097 Release 0.60-test 2014-02-28 00:37:34 +01:00
Peter Serwylo
aa9bfefd55 Fixed bug with only one apk being added from index for each app. 2014-02-28 10:32:32 +11:00
Peter Serwylo
7d985f137f Merge branch 'fix/manage-repos-crash-on-up' 2014-02-27 23:44:35 +11:00
Peter Serwylo
4004b6251f Fixed issue 474 - crash on "Up" button from ManageRepos.
Not sure that the "parent" activity of ManageRepos is required in
the manifest any more, due to the fact that the main use seems
to be to direct the "NavUtils.navigateUpSameTask" method uses it,
but this change switches to "NavUtils.navigateUpTo" and specifies
the activity explicitly.
2014-02-27 22:56:16 +11:00
Daniel Martí
7111f54c9b Update submodules 2014-02-27 11:32:20 +01:00
Peter Serwylo
141f133c7a Merge branch 'fix/count-apps-in-repo' 2014-02-24 11:06:57 +11:00
Peter Serwylo
45d046b445 Fix unique key violation in update service.
When two repos both add an apk with same version and id, then
it would break.
2014-02-24 11:01:56 +11:00
Peter Serwylo
87f2da7e2f Fix 'Number of apps' sql exception in repo details. 2014-02-24 10:45:25 +11:00
Peter Serwylo
568224ba78 s/curVersion/upstreamVersion/g, added suggestedVersion. Refactored QueryBuilder.
In order to support suggested version, I didn't want to have both
suggested version + versionCode in the App table. Rather, just the
code, and then use that (and the apps id) to join onto the apk table.
This is something we wanted to do elsewhere, so I refactored the
QueryBuilder class from the ApkProvider so that it can also be used
by the AppProvider.
2014-02-24 10:45:13 +11:00
Daniel Martí
955c2f5f6c Bump build-tools to 19.0.2 2014-02-23 12:22:04 +01:00
Daniel Martí
31aa3fcf30 Make titles and subtitles align properly in RTL
This is just a cosmetic fix to make the RTL layout look like the normal LTR
one. It is, effectively, making non-RTL text be aligned to the right. I
suppose that's fine, for the sake of making it readable since we don't want it
aligned to the left, breaking the layout.
2014-02-21 00:32:17 +01:00
Daniel Martí
8b823cdf59 Update changelog 2014-02-21 00:21:17 +01:00
Daniel Martí
f5c4018fee Merge branch 'rtl-layout' 2014-02-21 00:19:57 +01:00
Daniel Martí
57b2bc431e Merge branch 'rtl-layout' of gitorious.org:f-droid/fdroidclient into rtl-layout 2014-02-21 00:13:14 +01:00
Daniel Martí
2a03c51207 Use LayoutCompat in RepoAdapter 2014-02-21 00:11:58 +01:00
Daniel Martí
5d0074d821 Add ALIGN_PARENT_* to LayoutCompat.RelativeLayout 2014-02-21 00:11:58 +01:00
Daniel Martí
0fba2c255e Add START_OF to LayoutCompat.RelativeLayout 2014-02-21 00:11:58 +01:00
Daniel Martí
66563d30d9 First attempt at supporting RTL
Following the Android 4.2 changes, which explain how to add native support for
RTL, I've replaced Right for End and Left for Start. Enabling RTL to see the
results.
2014-02-21 00:11:58 +01:00
Daniel Martí
a3024bc837 Don't crash RepoDetailsFragment if nfc is not available 2014-02-21 00:10:52 +01:00
Daniel Martí
16c34a95d3 First attempt at supporting RTL
Following the Android 4.2 changes, which explain how to add native support for
RTL, I've replaced Right for End and Left for Start. Enabling RTL to see the
results.
2014-02-20 14:15:50 +01:00
Daniel Martí
44bb904ab0 Remove obsolete dbSyncModeValues array 2014-02-20 13:57:59 +01:00
Daniel Martí
93ea5ea9fb Try to get grade working again
Now it fails because it thinks that ":extern" is a subproject
2014-02-20 09:55:54 +01:00
Daniel Martí
28d5456e72 Update submodules 2014-02-20 09:32:43 +01:00
Daniel Martí
2c9d8ab7fc Merge commit 'refs/merge-requests/66' of gitorious.org:f-droid/fdroidclient
Conflicts:
	test/src/org/fdroid/fdroid/ApkProviderTest.java
2014-02-20 08:00:12 +01:00
Peter Serwylo
2dcd87cd41 Almost 100% test coverage of ApkProvider and ApkProvider.Helper
Removed unused code from ApkProvider.Helper, made it throw proper
exceptions when trying unsupported operations. Refactored tests
a little bit to facilitate separate test cases for the provider
and its helper.
2014-02-20 16:13:37 +11:00
Peter Serwylo
51a2159559 Removed maxage issue from TODO 2014-02-20 16:01:27 +11:00
Peter Serwylo
3240faf7f2 Fix "duplicate column: maxage" (issue #445)
The bug is explained in detail in the issue tracker.
This change added guard condition to check for existence of the field
before adding.

While I was at it, I also guarded a bunch of other ALTER statements
with the if (!columnExists()) check. It turns out that many of them
break, but we only saw the first one because it threw an exception
before getting to the others.
2014-02-20 15:55:29 +11:00
Hans-Christoph Steiner
576208d3aa Exception subclasses are supposed to have a serial number
This warning in Eclipse tells me so:

"The serializable class UpdateException does not declare a static final
serialVersionUID field of type long"
2014-02-19 20:11:30 -05:00
Hans-Christoph Steiner
27874b3a9e parameterize CategoryObserver.adapter
Helps Java do its error checking... and gets rid of a few warnings...
2014-02-19 20:06:17 -05:00
Hans-Christoph Steiner
dd3562c00f remove unnecessary cast
This is pretty cosmetic, but Eclipse did it for me, so why not? :-)
2014-02-19 20:06:17 -05:00
Hans-Christoph Steiner
888d28aed6 @Override decorator on every method that overrides
This marks a method as overriding another method, and makes sure that it
matches the signature of the method it is supposed to be overriding,
otherwise it gives a warning.

Its a bit verbose, but can catch mistakes and save time. And the default
Android profile for Eclipse always adds them automatically...
2014-02-19 20:06:05 -05:00
Hans-Christoph Steiner
301ac10515 remove trailing white space... 2014-02-19 19:59:31 -05:00
Hans-Christoph Steiner
3a0d40d86d remove all unused variables
This reduces the number of warnings so that we can see the useful ones!
2014-02-19 19:53:38 -05:00
Hans-Christoph Steiner
5d828e2341 remove all unused imports
This reduces the number of warnings so that we can see the useful ones!
2014-02-19 19:52:36 -05:00
Daniel Martí
8f506c0b0b Add maxage issue to TODO 2014-02-20 00:25:14 +01:00
Daniel Martí
231fb3dd8a Merge commit 'refs/merge-requests/65' of gitorious.org:f-droid/fdroidclient
Conflicts:
	src/org/fdroid/fdroid/views/fragments/RepoListFragment.java
2014-02-19 23:12:19 +01:00
Hans-Christoph Steiner
c7a40e9fa6 purge old, unused repo list XML layout
Its all done using getListView() in the ListFragment now :-)
2014-02-20 08:59:42 +11:00
Hans-Christoph Steiner
94fb0c8a02 prevent crash when clicking on the header in "Repositories" view
Here's the crash dump:

java.lang.NullPointerException
at org.fdroid.fdroid.data.ValueObject.checkCursorPosition(ValueObject.java:13)
at org.fdroid.fdroid.data.Repo.<init>(Repo.java:37)
at org.fdroid.fdroid.views.fragments.RepoListFragment.onListItemClick(RepoListFragment.java:269)
at android.support.v4.app.ListFragment$2.onItemClick(ListFragment.java:58)
at android.widget.AdapterView.performItemClick(AdapterView.java:299)
at android.widget.AbsListView.performItemClick(AbsListView.java:1113)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:2904)
at android.widget.AbsListView$3.run(AbsListView.java:3638)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
2014-02-20 08:58:58 +11:00
Peter Serwylo
4d5fd98ae5 Fixed two NPE.
Categories can technically be null, so need to guard for that
when getting them from the ContentProvider. This occurred because
I had an old index from before the change from "category" to
"categories", so it indeed was null.

The other one was from when I added a new repo without a fingerprint.
The fingerprint gets changed to upper case, but if null, causes
a NPE.
2014-02-20 08:55:44 +11:00
Daniel McCarney
3223e20e33 Add support for Network Service Discovery of FDroid repos.
If the device supports API level 16 (Android 4.1) then add a menu item
on the repository management screen to "Find Local Repos". Activating
this menu item will initiate NSD service discovery with the NsdHelper
class looking for 'fdroidrepo' and 'fdroidrepos' service types on the
local network. When one is found, the service is resolved and the name
& IP are populated into a list of discovered repositories. Clicking an
NSD discovered repo will prompt the user to add the repo.
2014-02-19 15:32:44 -05:00
Daniel Martí
8bb0e58e6c Update changelog and todo 2014-02-19 18:23:31 +01:00
Daniel Martí
e6ec5ee242 Add support for filtering apk compatibility by maxSdkVersion
For now it's enforced like minSdkVersion. It is possible to try and install
incompatible apks by enabling "Incompatible Versions" and agreeing to the
warning shown when clicking on such a version.
2014-02-19 18:11:32 +01:00
Daniel Martí
dc1bdc2f3b Make the incompatible reasons textview stand out
In other words, don't disable the view with the others when marking an apk as
incompatible
2014-02-19 18:07:34 +01:00
Hans-Christoph Steiner
a4de616b7a make ApkProvider.Helper take Context rather than ContentResolver
This makes the code a bit neater, and passing the Context around is a
common pattern.

https://dev.guardianproject.info/issues/2926
refs #2926
2014-02-18 19:04:05 -05:00
Hans-Christoph Steiner
ab6166c36d make RepoProvider.Helper take Context rather than ContentResolver
This makes the code a bit neater, and passing the Context around is a
common pattern.

https://dev.guardianproject.info/issues/2926
refs #2926
2014-02-18 19:04:05 -05:00
Hans-Christoph Steiner
a8bf9f7614 point Eclipse to new location for UniversalImageLoader submodule 2014-02-18 19:04:05 -05:00
Hans-Christoph Steiner
09f3e8b004 forgot to include the .project Eclipse file for the test project
Include the reusable Eclipse files (.project and .classpath).
2014-02-18 19:04:05 -05:00
Daniel Martí
334ba0b956 Remove TODO bluetooth item
After discussing it with Hans, the two points that I stated here are not
correct.
2014-02-19 00:22:46 +01:00
Daniel Martí
226003d38d Git automatic indenting fix 2014-02-19 00:19:05 +01:00
Peter Serwylo
5877af55ae Merge branch 'master' into improvements/apk-tests
Conflicts:
	test/src/org/fdroid/fdroid/AppProviderTest.java
2014-02-19 09:38:40 +11:00
Peter Serwylo
a797e43178 Test apk insert more comprehensivly. 2014-02-19 09:32:54 +11:00
Peter Serwylo
4860e06af3 Improved apk tests (test deleting). 2014-02-19 08:12:21 +11:00
Daniel Martí
4b4ee4b6db Update MTM module, now supports gradle 2014-02-18 11:26:15 +01:00
Peter Serwylo
68a719f48a Don't overwrite "ignore updates" settings on update.
For now, the UpdateService ignores these fields when updating from
the index. There is no time that the index should specify what
versions to be ignored.

In the future, this will be done with a join table that stores
info about what to ignore. Another future improvement should also be
to make "App.toContentValues()" smarter. That is, make it only return
values which have been set since the object was created. However this
will add an overhead which may or may not be noticable.
2014-02-18 08:11:02 +11:00
Peter Serwylo
85f3232de0 Started implementing ApkProvider tests.
Refactored a couple of common things from AppProviderTest to either
FDroidProviderTest (baseclass) or TestUtils (static methods) where
relevant.
2014-02-18 02:52:02 +11:00
Daniel Martí
799be52224 Fix regression: Don't count apps which we don't want to update 2014-02-17 16:09:57 +01:00
Daniel Martí
b222887745 Start TODO to be emptied before the upcoming stable release 2014-02-17 10:42:19 +01:00
Daniel Martí
8473627370 Update changelog with my recent changes 2014-02-17 10:34:28 +01:00
Peter Serwylo
43f8ea0814 Added category tests.
This will be useful when somebody wants to move categories from a comma
separated string in the app table, to a separate table all together.
2014-02-16 21:54:50 +11:00
Daniel Martí
41b5797307 Automatic tab fixing 2014-02-16 02:48:22 +01:00
Daniel Martí
feec3b1c51 Make all the gradle libs use the same latest build-tools version
This makes it completely build from source properly on a standard setup
2014-02-15 12:31:15 +01:00
Daniel Martí
901545d404 Don't recreate main activity when returning to it
Huge improvements! Amongst them:
* Pressing Up is just as fast as pressing Back
* Like Back, it keeps the scroll position and everything
* Now FDroid behaves like the other activities that an user may navigate up to
2014-02-15 11:49:29 +01:00
Daniel Martí
4e26c77327 Don't crash on startup if NFC is not available 2014-02-15 11:23:30 +01:00
Daniel Martí
6b2b759a16 Whoops, forgot to also change the ant setup 2014-02-15 11:18:58 +01:00
Hans-Christoph Steiner
3a1b814603 fix RO translation's formats, based on lint warning
Inconsistent formatting types for argument #1 in format string
searchres_napps ('%s'): Found both 'd' and 's' (in values/strings.xml)

This lint check ensures the following: (1) If there are multiple
translations of the format string, then all translations use the same type
for the same numbered arguments (2) The usage of the format string in Java
consistent with the format string, meaning that the parameter types passed
to String.format matches those in the format string.

<string name="searchres_napps">Sa gasit o aplicatie potrivita cu %s\'</string>
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-02-14 23:17:48 -05:00
Hans-Christoph Steiner
739ecfdea3 commit Eclipse project files to make it easier for others to start
Having the pre-configured Eclipse files in git will make it easier for
other people to work with FDroid in Eclipse, and should not affect anything
else. The key files are .classpath and .project.  The .settings/ folder is
for user-specific settings, so its ignored.
2014-02-14 23:07:49 -05:00
Hans-Christoph Steiner
6d111c6e7d document NFC/Bluetooth send methods in CHANGELOG 2014-02-14 22:45:48 -05:00
Hans-Christoph Steiner
c0cd0d33bf send the FDroid.apk via bluetooth on devices that support it
This is another easy method to send FDroid to a device that doesn't have it
yet.  Unfortunately, stock Android blocks the receiving of APKs, but many
ROMs and even some Samsung devices do not have this block.

You can find the lengthy backstory on this work here:
https://dev.guardianproject.info/issues/2084
2014-02-14 22:45:48 -05:00
Hans-Christoph Steiner
0c06b67f3d do not require WiFi in a device, any internet access will work
Setting android.permission.ACCESS_WIFI_STATE automatically sets up
uses-feature to require wifi.  Therefore, we have to manually say that
wifi is not actually required.
2014-02-14 22:45:48 -05:00
Daniel Martí
b709f9e17a Update AndroidPinning 2014-02-14 21:26:04 +01:00
Daniel Martí
1e9c6ccf2e Finally give up on UIL and set up the gradle project ourselves 2014-02-14 12:17:07 +01:00
Daniel Martí
fffae79c24 Add MemorizingTrustManager as gradle library too 2014-02-14 10:51:30 +01:00
Daniel Martí
967174b549 Finally get UIL working as a gradle library
The problem were the dashes in the path 'extern/Universal-Image-Loader'
2014-02-14 10:34:36 +01:00
Daniel Martí
c99cf93c8b Test projects can't have --name it seems 2014-02-14 09:18:21 +01:00
Daniel Martí
cf1519f792 Add eclipse files to gitignore 2014-02-14 09:16:18 +01:00
Daniel Martí
51a02fe40f Update libraries 2014-02-14 09:12:52 +01:00
Daniel Martí
97e3bac98e Bump gradle plugin to 0.8 (gradle 1.10) 2014-02-14 09:10:58 +01:00
Ciaran Gultnieks
f60ce3f56c Merge branch 'merge-requests/61' 2014-02-14 06:30:48 +00:00
Hans-Christoph Steiner
cdad2c66ed add instructions for running the embedded Android Test Project 2014-02-13 23:28:31 -05:00
Hans-Christoph Steiner
9871ad0f01 ant-prepare.sh: also set up test suite, should not affect normal ant builds
This adds the command to update the embedded Android Test Project, so that
it can be run using `cd test/; ant clean emma debug install test`

It also changes -p to --path just to make things a little easier to read.
2014-02-13 21:53:52 -05:00
Hans-Christoph Steiner
113ae202b7 include Eclipse project for the embedded Android Test Project
This should make it easier for some people get started with the tests.
2014-02-13 21:51:29 -05:00
Hans-Christoph Steiner
9c9c0a4819 setup main FDroid screen to NFC Beam the FDroid.apk
This pre-configures a file:// URI that points to the installed location of
the FDroid.apk.  When users put two devices together, and touch the screen
on the device with FDroid on it, it will "beam" over the APK, and prompt
the user to install it.
2014-02-12 21:19:19 -05:00
Hans-Christoph Steiner
ceed2c31d7 prevent crash when using back button after screen rotate
To reproduce the crash:
0. click a fdroidrepo:// URI to bring up the "app repo" dialog
1. rotate the device
2. click back to make the keyboard go away
3. click back to make the dialog go away
4. click back on Manage Repos screen
5. boom!
2014-02-12 21:19:19 -05:00
Hans-Christoph Steiner
ba8de64686 split out RepoListFragment from ManageRepo, Fragments need to be public
Otherwise we get errors like this upon rotation:

"android.support.v4.app.Fragment$InstantiationException: Unable to
instantiate fragment org.fdroid.fdroid.RepoListFragment: make sure class
name exists, is public, and has an empty constructor that is public"
2014-02-12 21:19:19 -05:00
Hans-Christoph Steiner
ea7f82ed1a add menu item to enable NFC to RepoDetails view
It is now possible to beam a repo config via NFC but just selecting the
repo in FDroid, then touching two NFC devices together, and clicking on the
FDroid one.  There is no indication that NFC is off, so this commit adds a
menu item that makes it easy to enable the required NFC settings for
sending a repo to another device via NFC.
2014-02-12 21:19:19 -05:00
Hans-Christoph Steiner
4489037619 NFC beam the repo in RepoDetailsActivity
This is the framework for easily swapping repos.  The idea is that a user
can send the URL with the fingerprint for trusted bootstrapping of the repo
on a new user's device.  This will be essential for p2p repos provided
by Bazaar/Kerplapp.

The required NFC APIs were introduced in android-14. So android-14 and below
skip the NFC stuff.
2014-02-12 21:19:19 -05:00
Hans-Christoph Steiner
220b3d1441 ensure repo fingerprints are always stored in all upper case
this makes sure that the repo fingerprints are always going to have the
same case, no matter how they were added.  Repo.fingerprint probably should
be converted to a BigInteger so that the comparison can be numeric rather
than String.  Then when the fingerprint needs to be displayed, it can be
formatted appropriately.
2014-02-12 21:19:19 -05:00
Hans-Christoph Steiner
fc511fd94f use https for fdroid.org everywhere, avoid redirects 2014-02-12 21:19:19 -05:00
Hans-Christoph Steiner
ae10cd0db4 save/restore current category in Available view
This saves the currently selected category in the Available apps view, and
restores that category when the user returns to the Available screen. It
drives me totally nuts that it always forgets the category when I nav away
from that screen, always returning to What's New.
2014-02-12 21:19:19 -05:00
Daniel Martí
2f6a812fdc Fix db rewrite regression, filtering pref used the wrong way 2014-02-12 20:53:26 +01:00
Daniel Martí
a3b316c4a8 Fix a couple regressions 2014-02-12 20:46:32 +01:00
Daniel Martí
4c58514152 Apply similar layout improvement to app list elements 2014-02-12 20:23:19 +01:00
Daniel Martí
f35528cd78 Fix remaining issues related to vertical length and centering 2014-02-12 20:15:43 +01:00
Daniel Martí
9bd236d66c Some much needed fixes to appdetails headers
* If the info is taller than the icon, grow larger to fit it in
* Center icon vertically
* Move padding out of the header
* Revert some font sizes to how they were some time ago, a bit smaller
2014-02-12 19:30:26 +01:00
Daniel Martí
9b2e5c2426 Don't let AppDetails header textviews overflow 2014-02-12 19:10:47 +01:00
Daniel Martí
81359f929e Place top categories in the original order 2014-02-11 09:06:36 +01:00
Peter Serwylo
1083f57ec1 Case insensitive sort of app list, if sorting by name. 2014-02-11 10:19:32 +11:00
Peter Serwylo
7ca6db9555 Added ArrayAdapterCompat so addAll doesn't need to be wrapped in a guard condition. 2014-02-11 10:12:29 +11:00
Peter Serwylo
ef784dffa8 Update categories list after app list update. 2014-02-11 09:02:03 +11:00
Peter Serwylo
e4d106a298 Fixed incorrect size of category spinner. 2014-02-11 08:30:36 +11:00
Daniel Martí
9ec0a9060c Add .fdmeta for testing reasons 2014-02-10 11:13:44 +01:00
Daniel Martí
52dc6f8977 Update README with new translation info 2014-02-10 09:37:03 +01:00
Daniel Martí
6da00f84cb Fix proguard use in gradle 2014-02-10 09:30:08 +01:00
Daniel Martí
34cdacc303 Run remove-unused-trans again 2014-02-10 09:23:40 +01:00
Daniel Martí
5292acfef0 Add support for arrays in remove-unused-trans 2014-02-10 09:23:27 +01:00
Daniel Martí
0ff1257aef Update submodules 2014-02-10 09:15:03 +01:00
Daniel Martí
f525af993f Run optipng -o4 on all png files 2014-02-09 16:40:38 +01:00
Daniel Martí
9b6bb724d6 Run remove-unused-trans 2014-02-09 16:37:39 +01:00
Daniel Martí
292cc40bc4 Tabbing fixes 2014-02-09 16:35:02 +01:00
Daniel Martí
87c5ff56b8 Fix gradle test root 2014-02-09 16:34:36 +01:00
Peter Serwylo
aaae885161 Merge commit 'refs/merge-requests/60' of gitorious.org:f-droid/fdroidclient 2014-02-08 12:35:13 +11:00
Peter Serwylo
da8e41249b Removed DB, implemented AppProvider.
Yay!

As expected, a lot of the stuff in DB class is due to UpdateService
requiring it to process the downloaded indexes and insert data into
the database. Thus, this change is about removing that stuff from
the DB class and migrating to ContentProviders.

This required a bit of a change to the way that UpdateService decides
what to do with the data from indexes, but I hope it will make
understanding and changing UpdateService easier in the long term.
For example, it used to read the app details from database, then
if a repo wasn't updated (due to unchanged index) then it would take
the app details for that repo from the list of apps, and re-update
the database (or something like that).

Now, it has been refactored into the following methods:
 * updateOrInsertApps(appsToUpdate);
 * updateOrInsertApks(apksToUpdate);
 * removeApksFromRepos(disabledRepos);
 * removeApksNoLongerInRepo(appsToUpdate, updatedRepos);
 * removeAppsWithoutApks();
 * and probably some others...
Which hopefully are self-explanitory.

The recent change to implement single repo updates was re-implemented
with in light of the methods above. The interface to UpdateService for
scheduling a single repo update is the same as it was before, but
the implementation is completely different. Still works though.

Using batch content provider operations for repo updates,
but they suffer from the problem of not all being under the same
transaction, so if an insert/update stuffs up half way through, we
are left with only half of the update being complete. In the future,
if there is some way to implement notifications from the content provider's
applyBatch method, then we can do it all in the one transaction, and
still have notifications. Currently we break it into several calls
to applyBatch (and hence several transactions) to inform the user
of the progress.

Also adding the beginnings of some tests for AppProvider. In the future, I'll
work on adding better coverage, including instrumentation to test UI features.

==========================
Below is a list of many of the minor changes that also happened along the way
==========================

Make "Can update" tab stay up to date using content observer, rather
than manually deciding when to refresh the tab label as before.

The installed app list is now cached in Utils, because it is invoked
quite a few times, especially when rendering the app lists. The cache is
invalidated when PackageReceiver is notified of new apps.

The content providers don't notify changes if we are in batch mode.
I've left the notification at the end of the batch updates as the
responsibility of the UpdateService. However, it would be nice if this
was somehow handled by the content, as they are really the ones who
should worry about it.

Made curVersion, curVercode and curApk work with providers.
This was done by removing curApk (otherwise we'd need to query the db each
time we fetched one app to get a reference to that apk (resulting in hundreds
of queries). Instead, UpdateService now calculates curVercode and curVersion
and saves them to the database. We then use these where possible. If we really
need curApk (because we want info other than its version and code) we still have
the option of ApkProvider.Helper.find(app.id, app.curVercode). I considered
putting this inside the app value object, e.g. in getCurApk() but thought
better of it as it will likely result in people invoking it all the time,
without realising it causes a DB query.

incompatibleReasons required a minor UI tweak, removing the "min sdk"
ui element from the Apk list. It is replaced by the "Requires: %s" view
(which only appears when the app is incompatible). In the process, and in
response to some feedback from mvdan, I left the min sdk in there, but
only made it show when in "expert mode", just like the architecture.

In order to make the "installed apps" query work under test conditions,
needed to change the way the InstalledApkCache be replaceable with a
mock object.

Pause UIL loading on fast scroll of list, as the list was very choppy for
some reason.

Re-added "Last repo scan" info to the Manage Repo list view.

Fixed up some misc TODO's, removed some unused/empty functions.
2014-02-08 11:29:59 +11:00
Peter Serwylo
b3773a1561 Refactoring Apk references into content provider.
Removed DB.Apk in favour of stand-alone Apk class.

Conflicts:
	src/org/fdroid/fdroid/DB.java
2014-02-01 21:40:15 +11:00
Daniel Martí
3b5509ff4b Fix changelog markdown 2014-01-30 17:01:18 +01:00
Daniel Martí
2a8c570a00 Release 0.59-test 2014-01-29 23:45:42 +01:00
Daniel Martí
a01bcd6be2 Don't use find in fix-ellipsis 2014-01-29 23:44:49 +01:00
Daniel Martí
102ff2d0be Run remove-unused-trans 2014-01-29 23:44:04 +01:00
Daniel Martí
cb68daa7f9 New script: remove-unused-trans 2014-01-29 23:43:56 +01:00
Daniel Martí
b8998d711a Run fix-ellipsis.sh 2014-01-29 23:33:39 +01:00
Daniel Martí
d553b07af2 Update submodules 2014-01-29 23:33:22 +01:00
Daniel Martí
c8016e9af2 Merge commit 'refs/merge-requests/52' of gitorious.org:f-droid/fdroidclient 2014-01-29 23:29:27 +01:00
Peter Serwylo
f098b9c6d8 Trim search string before querying for apps.
Fixes issue #452. It turns out that recent versions of android do
this automatically, but my gingerbread emulator didn't.

In the process, I also refactored the getQuery method. It was previously
a void method that modified the state of the search view, which is a
bit counter-intuitive given it's name. Instead, I made it just a getter,
which calculates the query and returns it. That way, I was able to remove
mQuery from the fields in the search view. Generally, the less state we
need to worry about (e.g. fields in an object), the less assumptions we
need to make about whether that field has been set or not.
2014-01-30 20:22:35 +11:00
Peter Serwylo
4a7f0ef9a2 Resolve memory issue when updating repo.
Solves issue # 453. Previously, it was reading one line at
a time of the index file. Turns out that the entire index is
only on about 5 lines, thus the 5th line is about 2mb. The
solution here is to switch to reading a fixed length of 4096
characters at a time rather than entire lines. This ends up
a bit more complex (because I wrote a custom tokenizer rather
than being able to use Java String methods such as indexOf).

There are still other memory issues on low memory devices,
to do with trying to parse ~1000 app value objects into memory,
each with numerous string objects associated with them. But
that particular issue will be solved in the future, with
the ContentProvider stuff.
2014-01-30 10:18:29 +11:00
Hans-Christoph Steiner
772004756e handle new signed repo with only fingerprint, no pubkey yet
A new repo can be added with only the fingerprint of the signing key, while
the regular tests are based on the entire public key (repo.pubkey). This
checks for the case when a repo only has the fingerprint and no pubkey yet.
In that case, it the pubkey presented by the index.jar file against the
stored fingerprint.  If they match, then the whole pubkey in the index.jar
is stored.
2014-01-28 20:31:47 -05:00
Hans-Christoph Steiner
04b5db1f4c update display of signing key fingerprint
Update Utils.formatFingerprint() to create a more readible version of the
SHA-256 fingerprint of the signing key of the repo.
2014-01-28 20:31:47 -05:00
Hans-Christoph Steiner
a02f985efa for signed repo with public key, guarantee fingerprint is also set
The stored fingerprint is checked when a repo URI is received by FDroid to
prevent bad actors from overriding repo configs with other keys. So if the
fingerprint is not stored yet, calculate it and store it. If the fingerprint
is stored, then check it against the calculated fingerprint just to make sure
it is correct. If the fingerprint is empty, then store the calculated one.

This was in place before, but it needed to be updated for the new Repo
ContentProvider.
2014-01-28 20:31:46 -05:00
Hans-Christoph Steiner
7b7da9a110 when receiving a repo URI with wifi info, warn user if on different wifi
A repo URI can include info such as the current wifi SSID and BSSID that
the repo is hosted on.  This is for when local repos are transmitted via
QRCode, NFC, etc.  The receiver of this URI then checks to make sure it is
on the same wifi access point, and warns the user if not.

In the future, it should do more than just warn the user, but instead give
concrete actions for the user to take, like associating to that wifi.
2014-01-28 20:31:46 -05:00
Hans-Christoph Steiner
7c67db22f3 reformat repo URIs to allow wifi, fingerprint, etc. in query string
Instead of ramming the fingerprint in the user field of the URI, use the
query string.  Having the fingerprint in the user field was confusing some
browsers because it was trying to log in.  The query string is the standard
place for such meta data, and has lots of room for expansion including
things like wifi network names. This will be useful later to determine if
both devices are currently on the same wifi network, and if they are local
repos, they should try syncing.
2014-01-28 20:31:46 -05:00
Hans-Christoph Steiner
126d96e4ba prevent soft keyboard from popping up on RepoDetails
Its quite annoying to have the URI EditText in focus and the soft keyboard
pop up when viewing the RepoDetails since the vast majority of the time,
the user will be viewing the info there, not editing the URL.

This commit just moves the focus to the frame, and prevents the soft
keyboard from showing up by default.  The user can still click on the URI
EditText to edit it and the soft keyboard will pop up.
2014-01-28 20:31:46 -05:00
Daniel Martí
510e8e1ba5 Replace HashSet types with Set 2014-01-29 01:02:03 +01:00
Daniel Martí
50ee88fbc7 Update AndroidPinning, get rid of -t android-17 2014-01-23 18:59:35 +01:00
Daniel Martí
6819d678a5 Pull from AndroidPinning, which lowers minsdk from 8 to 5 2014-01-23 09:55:48 +01:00
Daniel Martí
93de06aded Fix tabbing in RepoDetailsFragment 2014-01-23 09:47:33 +01:00
Hans-Christoph Steiner
bcb7c048b5 protect ManageRepo from malformed incoming URIs
URIs can come from clicking a web page, NFC transmission, QR Code scan, and
more.  This code stops badly formed Uri strings from crashing F-Droid.  It
then shows a Toast error message that it can't understand the incoming URI.
2014-01-22 22:12:52 -05:00
Hans-Christoph Steiner
ea9dec34b3 include upper case URI schemes for matching URIs from QR Codes
Android's scheme matcher is case-sensitive, so include
ALL CAPS versions to support ALL CAPS URLs in QR Codes.
QR Codes have a special ALL CAPS mode that uses a reduced
character set, making for more compact QR Codes.

This reverts:
We should not encourage all caps urls
2651b81792bdeed0db3c3960d0b7283536611012
2014-01-22 22:07:03 -05:00
Peter Serwylo
1f38a84fa9 Replaced repoId constructer argument with setArguments()
As suggested by android lint.
Also removed unused imports.
2014-01-23 14:02:47 +11:00
Peter Serwylo
f8893431fb Refactored Repo db access from DB class to ContentProvider.
The performance improvement from this will not be noticable (perhaps
there isn't one), however it is part of the bigger plan to move all of
the DB access to ContentProviders. This will make a big improvement to
the startup time of the app, given we are currently loading all of the
apps to populate the list of apps.

It will come at the cost of some apparantly weird code convensions. Most
notably, when loading data from a content provder, you only ask
for the fields that you intend to use. As a result of my Helper class which
converts results from the content providers cursor into Repo value objects,
there is no guarantee that certain attributes will be available on the
value object. E.g. if I load repos and only ask for "_ID" and "ADDRESS",
then it is meaningless to ask the resulting Repo object for its "VERSION"
(it wont be there), despite it being a perfectly legal attribute from
the Java compilers perspective.

Repo.id field has also been made private (sqlite is the only
entity should be able to set id's), and made id a long (sqlite stores
identifiers as longs rather than ints).
2014-01-23 13:03:07 +11:00
Daniel Martí
cad37b0d55 Revert AB.setTitle, support titles before 3.0 too 2014-01-22 10:05:49 +01:00
Hans-Christoph Steiner
cbb182c18a add method for updating a single repo while leaving the rest as is
Now, clicking Update in "Repo Detail" only updates that repo, not all of
the repos.  This will also be very useful for more transitory repos, like
p2p repos that are reached via bluetooth, local wifi, etc.
2014-01-21 21:52:56 -05:00
Hans-Christoph Steiner
10106bf6dd reorganize update process to set up updating individual repos
This keeps the same logic as was in place before, but splits out code from
onHandleIntent() so that it can be used to update specific repos, rather
than always updating all repos.  This is needed for transient repos, like
p2p repos connected via bluetooth or local wifi.
2014-01-21 20:54:59 -05:00
Hans-Christoph Steiner
62008e85c6 show repo name in ActionBar in "Repo Details"
Before, "Repo Details" always had a title of "Repositories". Now
it shows the name of the repo as the title.  This also enables the
ActionBar back button (aka "display home as up") to return to
"Manage Repos".
2014-01-21 19:21:34 -05:00
Hans-Christoph Steiner
526c978328 add ActionBarCompat.setTitle() method
Now the title can be easily set in the ActionBar to reflect the current
Activity.
2014-01-21 19:17:06 -05:00
Hans-Christoph Steiner
47659b5cec relabel misnamed items from "signature" to "repo fingerprint"
In the new Repo Details screen, there is some elements that are labels as
the "signature".  This is not quite right, it is actually referring to the
fingerprint of the repo signing key.  Since a repo will also usually have a
HTTPS certificate fingerprint, there will also be a fingerprint for that
certificate.
2014-01-21 18:30:02 -05:00
Hans-Christoph Steiner
4cd73c12f0 add my recent changes to the changelog 2014-01-21 16:56:41 -05:00
F-Droid Translatebot
7e87f8b81f Translation updates 2014-01-21 11:23:43 +00:00
Daniel Martí
fd998b7566 Avoid possible crashes when checking signatures
Might fix https://f-droid.org/forums/topic/nullpointerexception-when-trying-to-update-puzzles
2014-01-20 14:32:21 +01:00
Daniel Martí
077548eb72 Note that automatic building via gradle is not supported 2014-01-19 20:50:11 +01:00
Daniel Martí
b734b210e3 Add pd0x's entries to changelog 2014-01-19 20:47:39 +01:00
Daniel Martí
1f99c00899 Revert "New setting: "Small screen" to avoid ellipsizing on small screens"
This reverts commit a5c66a8c6ed9c9fd174aeb448e428d288e52f1e1.

Conflicts:
	src/org/fdroid/fdroid/AppDetails.java
2014-01-17 21:06:37 +01:00
Daniel Martí
9500c987cc Finish getting rid of hard-coded preferences 2014-01-16 09:40:24 +01:00
Daniel Martí
305daf5a10 DB.java: remove unused prefs, use pref names from Preferences.java 2014-01-15 23:51:24 +01:00
Daniel Martí
d99e3edb52 Incompatible apks are always in memory, no need to reload 2014-01-15 23:48:42 +01:00
Daniel Martí
a6ed36808d Don't show permissions list if there are no versions shown 2014-01-15 23:45:11 +01:00
Daniel Martí
4a70097c64 Show version updates in the updates tab 2014-01-15 23:44:56 +01:00
Kevin Everets
ca1a07677a Move up the setting of Prefences in AppDetails so they are actually respected
Without this, no matter how the user set the preferences, they could not see
incompatible APKs in the AppDetails.
2014-01-15 16:12:33 -05:00
Kevin Everets
68067a81c9 Show incompatible reasons if they exist 2014-01-15 16:12:33 -05:00
Kevin Everets
763b4d3ea0 Keep track of the reason that an apk is incompatible 2014-01-15 16:12:30 -05:00
Daniel Martí
d8df407b02 Don't hard-code apks.get(0) when showing permissions 2014-01-15 16:33:09 +01:00
Daniel Martí
b58cb74612 Revert "Specify that the version is for Android"
This reverts commit aff6a03fa2c2ea84cee6597a44dcfb32fa7006f5.

Conflicts:
	res/values/strings.xml
2014-01-14 13:27:04 +01:00
Daniel Martí
99808969d7 Get rid of remaining UPDATE_REPO stuff from FDroid.java 2014-01-10 23:32:53 +01:00
Daniel Martí
27452ac31b Use View.GONE instead of setText("") 2014-01-10 22:52:35 +01:00
Daniel Martí
3567d9e113 Make fix-ellipsis.sh more accurate
* Don't do dirs like res/layout
* Do xml files other than strings.xml like arrays.xml
2014-01-10 22:41:50 +01:00
Daniel Martí
3ae9fd7b88 Try to support AndroidPinning via gradle (won't work as-is) 2014-01-10 22:37:26 +01:00
Daniel Martí
a5c66a8c6e New setting: "Small screen" to avoid ellipsizing on small screens 2014-01-10 22:12:57 +01:00
Daniel Martí
7c472c8e18 Merge branch 'development' 2014-01-10 22:06:43 +01:00
Daniel Martí
15c1b98d5c Release 0.58 2014-01-10 21:29:25 +01:00
Daniel Martí
6a49d9656c Update changelog 2014-01-10 21:02:27 +01:00
Daniel Martí
b9628a6960 Merge branch 'master' into development 2014-01-10 18:03:45 +01:00
Daniel Martí
9f4bfe015c Fix: Use PreferencesActivity resultCodes properly
This fixes useless restarts/reloads, and missing ones too.
2014-01-10 18:03:02 +01:00
Daniel Martí
9b28fde89f Rename build.prop to ant.prop, add ant-prepare.sh 2014-01-09 12:35:38 +01:00
Daniel Martí
350d77aec6 Merge branch 'master' into development 2014-01-09 12:25:35 +01:00
Daniel Martí
c0fad0fe26 Fix: Don't crash if an app has no categories 2014-01-09 12:25:20 +01:00
Daniel Martí
2d3c333b21 AndroidPinning uses a weird target, force android-17 2014-01-08 23:55:16 +01:00
Daniel Martí
1c988a0b5a DBHelper refactor fix: re-add version column 2014-01-08 23:54:59 +01:00
Daniel Martí
a666b53ace Add ignore=dirty to submodules 2014-01-08 23:44:44 +01:00
Daniel Martí
30140d7a3b Indenting fixes 2014-01-08 23:23:32 +01:00
Daniel McCarney
254327f9a7 Adding support for SPKI pins, trust-on-first-use of TLS certs.
In order to support F-droid repositories hosted with HTTPS using
a self-signed certificate the f-droid client should prompt the user to
trust or 'memorize' the certificate presented by a repository. The
MemorizingTrustManager[0] project enables easy integration of
a prompting activity and corresponding trust manager implementation.
This behaviour is useful to projects such as Kerplapp[1] that boostrap
an F-droid repository on a user's device where it isn't possible to
acquire a long lived CA vetted TLS certificate.

In addition to Trust-on-First-Use (TOFU) behaviour, this patch
integrates the PinningTrustManager [2] project by Moxie Marlinspike to
allow the FDroid client to ship a hardcoded set of Subject Public Key
Identifier pins [3] for the official FDroid repository TLS certificate,
and the Guardian Project TLS certificate. Additional pins can be added
to the FDroidPins.java class.

The upstream release of AndroidPinning by moxie0 uses a minsdk value of
8. The Fdroid client has a minsdk of 5, presenting compatibility issues
using the AndroidPinning lib as a submodule. Fortunately it seems there
is no technical reason preventing using a minSDK of 5 with
AndroidPinning. I have created a fork with this change and submitted
a pull req upstream. Until this pull is merged we can use my fork of
AndroidPinning as the submodule.

The new 'flow' for deciding if a repositories presented TLS certificate
should be trusted is as follows:

1) If the certificate was previously trusted by a TOFU action, then the
   certificate is accepted as trusted

2) If the certificate wasn't previously trusted by a TOFU action but
   there is a matching SPKI pin then the certificate is accepted as
   trusted

3) If the certificate wasn't previously trusted by a TOFU action and
   there is no SPKI pin but the certificate is signed by a trusted
   Certificate Authority it is accepted as trusted (This is the
   behaviour of the FDroid client prior to this patch with all other
   conditions being a hard-fail).

4) If the certificate wasn't previously trusted by a TOFU action and
   there is no SPKI pin and the certificate is not signed by a trusted
   CA (i.e. self signed or otherwise) then the user is prompted to TOFU
   the certificate. The user may choose to trust the certificate for the
   current connection or forever. If the user chooses an option other
   than "deny" the certificate is accepted as trusted for the specified
   duration.

Users currently using a TLS protected repository will see *no
difference* in user experience after this patch is merged as the only
TLS protected repositories that would function prior to this patch were
providing certificates that match condition #3.

[0] https://github.com/ge0rg/MemorizingTrustManager/wiki/Integration
[1] https://github.com/guardianproject/kerplapp
[2] https://github.com/moxie0/AndroidPinning
[3] https://www.imperialviolet.org/2011/05/04/pinning.html
2014-01-08 11:01:12 -08:00
Daniel Martí
9fd22c92ff Add super-fdroid TODO 2014-01-08 15:36:20 +01:00
Daniel Martí
f8d235fb43 Merge commit 'refs/merge-requests/37' of gitorious.org:f-droid/fdroidclient into super-fdroid
Conflicts:
	lint.xml
	src/org/fdroid/fdroid/AppDetails.java
2014-01-08 15:35:58 +01:00
Daniel Martí
5f22877e1c Merge branch 'master' into development 2014-01-08 15:06:29 +01:00
Daniel Martí
5b4c40fe07 Log the icons dir for the device density 2014-01-08 15:05:36 +01:00
Daniel Martí
7279dfacac ViewHolder classes are now private 2014-01-08 14:59:07 +01:00
Daniel Martí
ff9620caf5 Add build.properties with the same encoding as gradle 2014-01-08 14:18:04 +01:00
Daniel Martí
dc5dd51462 Specify UTF-8 in build.gradle 2014-01-08 14:14:43 +01:00
Daniel Martí
499c9e50c5 Move "https://" addrepo default into a string 2014-01-08 13:36:45 +01:00
Daniel Martí
3f19888b11 res/drawable/btn_check_*.png are no longer used 2014-01-08 13:32:51 +01:00
Daniel Martí
fe0fe0e6a2 Merge branch 'master' into development 2014-01-08 13:14:59 +01:00
Daniel Martí
3aed80d94b Fix: Don't show "1.0" when sdkLevel is not known yet 2014-01-08 13:14:20 +01:00
Daniel Martí
ac739de345 Run fix-ellipsis for the first time 2014-01-08 13:09:53 +01:00
Daniel Martí
648f23e15a Add fix-ellipsis script 2014-01-08 13:09:41 +01:00
Daniel Martí
03dc389f85 Update change-package-name.sh 2014-01-08 13:06:53 +01:00
Daniel Martí
91cf8c9472 Add lint.xml with ignores for MissingTranslation 2014-01-08 13:04:00 +01:00
Daniel Martí
8411dd4f9c Use the same DateFormat for the DB and XML parsing, English locale 2014-01-08 12:55:48 +01:00
Daniel Martí
fe41108ed6 Always use Locale.ENGLISH for hashes/fingerprints 2014-01-08 11:58:26 +01:00
Daniel Martí
98d574afbf Switch was added in the sdk level 14, not 11 2014-01-08 11:39:26 +01:00
Daniel Martí
c274752477 Actually use the compat class in ClipboardCompat and SwitchCompat 2014-01-08 11:29:03 +01:00
Daniel Martí
f1c7846605 Refactor cpuAbis to compat/SupportedArchitectures
Changes:

* Use HashSet instead of ArrayList
* Print all the abis on Log.d instead of just the first one
* Get rid of lintian warnings
2014-01-08 11:21:35 +01:00
Daniel Martí
61ba6d52d0 Change # for Number in @string/repo_num_apps 2014-01-08 10:38:19 +01:00
Daniel Martí
5296bf1477 Remove *.orig files 2014-01-08 10:36:39 +01:00
Daniel Martí
943253084b Use a ViewHolder for the ApkList too 2014-01-08 10:35:30 +01:00
Daniel Martí
b4a51c4a91 Merge branch 'master' into development 2014-01-08 09:50:04 +01:00
Daniel Martí
4edd90d7aa Remove translations of removed strings 2014-01-08 09:49:29 +01:00
Daniel Martí
abc3631b16 Merge branch 'master' into development 2014-01-07 23:57:25 +01:00
Daniel Martí
837683217b Release 0.57-test 2014-01-07 23:49:23 +01:00
Daniel Martí
db01c9c476 Merge branch 'master' into development 2014-01-07 23:36:38 +01:00
Daniel Martí
d3686de3cd Support /icons-* per-density icon folders (repo version 11) 2014-01-07 18:23:26 +01:00
Daniel Martí
9709b4f51c No need to use String.format explicitly 2014-01-07 17:50:36 +01:00
Daniel Martí
3d66f7f311 Pull UIL from master again 2014-01-07 17:45:57 +01:00
Ciaran Gultnieks
a2fb86f518 Remove bogus translations 2014-01-07 16:28:10 +00:00
F-Droid Translatebot
34211bb1b7 Translation updates 2014-01-07 16:13:48 +00:00
Daniel Martí
72c2a6a942 README fix; Plain SVG doesn't fix possible rendering issues 2014-01-07 09:37:58 +01:00
Daniel Martí
9e30d442e1 Add README specifying that the svg files are from inkscape 2014-01-07 09:13:00 +01:00
Daniel Martí
e8337aad30 Revert "getApps(): Start Map size with the number of apps we have"
This reverts commit 21747dcf408bef108187588c5ba8b8d72c4b34dc.
2014-01-07 08:55:32 +01:00
Peter Serwylo
c1ccdcfca8 Merge branch 'master' into development
Conflicts:
	src/org/fdroid/fdroid/DB.java
	src/org/fdroid/fdroid/FDroid.java
	src/org/fdroid/fdroid/RepoXMLHandler.java
2014-01-06 15:05:37 +11:00
Peter Serwylo
a6379a8006 Oops, removed files accidentally added with 'git add .' 2014-01-06 11:45:16 +11:00
Peter Serwylo
1bed5ff87c Removed update repo from AB. Fix for new installs with repo version. 2014-01-06 11:17:25 +11:00
Peter Serwylo
5591104c21 Refactored DBHelper out of DB class.
This will be required for ContentProviders, because the need
SQLiteOpenHelpers (or whatever they are called) in order to work,
and having it as a subclass of DB wouldn't quite work for that.
2014-01-05 20:11:54 +11:00
Peter Serwylo
66cde1d88b Fix bug causing incorrect repos to silently be enabled. 2014-01-05 19:41:07 +11:00
Peter Serwylo
d80f2d58ad Merge branch 'development' into experimental/refactor-update
Conflicts:
	src/org/fdroid/fdroid/RepoXMLHandler.java
	src/org/fdroid/fdroid/Utils.java
2014-01-05 19:22:30 +11:00
Peter Serwylo
b863802479 Merge branch 'master' into experimental/refactor-update 2014-01-05 09:54:42 +11:00
Peter Serwylo
70576c72be Reinsted accidentally removed code. Removed refresh repos action item. 2014-01-05 09:35:50 +11:00
Peter Serwylo
783d6aa4d1 Minor fix after conflict resolution. 2014-01-04 21:30:09 +11:00
Peter Serwylo
3731ed8f23 Merge remote-tracking branch 'upstream/master' into improvement/16/manage-repos
Conflicts:
	res/values/strings.xml
	src/org/fdroid/fdroid/DB.java
	src/org/fdroid/fdroid/ManageRepo.java
	src/org/fdroid/fdroid/RepoXMLHandler.java
	src/org/fdroid/fdroid/Utils.java
2014-01-04 20:45:52 +11:00
Peter Serwylo
ffa2c962dc Merge branch 'master' into improvement/16/manage-repos
Conflicts:
	res/layout/appdetails.xml
	res/values/strings.xml
	src/org/fdroid/fdroid/DB.java
	src/org/fdroid/fdroid/FDroid.java
	src/org/fdroid/fdroid/ManageRepo.java
2014-01-04 20:19:27 +11:00
Daniel Martí
c262a8dd52 Preliminar changelog entry for the next stable release 2014-01-04 01:48:42 +01:00
Daniel Martí
9b88a14566 Be more specific in .gitignore 2014-01-04 01:48:21 +01:00
Daniel Martí
14d7ce38fd Specify what version_name means in the index.jar address 2014-01-04 01:25:45 +01:00
Daniel Martí
c6e9002f2c Use a literal string for versionName in AM.xml
It's handier to have just the one resource version_name, but lint gets very
angry at this (and there must be a reason for that). We must not forget to
update the resource in res/values/no_trans.xml, since it's still used in the
code.
2014-01-04 01:23:32 +01:00
Daniel Martí
3b5e883397 Translation string format inconsistencies should not be caught in java
They should not exist at all, i.e. our translatebot should not allow them in
(they break things in other places, not just here)
2014-01-04 01:09:33 +01:00
Daniel Martí
fa08a8cfa4 Get rid of unused TargetApis 2014-01-04 01:04:40 +01:00
Daniel Martí
21747dcf40 getApps(): Start Map size with the number of apps we have 2014-01-03 22:55:03 +01:00
Daniel Martí
463561d971 Use a ViewHolder static class to avoid most findViewById calls 2014-01-03 22:18:11 +01:00
Daniel Martí
bd2e379073 Keep the same inflater in the AppListAdapter 2014-01-03 22:05:34 +01:00
Daniel Martí
e9abbfa743 Add 'repo.version' integer 2014-01-03 20:47:08 +01:00
Daniel Martí
eeeace080f Start cpuAbis at length 2, place secondary abi at second position 2014-01-03 20:29:02 +01:00
Daniel Martí
066f67bcd4 Default to minSdk version "1.0" 2014-01-03 17:55:33 +01:00
Daniel Martí
aff6a03fa2 Specify that the version is for Android 2014-01-03 17:55:23 +01:00
Daniel Martí
105390fa88 Revert "Add very basic support for <provides>"
This reverts commit bc74d97195417814193ce9ccfa838f0730310821.

Conflicts:
	src/org/fdroid/fdroid/DB.java
2014-01-03 07:40:42 +01:00
Daniel Martí
4d94295864 Switch to "apks" apk cache dir, use internal cache when external is not available 2014-01-03 06:55:28 +01:00
Daniel Martí
8a90687867 Slightly larger margin separating minsdk 2014-01-03 04:47:42 +01:00
Daniel Martí
5cde91ef23 Show text in the update AB icon 2014-01-03 02:56:25 +01:00
Daniel Martí
aee57c448b Sightly more margins in app list views 2014-01-03 02:52:12 +01:00
Daniel Martí
50f68d34b9 Support minSdk info in version list views 2014-01-03 02:44:24 +01:00
Daniel Martí
ab6f41ec68 More layout tweaks, fix landscape 2014-01-03 02:17:32 +01:00
Daniel Martí
9c61ccebdb Place the update repos button in the Action Bar 2014-01-03 01:16:24 +01:00
Peter Serwylo
fe7c77ad03 Merge branch 'master' into experimental/refactor-update
Conflicts:
	src/org/fdroid/fdroid/RepoXMLHandler.java

Only conflict was renaming "apps" to "appList" in a block of code
that I removed.
2014-01-03 08:01:13 +11:00
Peter Serwylo
535d343faf Fixed update code to work with signed repos that haven't changed. 2014-01-03 06:15:45 +11:00
Daniel Martí
2226d5a23a Remove obsolete bits from .gitignore 2014-01-02 13:46:29 +01:00
Daniel Martí
b35bb9b1f5 Add TargetApi lines to compat/* to suppress many lint warnings 2014-01-01 22:30:01 +01:00
Daniel Martí
e8d3a7a4ef Raise minSdk to 5, UIL requires it 2014-01-01 22:22:21 +01:00
Daniel Martí
f4e23bb2ed Buildfix 2014-01-01 22:09:33 +01:00
Daniel Martí
cd00760cc4 Remove compact icons, replace installed with a symbol 2014-01-01 21:45:20 +01:00
Daniel Martí
753bc43452 Use AppDetails title as indicator where we come from 2014-01-01 21:34:41 +01:00
Daniel Martí
771947536e Add categories to AppDetails, layout tweaks 2014-01-01 21:08:41 +01:00
Peter Serwylo
2b1c335ea9 Refactored updating code to make future modifications easier.
Rebased several months of work, and attempted to resolve any conflicts.
The conflicts were a tad more difficult than usual to resolve because they
were in files where large blocks of code were refactored into different
files, and git didn't realise.

Conflicts:
	src/org/fdroid/fdroid/RepoXMLHandler.java
	src/org/fdroid/fdroid/UpdateService.java
2014-01-02 06:28:15 +11:00
Daniel Martí
e302baa340 Do paddings for the icon and not the whole applist item 2014-01-01 17:09:01 +01:00
Daniel Martí
214c920afd Do AddItems with addAll on AppListAdapter 2014-01-01 16:06:42 +01:00
Daniel Martí
219443b5a7 Fix support for 1.6 (4), fixes #414 2014-01-01 14:52:14 +01:00
Daniel Martí
b31d8cb55b Temporarily remove en-rGB, mainly since it breaks the whole app 2014-01-01 14:46:33 +01:00
Daniel Martí
b4cee703f2 applistitem centering tweaks 2014-01-01 02:15:27 +01:00
Daniel Martí
56cb8ccdda Update summaries via methods, greatly decreasing source lines 2014-01-01 02:09:16 +01:00
Daniel Martí
962521947e Last pref summary: notifications 2014-01-01 01:47:10 +01:00
Daniel Martí
de40bed7e1 Do expert mode summary 2014-01-01 01:43:52 +01:00
Daniel Martí
6c9a375b27 Do db sync and apk cache settings summaries too 2014-01-01 01:32:33 +01:00
Daniel Martí
abef4f36e0 Do incompatible versions and permissions settings too 2014-01-01 01:20:21 +01:00
Daniel Martí
65981e3a25 Do updateHistoryDays summary like the others 2014-01-01 01:13:01 +01:00
Daniel Martí
d1d88ea26b Update summaries on onResume() consistently 2014-01-01 01:03:25 +01:00
Daniel Martí
177b2a170d Show value for the theme pref too, no dummy defualt summaries 2014-01-01 00:42:27 +01:00
Daniel Martí
02bac89b17 Do on/off and value summaries for auto updates 2014-01-01 00:38:47 +01:00
Daniel Martí
1b6a643b9c Start doing checkbox preferences with on/off summaries 2013-12-31 21:59:46 +01:00
Daniel Martí
1b83bf38ac Move pref names to Preferences.java 2013-12-31 21:35:37 +01:00
Daniel Martí
aaad028f3a Use OnSharedPreferenceChangeListener, recommended and easier to use 2013-12-31 21:29:38 +01:00
Daniel Martí
994610c516 TODO done: Use a HashMap when updating app lists 2013-12-31 20:46:21 +01:00
Daniel Martí
ea0eae6b11 Small changes to SearchResuts 2013-12-31 14:49:34 +01:00
Daniel Martí
d1d1201a6e Add missing dogecoin bit to RepoXMLHandler 2013-12-31 12:12:32 +01:00
Daniel Martí
1e4fe9fa2c Add basic dogecoin donation support 2013-12-31 12:11:03 +01:00
Daniel Martí
a189ff6e4e Replace UnlimitedDiscCache with LimitedAgeDiscCache and 30 days (fixes #190) 2013-12-31 11:35:00 +01:00
Daniel Martí
67ec0f748c Separate status and license from name and summary in app lists 2013-12-31 11:27:19 +01:00
Daniel Martí
bc74d97195 Add very basic support for <provides> 2013-12-31 11:16:46 +01:00
Daniel Martí
e437898e33 Further fixes to layouts 2013-12-31 11:03:34 +01:00
Daniel Martí
5ef87602ca Update UIL, release 1.9.1 2013-12-31 11:03:34 +01:00
Daniel Martí
fa02eb5733 Small tweaks to paddings and layouts 2013-12-31 11:03:34 +01:00
Daniel Martí
70fd272871 Replace * and -> with UTF symbols 2013-12-31 11:03:34 +01:00
Ciaran Gultnieks
47c0c2f6ab Remove invalid language 2013-12-29 13:28:42 +00:00
F-Droid Translatebot
d8e63240b6 Translation updates 2013-12-29 13:22:49 +00:00
F-Droid Translatebot
2db4f3f972 Translation updates 2013-12-29 12:55:24 +00:00
Daniel Martí
dc7df0fc5f Release 0.56-test 2013-12-26 00:12:46 +01:00
Daniel Martí
c306fe9157 Properly center elements in the app list views 2013-12-26 00:08:43 +01:00
Daniel Martí
03f2869281 Always load incompatible apks on memory 2013-12-25 22:48:12 +01:00
Daniel Martí
e3789631ba Restructure applistitem:
* Move it to the top right corner
* Don't let the app name overlap it
* Ellipsize version names to leave space for name
* Summary can now take two lines if it needs them
* Installed versions are now bold
2013-12-25 22:46:46 +01:00
Daniel Martí
f3b247dc81 Don't override old DisplayImageOptions entirely 2013-12-25 20:11:26 +01:00
Daniel Martí
960e04d425 Merge commit 'refs/merge-requests/55' of gitorious.org:f-droid/fdroidclient 2013-12-25 19:46:09 +01:00
Daniel Martí
5c722ff07b Update UIL 2013-12-25 19:36:27 +01:00
Daniel Martí
0df1426c8a Slightly more specific gitignore 2013-12-23 13:43:34 +01:00
Daniel Martí
7f09ff0c09 Bump gradle and build-tools versions 2013-12-22 14:15:17 +01:00
Daniel Martí
2651b81792 We should not encourage all caps urls 2013-12-16 10:23:21 +01:00
Daniel Martí
71be2d8e82 Avoid a couple possible NullPointerExceptions 2013-12-14 11:47:59 +01:00
Daniel Martí
e070883934 Remove empty overrides 2013-12-14 11:41:25 +01:00
Daniel Martí
744d46161e Remove unnecessary returns 2013-12-14 11:34:26 +01:00
Peter Serwylo
6bbb939e46 Refresh UI more appropriately.
When the repository is updated, it will check if the "name" or "description"
have been modified (or learnt for the first time) and if so, update the DB and UI.
2013-12-13 03:24:38 +11:00
Peter Serwylo
135ec1f0ff Merge branch 'master' into improvement/16/manage-single-repo 2013-12-12 10:53:14 +11:00
Peter Serwylo
8306007f84 UI tweaks for manage repos.
Padding for add repo dialog.
Move cursor to end of text input for new repo dialog.
2013-12-12 10:50:01 +11:00
Peter Serwylo
42d21bcbe9 Refresh view after updating new repo. 2013-12-12 10:34:25 +11:00
Daniel Martí
2ee5226d62 Remove wanted id instead of hard-coded 1... 2013-12-12 00:32:35 +01:00
Daniel Martí
a0a2fe4cf0 A few variable type fixes 2013-12-12 00:32:35 +01:00
Daniel Martí
ccbfa2744e Replace iterator with foreach 2013-12-12 00:32:35 +01:00
Daniel Martí
00a0f4399f Avoid a couple possible NullPointerExceptions 2013-12-12 00:32:35 +01:00
Daniel Martí
10fa5108da Delete a bunch of unused imports 2013-12-12 00:32:29 +01:00
Daniel Martí
9522edda74 Remove a couple unused vars 2013-12-12 00:14:26 +01:00
Daniel Martí
d042ed7508 Multiple appends are better than an append of a concatenation 2013-12-12 00:13:09 +01:00
Daniel Martí
f4fa7db8c8 Make a couple FDroid variables local as per lint suggestion 2013-12-12 00:12:52 +01:00
Peter Serwylo
8d44f6e444 Manage repo screen - constant sized list items, and update menu item. 2013-12-10 17:34:18 +11:00
Peter Serwylo
9384bc093b Refactored repo details fragment. 2013-12-09 18:41:53 +11:00
Daniel Martí
23dcfadefa Don't crash if an apk exists for a non-existing app 2013-12-07 13:00:10 +01:00
Daniel Martí
901112b29d Update UIL 2013-12-07 12:25:48 +01:00
Peter Serwylo
41e0919c6f Removed TODO, reimplemented delete repo. 2013-12-06 15:29:22 +11:00
Peter Serwylo
4fdc23569b Added update button to repo details screen. 2013-12-06 13:01:05 +11:00
Peter Serwylo
82af6fc60e Merge branch 'master' into improvement/16/manage-single-repo
Phew, monster merge. Going to commit after *seemingly* resolving
conflicts, but it will no doubt take a few compile and runs to sort out
any funny stuff.

Conflicts:
	AndroidManifest.xml
	res/layout/addrepo.xml
	res/layout/appdetails.xml
	res/layout/repolisticons.xml
	res/values/strings.xml
	src/org/fdroid/fdroid/DB.java
	src/org/fdroid/fdroid/FDroid.java
	src/org/fdroid/fdroid/ManageRepo.java
	src/org/fdroid/fdroid/UpdateService.java
2013-12-06 08:43:11 +11:00
Peter Serwylo
93fec74728 WIP: implementing context and action bar menus for repo management.
SwitchCompat will return a Switch or a ToggleButton depending on the
platform (doesn't matter, both are CompoundButtons) and this will be
added to the repo_item view programatically.

I'm using some pretty specific listeners
to communicate between the details fragment and the repo list activity.
I've also split the functionality (e.g. for deleting) between the repo
list and the details view. In the future, when we have content providers
for repos, it will be easier to take care of everything from the details
screen, and automatically notify the repo list of changes.

Refactored update service.
Now has a static update method that can be called which
will setup the required intent to begin the update. It also deals with
progress listeners and dialogs for the user, so all of this is moved out
of FDroid. This was so that RepoDetailsFragment can now invoke the same
functionality.
2013-12-05 13:04:33 +11:00
Ciaran Gultnieks
4d3b7967c4 Merge branch 'merge-requests/45' 2013-12-04 17:44:34 +00:00
Ciaran Gultnieks
831a1b40fa Merge commit 'refs/merge-requests/45' of git://gitorious.org/f-droid/fdroidclient into merge-requests/45 2013-12-04 17:44:31 +00:00
Ciaran Gultnieks
708518883a Merge branch 'merge-requests/44' 2013-12-04 17:42:32 +00:00
Hans-Christoph Steiner
1ad693931f if incoming repo Intent is handled, then return to the sending Activity 2013-12-02 21:55:55 -05:00
Hans-Christoph Steiner
f9d2fbb0ae if incoming repo already exists and is enabled, show Toast and hide dialog
No need to show the dialog if it won't let you take any action.
2013-12-02 21:50:08 -05:00
Hans-Christoph Steiner
c7b076e5ea add detailed checking of incoming repos based on fingerprint in DB
When a new repo is being added, whether manually or via an incoming Intent,
check the address and fingerprint against repos in the DB.  If the repo is
not in the DB, offer to add it.  If the repo address is in the DB, then do
more checks:

* If that address has no fingerprint in the DB, then offer to add the new
  repo including that fingerprint.  This might happen when upgrading a repo
  from unsigned to signed.
* if the incoming info matches a repo in the DB, offer to enable that repo
* if the address matches a repo in the DB but the incoming fingerprint does
  not match the fingerprint in the DB, warn the user, and tell them to
  delete the existing repo if they truly want to override the existing info
2013-12-02 21:50:08 -05:00
Hans-Christoph Steiner
711a1418b6 make DB.calcFingerprint() return null if pubkey is null
Handling it here seems to keep the flow simple.
2013-12-02 21:50:08 -05:00
Hans-Christoph Steiner
e063636d61 make all incoming repo URLs all lowercase 2013-12-02 21:50:08 -05:00
Hans-Christoph Steiner
ffc1f27e33 remove trailing spaces from .java files to placate the more finicky formats
the Eclipse Android mode loves to remove all trailing whitespaces quite
religiously.  This commit just removes trailing whitespace.  It was done
by running this:

sed -i 's/[[:space:]]*$//' *.java */*.java
2013-12-02 18:53:33 -05:00
Hans-Christoph Steiner
a3ac298ae4 narrowly tailor repo URL matching to avoid false matches
With so many patterns being matched, it is highly likely that there will be
false positives, i.e. random URLs will trigger the prompt of whether to use
F-Droid or not.  The updated set of patterns narrowly tailors the matches
so that it is highly unlikely to match URLs that are not fdroid repos, yet
still makes it useful both as a generic repo and a peer-to-peer
bootstrapping repo.

This set of patterns only matches URLs like this:

https://foo.org/fdroid/repo
https://foo.org/fdroid/repo/
https://foo.org/fdroid/repo/////

It does not match URLs like this:

https://f-droid.org/repo
https://myblog.com/thoughts-about-my-lovely-fdroid-repo
https://news.com/tag/repo
https://somesite.com/repo/this-is-my-stuff

It matches multiple slashes to since those are in effect the same URL, and
they sometimes show up as typos.  This does not include mvdan's proposal
for the 'fdroid-bootstrap' tag on the end because its not something that I
would use in this current project, so I don't know how best to apply it.  I
have no objection to the 'fdroid-bootstrap' proposal.
2013-12-02 15:37:49 -05:00
Daniel Martí
7dfe9eac24 Add basic gradle support 2013-11-27 15:47:13 +01:00
Daniel Martí
78caf63093 Update UIL to latest master 2013-11-27 15:23:55 +01:00
Ciaran Gultnieks
62ddbe5ce1 Database upgrade fix 2013-11-27 13:54:55 +00:00
Ciaran Gultnieks
2e21f8abba Support for displaying UpstreamNonFree 2013-11-27 11:26:52 +00:00
Ciaran Gultnieks
d21788569f Accept declaration of maxage from repos 2013-11-26 19:59:42 +00:00
Ciaran Gultnieks
7dc56e6009 Add database field to enforce max age on index (per repo) 2013-11-26 16:29:42 +00:00
Ciaran Gultnieks
46bcfcf015 Merge branch 'merge-requests/43' 2013-11-24 07:42:41 +00:00
Hans-Christoph Steiner
95f932f79f update database to store repo key fingerprint
The stored fingerprint is needed for comparing new, incoming repos that are
in the Add Repo dialog.  This is to prevent malicious use of the automated
adding of repos via QR Codes, NFC, etc.  The only other option that I could
think of for handling this situation is for the Add Repo dialog to open a
socket to the proposed repo to get its pubkey.  That seems much less
desirable than just storing the fingerprints in the database.
2013-11-23 13:42:22 -05:00
Hans-Christoph Steiner
ee21a2724c generate fingerprint as a hex String, leave formatting for display code
When the fingerprint is generated to be stored in the database in the repo
table, make it a single String that is a hex number.  This is a natural
format for working with the fingerprints programmatically.  The display
formatting can then be handled by the display code, and can freely change
without affecting the underlying function of the code.
2013-11-23 13:42:22 -05:00
Hans-Christoph Steiner
9b485bece3 switch repo key fingerprint to SHA-256 since SHA-1 is considered deprecated
* a number of sources have said to avoid SHA-1 in new implementations
* nothing currently depends on the SHA-1 fingerprint in the code, it is
  only used to display on the repo list.
* Java 7 requires SHA-256 to be included
* keytool -list -v shows the SHA-256 fingerprint
2013-11-23 13:42:22 -05:00
Hans-Christoph Steiner
fd28883429 break out signing key fingerprint calculation into its own method
This will be needed for checking an incoming repo URL with a fingerprint
included to see if that uri/fingerprint already exists in the database.
2013-11-23 13:42:22 -05:00
Hans-Christoph Steiner
240f03d372 add "proper" Java decorators that Android ADT insists on adding
Everytime I save a java file with Android ADT, it adds @Override decorators
and throws errors if a method is called that is not supported in API 4. My
setup might be more sensitive since its setup with the official Android
style plugin for Eclipse.  But the decorators are "correct" Java style, so
it would be nice to have them in F-Droid.
2013-11-23 13:39:26 -05:00
Hans-Christoph Steiner
c0eecabcca also match repo urls that have one, two or three extra levels to the path
Yes, you really have to do all this craziness to get it to match right!
2013-11-22 17:17:19 -05:00
F-Droid Translatebot
fbd7a0c8e7 Translation updates 2013-11-22 21:01:19 +00:00
F-Droid Translatebot
95af56a118 Translation updates 2013-11-22 20:08:59 +00:00
Ciaran Gultnieks
6a6c2287d4 Merge branch 'merge-requests/39' 2013-11-22 09:44:54 +00:00
Hans-Christoph Steiner
36da418660 add CheckBox to enable overwriting of existing repos when adding new ones
The "Add" button is disabled until the user turns overwrite on.  It should
prevent accidental overwriting, but I imagine this could be handled better.
2013-11-20 00:06:12 -05:00
Hans-Christoph Steiner
14c525e7ff add fingerprint field to Add Repo dialog, and alert if repo already exists
Previously, anything added via the Add New Repository dialog would just
overwrite any existing repo config that was there.  This has become a
bigger issue with the QR Code scanning since it could become an attack
vector.  This is the first step towards making this Add Repo dialog give
more info to the user about the state of things, and what the user might
replace by clicking OK.
2013-11-20 00:06:12 -05:00
Hans-Christoph Steiner
f5ce7d8588 simplify browse URL IntentFilter data for readability
Each piece of <data /> applies to the whole IntentFilter, so each scheme,
host, or pathPattern only needs to be stated once per IntentFilter.
2013-11-19 21:17:24 -05:00
Hans-Christoph Steiner
3301a57a01 handle incoming URIs based on patterns: "^https?://.*/(repo|archive)/*$"
This allows for clickable/scannable URIs for adding repos to F-Droid.
2013-11-19 15:04:48 -05:00
Hans-Christoph Steiner
6928bd1244 accept froidrepo and fdroidrepos URIs, which can be scanned via QRCode, etc
This patch makes F-Droid register with Android that it accepts the URI
schemes of fdroidrepo (HTTP) and fdroidrepos(HTTPS).  When F-Droid receives
one of these URIs, it launches the ManageRepo Activity and then launches
the New Repository dialog.

refs #2454
2013-11-19 10:56:38 -05:00
Aleksey Tulinov
d687b7341e Setting 32x32dp for compact layout, bumped summary to name 2013-11-17 22:09:04 +02:00
Aleksey Tulinov
89b15b534f Setting up ImageLoader for multiple loads to the same ImageView 2013-11-17 22:06:15 +02:00
Ciaran Gultnieks
1b8ea8f3d5 Handle unrecognises antifeatures more gracefully
This allows us to add new ones without making a mess in the client.
Prior to this change it would add empty lines, and also if the only
antifeature was an unrecognised one, would enable the antifeature view
box but with nothing in it. It should now ignore them completely.
2013-11-17 11:33:05 +00:00
Aleksey Tulinov
5786d014dc Shifted summary to the right of icon to give icon more space, aligned status with license 2013-11-17 06:42:33 +02:00
Aleksey Tulinov
4f717c663b Issue #413: removed "compacts" array to always re-layout reused views 2013-11-17 06:23:12 +02:00
Daniel Martí
5626adc574 Properly retab all layout xml files 2013-11-16 23:39:37 +01:00
Daniel Martí
a2b939d1fc AppList icons back to 40dp, AppDetails icons to real 48dp 2013-11-16 23:37:26 +01:00
Daniel Martí
0aeec1d2bb Merge commit 'refs/merge-requests/40' of gitorious.org:f-droid/fdroidclient 2013-11-16 23:28:52 +01:00
Daniel Martí
afb5762a71 Save ignore settings in onPause, fixes #409 2013-11-16 23:26:03 +01:00
Aleksey Tulinov
2ec7cb3e8d Changed app icon paddings into margins to fit 48x48dp exactly 2013-11-16 20:31:40 +02:00
Paul Sokolovsky
f7b3e0b81c finish(): Check for app non-null before accessing it.
finish() may be called from reset() which sets app to null. This issues
hits for example when clicking on wiki-link of an app which doesn't
currenty exist in client index, throws:

E/AndroidRuntime(17630): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.fdroid.fdroid/org.fdroid.fdroid.AppDetails}: java.lang.NullPointerException
E/AndroidRuntime(17630): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
E/AndroidRuntime(17630): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
E/AndroidRuntime(17630): 	at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime(17630): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
E/AndroidRuntime(17630): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(17630): 	at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime(17630): 	at android.app.ActivityThread.main(ActivityThread.java:3691)
E/AndroidRuntime(17630): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(17630): 	at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(17630): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
E/AndroidRuntime(17630): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
E/AndroidRuntime(17630): 	at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(17630): Caused by: java.lang.NullPointerException
E/AndroidRuntime(17630): 	at org.fdroid.fdroid.AppDetails.finish(AppDetails.java:1012)
E/AndroidRuntime(17630): 	at org.fdroid.fdroid.AppDetails.reset(AppDetails.java:353)
E/AndroidRuntime(17630): 	at org.fdroid.fdroid.AppDetails.onCreate(AppDetails.java:243)
E/AndroidRuntime(17630): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(17630): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
2013-11-16 19:32:30 +02:00
Ciaran Gultnieks
fbdda9dc77 Improve changelog 2013-11-11 10:18:39 +00:00
Ciaran Gultnieks
44c1dc2c44 Version 0.55 2013-11-11 10:12:32 +00:00
F-Droid Translatebot
2efba7f932 Translation updates 2013-11-11 09:49:35 +00:00
Daniel Martí
7d5179b38a Fix remaining crashes when switching categories 2013-11-10 20:14:29 +01:00
Daniel Martí
9b5c2656ee Fix crashes when trying to view categories (fixes: #408) 2013-11-10 18:55:35 +01:00
Daniel Martí
080bab482d Fix possible crashes when entering AppDetails 2013-11-10 18:55:35 +01:00
Daniel Martí
36cba44c07 Bump project target to android-19 2013-11-10 18:55:35 +01:00
Daniel Martí
dc18bab86f Show categories on older devices properly (fixes #406) 2013-11-10 18:55:35 +01:00
Daniel Martí
ddfbcff0cb Bump support-v4 to r19 2013-11-10 18:55:35 +01:00
F-Droid Translatebot
03acf2002a Translation updates 2013-11-09 15:35:29 +00:00
F-Droid Translatebot
13b3944ae7 Translation updates 2013-11-08 23:39:54 +00:00
F-Droid Translatebot
32cf4375ad Translation updates 2013-11-08 22:24:04 +00:00
Ciaran Gultnieks
5fa4dde379 Remove all android2po/pootle-related stuff
No longer required
2013-11-08 22:04:13 +00:00
Ciaran Gultnieks
87bb85bdf1 Merge branch 'master' of gitorious.org:f-droid/fdroidclient
Conflicts:
	res/values-el/strings.xml
	res/values-eu/strings.xml
	res/values-sr/strings.xml
	res/values-tr/strings.xml
	res/values-ug/strings.xml
	res/values-uk/strings.xml
2013-11-08 17:03:13 +00:00
Ciaran Gultnieks
1b948f2489 Remove mysterious quotes from translations 2013-11-08 17:01:08 +00:00
F-Droid Translatebot
c11fffb8f2 Translation updates 2013-11-08 16:42:53 +00:00
Ciaran Gultnieks
6dcdbcbf1d Revert "Translation updates"
This reverts commit ed7736e31021aab84d9d6134bcf574880a2445f3.
It's not handling multi-line strings properly on export.
2013-11-08 12:48:18 +00:00
F-Droid Translatebot
ed7736e310 Translation updates 2013-11-08 12:41:25 +00:00
Ciaran Gultnieks
2f8cd8e202 Translation updates 2013-11-08 12:19:43 +00:00
Ciaran Gultnieks
34884a4e30 Move a few values to no_trans.xml 2013-11-08 07:51:25 +00:00
Daniel Martí
9734328488 Small fixes to changelog 2013-11-05 11:01:51 +01:00
Ciaran Gultnieks
3853a21387 Non-ambiguous date format in changelog 2013-11-05 09:56:53 +00:00
Ciaran Gultnieks
2e86b7753b More user-friendly changelog 2013-11-05 09:56:21 +00:00
Daniel Martí
3cedecca0c Release 0.54 2013-11-04 23:13:47 +01:00
Ciaran Gultnieks
fd529d347b Translation updates 2013-11-04 21:52:10 +00:00
Daniel Martí
3c645ee49b Switch admin@ to team@ e-mail address 2013-11-04 18:25:45 +01:00
Daniel Martí
a6507bcc8c Small fixes 2013-11-04 12:30:30 +01:00
Ciaran Gultnieks
03adcc86c3 Translation updates 2013-11-04 07:38:13 +00:00
Daniel Martí
171680e50f Add theme array values to po ignores 2013-11-04 00:28:23 +01:00
Ciaran Gultnieks
85a653c013 Translation updates 2013-11-03 19:36:20 +00:00
Daniel Martí
8db488bbae Use new <categories> xml element, sort categories 2013-11-03 19:28:40 +01:00
Daniel Martí
a76a465cf1 Re-add theming, much better this time 2013-11-03 16:12:22 +01:00
Ciaran Gultnieks
5d57711fcb Translation updates 2013-11-02 18:30:45 +00:00
Daniel Martí
ed49eced45 Change setting "Incompatible apps" to "Incompatible versions"
Rather large rewrite, basically doing:
* Always show incompatible apps
* Don't fetch incompatible apks if the new setting is off
* Start using result codes when returning from PreferencesActivity
2013-11-02 18:27:02 +01:00
Daniel Martí
6a62b7979e Forgot to add default app drawables 2013-11-02 16:31:12 +01:00
Daniel Martí
533c16af0a Some changes to app list adapters
* Only change compact layout stuff when really needed
* No need to use StringBuilders in some cases
* No need to keep setting status and license to "" when in compact
2013-11-02 12:32:54 +01:00
Daniel Martí
154b0bda45 Don't repopulate app lists if no repos were changed on update (much faster) 2013-11-02 12:29:12 +01:00
Daniel Martí
dc88ba57e2 Update changelog 2013-11-02 11:01:22 +01:00
Daniel Martí
651f40ea25 Use launcher icon as notification icon on pre-3.0 devices 2013-11-02 10:57:49 +01:00
Daniel Martí
85b633750e Fix categories on pre-3.0 devices 2013-11-02 10:57:16 +01:00
Daniel Martí
327de12f1a Support multiple categories as CommaSeparatedList 2013-11-02 00:57:38 +01:00
Daniel Martí
be5dbbfc55 Easier and faster isInCategory 2013-11-02 00:55:52 +01:00
Daniel Martí
c7ace4ff8e New loading/default app icon (kudos to mray) 2013-11-01 19:53:18 +01:00
Ciaran Gultnieks
8e54bb95c5 Merge branch 'merge-requests/38' 2013-10-27 22:28:24 +00:00
Kevin Everets
b3f0034140 Change wording in App Details from "Update" to "Upgrade"
An "Update" in that context implies that the details will update, not
that the app itself will be upgraded.
2013-10-25 15:27:32 -04:00
Daniel Martí
bf225d870b Include brief translating instructions to README 2013-10-25 21:11:40 +02:00
Daniel Martí
17b33108c5 2 threads for 2.2 and lower instead of 1 2013-10-25 19:57:04 +02:00
Daniel Martí
f7531fcdb5 Place an empty drawable before icons are loaded; faster animations 2013-10-25 18:53:19 +02:00
Daniel Martí
1346d370cb More changes to make icons smooth on older devices
* Never do any kind of scaling (was only done in low resolution screens)
* Don't animate (fade-in) on older devices
2013-10-25 17:24:00 +02:00
Daniel Martí
8f7d09f41a Release 0.53-test 2013-10-24 21:04:02 +02:00
Daniel Martí
e2d5b619be Be nicer on phones with mid-low memory size 2013-10-24 20:56:17 +02:00
Daniel Martí
9f1df4d937 Add markdown changelog 2013-10-24 18:22:01 +02:00
Ciaran Gultnieks
bb425ca072 Translation updates 2013-10-24 17:20:10 +01:00
Daniel Martí
4091477dd8 Switch to new launcher design by mray, reogranize media/, run optipng 2013-10-24 18:00:29 +02:00
Daniel Martí
2483e5289e Ignore leading "pname:" on market search links 2013-10-24 17:44:09 +02:00
Daniel Martí
6facb9ae98 Search by app id as well 2013-10-24 17:38:30 +02:00
Daniel Martí
d6f0fbca98 New setting: Automatic app list updates only on wifi (fixes: #380) 2013-10-24 14:21:35 +02:00
Daniel Martí
f16234e084 Also keep ignoreThisUpdate integer between repo updates 2013-10-23 18:27:13 +02:00
Daniel Martí
1cc01b6c73 Fix crashes when changing ignore updates checkboxes 2013-10-23 18:14:54 +02:00
Daniel Martí
e1ad61a974 More coherent apklistitem padding 2013-10-23 18:14:41 +02:00
Daniel Martí
86af7638e8 Re-add filtering by Root 2013-10-23 17:53:36 +02:00
Daniel Martí
991b91dfdc Remove filter by root, replaced by ACCESS_SUPERUSER permission 2013-10-23 01:13:39 +02:00
Daniel Martí
804496b50b Set label for ACCESS_SUPERUSER if the system doesn't have it yet 2013-10-23 00:52:54 +02:00
Daniel Martí
4fb720e271 Capitalize permission labels 2013-10-23 00:52:46 +02:00
Daniel Martí
19712433bc Always show apps with AFs; Always display AF list in bold red at top of AppDetails 2013-10-23 00:52:25 +02:00
Daniel Martí
38b16f3f8f Bump target in proj.prop to match AM.xml 2013-10-22 17:39:37 +02:00
Daniel Martí
067fa54736 Update UIL from origin/master 2013-10-22 15:36:28 +02:00
Daniel Martí
fd8f7c6e74 Remove duplicate drawable 2013-10-22 15:34:25 +02:00
Daniel Martí
8669460088 Switch to proper updates notification iconography
Following http://developer.android.com/design/style/iconography.html

Original design and graphics by mray
2013-10-22 14:56:15 +02:00
Dominik Schürmann
2ae83e8785 Implements unattended install/delete of packages using Android internal APIs. This works if F-Droid is a system app, e.g., by preinstalling it on an Android rom 2013-10-19 19:48:36 +02:00
Daniel Martí
808c4cefc3 Added a little margin before the description 2013-10-17 22:23:06 +02:00
Daniel Martí
2528df2f10 Set ImageLoader workers to 2 * number of processors 2013-10-15 21:14:36 +02:00
Ciaran Gultnieks
aa3c1c4f33 Translation updates 2013-10-15 16:05:35 +01:00
Daniel Martí
e0f27edaff Also ignore fuzzy translations 2013-10-15 17:03:46 +02:00
Ciaran Gultnieks
19ce9c625e Translation updates 2013-10-15 15:08:47 +01:00
Daniel Martí
2707f49c43 Don't fetch our own PackageInfo (slight speed-up) 2013-10-15 16:04:05 +02:00
Daniel Martí
e6ef9889d0 Place strings not to translate in separate file 2013-10-15 14:42:13 +02:00
Daniel Martí
bae65cb49a Actually show the Donate submenu in app details 2013-10-15 14:38:24 +02:00
Daniel Martí
6ada30118e Don't crash when updating, handle "ignore this" between updates 2013-10-13 21:29:03 +02:00
Daniel Martí
ef389b90e8 More space to the search results string 2013-10-11 20:30:36 +02:00
Daniel Martí
18a08fb611 Lots of layout improvements
They are more consistent now. Transitioning to RTL languages will also be
easier since more of them can be mirrored now. Also fixes some spacing issues
with icons and others.
2013-10-11 20:25:18 +02:00
Daniel Martí
ae95ef1b74 Spacings after html lists are fixed. Better paddings. 2013-10-11 18:59:40 +02:00
Daniel Martí
31afbe0423 AppDetails Apk layout tweaks, show ABIs in expert mode 2013-10-11 18:20:23 +02:00
Daniel Martí
36ecacc021 Consistency in order of includes
1. Native java
2. Third party java
3. Native android
4. Third party android
5. Ours
2013-10-11 16:46:14 +02:00
Daniel Martí
9c7316eea9 Very small fixes to paddings 2013-10-11 16:38:56 +02:00
Daniel Martí
1d319009c4 Only calculate the current Apk (recommended version) once 2013-10-11 16:20:07 +02:00
Daniel Martí
f205b67cd5 Fix ActionBar Home button issues on 3.X-4.0.X 2013-10-10 21:58:03 +02:00
Ciaran Gultnieks
5977f10ee6 Translation updates 2013-10-10 20:25:47 +01:00
Daniel Martí
f2500bec15 New feature: "Ignore This Update". 2013-10-10 17:49:31 +02:00
Daniel Martí
1e5cda97c3 Send icon for "Donate", no icons for its submenu entries 2013-10-10 17:49:04 +02:00
Daniel Martí
9ea8eca7d5 Mark the AFs which block apks from being shown in bright red 2013-10-09 23:59:58 +02:00
Daniel Martí
9bf73529a7 Add support for Litecoin donations 2013-10-09 22:49:23 +02:00
Daniel Martí
c9159b8bff Make use of the new FadeIn constructor (only fade in on network/disk fetch) 2013-10-09 20:52:10 +02:00
Daniel Martí
a7e58c154c Run optipng on all png drawables 2013-10-08 23:14:29 +02:00
Daniel Martí
e3789c18fb Update UIL submodule 2013-10-08 20:56:40 +02:00
Daniel Martí
3c4a58b8a3 Fix issue with number of updates in notification 2013-10-08 19:56:57 +02:00
Daniel Martí
0624189905 Also check for null versionName when refreshing apps 2013-10-08 15:44:48 +02:00
Daniel Martí
eabf9cd654 Add a space after every bullet in a <li> element 2013-10-08 15:32:23 +02:00
Daniel Martí
5609b88250 Remove unnecessary space at the end of description 2013-10-08 15:32:23 +02:00
Daniel Martí
6e622e59ab Initial Anti-Feature list implementation
Also, move visibility stuff from onResume to onCreate (they are only affected
by preferences, i.e. onCreate will always be run since the preferences button
is only in our main activity).
2013-10-08 15:32:22 +02:00
Ciaran Gultnieks
1011c8fadc Translation updates 2013-10-08 12:21:34 +01:00
Daniel Martí
78ba64c2ec Add App.toUpdate as the filter result of App.hasUpdates (fixes #372) 2013-10-08 12:57:58 +02:00
Daniel Martí
458f163f7e Default installed apk versionName to "null" (closes #182) 2013-10-08 11:00:46 +02:00
Daniel Martí
a6128a3e47 Remove "Google Play"/"Market" menu button 2013-10-03 19:10:32 +02:00
Daniel Martí
96bcee1066 Try to fix HomeAsUp problems on 4.0 and below 2013-10-03 19:00:46 +02:00
Daniel Martí
430cb42d14 Fix crash when a new app appeared in the index 2013-10-03 18:49:03 +02:00
Daniel Martí
2650508999 Keep app.ignoreUpdates when updating app details with a new index 2013-10-01 20:20:59 +02:00
Ciaran Gultnieks
a876291f12 Translation updates 2013-10-01 08:04:47 +01:00
Daniel Martí
f84e0e4fd6 Release 0.52-test 2013-09-29 21:00:27 +02:00
Daniel Martí
6a90f94b17 Fade-in for icons at 200ms 2013-09-29 20:55:31 +02:00
Daniel Martí
953512cac9 Revert some icon changes, go back to using <icon> from the index 2013-09-29 20:45:47 +02:00
Daniel Martí
5aa2710362 Leave repo uri scheme handling for later, fix search schemes 2013-09-29 20:27:49 +02:00
Daniel Martí
82f87f677e Print vercodes when logging incompatibilities 2013-09-28 21:31:44 +02:00
Daniel Martí
082802cbba Fix remaining issues with notifications 2013-09-28 21:13:32 +02:00
Daniel Martí
fa1b53a81c Fix repo update notifications
* Get rid of getAppsBasic(boolean)
* Use FDroidApp to read apps from UpdateService
  - Don't read the SQL tables twice if updating manually
  - Use two app lists, not three
* Notify regardless of the previous updates count
2013-09-28 19:34:48 +02:00
Daniel Martí
60dcf7f12c Disable baseLineAligned on more LinearLayout elements 2013-09-27 18:04:01 +02:00
Daniel Martí
78e2e1bcc4 Avoid crashes when appid or repoUri are empty 2013-09-26 20:16:08 +02:00
Daniel Martí
40904ab75f Rename "Market" to "Google Play" 2013-09-26 13:12:11 +02:00
Daniel Martí
da5877c9c4 Add support for fdroid.search:<query> and market://search?q=<query> 2013-09-26 08:56:09 +02:00
Daniel Martí
17302321b8 Add support for fdroid.repo:https://repo/address 2013-09-26 01:04:12 +02:00
Daniel Martí
32a106ad1d Don't run getIntent() twice 2013-09-26 00:44:56 +02:00
Daniel Martí
5e0dfcc631 No need for alignment on appdetails 2013-09-26 00:09:57 +02:00
Daniel Martí
5a2a68644b Remove unused layout 2013-09-26 00:09:48 +02:00
Daniel Martí
dc7d3a1f1f Get application id directly from its xml attribute 2013-09-25 23:50:46 +02:00
Daniel Martí
534400c80c Remove app.icon from DB, save icon uris to memory 2013-09-24 22:33:21 +02:00
Daniel Martí
0c12c0248e Allow Backups of fdroid 2013-09-23 21:22:56 +02:00
Daniel Martí
d6d48eb749 Input field for repo is an Uri 2013-09-23 21:22:39 +02:00
Daniel Martí
d7621e4af0 Remove many unused strings 2013-09-23 21:22:27 +02:00
Daniel Martí
489bf1425c Remove many unused imports 2013-09-23 21:10:05 +02:00
Daniel Martí
3f9ed656de Update build instructions 2013-09-23 20:32:55 +02:00
Daniel Martí
017811fb92 Use UIL, don't do caching on our own.
Advantages:

* Initial setup time for icons is zero
* We don't have to deal with it ourselves
* We can use the default package icon while we load
2013-09-23 20:21:29 +02:00
Daniel Martí
0d6ec3a001 Properly put shell commands in markdown 2013-09-22 00:49:00 +02:00
Daniel Martí
4427eb2d44 Small README fixes 2013-09-22 00:43:31 +02:00
Daniel Martí
1161bf65d1 Release 0.51-test 2013-09-22 00:14:38 +02:00
Daniel Martí
f801ed3b23 Move po scripts to tools/ dir 2013-09-22 00:12:36 +02:00
Daniel Martí
100d1a144b Add basic README markdown file 2013-09-22 00:08:40 +02:00
Daniel Martí
85cd9abd4c Set PackageInstaller as org.fdroid.fdroid whenever possible (closes: #355) 2013-09-21 23:46:09 +02:00
Daniel Martí
8f334fefeb Make Donate hold a submenu with all donation methods 2013-09-21 21:09:54 +02:00
Daniel Martí
e890f54d49 Remove unnecessary files 2013-09-19 22:56:14 +02:00
Daniel Martí
40f4482bd6 Filtering bools are now done once per refresh 2013-09-19 22:56:14 +02:00
Daniel Martí
3ea503f527 Filtered apps are now shown like incompatible apps
Apps with antifeatures or root requirements whose settings are not enabled are
shown greyed out in searches, direct links and the installed tab. Apks are
hidden so as to emphasize that the app should not be installed.
2013-09-19 22:56:14 +02:00
Ciaran Gultnieks
862d7b1183 Translation updates 2013-09-06 13:31:32 +01:00
Daniel Martí
f6b83871d3 Revert "Slightly optimise greyed out apk/app views"
This reverts commit 19583c2b75224bf60ebfe65ff86c1d061b20f855.
2013-09-06 13:03:15 +02:00
Daniel Martí
38d7fcdd4a No need to do anything when returning from PreferencesActivity 2013-09-06 13:01:03 +02:00
Daniel Martí
20aa6b8d64 Revert "Do not update AppDetails views if not necessary"
This reverts commit b14b2a9611522b94eb1d23022dab5c0b99708488.
2013-09-01 17:03:03 +02:00
Daniel Martí
3741c0c62b Revert all Light Theme changes
Should be done differently. Light theme before Holo is buggy.
2013-09-01 14:03:55 +02:00
Daniel Martí
c2159456e2 Add "Ignore Updates" to AppDetails (fixes: #99)
We can later separate updates by differing signatures, downgrades, ...
But IMHO ignoring updates is important and a different issue.
2013-09-01 14:03:50 +02:00
Daniel Martí
abde150ce0 Search and Update ActionBar items to _ALWAYS 2013-08-31 04:08:24 +02:00
Daniel Martí
b14b2a9611 Do not update AppDetails views if not necessary 2013-08-31 03:57:17 +02:00
Daniel Martí
6651fe43e6 Preferences in AppDetails now in onCreate()
This solves incompatible apks not showing up when showIncompatible is true
2013-08-31 03:51:47 +02:00
Daniel Martí
a9a10667fa Remove android.mk, no longer used by anyone and outdated
Confirmed on #replicant:

paulk-collins | yes now we use the prebuilt apk
        mvdan | so Android.mk can be dropped?
paulk-collins | I'd say so
2013-08-30 18:09:29 +02:00
Daniel Martí
4109bb270d Always keep incompatible apps in the DB
Show them under the following circumstances:

1) If showIncompatible is true, show all incompatible apps/apks always
2) Installed tab, Searches and direct links will always show incompatible apps, but NOT apks

TODO: onResume should repopulate all lists. And it seems to, lists are
reloaded. But the updates don't take effect and so restart is required for a
change in showIncompatible to take effect.
2013-08-30 17:56:29 +02:00
Daniel Martí
19583c2b75 Slightly optimise greyed out apk/app views 2013-08-30 14:35:15 +02:00
Daniel Martí
eb1d21f827 Rename "Maintenance" to "Other" 2013-08-30 14:34:52 +02:00
Daniel Martí
aadd89be1b Better incompatible apk warning string 2013-08-30 14:30:56 +02:00
Daniel Martí
bfcfd163a3 Always use Holo.Light on 3.0+ 2013-08-29 22:09:19 +02:00
Daniel Martí
ec74cbed48 Bump target sdk level to 18 2013-08-29 21:51:08 +02:00
Daniel Martí
9b9f1a0cce Group all "Storage" prefs under "Maintenance" 2013-08-29 17:29:41 +02:00
Daniel Martí
116c161ab7 Filter incompatible apps by architecture as well
CPU_ABI and CPU_ABI2 are used to check with the nativecode in the index. This
would only break if either of these two was set incorrectly in the ROM's
build.prop. Then again, should we worry about that?
2013-08-29 17:09:40 +02:00
Daniel Martí
d4a7247629 Add nativecode to database 2013-08-27 18:05:31 +02:00
Daniel Martí
cb83f6991d Forgot to commit import 2013-08-23 16:35:38 +02:00
Daniel Martí
32ae91eef5 Forgot to add theme support to SearchResults 2013-08-23 16:26:02 +02:00
Daniel Martí
50f0856f67 Add "Light Theme" setting
Default theme is dark (Holo dark on >=11), addition is light on <11, Holo.Ligt
on >=11 and Holo.Light.DarkActionbar on >=14
2013-08-23 14:29:50 +02:00
Daniel Martí
d6a66017e9 Delete non-used icons from cache 2013-08-23 11:11:05 +02:00
Daniel Martí
afe102e90a Better tryOpenUri implementation and toast string.
Got the if/else hint from
http://developer.android.com/about/versions/android-4.3.html#Behaviors

(much better than try/except anyway)
2013-08-22 18:16:57 +02:00
Daniel Martí
560b7392cf Bump support library from r13 to r18 2013-08-22 17:44:43 +02:00
Daniel Martí
6cc1880b17 Remove code that copied icons from .fdroid for the 0.46->0.50 update 2013-08-22 17:23:51 +02:00
Ciaran Gultnieks
cf120d27e4 Version 0.50 2013-08-20 08:42:00 +01:00
Daniel Martí
80de44ecc6 Add proguard-project.txt 2013-08-19 17:23:25 +02:00
Ciaran Gultnieks
e37bf801f4 Version 0.49 2013-08-19 10:02:01 +01:00
Ciaran Gultnieks
4427970ffc Translation updates 2013-08-19 10:00:51 +01:00
Ciaran Gultnieks
cd0234b4e8 Create .nomedia in icons directory for old Androids 2013-08-19 10:00:21 +01:00
Ciaran Gultnieks
cf0576a717 Translation updates 2013-08-16 19:56:38 +01:00
Ciaran Gultnieks
769e439148 Translation updates 2013-08-16 17:24:15 +01:00
Ciaran Gultnieks
cb7544cbec Translation updates 2013-08-16 15:14:04 +01:00
Ciaran Gultnieks
66e958a2ba Translation updates 2013-08-16 13:42:01 +01:00
Ciaran Gultnieks
2ad2b86e88 Need to be more defensive about cache clearing with slow SD cards 2013-08-09 12:18:22 +01:00
Ciaran Gultnieks
ce9fa45034 Translation updates 2013-08-07 13:01:18 +01:00
Daniel Martí
bab3a81cce Add proguard to project.properties 2013-08-07 11:57:00 +02:00
Daniel Martí
f83f5d00da Forgot to re-add non-RTL compatible layout lines 2013-08-07 11:54:32 +02:00
Daniel Martí
61bffdac71 Add project.properties (closes #323) 2013-08-06 16:26:08 +02:00
Daniel Martí
de3fcaab2d Remove "database" term from no_such_app toast message 2013-08-06 16:15:18 +02:00
Daniel Martí
17d4413835 Slightly better "app not found" toast string 2013-08-06 15:57:59 +02:00
Ciaran Gultnieks
1bad4cc5f7 Version 0.48-test 2013-08-06 14:53:11 +01:00
Ciaran Gultnieks
3dbb5758d5 Translation updates 2013-08-06 14:52:33 +01:00
Daniel Martí
6efb3e4927 Icons were not downloaded on first repo update if cache dir didn't exist 2013-08-06 15:36:33 +02:00
Daniel Martí
9886f59d17 Force repo update after DB update 2013-08-06 15:27:21 +02:00
Daniel Martí
f44b420473 Bump DB version 2013-08-06 14:49:09 +02:00
Daniel Martí
8325d2256a Toast when no app can be found matching id 2013-08-02 23:33:11 +02:00
Daniel Martí
e04a9f9682 Merge commit 'refs/merge-requests/45' of gitorious.org:f-droid/fdroidclient
Conflicts:
	src/org/fdroid/fdroid/AppDetails.java
2013-07-31 15:32:02 +02:00
Daniel Martí
e0bdc3c338 Make DB.getAppsBasic(bool) private
We don't want anyone using it outside of DB.java
2013-07-28 13:51:09 +02:00
Daniel Martí
7611a26f0a Use strings in AM.xml labels 2013-07-28 13:50:42 +02:00
Ciaran Gultnieks
57a8bf5f8b Change example repo address help string to https (for english) 2013-07-28 10:26:58 +01:00
Daniel Martí
5542f246f5 setDisplayShowTitleEnabled no longer used 2013-07-28 09:47:29 +02:00
Daniel Martí
a2e99c05a6 Fix f-droid.org web repo handling
Links on the site end with '/'. Using pathPrefix is IMHO better than
duplicating with and without ending slash.
2013-07-28 09:36:37 +02:00
Daniel Martí
6544ebed94 Handle www.f-droid.org as well as f-droid.org 2013-07-28 09:25:31 +02:00
Daniel Martí
aa164dd090 Also open web repo links right away
No fdid opens the app normally, listing all the apps. If fdid is present, that
app is opened.
2013-07-28 09:23:53 +02:00
Daniel Martí
eead91385e Do not invalidate all apps if not needed.
This gets repo updates with no changes back to normal speed, keeping the new
functionalities (icons download after cache clean) intact.
2013-07-28 09:08:20 +02:00
Daniel Martí
9d6c88a8bf Use https everywhere 2013-07-26 15:42:37 +02:00
Daniel Martí
49dddf42a4 Download all icons if cache/icons/ is missing
This way, after wiping cache one can redownload all the icons by just
updating the repos (even if they don't need updates, this will work)
2013-07-26 14:34:40 +02:00
Daniel Martí
f1f1abf095 Add App.userInstalled property for future use 2013-07-26 13:32:13 +02:00
Peter Serwylo
af2a9ecfb6 Safer preference managing. Fix "compact layout requires reload".
Previously, everybody had to remember the preference name and the
default value. If it was ever changed, this would have to be updated
everywhere. Now, the Preferences class is responsible for talking to the
SharedPreferences functionality of ANdroid.

I've started with just the compactlayout preference, because
that is what I required for this fix.
2013-07-26 09:38:23 +10:00
Daniel Martí
bc77804eee Add a small padding to the "found x applications matching..." string in SearchResults 2013-07-26 00:14:42 +02:00
Daniel Martí
47575b5c56 Add search results label 2013-07-26 00:10:48 +02:00
Daniel Martí
cb2bf7945b Add AppDetails activity label as well 2013-07-26 00:07:24 +02:00
Daniel Martí
1d72c31557 Set Preferences label for the ActionBar 2013-07-25 23:49:14 +02:00
Daniel Martí
a5492cac35 Revert "Hide ActionBar title on AppDetails to make space"
This reverts commit 2b4147ed9fee4557723804df093e5a3bd838cfb4.
There's no need to make more space.
2013-07-25 23:18:04 +02:00
Daniel Martí
c032cae0ff Don't show remove/run buttons on incompatible apps 2013-07-25 23:08:23 +02:00
Daniel Martí
03ca3e0e05 CV == 0 means none recommended. No CV declared means latest compatible apk recommended. 2013-07-23 18:19:04 +02:00
Daniel Martí
0c1b854b69 Remove "reset" from the preferences page.
Currently, removing the cache does the job much better. The only thing
clearing the cache doesn't do which "reset" did is removing the databases. But
we don't want to do that anyway.

If someone wants to do that, they can just deactivate or remove a repo, and it
will get wiped from the database.
2013-07-23 17:02:35 +02:00
Daniel Martí
4de47bd810 Only fetch local_path if necessary 2013-07-23 13:40:50 +02:00
Daniel Martí
36ff25a95c Merge commit 'refs/merge-requests/53' of gitorious.org:f-droid/fdroidclient 2013-07-23 12:11:20 +02:00
Daniel Martí
38f2cadb80 Don't recommend incompatible versions (closes: #311) 2013-07-23 11:21:18 +02:00
Peter Serwylo
65244e6784 Refactored the compact layout preference in AppListAdapter.
Moved it to a getter, instead of directly accessing the property
throughout.
2013-07-23 09:03:02 +10:00
Daniel Martí
5761f32935 Never star vercodes larger than the current as recommended 2013-07-22 17:59:46 +02:00
Daniel Martí
38c0ae1972 Sharing apps now has a better plaintext structure
SUBJECT: "Android App: [name]"
TEXT: "[name] ([summary]) - [link]"
2013-07-22 16:57:24 +02:00
Daniel Martí
ff0f3a27f9 Use https when sharing an app 2013-07-22 16:19:41 +02:00
Daniel Martí
e44f8b67a7 Disabling repos now clears their apks as well
The current method is quite ugly, mainly because enabling and disabling repos
uses SQL and the list item click function does not tell us whether a repo is
being enabled or disabled. For now it works, but there's room for improvement.
2013-07-22 14:59:22 +02:00
Daniel Martí
632f18c4a2 Fix getAppsBasic
versionName was always null, hence hasUpdates was always false.
2013-07-22 14:57:40 +02:00
Daniel Martí
3ea7226330 Also open https links to apps 2013-07-22 11:35:30 +02:00
Daniel Martí
6bfcb338d4 Use the new /app/app.id uri scheme
Also, differentiate between market://details and http://f-droid.org/app
better.
2013-07-22 11:33:21 +02:00
Daniel Martí
f3ee1201e4 Use INDEX_CAN_UPDATE rather than its hard-coded id 2013-07-22 10:51:17 +02:00
Daniel Martí
25968d181d Remove "X updates available" notification when entering the updates tab
Both in the old and new tab managers, when entering or programmatically
selecting the third tab (id 2) the notification with id 1 (updates
notification) will be cancelled i.e. deleted.
2013-07-21 19:01:07 +02:00
Daniel Martí
930cf7d613 Don't list apps with zero apks
After removing one or more repos, remove all the apps which don't have any
apks listed from the database.
2013-07-21 17:49:56 +02:00
Daniel Martí
4b32f92777 Get rid of unnecessary indentations 2013-07-21 17:03:26 +02:00
Daniel Martí
96f358d94c New getAppsBasic to avoid retrieving unnecessary data 2013-07-21 17:00:05 +02:00
Daniel Martí
07a161c0a9 Don't crash if no apks are listed 2013-07-21 13:20:42 +02:00
Daniel Martí
b9d5e8f701 Invalidate app/apk cache when removing repos 2013-07-21 13:15:01 +02:00
Daniel Martí
c545139927 Forgot to default hasUpdates to false (fixes: #297) 2013-07-21 11:18:37 +02:00
Peter Serwylo
c8fa5303c4 Fixed issues with api version differences.
I moved the Utils.hasApi to the protected method in Compatibility.
It was misleading having it in Utils, because it is not as simple as
putting a "if(Utils.hasApi(11)) callApi_11_method()" there.

The problem isn't when the method is executed during runtime, it is when
the class is loaded into the VM using the classloader. At that point, it
tries to verify that indeed every method you call from your class
exists, so the conditional check doesn't work, hence VerifyError's and
breakage.

The appropriate way to do it is the same way as the Android support
library does it. The goal is to have an interface which only one
implementation is every loaded at runtime. Any implementations for
versions that your device doesn't support will never get loaded, so no
VerifyErrors. If you have the support library installed in your
Android SDK, check out
extras/android/support/v4/src/java/android/support/v4/view/MenuItemCompat.java
to see how the pattern works.
2013-07-21 08:14:57 +10:00
Peter Serwylo
d2e2b492fb Added missing > in XML. 2013-07-21 07:20:53 +10:00
Daniel Martí
44824fa6cf Make install and run to be always shown in AB 2013-07-19 23:24:54 +02:00
Daniel Martí
86464608d7 Use f-droid.org rather than fdroid.org 2013-07-18 12:36:55 +02:00
Daniel Martí
d315521c7d Remove rtl layout support (WIP in rtl-layout branch) 2013-07-18 12:06:04 +02:00
Daniel Martí
577a4250b6 Share via http://fdroid.org/app?id=app.id
Advantages:
- http links are linkified everywhere
- web browser request will fall back to our web repo
- we don't have to use our own scheme
2013-07-18 11:56:52 +02:00
Daniel Martí
d22acac8a5 Make fdroid.app: browsable too 2013-07-18 11:56:39 +02:00
Daniel Martí
a17a5edff2 fdroid:// and market:// are browsable 2013-07-18 11:36:05 +02:00
Daniel Martí
bc5379d305 Switch to the newer android-support-v4 r13 lib 2013-07-16 15:13:26 +02:00
Daniel Martí
de82ab4e1d Typo in proposed code for selections 2013-07-16 15:08:27 +02:00
Daniel Martí
35d30e148e Disable text selection as it didn't allow links.
Possible but wonky solution suggested in the source code comments.
2013-07-16 15:03:01 +02:00
Ciaran Gultnieks
9941e543ed Merge branch 'master' of gitorious.org:f-droid/fdroidclient 2013-07-15 22:32:17 +01:00
Ciaran Gultnieks
63e37a879f Better attempt at fixing boot crash when SD card is not ready? 2013-07-15 22:32:09 +01:00
Daniel Martí
77449ac165 Revert "Disable scrollbars altogether on the three main tabs"
This reverts commit c78ff5df303689341ea040847d5d2c53b56c9533.
2013-07-15 23:02:53 +02:00
Daniel Martí
89f8630f12 Add share (via fdroid://details?id=app.id) button 2013-07-15 16:49:03 +02:00
Daniel Martí
234b39acb7 Add support for fdroid://details?id=app.id uris
Also, launch them from inside AppDetails directly
2013-07-15 15:37:24 +02:00
Ciaran Gultnieks
1764ceb55a Version 0.47-test 2013-07-11 13:56:49 +01:00
Ciaran Gultnieks
79b789d2c0 Merge branch 'master' of gitorious.org:f-droid/fdroidclient 2013-07-11 13:55:40 +01:00
Daniel Martí
c78ff5df30 Disable scrollbars altogether on the three main tabs 2013-07-11 13:03:22 +02:00
Daniel Martí
a46b8e8663 Revert all the fast scroll always enabled changes 2013-07-11 12:45:13 +02:00
Ciaran Gultnieks
d01afa4cb6 Use icons from old .fdroid rather than downloading if possible 2013-07-10 17:51:06 +01:00
Daniel Martí
2b4147ed9f Hide ActionBar title on AppDetails to make space 2013-07-10 15:51:58 +02:00
Daniel Martí
efb37e459f Remove unnecessary padding.
On 3.0+, the scrollbar padding already leaves some space.
2013-07-10 14:52:15 +02:00
Daniel Martí
194cb24d2c Move the "Uninstall" button to the Action Bar 2013-07-10 14:23:51 +02:00
Daniel Martí
78e7810c14 Recover description scrollbar only when in portrait 2013-07-10 14:19:58 +02:00
Daniel Martí
c1d023de0f Disable scrollbars on AppDetails 2013-07-10 12:59:47 +02:00
Ciaran Gultnieks
9d51cd72ac Use proper cache storage location (issue #239) 2013-07-10 11:34:19 +01:00
Daniel Martí
ed54b028a9 Make the icon spacing a lot easier 2013-07-09 23:33:05 +02:00
Daniel Martí
91aa4610a1 Align summary with app name on compact layout. 2013-07-09 23:25:21 +02:00
Daniel Martí
80437abcc0 Fast scroll always on and with padding only on APIs >= 11 2013-07-09 16:36:21 +02:00
Daniel Martí
3caa411390 Fast scrolling always enabled. Also, add some padding. 2013-07-09 15:22:30 +02:00
Ciaran Gultnieks
8eda160a30 Translation updates 2013-07-08 17:27:49 +01:00
Daniel Martí
2d11283db5 Enable fast scrolling for the search results 2013-07-08 15:45:44 +02:00
Daniel Martí
5230da8d68 Fix crashes on APIs <= 16 using compactlayout 2013-07-08 14:54:42 +02:00
Daniel Martí
8762efb86b Load compactlayout setting only once. Buildfix. 2013-07-08 14:51:28 +02:00
Daniel Martí
09d21740c8 Updates/Insalled icons in compact layout need to be updated 2013-07-08 14:32:41 +02:00
Daniel Martí
0c259673d8 non-compact stuff is now hidden by default via xml
Also, forgot to add the backwards compatibility for END_OF
2013-07-08 14:26:07 +02:00
Daniel Martí
74ca3c2aa5 Fix layouts for APIs <= 16 2013-07-08 13:03:10 +02:00
Daniel Martí
4d0c4babe6 Various speedups in the app views. Compact layout still needs restarting. 2013-07-08 12:54:44 +02:00
Daniel Martí
b05e38d761 Move the search function from the menu to the actionbar in SearchResults 2013-07-08 11:46:01 +02:00
Daniel Martí
66d16bf875 Add refreshApps header 2013-07-08 11:33:30 +02:00
Daniel Martí
3ce8cbf5bd Restore old invalidations after apk installs/uninstalls. Do not refresh the same app multiple times. 2013-07-08 11:21:36 +02:00
Daniel Martí
f5785c3de0 Add very basic support for RTL languages 2013-07-07 12:12:29 +02:00
Daniel Martí
4add713ab8 Bump targetSdk to support the parent activity features 2013-07-07 11:22:12 +02:00
Daniel Martí
686403d978 Add back to home function to the actionbar icon for apis >=11 (fixes #291) 2013-07-07 11:10:03 +02:00
Daniel Martí
948dfa55ec We handle market:// now, so open play.google.com directly 2013-07-07 10:27:37 +02:00
Daniel Martí
eaa94bdf83 No need to move around app ids around any more 2013-07-07 10:20:57 +02:00
Daniel Martí
9c4aa9127f Drastically improve performance after installs/uninstalls.
- Only reload those apps that actually need reloading, not all of them
- Reloading all the stuff inside DB.App is not necessary - only the install
  information can be changed
2013-07-07 00:27:12 +02:00
Daniel Martí
d39047bfea Drop text selection for APIs 10 or lower (not available) 2013-07-06 19:40:22 +02:00
Daniel Martí
419ea5510d Don't refill description and other static stuff when returning from install/uninstall 2013-07-06 19:16:12 +02:00
Daniel Martí
93326a90d1 Descriptions and Summaries are now selectable (closes #290) 2013-07-06 18:28:25 +02:00
Daniel Martí
15cf724074 Reload compact layout setting without restart (fixes #275) 2013-07-06 15:01:12 +02:00
Daniel Martí
71e6c294e4 Add support for market://details?id=package.name 2013-07-06 14:49:06 +02:00
Daniel Martí
5a461589a5 Search by typing in the search view as well 2013-07-06 14:21:59 +02:00
Daniel Martí
0d099a0126 Don't crash if a link points at a nonexistent package (fixes #167)
For now, nothing happens. This should be improved.
2013-07-06 13:35:58 +02:00
Daniel Martí
c7db510dad Forgot a period in 0cec8f9 2013-07-06 01:29:12 +02:00
Daniel Martí
0cec8f9bd5 Start a search by just typing (closes #213) 2013-07-06 01:24:00 +02:00
Daniel Martí
a1116608e7 No need to refill search results at each resume (fixes issue #155) 2013-07-06 00:29:58 +02:00
Daniel Martí
4f7858ad68 Add a message to differentiate when we download icons 2013-07-05 16:55:51 +02:00
Daniel Martí
e1ef7491c4 Forgot one variable 2013-06-30 22:34:42 +02:00
Daniel Martí
55389ce735 Don't overwrite $PATH 2013-06-30 22:31:56 +02:00
Peter Serwylo
5442aaa4dd Merge remote-tracking branch 'mvdan/notifications' 2013-06-28 08:22:53 +10:00
Daniel Martí
bd906c2f68 change-package-name changes:
- It now takes two arguments, new package ID and new package name
- Source path is now resolved from the package ID
- Add -x so that executed commands are seen on screen
2013-06-27 15:39:17 +02:00
Daniel Martí
048eca0457 Merge commit 'refs/merge-requests/52' of gitorious.org:f-droid/fdroidclient 2013-06-27 15:10:57 +02:00
Daniel Martí
4a61c20e92 Merge commit 'refs/merge-requests/46' of gitorious.org:f-droid/fdroidclient 2013-06-27 14:50:33 +02:00
Daniel Martí
232815cce8 Merge commit 'refs/merge-requests/47' of gitorious.org:f-droid/fdroidclient 2013-06-27 14:32:25 +02:00
Daniel Martí
9ba01d16bf Merge commit 'refs/merge-requests/51' of gitorious.org:f-droid/fdroidclient 2013-06-27 13:04:47 +02:00
Daniel Martí
ddaf4b65cd Merge commit 'refs/merge-requests/44' of gitorious.org:f-droid/fdroidclient 2013-06-27 12:57:45 +02:00
Daniel Martí
7605ec219f Merge commit 'refs/merge-requests/48' of gitorious.org:f-droid/fdroidclient 2013-06-27 12:51:04 +02:00
Daniel Martí
bab1e6536c Merge commit 'refs/merge-requests/49' of gitorious.org:f-droid/fdroidclient 2013-06-27 12:50:10 +02:00
Ciaran Gultnieks
21eb159330 Make tabhost initialisation work on Nook
I have no idea why this works, but it does.
2013-06-24 15:28:19 +01:00
Peter Serwylo
7ef7489c79 Updated description of 'Compact Layout' 2013-06-14 05:43:27 +10:00
David Black
fd1b0cbb59 Script for changing the package name and app name 2013-06-13 16:14:26 +01:00
Peter Serwylo
1caa7510b6 Changed compact view to show description.
Removed the license and the version info from the compact view, and
showed the description instead. The installed status, and whether the
app can be updated or not (but not which version can be updated to) is
now shown via little icons on the right hand side of the list view.

Also refactored adapters to allow different views for
Available/Installed/Updates tabs. This is because I didn't want the
"installed" status icon in the installed tab, and neither the
"installed" nor the "updates" icon in the "updates" tab.

The adapters were moved to the "views" package, because I needed to add
three new classes and they started to clutter the list of *.java files.
2013-06-10 21:57:28 +10:00
Ciaran Gultnieks
9ec94e8e88 Don't get upset if the SD card is not ready yet 2013-06-07 11:59:05 +01:00
Daniel Martí
3f0d8b2577 Don't suggest downgrades. No need to check version 2013-06-01 12:03:34 +02:00
Andrew Gaul
f5c6c4c0fe Correct typos 2013-05-31 08:44:44 -07:00
Andrew Gaul
d6f643cb4d Parameterize SQL queries
Also eliminate most calls to SQLiteDatabase.rawQuery.
2013-05-31 08:35:43 -07:00
Ciaran Gultnieks
020cac971f Version 0.46 2013-05-30 22:37:48 +01:00
Ciaran Gultnieks
068734c275 Merge branch 'merge-requests/41' 2013-05-30 18:35:32 +01:00
Ciaran Gultnieks
a0e34e8971 Merge commit 'refs/merge-requests/41' of git://gitorious.org/f-droid/fdroidclient into merge-requests/41 2013-05-30 18:35:27 +01:00
Ciaran Gultnieks
bb4d3e7f2a Merge branch 'merge-requests/43' 2013-05-30 17:09:08 +01:00
Ciaran Gultnieks
44bcaf465a Merge commit 'refs/merge-requests/43' of git://gitorious.org/f-droid/fdroidclient into merge-requests/43 2013-05-30 17:08:51 +01:00
Ciaran Gultnieks
0ca4de23bf Bump minsdk to 4 (1.6) due to android-support dependency 2013-05-30 17:07:51 +01:00
Ciaran Gultnieks
56295726bd Resolve bad interaction with app verify 2013-05-30 12:55:32 +01:00
Daniel Martí
780e0e3d54 Some more spacing fixes (suggestion by daithib8) 2013-05-27 18:08:24 +02:00
Daniel Martí
18ae6e6da2 Refactor about screen.
* Add paddings.
* Don't use hard-coded pixel sizes.
* Don't use white color directly (this would soon break the white holo theme)
* Don't use an "empty" textview to force a vertical space.

Looks much cleaner now, and the code is easier on the eyes.
2013-05-26 12:25:46 +02:00
Daniel Martí
6f3c5b4e85 More spacings in lists and app details screen 2013-05-26 12:25:20 +02:00
Daniel Martí
2b7585c1cf Check current version by signature as well
This prevents multiple versions shown as installed, which might happen if many
repos are used and contain the same versions of some app.
2013-05-25 23:01:50 +02:00
Daniel Martí
82ec7fe45c Add bitcoin and flattr support 2013-05-25 12:26:12 +02:00
Andrew Gaul
50ffaa4ea9 Correct SQLite typo in DB.getRepo 2013-05-23 22:14:25 -07:00
Daniel Martí
0f16b71688 Use v4.app.NotificationCompat 2013-05-22 19:07:31 +02:00
1886 changed files with 123393 additions and 28674 deletions

View File

@ -1,8 +0,0 @@
--gettext locale/
--groups strings array
--ignore about_sitec about_mailc
--ignore repo_add_http
--ignore /updateIntervalValues.*/
--ignore /dbSyncModeValues.*/

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.gpg binary

53
.gitignore vendored
View File

@ -1,12 +1,49 @@
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
build.xml
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
build.properties
project.properties
.classpath
bin/*
gen/*
proguard.cfg
proguard-project.txt
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Editor swap/save files
*~
.idea
*.swp
# More IDE stuff
.idea/
*.iml
out
.settings/
# Imported libs
extern/*/libs/
extern/*/*/libs/
# Tests
junit-report.xml
# Screen dumps from Android Studio/DDMS
captures/
/fdroid/

142
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,142 @@
stages:
- test
- deploy
.base:
image: registry.gitlab.com/fdroid/ci-images-client:latest
before_script:
- export GRADLE_USER_HOME=$PWD/.gradle
- export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle`
- alias sdkmanager="sdkmanager --no_https"
- echo y | sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" > /dev/null
# limit RAM usage for all gradle runs
- export maxmem=$(expr $(sed -n 's,^MemAvailable:[^0-9]*\([0-9][0-9]*\)[^0-9]*$,\1,p' /proc/meminfo) / 1024 / 2 / 1024 \* 1024)
- printf "\norg.gradle.jvmargs=-Xmx${maxmem}m -XX:MaxPermSize=${maxmem}m\norg.gradle.daemon=false\norg.gradle.parallel=false\n" >> gradle.properties
after_script:
# this file changes every time but should not be cached
- rm -f $GRADLE_USER_HOME/caches/modules-2/modules-2.lock
- rm -fr $GRADLE_USER_HOME/caches/*/plugin-resolution/
cache:
paths:
- .gradle/wrapper
- .gradle/caches
.test-template: &test-template
extends: .base
stage: test
artifacts:
name: "${CI_PROJECT_PATH}_${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}"
paths:
- kernel.log
- logcat.txt
- app/core*
- app/*.log
- app/build/reports
- app/build/outputs/*ml
- app/build/outputs/apk
expire_in: 1 week
when: on_failure
after_script:
- echo "Download debug artifacts from https://gitlab.com/${CI_PROJECT_PATH}/-/jobs"
# Run the most important first. Then we can decide whether to ignore
# the style tests if the rest of the more meaningful tests pass.
test_lint_pmd_checkstyle:
<<: *test-template
script:
- export EXITVALUE=0
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
- ./gradlew assemble
# always report on lint errors to the build log
- sed -i -e 's,textReport .*,textReport true,' app/build.gradle
- ./gradlew testFullDebugUnitTest || set_error
- ./gradlew lint || set_error
- ./gradlew pmd || set_error
- ./gradlew checkstyle || set_error
- ./tools/check-format-strings.py || set_error
- ./tools/check-fastlane-whitespace.py || set_error
- ./tools/remove-unused-and-blank-translations.py || set_error
- echo "These are unused or blank translations that should be removed:"
- git --no-pager diff --ignore-all-space --name-only --exit-code app/src/*/res/values*/strings.xml || set_error
- exit $EXITVALUE
errorprone:
extends: .base
stage: test
script:
- apt-get update
- apt-get install -t stretch-backports openjdk-11-jdk-headless
- update-java-alternatives --set java-1.11.0-openjdk-amd64
- export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64
- cat config/errorprone.gradle >> app/build.gradle
- ./gradlew -Dorg.gradle.dependency.verification=lenient assembleDebug
# Run the tests in the emulator. Each step is broken out to run on
# its own since the CI runner can have limited RAM, and the emulator
# can take a while to start.
#
# once these prove stable, the task should be switched to
# connectedCheck to test all the build flavors
.connected-template: &connected-template
extends: .base
script:
- ./gradlew assembleFullDebug
- export AVD_SDK=`echo $CI_JOB_NAME | awk '{print $2}'`
- export AVD_TAG=`echo $CI_JOB_NAME | awk '{print $3}'`
- export AVD_ARCH=`echo $CI_JOB_NAME | awk '{print $4}'`
- export AVD_PACKAGE="system-images;android-${AVD_SDK};${AVD_TAG};${AVD_ARCH}"
- echo $AVD_PACKAGE
- alias sdkmanager
- ls -l ~/.android
- adb start-server
- start-emulator
- wait-for-emulator
- adb devices
- adb shell input keyevent 82 &
- ./gradlew installFullDebug
- adb shell am start -n org.fdroid.fdroid.debug/org.fdroid.fdroid.views.main.MainActivity
- if [ $AVD_SDK -lt 25 ] || ! emulator -accel-check; then
export FLAG=-Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.LargeTest;
fi
- ./gradlew connectedFullDebugAndroidTest $FLAG
no-accel 22 default x86:
<<: *test-template
<<: *connected-template
.kvm-template: &kvm-template
tags:
- fdroid
- kvm
only:
variables:
- $RUN_KVM_JOBS
<<: *test-template
<<: *connected-template
kvm 29 microg x86_64:
<<: *kvm-template
deploy_nightly:
extends: .base
stage: deploy
only:
- master
script:
- test -z "$DEBUG_KEYSTORE" && exit 0
- sed -i
's,<string name="app_name">.*</string>,<string name="app_name">F-Nightly</string>,'
app/src/main/res/values*/strings.xml
# add this nightly repo as a enabled repo
- sed -i -e '/<\/string-array>/d' -e '/<\/resources>/d' app/src/main/res/values/default_repos.xml
- echo "<item>${CI_PROJECT_PATH}-nightly</item>" >> app/src/main/res/values/default_repos.xml
- echo "<item>${CI_PROJECT_URL}-nightly/raw/master/fdroid/repo</item>" >> app/src/main/res/values/default_repos.xml
- cat config/nightly-repo/repo.xml >> app/src/main/res/values/default_repos.xml
- export DB=`sed -n 's,.*DB_VERSION *= *\([0-9][0-9]*\).*,\1,p' app/src/main/java/org/fdroid/fdroid/data/DBHelper.java`
- export versionCode=`printf '%d%05d' $DB $(date '+%s'| cut -b4-8)`
- sed -i "s,^\(\s*versionCode\) *[0-9].*,\1 $versionCode," app/build.gradle
# build the APKs!
- ./gradlew assembleDebug
- fdroid nightly -v

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>fdroid</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

3
.weblate Normal file
View File

@ -0,0 +1,3 @@
[weblate]
url = https://hosted.weblate.org/api/
translation = f-droid/f-droid

View File

@ -1,8 +1,26 @@
LOCAL_PATH := $(call my-dir)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := FDroid
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_MODULE := F-Droid
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := F-Droid
include $(BUILD_PACKAGE)
fdroid_root := $(LOCAL_PATH)
fdroid_dir := app
fdroid_out := $(PWD)/$(OUT_DIR)/target/common/obj/APPS/$(LOCAL_MODULE)_intermediates
fdroid_build := $(fdroid_root)/$(fdroid_dir)/build
fdroid_apk := build/outputs/apk/full/release/$(fdroid_dir)-full-release-unsigned.apk
$(fdroid_root)/$(fdroid_dir)/$(fdroid_apk):
rm -Rf $(fdroid_build)
mkdir -p $(fdroid_out)
ln -sf $(fdroid_out) $(fdroid_build)
cd $(fdroid_root)/$(fdroid_dir) && gradle assembleRelease
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(fdroid_dir)/$(fdroid_apk)
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)

View File

@ -1,92 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fdroid.fdroid"
android:installLocation="auto"
android:versionCode="45"
android:versionName="0.45" >
<uses-sdk
android:minSdkVersion="3"
android:targetSdkVersion="15" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name="FDroidApp"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name="FDroid"
android:configChanges="keyboardHidden|orientation|screenSize" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.default_searchable"
android:value=".SearchResults" />
</activity>
<activity android:name="ManageRepo" />
<activity android:name="Settings" />
<activity
android:name="AppDetails"
android:exported="true" >
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<data android:scheme="fdroid.app" />
</intent-filter>
</activity>
<activity android:name="Preferences" />
<activity
android:name="SearchResults"
android:exported="true"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
<receiver android:name="StartupReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
<receiver android:name="PackageReceiver" >
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_UPGRADED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
<service android:name="UpdateService" />
</application>
</manifest>

1081
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

81
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,81 @@
# Contributing
## Reporting issues
If you find an issue in the client, you can use our [Issue
Tracker](https://gitlab.com/fdroid/fdroidclient/issues). Make sure that it
hasn't yet been reported by searching first.
Remember to include the following information:
* Android version
* Device model
* F-Droid version
* Steps to reproduce the issue
* Logcat - see [instructions](https://f-droid.org/wiki/page/Getting_logcat_messages_after_crash)
## Translating
The strings are translated using [Weblate](https://weblate.org/en/). Follow
[these instructions](https://hosted.weblate.org/engage/f-droid/) if you would
like to contribute.
Please *do not* send merge requests or patches modifying the translations. Use
Weblate instead - it applies a series of fixes and suggestions, plus it keeps
track of modifications and fuzzy translations. Applying translations manually
skips all of the fixes and checks, and overrides the fuzzy state of strings.
Note that you cannot change the English strings on Weblate. If you have any
suggestions on how to improve them, open an issue or merge request like you
would if you were making code changes. This way the changes can be reviewed
before the source strings on Weblate are changed.
## Code Style
We follow the default Android Studio code formatter (e.g. `Ctrl-Alt-L`). This
should be more or less the same as [Android Java
style](https://source.android.com/source/code-style.html). Some key points:
* Four space indentation
* UTF-8 source files
* Exactly one top-level class per file
* No wildcard imports
* One statement per line
* K&R spacings with braces and parenthesis
* Commented fallthroughs
* Braces are always used after if, for and while
The current code base doesn't follow it entirely, but new code should follow
it. We enforce some of these, but not all, via `./gradlew checkstyle`.
## Running the test suite
Before pushing commits to a merge request, make sure this passes:
./gradlew checkstyle pmd lint
In order to run the F-Droid test suite, you will need to have either a real device
connected via `adb`, or an emulator running. Then, execute the following from the
command line:
./gradlew check
Many important tests require a device or emulator, but do not work in GitLab CI.
That mean they need to be run locally, and that is usually easiest in Android
Studio rather than the command line.
For a quick way to run a specific JUnit/Robolectric test:
./gradlew testFullDebugUnitTest --tests *LocaleSelectionTest*
For a quick way to run a specific emulator test:
./gradlew connectedFullDebugAndroidTest \
-Pandroid.testInstrumentationRunnerArguments.class=org.fdroid.fdroid.MainActivityExpressoTest
## Making releases
See https://gitlab.com/fdroid/wiki/-/wikis/Internal/Release-Process#fdroidclient

11
FUNDING.yml Normal file
View File

@ -0,0 +1,11 @@
---
liberapay: F-Droid-Data
open_collective: F-Droid
github:
- f-droid
- eighthave
custom:
- https://f-droid.org/donate/
- https://www.hellotux.com/f-droid
- https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=E2FCXCT6837GL
- https://blockchain.info/address/15u8aAPK4jJ5N8wpWJ5gutAyyeHtKX5i18

View File

67
README.md Normal file
View File

@ -0,0 +1,67 @@
# F-Droid Client
[![build status](https://gitlab.com/fdroid/fdroidclient/badges/master/pipeline.svg)](https://gitlab.com/fdroid/fdroidclient/-/jobs)
[![Translation status](https://hosted.weblate.org/widgets/f-droid/-/svg-badge.svg)](https://hosted.weblate.org/engage/f-droid/)
Client for [F-Droid](https://f-droid.org), the Free Software repository system
for Android.
## Building with Gradle
./gradlew assembleRelease
## Direct download
You can [download the application](https://f-droid.org/FDroid.apk) directly
from our site or [browse it in the repo](https://f-droid.org/app/org.fdroid.fdroid).
## Contributing
See our [Contributing doc](CONTRIBUTING.md) for information on how to report
issues, translate the app into your language or help with development.
## IRC
We are on `#fdroid` and `#fdroid-dev` on Freenode. We hold weekly dev meetings
on `#fdroid-dev` on Thursdays at 11:30h UTC, which usually last half an hour.
## FAQ
* Why does F-Droid require "Unknown Sources" to install apps by default?
Because a regular Android app cannot act as a package manager on its
own. To do so, it would require system privileges (see below), similar
to what Google Play does.
* Can I avoid enabling "Unknown Sources" by installing F-Droid as a
privileged system app?
This used to be the case, but no longer is. Now the [Privileged
Extension](https://gitlab.com/fdroid/privileged-extension) is the one that should be placed in
the system. It can be bundled with a ROM or installed via a zip.
## License
This program is Free Software: You can use, study share and improve it at your
will. Specifically you can redistribute and/or modify it under the terms of the
[GNU General Public License](https://www.gnu.org/licenses/gpl.html) as
published by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Some icons are made by [Picol](http://www.flaticon.com/authors/picol),
[Icomoon](http://www.flaticon.com/authors/icomoon) or
[Dave Gandy](http://www.flaticon.com/authors/dave-gandy) from
[Flaticon](http://www.flaticon.com) or by Google and are licensed by
[Creative Commons BY 3.0](https://creativecommons.org/licenses/by/3.0/).
Other icons are from the
[Material Design Icon set](https://github.com/google/material-design-icons)
released under an
[Attribution 4.0 International license](https://creativecommons.org/licenses/by/4.0/).
## Translation
Everything can be translated. See
[Translation and Localization](https://f-droid.org/docs/Translation_and_Localization)
for more info.
[![translation status](https://hosted.weblate.org/widgets/f-droid/-/f-droid/multi-auto.svg)](https://hosted.weblate.org/engage/f-droid/?utm_source=widget)

View File

@ -1,18 +0,0 @@
# This file is used to override default values used by the Ant build system.
#
# This file must be checked into Version Control Systems, as it is
# integral to the build system of your project.
# This file is only used by the Ant script.
# You can use this to override default values such as
# 'source.dir' for the location of your java source folder and
# 'out.dir' for the location of your output folder.
# You can also use it define how the release builds are signed by declaring
# the following properties:
# 'key.store' for the location of your keystore and
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.
application.package=org.fdroid.fdroid

230
app/build.gradle Normal file
View File

@ -0,0 +1,230 @@
apply plugin: 'com.android.application'
apply plugin: 'checkstyle'
apply plugin: 'pmd'
/* gets the version name from the latest Git tag */
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--always'
standardOutput = stdout
}
return stdout.toString().trim()
}
def isCi = "true" == System.getenv("CI")
def preDexEnabled = "true" == System.getProperty("pre-dex", "true")
def fullApplicationId = "org.fdroid.fdroid"
def basicApplicationId = "org.fdroid.basic"
// yes, this actually needs both quotes https://stackoverflow.com/a/41391841
def privilegedExtensionApplicationId = '"org.fdroid.fdroid.privileged"'
android {
compileSdkVersion 30
defaultConfig {
versionCode 1013001
versionName getVersionName()
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
minSdkVersion 24
//noinspection ExpiredTargetSdkVersion
targetSdkVersion 28
/*
The Android Testing Support Library collects analytics to continuously improve the testing
experience. More specifically, it uploads a hash of the package name of the application
under test for each invocation. If you do not wish to upload this data, you can opt-out by
passing the following argument to the test runner: disableAnalytics "true".
*/
testInstrumentationRunnerArguments disableAnalytics: 'true'
vectorDrawables.useSupportLibrary = true
}
buildTypes {
// use proguard on debug too since we have unknowingly broken
// release builds before.
all {
minifyEnabled true
shrinkResources true
buildConfigField "String", "PRIVILEGED_EXTENSION_PACKAGE_NAME", privilegedExtensionApplicationId
buildConfigField "String", "ACRA_REPORT_EMAIL", '"reports@f-droid.org"' // String needs both quotes
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'src/androidTest/proguard-rules.pro'
}
debug {
applicationIdSuffix ".debug"
resValue "string", "applicationId", fullApplicationId + applicationIdSuffix
versionNameSuffix "-debug"
println 'buildTypes.debug defaultConfig.versionCode ' + defaultConfig.versionCode
}
}
flavorDimensions "base"
productFlavors {
full {
dimension "base"
applicationId fullApplicationId
resValue "string", "applicationId", fullApplicationId
}
basic {
dimension "base"
applicationId basicApplicationId
resValue "string", "applicationId", basicApplicationId
}
}
compileOptions {
compileOptions.encoding = "UTF-8"
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
aaptOptions {
cruncherEnabled = false
}
dexOptions {
// Improve build server performance by allowing disabling of pre-dexing
// see http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance
// Skip pre-dexing when running on CI or when disabled via -Dpre-dex=false.
preDexLibraries = preDexEnabled && !isCi
}
testOptions {
unitTests {
includeAndroidResources = true
// prevent tests from dying on android.util.Log calls
returnDefaultValues = true
all {
// All the usual Gradle options.
testLogging {
events "skipped", "failed", "standardOut", "standardError"
showStandardStreams = true
}
systemProperty 'robolectric.dependency.repo.url', 'https://repo1.maven.org/maven2'
// hack to avoid memory leak crashes
forkEvery = 1
}
}
}
sourceSets {
test {
java.srcDirs += "$projectDir/src/testShared/java"
}
androidTest {
java.srcDirs += "$projectDir/src/testShared/java"
}
}
lintOptions {
checkReleaseBuilds false
abortOnError true
htmlReport true
xmlReport false
textReport false
lintConfig file("lint.xml")
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/INDEX.LIST'
exclude '.readme'
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.work:work-runtime:2.4.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.google.zxing:core:3.3.3'
implementation 'info.guardianproject.netcipher:netcipher:2.2.0-alpha'
implementation 'info.guardianproject.panic:panic:1.0'
implementation 'commons-io:commons-io:2.6'
implementation 'commons-net:commons-net:3.6'
implementation 'ch.acra:acra:4.9.1'
implementation 'com.hannesdorfmann:adapterdelegates3:3.0.1'
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
implementation 'io.reactivex.rxjava3:rxjava:3.0.9'
implementation 'com.fasterxml.jackson.core:jackson-core:2.11.1'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.11.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.1'
implementation 'org.bouncycastle:bcprov-jdk15on:1.65'
fullImplementation 'org.bouncycastle:bcpkix-jdk15on:1.65'
fullImplementation 'cc.mvdan.accesspoint:library:0.2.0'
fullImplementation 'org.jmdns:jmdns:3.5.5'
fullImplementation 'org.nanohttpd:nanohttpd:2.3.1'
testImplementation 'androidx.test:core:1.3.0'
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.robolectric:robolectric:4.3'
testImplementation 'org.mockito:mockito-core:3.3.3'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'org.bouncycastle:bcprov-jdk15on:1.65'
androidTestImplementation 'androidx.arch.core:core-testing:2.1.0'
androidTestImplementation 'androidx.test:core:1.3.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'androidx.test:monitor:1.3.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'androidx.work:work-testing:2.4.0'
}
checkstyle {
toolVersion = '7.2'
}
task checkstyle(type: Checkstyle) {
configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
source 'src/main/java', 'src/test/java', 'src/androidTest/java'
include '**/*.java'
classpath = files()
}
pmd {
toolVersion = '6.20.0'
consoleOutput = true
}
task pmdMain(type: Pmd) {
dependsOn 'assembleDebug'
ruleSetFiles = files("${project.rootDir}/config/pmd/rules.xml", "${project.rootDir}/config/pmd/rules-main.xml")
ruleSets = [] // otherwise defaults clash with the list in rules.xml
source 'src/main/java'
include '**/*.java'
}
task pmdTest(type: Pmd) {
dependsOn 'assembleDebug'
ruleSetFiles = files("${project.rootDir}/config/pmd/rules.xml", "${project.rootDir}/config/pmd/rules-test.xml")
ruleSets = [] // otherwise defaults clash with the list in rules.xml
source 'src/test/java', 'src/androidTest/java'
include '**/*.java'
}
task pmd(dependsOn: [pmdMain, pmdTest]) {}

67
app/lint.xml Normal file
View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<!-- Our translations are crowd-sourced -->
<issue id="MissingTranslation" severity="ignore"/>
<!-- to make CI fail on errors until this is fixed
https://github.com/rtyley/spongycastle/issues/7 -->
<issue id="InvalidPackage" severity="warning"/>
<issue id="ImpliedQuantity" severity="error"/>
<issue id="DefaultLocale" severity="error"/>
<issue id="SimpleDateFormat" severity="error"/>
<issue id="NewApi" severity="error"/>
<issue id="InlinedApi" severity="error"/>
<!-- These are important to us, so promote from warning to error -->
<issue id="UnusedResources" severity="error">
<ignore path="src/main/res/drawable/category_**.png" />
<ignore path="src/main/res/values/dimens.xml"/>
<ignore path="src/main/res/values/styles.xml"/>
<ignore path="src/full/res/values/styles.xml"/>
<!-- keep a single strings.xml for all build flavors -->
<ignore path="src/main/res/values**/strings.xml"/>
</issue>
<issue id="AppCompatMethod" severity="error"/>
<issue id="NestedScrolling" severity="error"/>
<issue id="Typos" severity="error"/>
<issue id="StringFormatCount" severity="error"/>
<issue id="UnsafeProtectedBroadcastReceiver" severity="error"/>
<issue id="GetInstance" severity="error"/>
<issue id="PackageManagerGetSignatures" severity="error"/>
<issue id="HardwareIds" severity="error"/>
<issue id="TrustAllX509TrustManager" severity="error">
<!-- these come from included libraries -->
<ignore path="org/apache/commons/net/ftp/FTPSTrustManager.class"/>
<ignore path="org/bouncycastle/est/jcajce/JcaJceUtils$1.class"/>
<ignore path="org/bouncycastle/est/jcajce/JcaJceUtils$2.class"/>
<ignore path="org/apache/commons/net/util/TrustManagerUtils$TrustManager.class"/>
</issue>
<issue id="PluralsCandidate" severity="error"/>
<issue id="HardcodedText" severity="error"/>
<issue id="RtlCompat" severity="error"/>
<issue id="RtlEnabled" severity="error"/>
<!-- both the correct and deprecated locales need to be present for
them to be recognized on all devices -->
<issue id="LocaleFolder" severity="error">
<ignore path="src/main/res/values-he"/>
<ignore path="src/main/res/values-id"/>
</issue>
<issue id="SetWorldReadable" severity="error">
<ignore path="src/main/java/org/fdroid/fdroid/installer/ApkFileProvider.java"/>
</issue>
<issue id="ProtectedPermissions" severity="error">
<ignore path="src/debug/AndroidManifest.xml"/>
<ignore path="src/full/AndroidManifest.xml"/>
</issue>
<!-- these should be fixed, but it'll be a chunk of work -->
<issue id="SetTextI18n" severity="error">
<ignore path="src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java"/>
<ignore path="src/main/java/org/fdroid/fdroid/views/apps/AppListItemController.java"/>
</issue>
</lint>

47
app/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,47 @@
-dontobfuscate
-dontoptimize
-keepattributes SourceFile,LineNumberTable,Exceptions
-keep class org.fdroid.fdroid.** {*;}
-dontskipnonpubliclibraryclassmembers
-dontwarn android.test.**
-dontwarn javax.naming.**
-dontwarn org.slf4j.**
-dontnote org.apache.http.**
-dontnote android.net.http.**
-dontnote **ILicensingService
# Needed for espresso https://stackoverflow.com/a/21706087
-dontwarn org.xmlpull.v1.**
# StrongHttpsClient and its support classes are totally unused, so the
# ch.boye.httpclientandroidlib.** classes are also unneeded
-dontwarn info.guardianproject.netcipher.client.**
# These libraries are known to break if minification is enabled on them. They
# use reflection to instantiate classes, for example. If the keep flags are
# removed, proguard will strip classes which are required, which may result in
# crashes.
-keep class kellinwood.security.zipsigner.** {*;}
-keep class org.bouncycastle.** {*;}
# This keeps class members used for SystemInstaller IPC.
# Reference: https://gitlab.com/fdroid/fdroidclient/issues/79
-keepclassmembers class * implements android.os.IInterface {
public *;
}
-keepattributes *Annotation*,EnclosingMethod,Signature
-keepnames class com.fasterxml.jackson.** { *; }
-dontwarn com.fasterxml.jackson.databind.ext.**
-keep class org.codehaus.** { *; }
-keepclassmembers public final enum org.codehaus.jackson.annotate.JsonAutoDetect$Visibility {
public static final org.codehaus.jackson.annotate.JsonAutoDetect$Visibility *; }
-keep public class your.class.** {
*;
}
# This is necessary so that RemoteWorkManager can be initialized (also marked with @Keep)
-keep class androidx.work.multiprocess.RemoteWorkManagerClient {
public <init>(...);
}

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.fdroid.fdroid.tests"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator" />
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
which is needed when building test cases. -->
<application>
<uses-library
android:name="android.test.runner"
android:required="false" />
</application>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>

View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<fdroid>
<repo name="F-Droid" icon="fdroid-icon.png" maxage="14"
pubkey="3082035e30820246a00302010202044c49cd00300d06092a864886f70d01010505003071310b300906035504061302554b3110300e06035504081307556e6b6e6f776e3111300f0603550407130857657468657262793110300e060355040a1307556e6b6e6f776e3110300e060355040b1307556e6b6e6f776e311930170603550403131043696172616e2047756c746e69656b73301e170d3130303732333137313032345a170d3337313230383137313032345a3071310b300906035504061302554b3110300e06035504081307556e6b6e6f776e3111300f0603550407130857657468657262793110300e060355040a1307556e6b6e6f776e3110300e060355040b1307556e6b6e6f776e311930170603550403131043696172616e2047756c746e69656b7330820122300d06092a864886f70d01010105000382010f003082010a028201010096d075e47c014e7822c89fd67f795d23203e2a8843f53ba4e6b1bf5f2fd0e225938267cfcae7fbf4fe596346afbaf4070fdb91f66fbcdf2348a3d92430502824f80517b156fab00809bdc8e631bfa9afd42d9045ab5fd6d28d9e140afc1300917b19b7c6c4df4a494cf1f7cb4a63c80d734265d735af9e4f09455f427aa65a53563f87b336ca2c19d244fcbba617ba0b19e56ed34afe0b253ab91e2fdb1271f1b9e3c3232027ed8862a112f0706e234cf236914b939bcf959821ecb2a6c18057e070de3428046d94b175e1d89bd795e535499a091f5bc65a79d539a8d43891ec504058acb28c08393b5718b57600a211e803f4a634e5c57f25b9b8c4422c6fd90203010001300d06092a864886f70d0101050500038201010008e4ef699e9807677ff56753da73efb2390d5ae2c17e4db691d5df7a7b60fc071ae509c5414be7d5da74df2811e83d3668c4a0b1abc84b9fa7d96b4cdf30bba68517ad2a93e233b042972ac0553a4801c9ebe07bf57ebe9a3b3d6d663965260e50f3b8f46db0531761e60340a2bddc3426098397fda54044a17e5244549f9869b460ca5e6e216b6f6a2db0580b480ca2afe6ec6b46eedacfa4aa45038809ece0c5978653d6c85f678e7f5a2156d1bedd8117751e64a4b0dcd140f3040b021821a8d93aed8d01ba36db6c82372211fed714d9a32607038cdfd565bd529ffc637212aaa2c224ef22b603eccefb5bf1e085c191d4b24fe742b17ab3f55d4e6f05ef"
timestamp="1467169032" url="http://f-droid.org/repo" version="16">
<description>
This is just a test of the extended permissions attributes.
</description>
</repo>
<application id="urzip.at.or.at.urzip">
<id>at.bitfire.davdroid</id>
<added>2013-10-13</added>
<lastupdated>2016-06-26</lastupdated>
<name>DAVdroid</name>
<summary>Contacts and Calendar sync</summary>
<icon>at.bitfire.davdroid.107.png</icon>
<desc>apk generated from urzip to test extended permissions</desc>
<license>GPLv3</license>
<categories>Internet</categories>
<category>Internet</category>
<web>https://davdroid.bitfire.at/</web>
<source>https://davdroid.bitfire.at/source/</source>
<tracker>https://davdroid.bitfire.at/forums/</tracker>
<changelog>https://gitlab.com/bitfireAT/davdroid/tags</changelog>
<donate>https://davdroid.bitfire.at/donate/</donate>
<bitcoin>1KSCy7RHztKuhW9fLLaUYqdwdC2iwbejZU</bitcoin>
<flattr>2100160</flattr>
<marketversion>1.1.1.2</marketversion>
<marketvercode>107</marketvercode>
<package>
<version>1.3.2-FAKE</version>
<versioncode>117</versioncode>
<apkname>org.fdroid.extendedpermissionstest.apk</apkname>
<srcname>at.bitfire.davdroid_116_src.tar.gz</srcname>
<hash type="sha256">f1aa02257e99c167d2ea9b0e9525c3ce7c181fe2e7f4dd00b65dd81ed2e27a62
</hash>
<sig>03542175324d067b4c36582242f8aecc</sig>
<size>3298864</size>
<sdkver>14</sdkver>
<targetSdkVersion>23</targetSdkVersion>
<added>2016-09-22</added>
<permissions>
READ_EXTERNAL_STORAGE,WRITE_SYNC_SETTINGS,ACCESS_NETWORK_STATE,WRITE_EXTERNAL_STORAGE,WRITE_CONTACTS,ACCESS_WIFI_STATE,REQUEST_IGNORE_BATTERY_OPTIMIZATIONS,WRITE_CALENDAR,READ_CONTACTS,READ_SYNC_SETTINGS,MANAGE_ACCOUNTS,INTERNET,AUTHENTICATE_ACCOUNTS,GET_ACCOUNTS,READ_CALENDAR,READ_SYNC_STATS
</permissions>
<uses-permission name="android.permission.GET_ACCOUNTS" maxSdkVersion="22" />
<uses-permission name="android.permission.READ_EXTERNAL_STORAGE" maxSdkVersion="18" />
<uses-permission name="android.permission.WRITE_EXTERNAL_STORAGE" maxSdkVersion="18" />
<uses-permission name="android.permission.AUTHENTICATE_ACCOUNTS" maxSdkVersion="22" />
<uses-permission name="android.permission.MANAGE_ACCOUNTS" maxSdkVersion="22" />
<uses-permission-sdk-23 name="android.permission.CAMERA" />
<uses-permission-sdk-23 name="android.permission.CALL_PHONE" maxSdkVersion="23" />
</package>
<package>
<version>1.3.1-ose</version>
<versioncode>116</versioncode>
<apkname>at.bitfire.davdroid_116.apk</apkname>
<srcname>at.bitfire.davdroid_116_src.tar.gz</srcname>
<hash type="sha256">f1aa02257e99c167d2ea9b0e9525c3ce7c181fe2e7f4dd00b65dd81ed2e27a62
</hash>
<sig>03542175324d067b4c36582242f8aecc</sig>
<size>3298864</size>
<sdkver>14</sdkver>
<targetSdkVersion>24</targetSdkVersion>
<added>2016-09-21</added>
<permissions>
READ_EXTERNAL_STORAGE,WRITE_SYNC_SETTINGS,ACCESS_NETWORK_STATE,WRITE_EXTERNAL_STORAGE,org.dmfs.permission.READ_TASKS,WRITE_CONTACTS,ACCESS_WIFI_STATE,REQUEST_IGNORE_BATTERY_OPTIMIZATIONS,WRITE_CALENDAR,READ_CONTACTS,READ_SYNC_SETTINGS,MANAGE_ACCOUNTS,INTERNET,AUTHENTICATE_ACCOUNTS,GET_ACCOUNTS,READ_CALENDAR,org.dmfs.permission.WRITE_TASKS
</permissions>
<uses-permission name="android.permission.GET_ACCOUNTS" maxSdkVersion="22" />
<uses-permission name="android.permission.READ_EXTERNAL_STORAGE" maxSdkVersion="18" />
<uses-permission name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission name="android.permission.AUTHENTICATE_ACCOUNTS" maxSdkVersion="22" />
<uses-permission name="android.permission.MANAGE_ACCOUNTS" maxSdkVersion="22" />
</package>
<package>
<version>1.1.1.2</version>
<versioncode>107</versioncode>
<apkname>at.bitfire.davdroid_107.apk</apkname>
<srcname>at.bitfire.davdroid_107_src.tar.gz</srcname>
<hash type="sha256">9a616f2e97bf8cf012baf896f95667dea4e3ce3252b31c5715073638a9fcc3d4
</hash>
<sig>03542175324d067b4c36582242f8aecc</sig>
<size>3134363</size>
<sdkver>14</sdkver>
<targetSdkVersion>23</targetSdkVersion>
<added>2016-06-26</added>
<permissions>
org.dmfs.permission.READ_TASKS,WRITE_CONTACTS,GET_ACCOUNTS,AUTHENTICATE_ACCOUNTS,WRITE_EXTERNAL_STORAGE,READ_CALENDAR,ACCESS_WIFI_STATE,org.dmfs.permission.WRITE_TASKS,ACCESS_NETWORK_STATE,WRITE_CALENDAR,READ_CONTACTS,READ_SYNC_SETTINGS,INTERNET,MANAGE_ACCOUNTS,WRITE_SYNC_SETTINGS
</permissions>
</package>
<package>
<version>1.1.1.1</version>
<versioncode>105</versioncode>
<apkname>at.bitfire.davdroid_105.apk</apkname>
<srcname>at.bitfire.davdroid_105_src.tar.gz</srcname>
<hash type="sha256">4a0408c61536a1cc1028cea4273adbde2e57dfa2b12d93c3b52f4c3d095e2849
</hash>
<sig>03542175324d067b4c36582242f8aecc</sig>
<size>3131567</size>
<sdkver>14</sdkver>
<targetSdkVersion>23</targetSdkVersion>
<added>2016-06-24</added>
<permissions>
org.dmfs.permission.READ_TASKS,READ_EXTERNAL_STORAGE,WRITE_CONTACTS,GET_ACCOUNTS,AUTHENTICATE_ACCOUNTS,WRITE_EXTERNAL_STORAGE,READ_CALENDAR,ACCESS_WIFI_STATE,org.dmfs.permission.WRITE_TASKS,ACCESS_NETWORK_STATE,WRITE_CALENDAR,READ_CONTACTS,READ_SYNC_SETTINGS,INTERNET,MANAGE_ACCOUNTS,WRITE_SYNC_SETTINGS
</permissions>
</package>
<package>
<version>1.1.1</version>
<versioncode>104</versioncode>
<apkname>at.bitfire.davdroid_104.apk</apkname>
<srcname>at.bitfire.davdroid_104_src.tar.gz</srcname>
<hash type="sha256">09ba34996177efe8b1498a93fe6521ab84efab3bccb0f42449116e80b59e5b56
</hash>
<sig>03542175324d067b4c36582242f8aecc</sig>
<size>3131367</size>
<sdkver>14</sdkver>
<targetSdkVersion>23</targetSdkVersion>
<added>2016-06-22</added>
<permissions>
org.dmfs.permission.READ_TASKS,READ_EXTERNAL_STORAGE,WRITE_CONTACTS,GET_ACCOUNTS,AUTHENTICATE_ACCOUNTS,WRITE_EXTERNAL_STORAGE,READ_CALENDAR,ACCESS_WIFI_STATE,org.dmfs.permission.WRITE_TASKS,ACCESS_NETWORK_STATE,WRITE_CALENDAR,READ_CONTACTS,READ_SYNC_SETTINGS,INTERNET,MANAGE_ACCOUNTS,WRITE_SYNC_SETTINGS
</permissions>
</package>
</application>
</fdroid>

View File

@ -0,0 +1,43 @@
package org.fdroid.fdroid;
import android.content.Context;
import android.util.Log;
import androidx.annotation.Nullable;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import static org.junit.Assert.fail;
public class AssetUtils {
private static final String TAG = "Utils";
/**
* This requires {@link Context} from {@link android.app.Instrumentation#getContext()}
*/
@Nullable
public static File copyAssetToDir(Context context, String assetName, File directory) {
File tempFile = null;
InputStream input = null;
OutputStream output = null;
try {
tempFile = File.createTempFile(assetName, ".testasset", directory);
Log.i(TAG, "Copying asset file " + assetName + " to directory " + directory);
input = context.getAssets().open(assetName);
output = new FileOutputStream(tempFile);
Utils.copy(input, output);
} catch (IOException e) {
Log.e(TAG, "Check the context is from Instrumentation.getContext()");
fail(e.getMessage());
} finally {
Utils.closeQuietly(output);
Utils.closeQuietly(input);
}
return tempFile;
}
}

View File

@ -0,0 +1,222 @@
package org.fdroid.fdroid;
import android.app.Instrumentation;
import android.content.Context;
import android.content.res.AssetManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.HashSet;
import java.util.IllegalFormatException;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Runs through all of the translated strings and tests them with the same format
* values that the source strings expect. This is to ensure that the formats in
* the translations are correct in number and in type (e.g. {@code s} or {@code s}.
* It reads the source formats and then builds {@code formats} to represent the
* position and type of the formats. Then it runs through all of the translations
* with formats of the correct number and type.
*/
@RunWith(AndroidJUnit4.class)
public class LocalizationTest {
public static final String TAG = "LocalizationTest";
private final Pattern androidFormat = Pattern.compile("(%[a-z0-9]\\$?[a-z]?)");
private final Locale[] locales = Locale.getAvailableLocales();
private final HashSet<String> localeNames = new HashSet<>(locales.length);
private AssetManager assets;
private Configuration config;
private Resources resources;
@Before
public void setUp() {
for (Locale locale : Languages.LOCALES_TO_TEST) {
localeNames.add(locale.toString());
}
for (Locale locale : locales) {
localeNames.add(locale.toString());
}
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
Context context = instrumentation.getTargetContext();
assets = context.getAssets();
config = context.getResources().getConfiguration();
config.locale = Locale.ENGLISH;
// Resources() requires DisplayMetrics, but they are only needed for drawables
resources = new Resources(assets, new DisplayMetrics(), config);
}
@Test
public void testLoadAllPlural() throws IllegalAccessException {
Field[] fields = R.plurals.class.getDeclaredFields();
HashMap<String, String> haveFormats = new HashMap<>();
for (Field field : fields) {
//Log.i(TAG, field.getName());
int resId = field.getInt(int.class);
CharSequence string = resources.getQuantityText(resId, 4);
//Log.i(TAG, field.getName() + ": '" + string + "'");
Matcher matcher = androidFormat.matcher(string);
int matches = 0;
char[] formats = new char[5];
while (matcher.find()) {
String match = matcher.group(0);
char formatType = match.charAt(match.length() - 1);
switch (match.length()) {
case 2:
formats[matches] = formatType;
matches++;
break;
case 4:
formats[Integer.parseInt(match.substring(1, 2)) - 1] = formatType;
break;
case 5:
formats[Integer.parseInt(match.substring(1, 3)) - 1] = formatType;
break;
default:
throw new IllegalStateException(field.getName() + " has bad format: " + match);
}
}
haveFormats.put(field.getName(), new String(formats).trim());
}
for (Locale locale : locales) {
config.locale = locale;
// Resources() requires DisplayMetrics, but they are only needed for drawables
resources = new Resources(assets, new DisplayMetrics(), config);
for (Field field : fields) {
String formats = null;
try {
int resId = field.getInt(int.class);
for (int quantity = 0; quantity < 567; quantity++) {
resources.getQuantityString(resId, quantity);
}
formats = haveFormats.get(field.getName());
switch (formats) {
case "d":
resources.getQuantityString(resId, 1, 1);
break;
case "s":
resources.getQuantityString(resId, 1, "ONE");
break;
case "ds":
resources.getQuantityString(resId, 2, 1, "TWO");
break;
default:
if (!TextUtils.isEmpty(formats)) {
throw new IllegalStateException("Pattern not included in tests: " + formats);
}
}
} catch (IllegalFormatException | Resources.NotFoundException e) {
Log.i(TAG, locale + " " + field.getName());
throw new IllegalArgumentException("Bad '" + formats + "' format in " + locale + " "
+ field.getName() + ": " + e.getMessage());
}
}
}
}
@Test
public void testLoadAllStrings() throws IllegalAccessException {
Field[] fields = R.string.class.getDeclaredFields();
HashMap<String, String> haveFormats = new HashMap<>();
for (Field field : fields) {
String string = resources.getString(field.getInt(int.class));
Matcher matcher = androidFormat.matcher(string);
int matches = 0;
char[] formats = new char[5];
while (matcher.find()) {
String match = matcher.group(0);
char formatType = match.charAt(match.length() - 1);
switch (match.length()) {
case 2:
formats[matches] = formatType;
matches++;
break;
case 4:
formats[Integer.parseInt(match.substring(1, 2)) - 1] = formatType;
break;
case 5:
formats[Integer.parseInt(match.substring(1, 3)) - 1] = formatType;
break;
default:
throw new IllegalStateException(field.getName() + " has bad format: " + match);
}
}
haveFormats.put(field.getName(), new String(formats).trim());
}
for (Locale locale : locales) {
config.locale = locale;
// Resources() requires DisplayMetrics, but they are only needed for drawables
resources = new Resources(assets, new DisplayMetrics(), config);
for (Field field : fields) {
int resId = field.getInt(int.class);
resources.getString(resId);
String formats = haveFormats.get(field.getName());
try {
switch (formats) {
case "d":
resources.getString(resId, 1);
break;
case "dd":
resources.getString(resId, 1, 2);
break;
case "ds":
resources.getString(resId, 1, "TWO");
break;
case "dds":
resources.getString(resId, 1, 2, "THREE");
break;
case "sds":
resources.getString(resId, "ONE", 2, "THREE");
break;
case "s":
resources.getString(resId, "ONE");
break;
case "ss":
resources.getString(resId, "ONE", "TWO");
break;
case "sss":
resources.getString(resId, "ONE", "TWO", "THREE");
break;
case "ssss":
resources.getString(resId, "ONE", "TWO", "THREE", "FOUR");
break;
case "ssd":
resources.getString(resId, "ONE", "TWO", 3);
break;
case "sssd":
resources.getString(resId, "ONE", "TWO", "THREE", 4);
break;
default:
if (!TextUtils.isEmpty(formats)) {
throw new IllegalStateException("Pattern not included in tests: " + formats);
}
}
} catch (Exception e) {
Log.i(TAG, locale + " " + field.getName());
throw new IllegalArgumentException("Bad format in '" + locale + "' '" + field.getName() + "': "
+ e.getMessage());
}
}
}
}
}

View File

@ -0,0 +1,303 @@
package org.fdroid.fdroid;
import android.Manifest;
import android.app.ActivityManager;
import android.app.Instrumentation;
import android.content.Context;
import android.os.Build;
import androidx.core.content.ContextCompat;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.filters.LargeTest;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.espresso.IdlingPolicies;
import androidx.test.espresso.ViewInteraction;
import androidx.test.rule.ActivityTestRule;
import androidx.test.rule.GrantPermissionRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.uiautomator.UiDevice;
import androidx.test.uiautomator.UiObject;
import androidx.test.uiautomator.UiObjectNotFoundException;
import androidx.test.uiautomator.UiSelector;
import android.util.Log;
import android.view.View;
import org.fdroid.fdroid.views.StatusBanner;
import org.fdroid.fdroid.views.main.MainActivity;
import org.hamcrest.Matchers;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.swipeDown;
import static androidx.test.espresso.action.ViewActions.swipeLeft;
import static androidx.test.espresso.action.ViewActions.swipeRight;
import static androidx.test.espresso.action.ViewActions.swipeUp;
import static androidx.test.espresso.action.ViewActions.typeText;
import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
@LargeTest
@RunWith(AndroidJUnit4.class)
public class MainActivityEspressoTest {
public static final String TAG = "MainActivityEspressoTest";
/**
* Emulators older than {@code android-25} seem to fail at running Espresso tests.
* <p>
* ARM emulators are too slow to run these tests in a useful way. The sad
* thing is that it would probably work if Android didn't put up the ANR
* "Process system isn't responding" on boot each time. There seems to be no
* way to increase the ANR timeout.
*/
private static boolean canRunEspresso() {
if (Build.VERSION.SDK_INT < 25
|| (Build.SUPPORTED_ABIS[0].startsWith("arm") && isEmulator())) {
Log.e(TAG, "SKIPPING TEST: ARM emulators are too slow to run these tests in a useful way");
return false;
}
return true;
}
@BeforeClass
public static void classSetUp() {
IdlingPolicies.setIdlingResourceTimeout(10, TimeUnit.MINUTES);
IdlingPolicies.setMasterPolicyTimeout(10, TimeUnit.MINUTES);
if (!canRunEspresso()) {
return;
}
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
try {
UiDevice.getInstance(instrumentation)
.executeShellCommand("pm grant "
+ instrumentation.getTargetContext().getPackageName()
+ " android.permission.SET_ANIMATION_SCALE");
} catch (IOException e) {
e.printStackTrace();
}
SystemAnimations.disableAll(ApplicationProvider.getApplicationContext());
// dismiss the ANR or any other system dialogs that might be there
UiObject button = new UiObject(new UiSelector().text("Wait").enabled(true));
try {
button.click();
} catch (UiObjectNotFoundException e) {
Log.d(TAG, e.getLocalizedMessage());
}
new UiWatchers().registerAnrAndCrashWatchers();
Context context = instrumentation.getTargetContext();
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
ActivityManager activityManager = ContextCompat.getSystemService(context, ActivityManager.class);
activityManager.getMemoryInfo(mi);
long percentAvail = mi.availMem / mi.totalMem;
Log.i(TAG, "RAM: " + mi.availMem + " / " + mi.totalMem + " = " + percentAvail);
}
@AfterClass
public static void classTearDown() {
SystemAnimations.enableAll(ApplicationProvider.getApplicationContext());
}
public static boolean isEmulator() {
return Build.FINGERPRINT.startsWith("generic")
|| Build.FINGERPRINT.startsWith("unknown")
|| Build.MODEL.contains("google_sdk")
|| Build.MODEL.contains("Emulator")
|| Build.MODEL.contains("Android SDK built for x86")
|| Build.MANUFACTURER.contains("Genymotion")
|| (Build.BRAND.startsWith("generic") && Build.DEVICE.startsWith("generic"))
|| "google_sdk".equals(Build.PRODUCT);
}
@Before
public void setUp() {
assumeTrue(canRunEspresso());
}
/**
* Placate {@link android.os.StrictMode}
*
* @see <a href="https://github.com/aosp-mirror/platform_frameworks_base/commit/6f3a38f3afd79ed6dddcef5c83cb442d6749e2ff"> Run finalizers before counting for StrictMode</a>
*/
@After
public void tearDown() {
System.gc();
System.runFinalization();
System.gc();
}
@Rule
public ActivityTestRule<MainActivity> activityTestRule =
new ActivityTestRule<>(MainActivity.class);
@Rule
public GrantPermissionRule accessCoarseLocationPermissionRule = GrantPermissionRule.grant(
Manifest.permission.ACCESS_COARSE_LOCATION);
@Rule
public GrantPermissionRule writeExternalStoragePermissionRule = GrantPermissionRule.grant(
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
public void bottomNavFlavorCheck() {
onView(withText(R.string.main_menu__updates)).check(matches(isDisplayed()));
onView(withText(R.string.menu_settings)).check(matches(isDisplayed()));
onView(withText("THIS SHOULD NOT SHOW UP ANYWHERE!!!")).check(doesNotExist());
assertTrue(BuildConfig.FLAVOR.startsWith("full") || BuildConfig.FLAVOR.startsWith("basic"));
if (BuildConfig.FLAVOR.startsWith("basic")) {
onView(withText(R.string.main_menu__latest_apps)).check(matches(isDisplayed()));
onView(withText(R.string.main_menu__categories)).check(doesNotExist());
onView(withText(R.string.main_menu__swap_nearby)).check(doesNotExist());
}
if (BuildConfig.FLAVOR.startsWith("full")) {
onView(withText(R.string.main_menu__latest_apps)).check(matches(isDisplayed()));
onView(withText(R.string.main_menu__categories)).check(matches(isDisplayed()));
onView(withText(R.string.main_menu__swap_nearby)).check(matches(isDisplayed()));
}
}
@LargeTest
@Test
public void showSettings() {
ViewInteraction settingsBottonNavButton = onView(
allOf(withText(R.string.menu_settings), isDisplayed()));
settingsBottonNavButton.perform(click());
onView(withText(R.string.preference_manage_installed_apps)).check(matches(isDisplayed()));
if (BuildConfig.FLAVOR.startsWith("basic") && BuildConfig.APPLICATION_ID.endsWith(".debug")) {
// TODO fix me by sorting out the flavor applicationId for debug builds in app/build.gradle
Log.i(TAG, "Skipping the remainder of showSettings test because it just crashes on basic .debug builds");
return;
}
ViewInteraction manageInstalledAppsButton = onView(
allOf(withText(R.string.preference_manage_installed_apps), isDisplayed()));
manageInstalledAppsButton.perform(click());
onView(withText(R.string.installed_apps__activity_title)).check(matches(isDisplayed()));
onView(withContentDescription(R.string.abc_action_bar_up_description)).perform(click());
onView(withText(R.string.menu_manage)).perform(click());
onView(withContentDescription(R.string.abc_action_bar_up_description)).perform(click());
manageInstalledAppsButton.perform(click());
onView(withText(R.string.installed_apps__activity_title)).check(matches(isDisplayed()));
onView(withContentDescription(R.string.abc_action_bar_up_description)).perform(click());
onView(withText(R.string.menu_manage)).perform(click());
onView(withContentDescription(R.string.abc_action_bar_up_description)).perform(click());
onView(withText(R.string.about_title)).perform(click());
onView(withId(R.id.version)).check(matches(isDisplayed()));
onView(withId(R.id.ok_button)).perform(click());
onView(withId(android.R.id.list_container)).perform(swipeUp()).perform(swipeUp()).perform(swipeUp());
}
@LargeTest
@Test
public void showUpdates() {
ViewInteraction updatesBottonNavButton = onView(allOf(withText(R.string.main_menu__updates), isDisplayed()));
updatesBottonNavButton.perform(click());
onView(withText(R.string.main_menu__updates)).check(matches(isDisplayed()));
}
@LargeTest
@Test
public void startSwap() {
if (!BuildConfig.FLAVOR.startsWith("full")) {
return;
}
ViewInteraction nearbyBottonNavButton = onView(
allOf(withText(R.string.main_menu__swap_nearby), isDisplayed()));
nearbyBottonNavButton.perform(click());
ViewInteraction findPeopleButton = onView(
allOf(withId(R.id.find_people_button), withText(R.string.nearby_splash__find_people_button),
isDisplayed()));
findPeopleButton.perform(click());
onView(withText(R.string.swap_send_fdroid)).check(matches(isDisplayed()));
}
@LargeTest
@Test
public void showCategories() {
if (!BuildConfig.FLAVOR.startsWith("full")) {
return;
}
onView(allOf(withText(R.string.menu_settings), isDisplayed())).perform(click());
onView(allOf(withText(R.string.main_menu__categories), isDisplayed())).perform(click());
onView(allOf(withId(R.id.swipe_to_refresh), isDisplayed()))
.perform(swipeDown())
.perform(swipeUp())
.perform(swipeUp())
.perform(swipeUp())
.perform(swipeUp())
.perform(swipeUp())
.perform(swipeUp())
.perform(swipeDown())
.perform(swipeDown())
.perform(swipeRight())
.perform(swipeLeft())
.perform(swipeLeft())
.perform(swipeLeft())
.perform(swipeLeft())
.perform(click());
}
@LargeTest
@Test
public void showLatest() {
if (!BuildConfig.FLAVOR.startsWith("full")) {
return;
}
onView(Matchers.<View>instanceOf(StatusBanner.class)).check(matches(not(isDisplayed())));
onView(allOf(withText(R.string.menu_settings), isDisplayed())).perform(click());
onView(allOf(withText(R.string.main_menu__latest_apps), isDisplayed())).perform(click());
onView(allOf(withId(R.id.swipe_to_refresh), isDisplayed()))
.perform(swipeDown())
.perform(swipeUp())
.perform(swipeUp())
.perform(swipeUp())
.perform(swipeDown())
.perform(swipeUp())
.perform(swipeDown())
.perform(swipeDown())
.perform(swipeDown())
.perform(swipeDown())
.perform(click());
}
@LargeTest
@Test
public void showSearch() {
onView(allOf(withText(R.string.menu_settings), isDisplayed())).perform(click());
onView(withId(R.id.fab_search)).check(doesNotExist());
if (!BuildConfig.FLAVOR.startsWith("full")) {
return;
}
onView(allOf(withText(R.string.main_menu__latest_apps), isDisplayed())).perform(click());
onView(allOf(withId(R.id.fab_search), isDisplayed())).perform(click());
onView(withId(R.id.sort)).check(matches(isDisplayed()));
onView(allOf(withId(R.id.search), isDisplayed()))
.perform(click())
.perform(typeText("test"));
onView(allOf(withId(R.id.sort), isDisplayed())).perform(click());
}
}

View File

@ -0,0 +1,372 @@
package org.fdroid.fdroid;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Replacer for the netstat utility, by reading the /proc filesystem it can find out the
* open connections of the system
* From http://www.ussg.iu.edu/hypermail/linux/kernel/0409.1/2166.html :
* It will first list all listening TCP sockets, and next list all established
* TCP connections. A typical entry of /proc/net/tcp would look like this (split
* up into 3 parts because of the length of the line):
* <p>
* 46: 010310AC:9C4C 030310AC:1770 01
* | | | | | |--> connection state
* | | | | |------> remote TCP port number
* | | | |-------------> remote IPv4 address
* | | |--------------------> local TCP port number
* | |---------------------------> local IPv4 address
* |----------------------------------> number of entry
* <p>
* 00000150:00000000 01:00000019 00000000
* | | | | |--> number of unrecovered RTO timeouts
* | | | |----------> number of jiffies until timer expires
* | | |----------------> timer_active (see below)
* | |----------------------> receive-queue
* |-------------------------------> transmit-queue
* <p>
* 1000 0 54165785 4 cd1e6040 25 4 27 3 -1
* | | | | | | | | | |--> slow start size threshold,
* | | | | | | | | | or -1 if the treshold
* | | | | | | | | | is >= 0xFFFF
* | | | | | | | | |----> sending congestion window
* | | | | | | | |-------> (ack.quick<<1)|ack.pingpong
* | | | | | | |---------> Predicted tick of soft clock
* | | | | | | (delayed ACK control data)
* | | | | | |------------> retransmit timeout
* | | | | |------------------> location of socket in memory
* | | | |-----------------------> socket reference count
* | | |-----------------------------> inode
* | |----------------------------------> unanswered 0-window probes
* |---------------------------------------------> uid
*
* @author Ciprian Dobre
*/
public class Netstat {
/**
* Possible values for states in /proc/net/tcp
*/
private static final String[] STATES = {
"ESTBLSH", "SYNSENT", "SYNRECV", "FWAIT1", "FWAIT2", "TMEWAIT",
"CLOSED", "CLSWAIT", "LASTACK", "LISTEN", "CLOSING", "UNKNOWN",
};
/**
* Pattern used when parsing through /proc/net/tcp
*/
private static final Pattern NET_PATTERN = Pattern.compile(
"\\d+:\\s+([\\dA-F]+):([\\dA-F]+)\\s+([\\dA-F]+):([\\dA-F]+)\\s+([\\dA-F]+)\\s+" +
"[\\dA-F]+:[\\dA-F]+\\s+[\\dA-F]+:[\\dA-F]+\\s+[\\dA-F]+\\s+([\\d]+)\\s+[\\d]+\\s+([\\d]+)");
/**
* Utility method that converts an address from a hex representation as founded in /proc to String representation
*/
private static String getAddress(final String hexa) {
try {
// first let's convert the address to Integer
final long v = Long.parseLong(hexa, 16);
// in /proc the order is little endian and java uses big endian order we also need to invert the order
final long adr = (v >>> 24) | (v << 24) |
((v << 8) & 0x00FF0000) | ((v >> 8) & 0x0000FF00);
// and now it's time to output the result
return ((adr >> 24) & 0xff) + "." + ((adr >> 16) & 0xff) + "." + ((adr >> 8) & 0xff) + "." + (adr & 0xff);
} catch (Exception ex) {
ex.printStackTrace();
return "0.0.0.0"; // NOPMD
}
}
private static int getInt16(final String hexa) {
try {
return Integer.parseInt(hexa, 16);
} catch (Exception ex) {
ex.printStackTrace();
return -1;
}
}
/*
private static String getPName(final int pid) {
final Pattern pattern = Pattern.compile("Name:\\s*(\\S+)");
try {
BufferedReader in = new BufferedReader(new FileReader("/proc/" + pid + "/status"));
String line;
while ((line = in.readLine()) != null) {
final Matcher matcher = pattern.matcher(line);
if (matcher.find()) {
return matcher.group(1);
}
}
in.close();
} catch (Throwable t) {
// ignored
}
return "UNKNOWN";
}
*/
/**
* Method used to question for the connections currently openned
*
* @return The list of connections (as Connection objects)
*/
public static List<Connection> getConnections() {
final ArrayList<Connection> net = new ArrayList<>();
// read from /proc/net/tcp the list of currently openned socket connections
try {
BufferedReader in = new BufferedReader(new FileReader("/proc/net/tcp"));
String line;
while ((line = in.readLine()) != null) { // NOPMD
Matcher matcher = NET_PATTERN.matcher(line);
if (matcher.find()) {
final Connection c = new Connection();
c.setProtocol(Connection.TCP_CONNECTION);
net.add(c);
final String localPortHexa = matcher.group(2);
final String remoteAddressHexa = matcher.group(3);
final String remotePortHexa = matcher.group(4);
final String statusHexa = matcher.group(5);
//final String uid = matcher.group(6);
//final String inode = matcher.group(7);
c.setLocalPort(getInt16(localPortHexa));
c.setRemoteAddress(getAddress(remoteAddressHexa));
c.setRemotePort(getInt16(remotePortHexa));
try {
c.setStatus(STATES[Integer.parseInt(statusHexa, 16) - 1]);
} catch (Exception ex) {
c.setStatus(STATES[11]); // unknown
}
c.setPID(-1); // unknown
c.setPName("UNKNOWN");
}
}
in.close();
} catch (Throwable t) { // NOPMD
// ignored
}
// read from /proc/net/udp the list of currently openned socket connections
try {
BufferedReader in = new BufferedReader(new FileReader("/proc/net/udp"));
String line;
while ((line = in.readLine()) != null) { // NOPMD
Matcher matcher = NET_PATTERN.matcher(line);
if (matcher.find()) {
final Connection c = new Connection();
c.setProtocol(Connection.UDP_CONNECTION);
net.add(c);
final String localPortHexa = matcher.group(2);
final String remoteAddressHexa = matcher.group(3);
final String remotePortHexa = matcher.group(4);
final String statusHexa = matcher.group(5);
//final String uid = matcher.group(6);
//final String inode = matcher.group(7);
c.setLocalPort(getInt16(localPortHexa));
c.setRemoteAddress(getAddress(remoteAddressHexa));
c.setRemotePort(getInt16(remotePortHexa));
try {
c.setStatus(STATES[Integer.parseInt(statusHexa, 16) - 1]);
} catch (Exception ex) {
c.setStatus(STATES[11]); // unknown
}
c.setPID(-1); // unknown
c.setPName("UNKNOWN");
}
}
in.close();
} catch (Throwable t) { // NOPMD
// ignored
}
// read from /proc/net/raw the list of currently openned socket connections
try {
BufferedReader in = new BufferedReader(new FileReader("/proc/net/raw"));
String line;
while ((line = in.readLine()) != null) { // NOPMD
Matcher matcher = NET_PATTERN.matcher(line);
if (matcher.find()) {
final Connection c = new Connection();
c.setProtocol(Connection.RAW_CONNECTION);
net.add(c);
//final String localAddressHexa = matcher.group(1);
final String localPortHexa = matcher.group(2);
final String remoteAddressHexa = matcher.group(3);
final String remotePortHexa = matcher.group(4);
final String statusHexa = matcher.group(5);
//final String uid = matcher.group(6);
//final String inode = matcher.group(7);
c.setLocalPort(getInt16(localPortHexa));
c.setRemoteAddress(getAddress(remoteAddressHexa));
c.setRemotePort(getInt16(remotePortHexa));
try {
c.setStatus(STATES[Integer.parseInt(statusHexa, 16) - 1]);
} catch (Exception ex) {
c.setStatus(STATES[11]); // unknown
}
c.setPID(-1); // unknown
c.setPName("UNKNOWN");
}
}
in.close();
} catch (Throwable t) { // NOPMD
// ignored
}
return net;
}
/**
* Informations about a given connection
*
* @author Ciprian Dobre
*/
public static class Connection {
/**
* Types of connection protocol
***/
public static final byte TCP_CONNECTION = 0;
public static final byte UDP_CONNECTION = 1;
public static final byte RAW_CONNECTION = 2;
/**
* <code>serialVersionUID</code>
*/
private static final long serialVersionUID = 1988671591829311032L;
/**
* The protocol of the connection (can be tcp, udp or raw)
*/
protected byte protocol;
/**
* The owner of the connection (username)
*/
protected String powner;
/**
* The pid of the owner process
*/
protected int pid;
/**
* The name of the program owning the connection
*/
protected String pname;
/**
* Local port
*/
protected int localPort;
/**
* Remote address of the connection
*/
protected String remoteAddress;
/**
* Remote port
*/
protected int remotePort;
/**
* Status of the connection
*/
protected String status;
public final byte getProtocol() {
return protocol;
}
public final void setProtocol(final byte protocol) {
this.protocol = protocol;
}
public final String getProtocolAsString() {
switch (protocol) {
case TCP_CONNECTION:
return "TCP";
case UDP_CONNECTION:
return "UDP";
case RAW_CONNECTION:
return "RAW";
}
return "UNKNOWN";
}
public final String getPOwner() {
return powner;
}
public final void setPOwner(final String owner) {
this.powner = owner;
}
public final int getPID() {
return pid;
}
public final void setPID(final int pid) {
this.pid = pid;
}
public final String getPName() {
return pname;
}
public final void setPName(final String pname) {
this.pname = pname;
}
public final int getLocalPort() {
return localPort;
}
public final void setLocalPort(final int localPort) {
this.localPort = localPort;
}
public final String getRemoteAddress() {
return remoteAddress;
}
public final void setRemoteAddress(final String remoteAddress) {
this.remoteAddress = remoteAddress;
}
public final int getRemotePort() {
return remotePort;
}
public final void setRemotePort(final int remotePort) {
this.remotePort = remotePort;
}
public final String getStatus() {
return status;
}
public final void setStatus(final String status) {
this.status = status;
}
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("[Prot=").append(getProtocolAsString());
buf.append(",POwner=").append(powner);
buf.append(",PID=").append(pid);
buf.append(",PName=").append(pname);
buf.append(",LPort=").append(localPort);
buf.append(",RAddress=").append(remoteAddress);
buf.append(",RPort=").append(remotePort);
buf.append(",Status=").append(status);
buf.append("]");
return buf.toString();
}
}
}

View File

@ -0,0 +1,62 @@
package org.fdroid.fdroid;
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.util.Log;
import java.lang.reflect.Method;
/**
* @see <a href="https://artemzin.com/blog/easiest-way-to-give-set_animation_scale-permission-for-your-ui-tests-on-android/>EASIEST WAY TO GIVE SET_ANIMATION_SCALE PERMISSION FOR YOUR UI TESTS ON ANDROID</a>
* @see <a href="https://gist.github.com/xrigau/11284124>Disable animations for Espresso tests</a>
*/
class SystemAnimations {
public static final String TAG = "SystemAnimations";
private static final float DISABLED = 0.0f;
private static final float DEFAULT = 1.0f;
static void disableAll(Context context) {
int permStatus = context.checkCallingOrSelfPermission(Manifest.permission.SET_ANIMATION_SCALE);
if (permStatus == PackageManager.PERMISSION_GRANTED) {
Log.i(TAG, "Manifest.permission.SET_ANIMATION_SCALE PERMISSION_GRANTED");
setSystemAnimationsScale(DISABLED);
} else {
Log.i(TAG, "Disabling Manifest.permission.SET_ANIMATION_SCALE failed: " + permStatus);
}
}
static void enableAll(Context context) {
int permStatus = context.checkCallingOrSelfPermission(Manifest.permission.SET_ANIMATION_SCALE);
if (permStatus == PackageManager.PERMISSION_GRANTED) {
Log.i(TAG, "Manifest.permission.SET_ANIMATION_SCALE PERMISSION_GRANTED");
setSystemAnimationsScale(DEFAULT);
} else {
Log.i(TAG, "Enabling Manifest.permission.SET_ANIMATION_SCALE failed: " + permStatus);
}
}
private static void setSystemAnimationsScale(float animationScale) {
try {
Class<?> windowManagerStubClazz = Class.forName("android.view.IWindowManager$Stub");
Method asInterface = windowManagerStubClazz.getDeclaredMethod("asInterface", IBinder.class);
Class<?> serviceManagerClazz = Class.forName("android.os.ServiceManager");
Method getService = serviceManagerClazz.getDeclaredMethod("getService", String.class);
Class<?> windowManagerClazz = Class.forName("android.view.IWindowManager");
Method setAnimationScales = windowManagerClazz.getDeclaredMethod("setAnimationScales", float[].class);
Method getAnimationScales = windowManagerClazz.getDeclaredMethod("getAnimationScales");
IBinder windowManagerBinder = (IBinder) getService.invoke(null, "window");
Object windowManagerObj = asInterface.invoke(null, windowManagerBinder);
float[] currentScales = (float[]) getAnimationScales.invoke(windowManagerObj);
for (int i = 0; i < currentScales.length; i++) {
currentScales[i] = animationScale;
}
setAnimationScales.invoke(windowManagerObj, new Object[]{currentScales});
} catch (Exception e) {
Log.e(TAG, "Could not change animation scale to " + animationScale + " :'(");
}
}
}

View File

@ -0,0 +1,156 @@
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.fdroid.fdroid;
import androidx.test.uiautomator.UiDevice;
import androidx.test.uiautomator.UiObject;
import androidx.test.uiautomator.UiObjectNotFoundException;
import androidx.test.uiautomator.UiSelector;
import androidx.test.uiautomator.UiWatcher;
import android.util.Log;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@SuppressWarnings("MemberName")
public class UiWatchers {
private static final String LOG_TAG = UiWatchers.class.getSimpleName();
private final List<String> mErrors = new ArrayList<String>();
/**
* We can use the UiDevice registerWatcher to register a small script to be executed when the
* framework is waiting for a control to appear. Waiting may be the cause of an unexpected
* dialog on the screen and it is the time when the framework runs the registered watchers.
* This is a sample watcher looking for ANR and crashes. it closes it and moves on. You should
* create your own watchers and handle error logging properly for your type of tests.
*/
public void registerAnrAndCrashWatchers() {
UiDevice.getInstance().registerWatcher("ANR", new UiWatcher() {
@Override
public boolean checkForCondition() {
UiObject window = new UiObject(new UiSelector().className(
"com.android.server.am.AppNotRespondingDialog"));
String errorText = null;
if (window.exists()) {
try {
errorText = window.getText();
} catch (UiObjectNotFoundException e) {
Log.e(LOG_TAG, "dialog gone?", e);
}
onAnrDetected(errorText);
postHandler("Wait");
return true; // triggered
}
return false; // no trigger
}
});
// class names may have changed
UiDevice.getInstance().registerWatcher("ANR2", new UiWatcher() {
@Override
public boolean checkForCondition() {
UiObject window = new UiObject(new UiSelector().packageName("android")
.textContains("isn't responding."));
if (window.exists()) {
String errorText = null;
try {
errorText = window.getText();
} catch (UiObjectNotFoundException e) {
Log.e(LOG_TAG, "dialog gone?", e);
}
onAnrDetected(errorText);
postHandler("Wait");
return true; // triggered
}
return false; // no trigger
}
});
UiDevice.getInstance().registerWatcher("CRASH", new UiWatcher() {
@Override
public boolean checkForCondition() {
UiObject window = new UiObject(new UiSelector().className(
"com.android.server.am.AppErrorDialog"));
if (window.exists()) {
String errorText = null;
try {
errorText = window.getText();
} catch (UiObjectNotFoundException e) {
Log.e(LOG_TAG, "dialog gone?", e);
}
onCrashDetected(errorText);
postHandler("OK");
return true; // triggered
}
return false; // no trigger
}
});
UiDevice.getInstance().registerWatcher("CRASH2", new UiWatcher() {
@Override
public boolean checkForCondition() {
UiObject window = new UiObject(new UiSelector().packageName("android")
.textContains("has stopped"));
if (window.exists()) {
String errorText = null;
try {
errorText = window.getText();
} catch (UiObjectNotFoundException e) {
Log.e(LOG_TAG, "dialog gone?", e);
}
onCrashDetected(errorText);
postHandler("OK");
return true; // triggered
}
return false; // no trigger
}
});
Log.i(LOG_TAG, "Registered GUI Exception watchers");
}
public void onAnrDetected(String errorText) {
mErrors.add(errorText);
}
public void onCrashDetected(String errorText) {
mErrors.add(errorText);
}
public void reset() {
mErrors.clear();
}
public List<String> getErrors() {
return Collections.unmodifiableList(mErrors);
}
/**
* Current implementation ignores the exception and continues.
*/
public void postHandler(String buttonText) {
// TODO: Add custom error logging here
String formatedOutput = String.format("UI Exception Message: %-20s\n", UiDevice
.getInstance().getCurrentPackageName());
Log.e(LOG_TAG, formatedOutput);
UiObject buttonOK = new UiObject(new UiSelector().text(buttonText).enabled(true));
// sometimes it takes a while for the OK button to become enabled
buttonOK.waitForExists(5000);
try {
buttonOK.click();
} catch (UiObjectNotFoundException e) {
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,115 @@
package org.fdroid.fdroid.compat;
import android.app.Instrumentation;
import android.content.Context;
import android.os.Build;
import android.os.Environment;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import android.util.Log;
import org.fdroid.fdroid.AssetUtils;
import org.fdroid.fdroid.data.SanitizedFile;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.UUID;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
/**
* This test needs to run on the emulator, even though it technically could
* run as a plain JUnit test, because it is testing the specifics of
* Android's symlink handling.
*/
@RunWith(AndroidJUnit4.class)
public class FileCompatTest {
private static final String TAG = "FileCompatTest";
private SanitizedFile sourceFile;
private SanitizedFile destFile;
@Before
public void setUp() {
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
File dir = getWriteableDir(instrumentation);
sourceFile = SanitizedFile.knownSanitized(
AssetUtils.copyAssetToDir(instrumentation.getContext(), "simpleIndex.jar", dir));
destFile = new SanitizedFile(dir, "dest-" + UUID.randomUUID() + ".testproduct");
assertFalse(destFile.exists());
assertTrue(sourceFile.getAbsolutePath() + " should exist.", sourceFile.exists());
}
@After
public void tearDown() {
if (!sourceFile.delete()) {
Log.w(TAG, "Can't delete " + sourceFile.getAbsolutePath() + ".");
}
if (!destFile.delete()) {
Log.w(TAG, "Can't delete " + destFile.getAbsolutePath() + ".");
}
}
@Test
public void testSymlinkRuntime() {
FileCompat.symlinkRuntime(sourceFile, destFile);
assertTrue(destFile.getAbsolutePath() + " should exist after symlinking", destFile.exists());
}
@Test
public void testSymlinkLibcore() {
assumeTrue(Build.VERSION.SDK_INT >= 19);
FileCompat.symlinkLibcore(sourceFile, destFile);
assertTrue(destFile.getAbsolutePath() + " should exist after symlinking", destFile.exists());
}
@Test
public void testSymlinkOs() {
assumeTrue(Build.VERSION.SDK_INT >= 21);
FileCompat.symlinkOs(sourceFile, destFile);
assertTrue(destFile.getAbsolutePath() + " should exist after symlinking", destFile.exists());
}
/**
* Prefer internal over external storage, because external tends to be FAT filesystems,
* which don't support symlinks (which we test using this method).
*/
public static File getWriteableDir(Instrumentation instrumentation) {
Context context = instrumentation.getContext();
Context targetContext = instrumentation.getTargetContext();
File[] dirsToTry = new File[]{
context.getCacheDir(),
context.getFilesDir(),
targetContext.getCacheDir(),
targetContext.getFilesDir(),
context.getExternalCacheDir(),
context.getExternalFilesDir(null),
targetContext.getExternalCacheDir(),
targetContext.getExternalFilesDir(null),
Environment.getExternalStorageDirectory(),
};
return getWriteableDir(dirsToTry);
}
private static File getWriteableDir(File[] dirsToTry) {
for (File dir : dirsToTry) {
if (dir != null && dir.canWrite()) {
return dir;
}
}
return null;
}
}

View File

@ -0,0 +1,454 @@
/*
* Copyright (C) 2016 Dominik Schürmann <dominik@dominikschuermann.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.installer;
import android.app.Instrumentation;
import android.net.Uri;
import android.os.Build;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.fdroid.fdroid.AssetUtils;
import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.compat.FileCompatTest;
import org.fdroid.fdroid.data.Apk;
import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.RepoXMLHandler;
import org.fdroid.fdroid.mock.RepoDetails;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.TreeSet;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* This test checks the ApkVerifier by parsing a repo from permissionsRepo.xml
* and checking the listed permissions against the ones specified in apks' AndroidManifest,
* which have been specifically generated for this test.
* <p>
* NOTE: This androidTest cannot run as a Robolectric test because the
* required methods from PackageManger are not included in Robolectric's Android API.
* java.lang.NoClassDefFoundError: java/util/jar/StrictJarFile
* at android.content.pm.PackageManager.getPackageArchiveInfo(PackageManager.java:3545)
*/
@RunWith(AndroidJUnit4.class)
public class ApkVerifierTest {
public static final String TAG = "ApkVerifierTest";
Instrumentation instrumentation;
File sdk14Apk;
File minMaxApk;
private File extendedPermissionsApk;
private File extendedPermsXml;
@Before
public void setUp() {
instrumentation = InstrumentationRegistry.getInstrumentation();
File dir = FileCompatTest.getWriteableDir(instrumentation);
assertTrue(dir.isDirectory());
assertTrue(dir.canWrite());
sdk14Apk = AssetUtils.copyAssetToDir(instrumentation.getContext(),
"org.fdroid.permissions.sdk14.apk",
dir
);
minMaxApk = AssetUtils.copyAssetToDir(instrumentation.getContext(),
"org.fdroid.permissions.minmax.apk",
dir
);
extendedPermissionsApk = AssetUtils.copyAssetToDir(instrumentation.getContext(),
"org.fdroid.extendedpermissionstest.apk",
dir
);
extendedPermsXml = AssetUtils.copyAssetToDir(instrumentation.getContext(),
"extendedPerms.xml",
dir
);
assertTrue(sdk14Apk.exists());
assertTrue(minMaxApk.exists());
assertTrue(extendedPermissionsApk.exists());
assertTrue(extendedPermsXml.exists());
}
@Test
public void testNulls() {
assertTrue(ApkVerifier.requestedPermissionsEqual(null, null));
String[] perms = new String[]{"Blah"};
assertFalse(ApkVerifier.requestedPermissionsEqual(perms, null));
assertFalse(ApkVerifier.requestedPermissionsEqual(null, perms));
}
@Test
public void testWithoutPrefix() {
Apk apk = new Apk();
apk.packageName = "org.fdroid.permissions.sdk14";
apk.targetSdkVersion = 14;
ArrayList<String> noPrefixPermissionsList = new ArrayList<>(Arrays.asList(
"AUTHENTICATE_ACCOUNTS",
"MANAGE_ACCOUNTS",
"READ_PROFILE",
"WRITE_PROFILE",
"GET_ACCOUNTS",
"READ_CONTACTS",
"WRITE_CONTACTS",
"WRITE_EXTERNAL_STORAGE",
"READ_EXTERNAL_STORAGE",
"INTERNET",
"ACCESS_NETWORK_STATE",
"NFC",
"READ_SYNC_SETTINGS",
"WRITE_SYNC_SETTINGS",
"WRITE_CALL_LOG", // implied-permission!
"READ_CALL_LOG" // implied-permission!
));
if (Build.VERSION.SDK_INT >= 29) {
noPrefixPermissionsList.add("android.permission.ACCESS_MEDIA_LOCATION");
}
String[] noPrefixPermissions = noPrefixPermissionsList.toArray(new String[0]);
for (int i = 0; i < noPrefixPermissions.length; i++) {
noPrefixPermissions[i] = RepoXMLHandler.fdroidToAndroidPermission(noPrefixPermissions[i]);
}
apk.requestedPermissions = noPrefixPermissions;
Uri uri = Uri.fromFile(sdk14Apk);
ApkVerifier apkVerifier = new ApkVerifier(instrumentation.getContext(), uri, apk);
try {
apkVerifier.verifyApk();
} catch (ApkVerifier.ApkVerificationException | ApkVerifier.ApkPermissionUnequalException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
@Test(expected = ApkVerifier.ApkPermissionUnequalException.class)
public void testWithMinMax()
throws ApkVerifier.ApkPermissionUnequalException, ApkVerifier.ApkVerificationException {
Apk apk = new Apk();
apk.packageName = "org.fdroid.permissions.minmax";
apk.targetSdkVersion = 24;
ArrayList<String> permissionsList = new ArrayList<>();
permissionsList.add("android.permission.READ_CALENDAR");
if (Build.VERSION.SDK_INT <= 18) {
permissionsList.add("android.permission.WRITE_EXTERNAL_STORAGE");
}
if (Build.VERSION.SDK_INT >= 23) {
permissionsList.add("android.permission.ACCESS_FINE_LOCATION");
}
apk.requestedPermissions = permissionsList.toArray(new String[permissionsList.size()]);
Uri uri = Uri.fromFile(minMaxApk);
ApkVerifier apkVerifier = new ApkVerifier(instrumentation.getContext(), uri, apk);
apkVerifier.verifyApk();
permissionsList.add("ADDITIONAL_PERMISSION");
apk.requestedPermissions = permissionsList.toArray(new String[permissionsList.size()]);
apkVerifier.verifyApk();
}
@Test
public void testWithPrefix() {
Apk apk = new Apk();
apk.packageName = "org.fdroid.permissions.sdk14";
apk.targetSdkVersion = 14;
TreeSet<String> expectedSet = new TreeSet<>(Arrays.asList(
"android.permission.AUTHENTICATE_ACCOUNTS",
"android.permission.MANAGE_ACCOUNTS",
"android.permission.READ_PROFILE",
"android.permission.WRITE_PROFILE",
"android.permission.GET_ACCOUNTS",
"android.permission.READ_CONTACTS",
"android.permission.WRITE_CONTACTS",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.READ_EXTERNAL_STORAGE",
"android.permission.INTERNET",
"android.permission.ACCESS_NETWORK_STATE",
"android.permission.NFC",
"android.permission.READ_SYNC_SETTINGS",
"android.permission.WRITE_SYNC_SETTINGS",
"android.permission.WRITE_CALL_LOG", // implied-permission!
"android.permission.READ_CALL_LOG"// implied-permission!
));
if (Build.VERSION.SDK_INT >= 29) {
expectedSet.add("android.permission.ACCESS_MEDIA_LOCATION");
}
apk.requestedPermissions = expectedSet.toArray(new String[0]);
Uri uri = Uri.fromFile(sdk14Apk);
ApkVerifier apkVerifier = new ApkVerifier(instrumentation.getContext(), uri, apk);
try {
apkVerifier.verifyApk();
} catch (ApkVerifier.ApkVerificationException | ApkVerifier.ApkPermissionUnequalException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
/**
* Additional permissions are okay. The user is simply
* warned about a permission that is not used inside the apk
*/
@Test(expected = ApkVerifier.ApkPermissionUnequalException.class)
public void testAdditionalPermission()
throws ApkVerifier.ApkPermissionUnequalException, ApkVerifier.ApkVerificationException {
Apk apk = new Apk();
apk.packageName = "org.fdroid.permissions.sdk14";
apk.targetSdkVersion = 14;
apk.requestedPermissions = new String[]{
"android.permission.AUTHENTICATE_ACCOUNTS",
"android.permission.MANAGE_ACCOUNTS",
"android.permission.READ_PROFILE",
"android.permission.WRITE_PROFILE",
"android.permission.GET_ACCOUNTS",
"android.permission.READ_CONTACTS",
"android.permission.WRITE_CONTACTS",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.READ_EXTERNAL_STORAGE",
"android.permission.INTERNET",
"android.permission.ACCESS_NETWORK_STATE",
"android.permission.NFC",
"android.permission.READ_SYNC_SETTINGS",
"android.permission.WRITE_SYNC_SETTINGS",
"android.permission.WRITE_CALL_LOG", // implied-permission!
"android.permission.READ_CALL_LOG", // implied-permission!
"android.permission.FAKE_NEW_PERMISSION",
};
Uri uri = Uri.fromFile(sdk14Apk);
ApkVerifier apkVerifier = new ApkVerifier(instrumentation.getContext(), uri, apk);
apkVerifier.verifyApk();
}
/**
* Missing permissions are not okay!
* The user is then not warned about a permission that the apk uses!
*/
@Test
public void testMissingPermission() {
Apk apk = new Apk();
apk.packageName = "org.fdroid.permissions.sdk14";
apk.targetSdkVersion = 14;
apk.requestedPermissions = new String[]{
//"android.permission.AUTHENTICATE_ACCOUNTS",
"android.permission.MANAGE_ACCOUNTS",
"android.permission.READ_PROFILE",
"android.permission.WRITE_PROFILE",
"android.permission.GET_ACCOUNTS",
"android.permission.READ_CONTACTS",
"android.permission.WRITE_CONTACTS",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.READ_EXTERNAL_STORAGE",
"android.permission.INTERNET",
"android.permission.ACCESS_NETWORK_STATE",
"android.permission.NFC",
"android.permission.READ_SYNC_SETTINGS",
"android.permission.WRITE_SYNC_SETTINGS",
"android.permission.WRITE_CALL_LOG", // implied-permission!
"android.permission.READ_CALL_LOG", // implied-permission!
};
Uri uri = Uri.fromFile(sdk14Apk);
ApkVerifier apkVerifier = new ApkVerifier(instrumentation.getContext(), uri, apk);
try {
apkVerifier.verifyApk();
fail();
} catch (ApkVerifier.ApkVerificationException e) {
e.printStackTrace();
fail(e.getMessage());
} catch (ApkVerifier.ApkPermissionUnequalException e) {
e.printStackTrace();
}
}
@Test
public void testExtendedPerms() throws IOException,
ApkVerifier.ApkPermissionUnequalException, ApkVerifier.ApkVerificationException {
RepoDetails actualDetails = getFromFile(extendedPermsXml);
HashSet<String> expectedSet = new HashSet<>(Arrays.asList(
"android.permission.ACCESS_NETWORK_STATE",
"android.permission.ACCESS_WIFI_STATE",
"android.permission.INTERNET",
"android.permission.READ_SYNC_STATS",
"android.permission.READ_SYNC_SETTINGS",
"android.permission.WRITE_SYNC_SETTINGS",
"android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS",
"android.permission.READ_CONTACTS",
"android.permission.WRITE_CONTACTS",
"android.permission.READ_CALENDAR",
"android.permission.WRITE_CALENDAR"
));
if (Build.VERSION.SDK_INT <= 18) {
expectedSet.add("android.permission.READ_EXTERNAL_STORAGE");
expectedSet.add("android.permission.WRITE_EXTERNAL_STORAGE");
}
if (Build.VERSION.SDK_INT <= 22) {
expectedSet.add("android.permission.GET_ACCOUNTS");
expectedSet.add("android.permission.AUTHENTICATE_ACCOUNTS");
expectedSet.add("android.permission.MANAGE_ACCOUNTS");
}
if (Build.VERSION.SDK_INT >= 23) {
expectedSet.add("android.permission.CAMERA");
if (Build.VERSION.SDK_INT <= 23) {
expectedSet.add("android.permission.CALL_PHONE");
}
}
Apk apk = actualDetails.apks.get(0);
HashSet<String> actualSet = new HashSet<>(Arrays.asList(apk.requestedPermissions));
for (String permission : expectedSet) {
if (!actualSet.contains(permission)) {
Log.i(TAG, permission + " in expected but not actual! (android-"
+ Build.VERSION.SDK_INT + ")");
}
}
for (String permission : actualSet) {
if (!expectedSet.contains(permission)) {
Log.i(TAG, permission + " in actual but not expected! (android-"
+ Build.VERSION.SDK_INT + ")");
}
}
String[] expectedPermissions = expectedSet.toArray(new String[expectedSet.size()]);
assertTrue(ApkVerifier.requestedPermissionsEqual(expectedPermissions, apk.requestedPermissions));
String[] badPermissions = Arrays.copyOf(expectedPermissions, expectedPermissions.length + 1);
assertFalse(ApkVerifier.requestedPermissionsEqual(badPermissions, apk.requestedPermissions));
badPermissions[badPermissions.length - 1] = "notarealpermission";
assertFalse(ApkVerifier.requestedPermissionsEqual(badPermissions, apk.requestedPermissions));
Uri uri = Uri.fromFile(extendedPermissionsApk);
ApkVerifier apkVerifier = new ApkVerifier(instrumentation.getContext(), uri, apk);
apkVerifier.verifyApk();
}
@Test
public void testImpliedPerms() throws IOException {
RepoDetails actualDetails = getFromFile(extendedPermsXml);
TreeSet<String> expectedSet = new TreeSet<>(Arrays.asList(
"android.permission.ACCESS_NETWORK_STATE",
"android.permission.ACCESS_WIFI_STATE",
"android.permission.INTERNET",
"android.permission.READ_CALENDAR",
"android.permission.READ_CONTACTS",
"android.permission.READ_EXTERNAL_STORAGE",
"android.permission.READ_SYNC_SETTINGS",
"android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS",
"android.permission.WRITE_CALENDAR",
"android.permission.WRITE_CONTACTS",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.WRITE_SYNC_SETTINGS",
"org.dmfs.permission.READ_TASKS",
"org.dmfs.permission.WRITE_TASKS"
));
if (Build.VERSION.SDK_INT <= 22) { // maxSdkVersion="22"
expectedSet.addAll(Arrays.asList(
"android.permission.AUTHENTICATE_ACCOUNTS",
"android.permission.GET_ACCOUNTS",
"android.permission.MANAGE_ACCOUNTS"
));
}
if (Build.VERSION.SDK_INT >= 29) {
expectedSet.add("android.permission.ACCESS_MEDIA_LOCATION");
}
Apk apk = actualDetails.apks.get(1);
Log.i(TAG, "APK: " + apk.apkName);
HashSet<String> actualSet = new HashSet<>(Arrays.asList(apk.requestedPermissions));
for (String permission : expectedSet) {
if (!actualSet.contains(permission)) {
Log.i(TAG, permission + " in expected but not actual! (android-"
+ Build.VERSION.SDK_INT + ")");
}
}
for (String permission : actualSet) {
if (!expectedSet.contains(permission)) {
Log.i(TAG, permission + " in actual but not expected! (android-"
+ Build.VERSION.SDK_INT + ")");
}
}
String[] expectedPermissions = expectedSet.toArray(new String[expectedSet.size()]);
assertTrue(ApkVerifier.requestedPermissionsEqual(expectedPermissions, apk.requestedPermissions));
expectedSet = new TreeSet<>(Arrays.asList(
"android.permission.ACCESS_NETWORK_STATE",
"android.permission.ACCESS_WIFI_STATE",
"android.permission.AUTHENTICATE_ACCOUNTS",
"android.permission.GET_ACCOUNTS",
"android.permission.INTERNET",
"android.permission.MANAGE_ACCOUNTS",
"android.permission.READ_CALENDAR",
"android.permission.READ_CONTACTS",
"android.permission.READ_EXTERNAL_STORAGE",
"android.permission.READ_SYNC_SETTINGS",
"android.permission.WRITE_CALENDAR",
"android.permission.WRITE_CONTACTS",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.WRITE_SYNC_SETTINGS",
"org.dmfs.permission.READ_TASKS",
"org.dmfs.permission.WRITE_TASKS"
));
if (Build.VERSION.SDK_INT >= 29) {
expectedSet.add("android.permission.ACCESS_MEDIA_LOCATION");
}
expectedPermissions = expectedSet.toArray(new String[expectedSet.size()]);
apk = actualDetails.apks.get(2);
Log.i(TAG, "APK: " + apk.apkName);
actualSet = new HashSet<>(Arrays.asList(apk.requestedPermissions));
for (String permission : expectedSet) {
if (!actualSet.contains(permission)) {
Log.i(TAG, permission + " in expected but not actual! (android-"
+ Build.VERSION.SDK_INT + ")");
}
}
for (String permission : actualSet) {
if (!expectedSet.contains(permission)) {
Log.i(TAG, permission + " in actual but not expected! (android-"
+ Build.VERSION.SDK_INT + ")");
}
}
assertTrue(ApkVerifier.requestedPermissionsEqual(expectedPermissions, apk.requestedPermissions));
}
@NonNull
private RepoDetails getFromFile(File indexFile) throws IOException {
InputStream inputStream = null;
try {
inputStream = new FileInputStream(indexFile);
return RepoDetails.getFromFile(inputStream, Repo.PUSH_REQUEST_IGNORE);
} finally {
Utils.closeQuietly(inputStream);
}
}
}

View File

@ -0,0 +1,128 @@
package org.fdroid.fdroid.nearby;
import android.content.Context;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.fdroid.fdroid.FDroidApp;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import javax.jmdns.ServiceEvent;
import javax.jmdns.ServiceListener;
import static org.junit.Assert.assertTrue;
@RunWith(AndroidJUnit4.class)
public class BonjourManagerTest {
private static final String NAME = "Robolectric-test";
private static final String LOCALHOST = "localhost";
private static final int PORT = 8888;
@Test
public void testStartStop() throws InterruptedException {
Context context = ApplicationProvider.getApplicationContext();
FDroidApp.ipAddressString = LOCALHOST;
FDroidApp.port = PORT;
final CountDownLatch addedLatch = new CountDownLatch(1);
final CountDownLatch resolvedLatch = new CountDownLatch(1);
final CountDownLatch removedLatch = new CountDownLatch(1);
BonjourManager.start(context, NAME, false,
new ServiceListener() {
@Override
public void serviceAdded(ServiceEvent serviceEvent) {
System.out.println("Service added: " + serviceEvent.getInfo());
if (NAME.equals(serviceEvent.getName())) {
addedLatch.countDown();
}
}
@Override
public void serviceRemoved(ServiceEvent serviceEvent) {
System.out.println("Service removed: " + serviceEvent.getInfo());
removedLatch.countDown();
}
@Override
public void serviceResolved(ServiceEvent serviceEvent) {
System.out.println("Service resolved: " + serviceEvent.getInfo());
if (NAME.equals(serviceEvent.getName())) {
resolvedLatch.countDown();
}
}
}, getBlankServiceListener());
BonjourManager.setVisible(context, true);
assertTrue(addedLatch.await(30, TimeUnit.SECONDS));
assertTrue(resolvedLatch.await(30, TimeUnit.SECONDS));
BonjourManager.setVisible(context, false);
assertTrue(removedLatch.await(30, TimeUnit.SECONDS));
BonjourManager.stop(context);
}
@Test
public void testRestart() throws InterruptedException {
Context context = ApplicationProvider.getApplicationContext();
FDroidApp.ipAddressString = LOCALHOST;
FDroidApp.port = PORT;
BonjourManager.start(context, NAME, false, getBlankServiceListener(), getBlankServiceListener());
final CountDownLatch addedLatch = new CountDownLatch(1);
final CountDownLatch resolvedLatch = new CountDownLatch(1);
final CountDownLatch removedLatch = new CountDownLatch(1);
BonjourManager.restart(context, NAME, false,
new ServiceListener() {
@Override
public void serviceAdded(ServiceEvent serviceEvent) {
System.out.println("Service added: " + serviceEvent.getInfo());
if (NAME.equals(serviceEvent.getName())) {
addedLatch.countDown();
}
}
@Override
public void serviceRemoved(ServiceEvent serviceEvent) {
System.out.println("Service removed: " + serviceEvent.getInfo());
removedLatch.countDown();
}
@Override
public void serviceResolved(ServiceEvent serviceEvent) {
System.out.println("Service resolved: " + serviceEvent.getInfo());
if (NAME.equals(serviceEvent.getName())) {
resolvedLatch.countDown();
}
}
}, getBlankServiceListener());
BonjourManager.setVisible(context, true);
assertTrue(addedLatch.await(30, TimeUnit.SECONDS));
assertTrue(resolvedLatch.await(30, TimeUnit.SECONDS));
BonjourManager.setVisible(context, false);
assertTrue(removedLatch.await(30, TimeUnit.SECONDS));
BonjourManager.stop(context);
}
private ServiceListener getBlankServiceListener() {
return new ServiceListener() {
@Override
public void serviceAdded(ServiceEvent serviceEvent) {
}
@Override
public void serviceRemoved(ServiceEvent serviceEvent) {
}
@Override
public void serviceResolved(ServiceEvent serviceEvent) {
}
};
}
}

View File

@ -0,0 +1,192 @@
package org.fdroid.fdroid.nearby;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.filters.LargeTest;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import android.util.Log;
import org.fdroid.fdroid.FDroidApp;
import org.fdroid.fdroid.Netstat;
import org.fdroid.fdroid.Utils;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
import java.net.ServerSocket;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@LargeTest
@RunWith(AndroidJUnit4.class)
public class LocalHTTPDManagerTest {
private static final String TAG = "LocalHTTPDManagerTest";
private Context context;
private LocalBroadcastManager lbm;
private static final String LOCALHOST = "localhost";
private static final int PORT = 8888;
@Before
public void setUp() {
context = ApplicationProvider.getApplicationContext();
lbm = LocalBroadcastManager.getInstance(context);
FDroidApp.ipAddressString = LOCALHOST;
FDroidApp.port = PORT;
for (Netstat.Connection connection : Netstat.getConnections()) { // NOPMD
Log.i("LocalHTTPDManagerTest", "connection: " + connection.toString());
}
assertFalse(Utils.isServerSocketInUse(PORT));
LocalHTTPDManager.stop(context);
for (Netstat.Connection connection : Netstat.getConnections()) { // NOPMD
Log.i("LocalHTTPDManagerTest", "connection: " + connection.toString());
}
}
@After
public void tearDown() {
lbm.unregisterReceiver(startedReceiver);
lbm.unregisterReceiver(stoppedReceiver);
lbm.unregisterReceiver(errorReceiver);
}
@Ignore
@Test
public void testStartStop() throws InterruptedException {
Log.i(TAG, "testStartStop");
final CountDownLatch startLatch = new CountDownLatch(1);
BroadcastReceiver latchReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
startLatch.countDown();
}
};
lbm.registerReceiver(latchReceiver, new IntentFilter(LocalHTTPDManager.ACTION_STARTED));
lbm.registerReceiver(stoppedReceiver, new IntentFilter(LocalHTTPDManager.ACTION_STOPPED));
lbm.registerReceiver(errorReceiver, new IntentFilter(LocalHTTPDManager.ACTION_ERROR));
LocalHTTPDManager.start(context, false);
assertTrue(startLatch.await(30, TimeUnit.SECONDS));
assertTrue(Utils.isServerSocketInUse(PORT));
assertTrue(Utils.canConnectToSocket(LOCALHOST, PORT));
lbm.unregisterReceiver(latchReceiver);
lbm.unregisterReceiver(stoppedReceiver);
lbm.unregisterReceiver(errorReceiver);
final CountDownLatch stopLatch = new CountDownLatch(1);
latchReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
stopLatch.countDown();
}
};
lbm.registerReceiver(startedReceiver, new IntentFilter(LocalHTTPDManager.ACTION_STARTED));
lbm.registerReceiver(latchReceiver, new IntentFilter(LocalHTTPDManager.ACTION_STOPPED));
lbm.registerReceiver(errorReceiver, new IntentFilter(LocalHTTPDManager.ACTION_ERROR));
LocalHTTPDManager.stop(context);
assertTrue(stopLatch.await(30, TimeUnit.SECONDS));
assertFalse(Utils.isServerSocketInUse(PORT));
assertFalse(Utils.canConnectToSocket(LOCALHOST, PORT)); // if this is flaky, just remove it
lbm.unregisterReceiver(latchReceiver);
}
@Test
public void testError() throws InterruptedException, IOException {
Log.i("LocalHTTPDManagerTest", "testError");
ServerSocket blockerSocket = new ServerSocket(PORT);
final CountDownLatch latch = new CountDownLatch(1);
BroadcastReceiver latchReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
latch.countDown();
}
};
lbm.registerReceiver(startedReceiver, new IntentFilter(LocalHTTPDManager.ACTION_STARTED));
lbm.registerReceiver(stoppedReceiver, new IntentFilter(LocalHTTPDManager.ACTION_STOPPED));
lbm.registerReceiver(latchReceiver, new IntentFilter(LocalHTTPDManager.ACTION_ERROR));
LocalHTTPDManager.start(context, false);
assertTrue(latch.await(30, TimeUnit.SECONDS));
assertTrue(Utils.isServerSocketInUse(PORT));
assertNotEquals(PORT, FDroidApp.port);
assertFalse(Utils.isServerSocketInUse(FDroidApp.port));
lbm.unregisterReceiver(latchReceiver);
blockerSocket.close();
}
@Test
public void testRestart() throws InterruptedException, IOException {
Log.i("LocalHTTPDManagerTest", "testRestart");
assertFalse(Utils.isServerSocketInUse(PORT));
final CountDownLatch startLatch = new CountDownLatch(1);
BroadcastReceiver latchReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
startLatch.countDown();
}
};
lbm.registerReceiver(latchReceiver, new IntentFilter(LocalHTTPDManager.ACTION_STARTED));
lbm.registerReceiver(stoppedReceiver, new IntentFilter(LocalHTTPDManager.ACTION_STOPPED));
lbm.registerReceiver(errorReceiver, new IntentFilter(LocalHTTPDManager.ACTION_ERROR));
LocalHTTPDManager.start(context, false);
assertTrue(startLatch.await(30, TimeUnit.SECONDS));
assertTrue(Utils.isServerSocketInUse(PORT));
lbm.unregisterReceiver(latchReceiver);
lbm.unregisterReceiver(stoppedReceiver);
final CountDownLatch restartLatch = new CountDownLatch(1);
latchReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
restartLatch.countDown();
}
};
lbm.registerReceiver(latchReceiver, new IntentFilter(LocalHTTPDManager.ACTION_STARTED));
LocalHTTPDManager.restart(context, false);
assertTrue(restartLatch.await(30, TimeUnit.SECONDS));
lbm.unregisterReceiver(latchReceiver);
}
private final BroadcastReceiver startedReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String message = intent.getStringExtra(Intent.EXTRA_TEXT);
Log.i(TAG, "startedReceiver: " + message);
fail();
}
};
private final BroadcastReceiver stoppedReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String message = intent.getStringExtra(Intent.EXTRA_TEXT);
Log.i(TAG, "stoppedReceiver: " + message);
fail();
}
};
private final BroadcastReceiver errorReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String message = intent.getStringExtra(Intent.EXTRA_TEXT);
Log.i(TAG, "errorReceiver: " + message);
fail();
}
};
}

View File

@ -0,0 +1,159 @@
package org.fdroid.fdroid.net;
import android.net.Uri;
import android.os.Build;
import android.util.Log;
import org.fdroid.fdroid.ProgressListener;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
public class HttpDownloaderTest {
private static final String TAG = "HttpDownloaderTest";
static final String[] URLS;
// https://developer.android.com/reference/javax/net/ssl/SSLContext
static {
ArrayList<String> tempUrls = new ArrayList<>(Arrays.asList(
"https://f-droid.org/repo/index-v1.jar",
// sites that use SNI for HTTPS
"https://mirrors.kernel.org/debian/dists/stable/Release",
"https://fdroid.tetaneutral.net/fdroid/repo/index-v1.jar",
"https://ftp.fau.de/fdroid/repo/index-v1.jar",
//"https://microg.org/fdroid/repo/index-v1.jar",
//"https://grobox.de/fdroid/repo/index.jar",
"https://guardianproject.info/fdroid/repo/index-v1.jar"
));
if (Build.VERSION.SDK_INT >= 22) {
tempUrls.addAll(Arrays.asList(
"https://en.wikipedia.org/wiki/Index.html", // no SNI but weird ipv6 lookup issues
"https://mirror.cyberbits.eu/fdroid/repo/index-v1.jar" // TLSv1.2 only and SNI
));
}
URLS = tempUrls.toArray(new String[tempUrls.size()]);
}
private boolean receivedProgress;
@Test
public void downloadUninterruptedTest() throws IOException, InterruptedException {
for (String urlString : URLS) {
Log.i(TAG, "URL: " + urlString);
Uri uri = Uri.parse(urlString);
File destFile = File.createTempFile("dl-", "");
HttpDownloader httpDownloader = new HttpDownloader(uri, destFile);
httpDownloader.download();
assertTrue(destFile.exists());
assertTrue(destFile.canRead());
destFile.deleteOnExit();
}
}
@Test
public void downloadUninterruptedTestWithProgress() throws IOException, InterruptedException {
final CountDownLatch latch = new CountDownLatch(1);
String urlString = "https://f-droid.org/repo/index.jar";
receivedProgress = false;
Uri uri = Uri.parse(urlString);
File destFile = File.createTempFile("dl-", "");
final HttpDownloader httpDownloader = new HttpDownloader(uri, destFile);
httpDownloader.setListener(new ProgressListener() {
@Override
public void onProgress(long bytesRead, long totalBytes) {
receivedProgress = true;
}
});
new Thread() {
@Override
public void run() {
try {
httpDownloader.download();
latch.countDown();
} catch (IOException | InterruptedException e) {
e.printStackTrace();
fail();
}
}
}.start();
latch.await(100, TimeUnit.SECONDS); // either 2 progress reports or 100 seconds
assertTrue(destFile.exists());
assertTrue(destFile.canRead());
assertTrue(receivedProgress);
destFile.deleteOnExit();
}
@Test
public void downloadHttpBasicAuth() throws IOException, InterruptedException {
Uri uri = Uri.parse("https://httpbin.org/basic-auth/myusername/supersecretpassword");
File destFile = File.createTempFile("dl-", "");
HttpDownloader httpDownloader = new HttpDownloader(uri, destFile, "myusername", "supersecretpassword");
httpDownloader.download();
assertTrue(destFile.exists());
assertTrue(destFile.canRead());
destFile.deleteOnExit();
}
@Test(expected = IOException.class)
public void downloadHttpBasicAuthWrongPassword() throws IOException, InterruptedException {
Uri uri = Uri.parse("https://httpbin.org/basic-auth/myusername/supersecretpassword");
File destFile = File.createTempFile("dl-", "");
HttpDownloader httpDownloader = new HttpDownloader(uri, destFile, "myusername", "wrongpassword");
httpDownloader.download();
assertFalse(destFile.exists());
destFile.deleteOnExit();
}
@Test(expected = IOException.class)
public void downloadHttpBasicAuthWrongUsername() throws IOException, InterruptedException {
Uri uri = Uri.parse("https://httpbin.org/basic-auth/myusername/supersecretpassword");
File destFile = File.createTempFile("dl-", "");
HttpDownloader httpDownloader = new HttpDownloader(uri, destFile, "wrongusername", "supersecretpassword");
httpDownloader.download();
assertFalse(destFile.exists());
destFile.deleteOnExit();
}
@Test
public void downloadThenCancel() throws IOException, InterruptedException {
final CountDownLatch latch = new CountDownLatch(2);
Uri uri = Uri.parse("https://f-droid.org/repo/index.jar");
File destFile = File.createTempFile("dl-", "");
final HttpDownloader httpDownloader = new HttpDownloader(uri, destFile);
httpDownloader.setListener(new ProgressListener() {
@Override
public void onProgress(long bytesRead, long totalBytes) {
receivedProgress = true;
latch.countDown();
}
});
new Thread() {
@Override
public void run() {
try {
httpDownloader.download();
fail();
} catch (IOException e) {
e.printStackTrace();
fail();
} catch (InterruptedException e) {
// success!
}
}
}.start();
latch.await(100, TimeUnit.SECONDS); // either 2 progress reports or 100 seconds
httpDownloader.cancelDownload();
assertTrue(receivedProgress);
destFile.deleteOnExit();
}
}

View File

@ -0,0 +1,203 @@
package org.fdroid.fdroid.updater;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.ResolveInfo;
import android.os.Looper;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import android.text.TextUtils;
import android.util.Log;
import org.fdroid.fdroid.BuildConfig;
import org.fdroid.fdroid.FDroidApp;
import org.fdroid.fdroid.Hasher;
import org.fdroid.fdroid.IndexUpdater;
import org.fdroid.fdroid.Preferences;
import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.data.Apk;
import org.fdroid.fdroid.data.ApkProvider;
import org.fdroid.fdroid.data.App;
import org.fdroid.fdroid.data.AppProvider;
import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.RepoProvider;
import org.fdroid.fdroid.data.Schema;
import org.fdroid.fdroid.nearby.LocalHTTPD;
import org.fdroid.fdroid.nearby.LocalRepoKeyStore;
import org.fdroid.fdroid.nearby.LocalRepoManager;
import org.fdroid.fdroid.nearby.LocalRepoService;
import org.junit.Ignore;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.net.Socket;
import java.security.cert.Certificate;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@LargeTest
public class SwapRepoEmulatorTest {
public static final String TAG = "SwapRepoEmulatorTest";
/**
* @see org.fdroid.fdroid.nearby.WifiStateChangeService.WifiInfoThread#run()
*/
@Ignore
@Test
public void testSwap()
throws IOException, LocalRepoKeyStore.InitException, IndexUpdater.UpdateException, InterruptedException {
Looper.prepare();
LocalHTTPD localHttpd = null;
try {
Log.i(TAG, "REPO: " + FDroidApp.repo);
final Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
Preferences.setupForTests(context);
FDroidApp.initWifiSettings();
assertNull(FDroidApp.repo.address);
final CountDownLatch latch = new CountDownLatch(1);
new Thread() {
@Override
public void run() {
while (FDroidApp.repo.address == null) {
try {
Log.i(TAG, "Waiting for IP address... " + FDroidApp.repo.address);
Thread.sleep(1000);
} catch (InterruptedException e) {
// ignored
}
}
latch.countDown();
}
}.start();
latch.await(10, TimeUnit.MINUTES);
assertNotNull(FDroidApp.repo.address);
LocalRepoService.runProcess(context, new String[]{context.getPackageName()});
Log.i(TAG, "REPO: " + FDroidApp.repo);
File indexJarFile = LocalRepoManager.get(context).getIndexJar();
assertTrue(indexJarFile.isFile());
localHttpd = new LocalHTTPD(
context,
null,
FDroidApp.port,
LocalRepoManager.get(context).getWebRoot(),
false);
localHttpd.start();
Thread.sleep(100); // give the server some tine to start.
assertTrue(localHttpd.isAlive());
LocalRepoKeyStore localRepoKeyStore = LocalRepoKeyStore.get(context);
Certificate localCert = localRepoKeyStore.getCertificate();
String signingCert = Hasher.hex(localCert);
assertFalse(TextUtils.isEmpty(signingCert));
assertFalse(TextUtils.isEmpty(Utils.calcFingerprint(localCert)));
Repo repoToDelete = RepoProvider.Helper.findByAddress(context, FDroidApp.repo.address);
while (repoToDelete != null) {
Log.d(TAG, "Removing old test swap repo matching this one: " + repoToDelete.address);
RepoProvider.Helper.remove(context, repoToDelete.getId());
repoToDelete = RepoProvider.Helper.findByAddress(context, FDroidApp.repo.address);
}
ContentValues values = new ContentValues(4);
values.put(Schema.RepoTable.Cols.SIGNING_CERT, signingCert);
values.put(Schema.RepoTable.Cols.ADDRESS, FDroidApp.repo.address);
values.put(Schema.RepoTable.Cols.NAME, FDroidApp.repo.name);
values.put(Schema.RepoTable.Cols.IS_SWAP, true);
final String lastEtag = UUID.randomUUID().toString();
values.put(Schema.RepoTable.Cols.LAST_ETAG, lastEtag);
RepoProvider.Helper.insert(context, values);
Repo repo = RepoProvider.Helper.findByAddress(context, FDroidApp.repo.address);
assertTrue(repo.isSwap);
assertNotEquals(-1, repo.getId());
assertTrue(repo.name.startsWith(FDroidApp.repo.name));
assertEquals(lastEtag, repo.lastetag);
assertNull(repo.lastUpdated);
assertTrue(isPortInUse(FDroidApp.ipAddressString, FDroidApp.port));
Thread.sleep(100);
IndexUpdater updater = new IndexUpdater(context, repo);
updater.update();
assertTrue(updater.hasChanged());
repo = RepoProvider.Helper.findByAddress(context, FDroidApp.repo.address);
final Date lastUpdated = repo.lastUpdated;
assertTrue("repo lastUpdated should be updated", new Date(2019, 5, 13).compareTo(repo.lastUpdated) > 0);
App app = AppProvider.Helper.findSpecificApp(context.getContentResolver(),
context.getPackageName(), repo.getId());
assertEquals(context.getPackageName(), app.packageName);
List<Apk> apks = ApkProvider.Helper.findByRepo(context, repo, Schema.ApkTable.Cols.ALL);
assertEquals(1, apks.size());
for (Apk apk : apks) {
Log.i(TAG, "Apk: " + apk);
assertEquals(context.getPackageName(), apk.packageName);
assertEquals(BuildConfig.VERSION_NAME, apk.versionName);
assertEquals(BuildConfig.VERSION_CODE, apk.versionCode);
assertEquals(app.repoId, apk.repoId);
}
Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> resolveInfoList = context.getPackageManager().queryIntentActivities(mainIntent, 0);
HashSet<String> packageNames = new HashSet<>();
for (ResolveInfo resolveInfo : resolveInfoList) {
if (!isSystemPackage(resolveInfo)) {
Log.i(TAG, "resolveInfo: " + resolveInfo);
packageNames.add(resolveInfo.activityInfo.packageName);
}
}
LocalRepoService.runProcess(context, packageNames.toArray(new String[0]));
updater = new IndexUpdater(context, repo);
updater.update();
assertTrue(updater.hasChanged());
assertTrue("repo lastUpdated should be updated", lastUpdated.compareTo(repo.lastUpdated) < 0);
for (String packageName : packageNames) {
assertNotNull(ApkProvider.Helper.findByPackageName(context, packageName));
}
} finally {
if (localHttpd != null) {
localHttpd.stop();
}
}
if (localHttpd != null) {
assertFalse(localHttpd.isAlive());
}
}
private boolean isPortInUse(String host, int port) {
boolean result = false;
try {
(new Socket(host, port)).close();
result = true;
} catch (IOException e) {
// Could not connect.
e.printStackTrace();
}
return result;
}
private boolean isSystemPackage(ResolveInfo resolveInfo) {
return (resolveInfo.activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
}
}

View File

@ -0,0 +1,110 @@
package org.fdroid.fdroid.work;
import android.app.Instrumentation;
import androidx.arch.core.executor.testing.InstantTaskExecutorRule;
import androidx.test.filters.LargeTest;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.work.OneTimeWorkRequest;
import androidx.work.WorkInfo;
import com.google.common.util.concurrent.ListenableFuture;
import org.apache.commons.io.FileUtils;
import org.fdroid.fdroid.compat.FileCompatTest;
import org.junit.Rule;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* This test cannot run on Robolectric unfortunately since it does not support
* getting the timestamps from the files completely.
* <p>
* This is marked with {@link LargeTest} because it always fails on the emulator
* tests on GitLab CI. That excludes it from the test run there.
*/
@LargeTest
public class CleanCacheWorkerTest {
public static final String TAG = "CleanCacheWorkerEmulatorTest";
@Rule
public InstantTaskExecutorRule instantTaskExecutorRule = new InstantTaskExecutorRule();
@Rule
public WorkManagerTestRule workManagerTestRule = new WorkManagerTestRule();
@Test
public void testWorkRequest() throws ExecutionException, InterruptedException {
OneTimeWorkRequest request = new OneTimeWorkRequest.Builder(CleanCacheWorker.class).build();
workManagerTestRule.workManager.enqueue(request).getResult();
ListenableFuture<WorkInfo> workInfo = workManagerTestRule.workManager.getWorkInfoById(request.getId());
assertEquals(WorkInfo.State.SUCCEEDED, workInfo.get().getState());
}
@Test
public void testClearOldFiles() throws IOException, InterruptedException {
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
File tempDir = FileCompatTest.getWriteableDir(instrumentation);
assertTrue(tempDir.isDirectory());
assertTrue(tempDir.canWrite());
File dir = new File(tempDir, "F-Droid-test.clearOldFiles");
FileUtils.deleteQuietly(dir);
assertTrue(dir.mkdirs());
assertTrue(dir.isDirectory());
File first = new File(dir, "first");
first.deleteOnExit();
File second = new File(dir, "second");
second.deleteOnExit();
assertFalse(first.exists());
assertFalse(second.exists());
assertTrue(first.createNewFile());
assertTrue(first.exists());
Thread.sleep(7000);
assertTrue(second.createNewFile());
assertTrue(second.exists());
CleanCacheWorker.clearOldFiles(dir, 3000); // check all in dir
assertFalse(first.exists());
assertTrue(second.exists());
Thread.sleep(7000);
CleanCacheWorker.clearOldFiles(second, 3000); // check just second file
assertFalse(first.exists());
assertFalse(second.exists());
// make sure it doesn't freak out on a non-existent file
File nonexistent = new File(tempDir, "nonexistent");
CleanCacheWorker.clearOldFiles(nonexistent, 1);
CleanCacheWorker.clearOldFiles(null, 1);
}
/*
// TODO enable this once getImageCacheDir() can be mocked or provide a writable dir in the test
@Test
public void testDeleteOldIcons() throws IOException {
Context context = InstrumentationRegistry.getInstrumentation().getContext();
File imageCacheDir = Utils.getImageCacheDir(context);
imageCacheDir.mkdirs();
assertTrue(imageCacheDir.isDirectory());
File oldIcon = new File(imageCacheDir, "old.png");
assertTrue(oldIcon.createNewFile());
Assume.assumeTrue("test environment must be able to set LastModified time",
oldIcon.setLastModified(System.currentTimeMillis() - (DateUtils.DAY_IN_MILLIS * 370)));
File currentIcon = new File(imageCacheDir, "current.png");
assertTrue(currentIcon.createNewFile());
CleanCacheWorker.deleteOldIcons(context);
assertTrue(currentIcon.exists());
assertFalse(oldIcon.exists());
}
*/
}

View File

@ -0,0 +1,72 @@
/*
* Copyright (C) 2021 Hans-Christoph Steiner <hans@eds.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.fdroid.fdroid.work;
import androidx.arch.core.executor.testing.InstantTaskExecutorRule;
import androidx.test.filters.LargeTest;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.work.OneTimeWorkRequest;
import androidx.work.WorkInfo;
import com.google.common.util.concurrent.ListenableFuture;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
import static org.junit.Assert.assertEquals;
/**
* This actually runs {@link FDroidMetricsWorker} on a device/emulator and
* submits a report to https://metrics.cleaninsights.org
* <p>
* This is marked with {@link LargeTest} to exclude it from running on GitLab CI
* because it always fails on the emulator tests there. Also, it actually submits
* a report.
*/
@LargeTest
public class FDroidMetricsWorkerTest {
public static final String TAG = "FDroidMetricsWorkerTest";
@Rule
public InstantTaskExecutorRule instantTaskExecutorRule = new InstantTaskExecutorRule();
@Rule
public WorkManagerTestRule workManagerTestRule = new WorkManagerTestRule();
/**
* A test for easy manual testing.
*/
@Ignore
@Test
public void testGenerateReport() throws IOException {
String json = FDroidMetricsWorker.generateReport(
InstrumentationRegistry.getInstrumentation().getTargetContext());
System.out.println(json);
}
@Test
public void testWorkRequest() throws ExecutionException, InterruptedException {
OneTimeWorkRequest request = new OneTimeWorkRequest.Builder(FDroidMetricsWorker.class).build();
workManagerTestRule.workManager.enqueue(request).getResult();
ListenableFuture<WorkInfo> workInfo = workManagerTestRule.workManager.getWorkInfoById(request.getId());
assertEquals(WorkInfo.State.SUCCEEDED, workInfo.get().getState());
}
}

View File

@ -0,0 +1,33 @@
package org.fdroid.fdroid.work;
import android.app.Instrumentation;
import android.content.Context;
import android.util.Log;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.work.Configuration;
import androidx.work.WorkManager;
import androidx.work.testing.SynchronousExecutor;
import androidx.work.testing.WorkManagerTestInitHelper;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;
public class WorkManagerTestRule extends TestWatcher {
Context targetContext;
Context testContext;
Configuration configuration;
WorkManager workManager;
@Override
protected void starting(Description description) {
final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
targetContext = instrumentation.getTargetContext();
testContext = instrumentation.getContext();
configuration = new Configuration.Builder()
.setMinimumLoggingLevel(Log.DEBUG)
.setExecutor(new SynchronousExecutor())
.build();
WorkManagerTestInitHelper.initializeTestWorkManager(targetContext, configuration);
workManager = WorkManager.getInstance(targetContext);
}
}

25
app/src/androidTest/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,25 @@
-dontoptimize
-dontwarn
-dontobfuscate
-dontwarn android.test.**
-dontwarn android.support.test.**
-dontnote junit.framework.**
-dontnote junit.runner.**
# Uncomment this if you use Mockito
#-dontwarn org.mockito.**
-keep class org.hamcrest.** { *; }
-dontwarn org.hamcrest.**
-keep class org.junit.** { *; }
-dontwarn org.junit.**
-keep class junit.** { *; }
-dontwarn junit.**
# This is necessary so that RemoteWorkManager can be initialized (also marked with @Keep)
-keep class androidx.work.multiprocess.RemoteWorkManagerClient {
public <init>(...);
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2018 Senecto Limited
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.nearby;
/**
* Dummy version for basic app flavor.
*/
public class BluetoothClient {
public BluetoothClient(String ignored) {
}
public BluetoothConnection openConnection() {
return null;
}
}

View File

@ -0,0 +1,5 @@
package org.fdroid.fdroid.nearby;
public class LocalRepoManager {
public static final String[] WEB_ROOT_ASSET_FILES = {};
}

View File

@ -0,0 +1,30 @@
/*
* Copyright (C) 2018 Hans-Christoph Steiner <hans@eds.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.nearby;
import android.content.Context;
/**
* Dummy version for basic app flavor.
*/
public class SDCardScannerService {
public static void scan(Context context) {
}
}

View File

@ -0,0 +1,30 @@
/*
* Copyright (C) 2018 Hans-Christoph Steiner <hans@eds.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.nearby;
import android.content.Context;
/**
* Dummy version for basic app flavor.
*/
public class SwapService {
public static void start(Context context) {
}
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2018 Senecto Limited
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.nearby;
import android.content.Context;
import android.net.Uri;
/**
* Dummy version for basic app flavor.
*/
public class SwapWorkflowActivity {
public static final String EXTRA_PREVENT_FURTHER_SWAP_REQUESTS = "preventFurtherSwap";
public static void requestSwap(Context context, Uri uri) {
}
}

View File

@ -0,0 +1,32 @@
/*
* Copyright (C) 2018 Senecto Limited
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.nearby;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
/**
* Dummy version for basic app flavor.
*/
public class TreeUriScannerIntentService {
public static void onActivityResult(AppCompatActivity activity, Intent intent) {
throw new IllegalStateException("unimplemented");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2012 Ciaran Gultnieks, ciaran@ciarang.com
* Copyright (C) 2018 Senecto Limited
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -10,25 +10,26 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid;
package org.fdroid.fdroid.nearby;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import androidx.annotation.Nullable;
public class PackageReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context ctx, Intent intent) {
Log.d("FDroid", "PackageReceiver invalidating apps");
((FDroidApp) ctx.getApplicationContext()).invalidateApps();
/**
* Dummy version for basic app flavor.
*/
public class WifiStateChangeService {
public static void start(Context context, @Nullable Intent intent) {
}
public class WifiInfoThread extends Thread {
}
}

View File

@ -0,0 +1,30 @@
/*
* Copyright (C) 2018 Senecto Limited
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.nearby.peers;
import org.fdroid.fdroid.data.NewRepoConfig;
/**
* Dummy version for basic app flavor.
*/
public class WifiPeer {
public WifiPeer(NewRepoConfig config) {
}
}

View File

@ -0,0 +1,37 @@
/*
* Copyright (C) 2018 Senecto Limited
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.panic;
import android.content.Context;
/**
* Dummy version for basic app flavor.
*/
public class HidingManager {
public static boolean isHidden(Context context) {
return false;
}
public static void showHideDialog(final Context context) {
throw new IllegalStateException("unimplemented");
}
}

View File

@ -0,0 +1,99 @@
/*
* Copyright (C) 2018 Senecto Limited
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.views.main;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
import org.fdroid.fdroid.R;
import org.fdroid.fdroid.views.PreferencesFragment;
import org.fdroid.fdroid.views.updates.UpdatesViewBinder;
/**
* Decides which view on the main screen to attach to a given {@link FrameLayout}. This class
* doesn't know which view it will be rendering at the time it is constructed. Rather, at some
* point in the future the {@link MainViewAdapter} will have information about which view we
* are required to render, and will invoke the relevant "bind*()" method on this class.
*/
class MainViewController extends RecyclerView.ViewHolder {
private final AppCompatActivity activity;
private final FrameLayout frame;
@Nullable
private UpdatesViewBinder updatesView = null;
MainViewController(AppCompatActivity activity, FrameLayout frame) {
super(frame);
this.activity = activity;
this.frame = frame;
}
/**
* @see LatestViewBinder
*/
public void bindLatestView() {
new LatestViewBinder(activity, frame);
}
/**
* @see UpdatesViewBinder
*/
public void bindUpdates() {
if (updatesView == null) {
updatesView = new UpdatesViewBinder(activity, frame);
}
updatesView.bind();
}
public void unbindUpdates() {
if (updatesView != null) {
updatesView.unbind();
}
}
public void bindCategoriesView() {
throw new IllegalStateException("unimplemented");
}
public void bindSwapView() {
throw new IllegalStateException("unimplemented");
}
/**
* Attaches a {@link PreferencesFragment} to the view. Everything else is managed by the
* fragment itself, so no further work needs to be done by this view binder.
* <p>
* Note: It is tricky to attach a {@link Fragment} to a view from this view holder. This is due
* to the way in which the {@link RecyclerView} will reuse existing views and ask us to
* put a settings fragment in there at arbitrary times. Usually it wont be the same view we
* attached the fragment to last time, which causes weirdness. The solution is to use code from
* the com.lsjwzh.widget.recyclerviewpager.FragmentStatePagerAdapter which manages this.
* The code has been ported to {@link SettingsView}.
*
* @see SettingsView
*/
public void bindSettingsView() {
activity.getLayoutInflater().inflate(R.layout.main_tab_settings, frame, true);
}
}

View File

@ -0,0 +1,9 @@
package org.fdroid.fdroid.views.main;
import android.content.Context;
class NearbyViewBinder {
public static void updateUsbOtg(Context context) {
throw new IllegalStateException("unimplemented");
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MenuTitle">
<!-- android:title and android:icon are set dynamically in MainActivity -->
<item
app:showAsAction="ifRoom|withText"
android:id="@+id/latest"/>
<item
app:showAsAction="ifRoom|withText"
android:id="@+id/updates"/>
<item
app:showAsAction="ifRoom|withText"
android:id="@+id/settings"/>
</menu>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">F-Droid Basic</string>
<string name="about_title">About F-Droid Basic</string>
</resources>

View File

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen android:title="@string/about_title"
android:key="pref_about" />
<PreferenceCategory android:title="@string/preference_category__my_apps">
<PreferenceScreen android:title="@string/preference_manage_installed_apps">
<intent
android:action="android.intent.action.MAIN"
android:targetPackage="@string/applicationId"
android:targetClass="org.fdroid.fdroid.views.installed.InstalledAppsActivity"/>
</PreferenceScreen>
<PreferenceScreen
android:title="@string/menu_manage"
android:summary="@string/repositories_summary">
<intent
android:action="android.intent.action.MAIN"
android:targetPackage="@string/applicationId"
android:targetClass="org.fdroid.fdroid.views.ManageReposActivity"/>
</PreferenceScreen>
<PreferenceScreen
android:key="installHistory"
android:visible="false"
android:title="@string/install_history"
android:summary="@string/install_history_summary">
<intent
android:action="android.intent.action.MAIN"
android:targetPackage="@string/applicationId"
android:targetClass="org.fdroid.fdroid.views.InstallHistoryActivity"/>
</PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory android:title="@string/updates">
<org.fdroid.fdroid.views.LiveSeekBarPreference
android:key="overWifi"
android:title="@string/over_wifi"
android:defaultValue="@integer/defaultOverWifi"
android:layout="@layout/preference_seekbar"/>
<org.fdroid.fdroid.views.LiveSeekBarPreference
android:key="overData"
android:title="@string/over_data"
android:defaultValue="@integer/defaultOverData"
android:layout="@layout/preference_seekbar"/>
<SwitchPreferenceCompat
android:title="@string/update_auto_download"
android:summary="@string/update_auto_download_summary"
android:key="updateAutoDownload"/>
<org.fdroid.fdroid.views.LiveSeekBarPreference
android:key="updateIntervalSeekBarPosition"
android:title="@string/update_interval"
android:defaultValue="@integer/defaultUpdateInterval"
android:layout="@layout/preference_seekbar"/>
<SwitchPreferenceCompat
android:title="@string/notify"
android:defaultValue="true"
android:key="updateNotify"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/display"
android:key="pref_category_display">
<ListPreference
android:title="@string/pref_language"
android:key="language"/>
<ListPreference
android:title="@string/theme"
android:key="theme"
android:defaultValue="light"
android:entries="@array/themeNames"
android:entryValues="@array/themeValues"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/appcompatibility"
android:key="pref_category_appcompatibility">
<SwitchPreferenceCompat
android:title="@string/show_incompat_versions"
android:defaultValue="false"
android:key="incompatibleVersions"/>
<SwitchPreferenceCompat
android:title="@string/show_anti_feature_apps"
android:defaultValue="false"
android:key="showAntiFeatureApps"/>
<SwitchPreferenceCompat
android:title="@string/force_touch_apps"
android:defaultValue="false"
android:key="ignoreTouchscreen"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/proxy">
<SwitchPreferenceCompat
android:key="useTor"
android:summary="@string/useTorSummary"
android:title="@string/useTor"/>
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="enableProxy"
android:title="@string/enable_proxy_title"
android:summary="@string/enable_proxy_summary"/>
<EditTextPreference
android:key="proxyHost"
android:title="@string/proxy_host"
android:summary="@string/proxy_host_summary"
android:dependency="enableProxy"/>
<EditTextPreference
android:key="proxyPort"
android:title="@string/proxy_port"
android:summary="@string/proxy_port_summary"
android:dependency="enableProxy"/>
</PreferenceCategory>
<PreferenceCategory
android:key="pref_category_privacy"
android:title="@string/privacy">
<SwitchPreferenceCompat
android:key="promptToSendCrashReports"
android:title="@string/prompt_to_send_crash_reports"
android:summary="@string/prompt_to_send_crash_reports_summary"
android:defaultValue="true"/>
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="preventScreenshots"
android:summary="@string/preventScreenshots_summary"
android:title="@string/preventScreenshots_title"/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/other"
android:key="pref_category_other">
<ListPreference
android:title="@string/cache_downloaded"
android:key="keepCacheFor"
android:defaultValue="86400000"
android:entries="@array/keepCacheNames"
android:entryValues="@array/keepCacheValues"/>
<SwitchPreferenceCompat
android:title="@string/expert"
android:defaultValue="false"
android:key="expert"/>
<CheckBoxPreference
android:key="unstableUpdates"
android:title="@string/unstable_updates"
android:summary="@string/unstable_updates_summary"
android:defaultValue="false"
android:dependency="expert"/>
<CheckBoxPreference
android:key="keepInstallHistory"
android:title="@string/keep_install_history"
android:summary="@string/keep_install_history_summary"
android:defaultValue="false"
android:dependency="expert"/>
<CheckBoxPreference
android:key="sendToFdroidMetrics"
android:title="@string/send_to_fdroid_metrics"
android:summary="@string/send_to_fdroid_metrics_summary"
android:defaultValue="false"
android:dependency="expert"/>
<CheckBoxPreference
android:key="hideAllNotifications"
android:title="@string/hide_all_notifications"
android:summary="@string/hide_all_notifications_summary"
android:defaultValue="false"
android:dependency="expert"/>
<CheckBoxPreference
android:key="sendVersionAndUUIDToServers"
android:title="@string/send_version_and_uuid"
android:summary="@string/send_version_and_uuid_summary"
android:defaultValue="false"
android:dependency="expert"/>
<CheckBoxPreference
android:key="forceOldIndex"
android:title="@string/force_old_index"
android:summary="@string/force_old_index_summary"
android:defaultValue="false"
android:dependency="expert"/>
<CheckBoxPreference
android:title="@string/system_installer"
android:defaultValue="false"
android:key="privilegedInstaller"
android:persistent="false"
android:dependency="expert"/>
</PreferenceCategory>
</PreferenceScreen>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This file should be outside of release manifest (in this case app/src/mock/Manifest.xml -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!--required to enable/disable system animations from the app itself during Espresso test runs-->
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE" />
</manifest>

View File

@ -0,0 +1,179 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Copyright (C) 2010-2012 Ciaran Gultnieks
* Copyright (C) 2013-2017 Peter Serwylo
* Copyright (C) 2014-2015 Daniel Martí
* Copyright (C) 2014-2018 Hans-Christoph Steiner
* Copyright (C) 2016 Dominik Schürmann
* Copyright (C) 2018 Torsten Grote
* Copyright (C) 2018 Senecto Limited
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fdroid.fdroid"
android:installLocation="auto">
<uses-feature
android:name="android.hardware.nfc"
android:required="false" />
<uses-feature
android:name="android.hardware.bluetooth"
android:required="false" />
<uses-feature
android:name="android.hardware.usb.host"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission
android:name="android.permission.USB_PERMISSION"
android:maxSdkVersion="22" /><!-- maybe unnecessary -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission-sdk-23 android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application>
<activity
android:name=".nearby.SwapWorkflowActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/swap"
android:launchMode="singleTask"
android:parentActivityName=".views.main.MainActivity"
android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".views.main.MainActivity" />
</activity>
<activity
android:name=".panic.PanicPreferencesActivity"
android:label="@string/panic_settings"
android:parentActivityName=".views.main.MainActivity">
<intent-filter>
<action android:name="info.guardianproject.panic.action.CONNECT" />
<action android:name="info.guardianproject.panic.action.DISCONNECT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".views.main.MainActivity" />
</activity>
<activity
android:name=".panic.SelectInstalledAppsActivity"
android:parentActivityName=".panic.PanicPreferencesActivity" />
<activity
android:name=".panic.PanicResponderActivity"
android:noHistory="true"
android:theme="@android:style/Theme.NoDisplay">
<!-- this can never have launchMode singleTask or singleInstance! -->
<intent-filter>
<action android:name="info.guardianproject.panic.action.TRIGGER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".panic.ExitActivity"
android:theme="@android:style/Theme.NoDisplay" />
<activity
android:name=".panic.CalculatorActivity"
android:enabled="false"
android:icon="@mipmap/ic_calculator_launcher"
android:label="@string/hiding_calculator">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".nearby.WifiStateChangeReceiver">
<intent-filter>
<action android:name="android.net.wifi.STATE_CHANGE" />
</intent-filter>
</receiver>
<receiver android:name=".receiver.DeviceStorageReceiver">
<intent-filter>
<action android:name="android.intent.action.DEVICE_STORAGE_LOW" />
</intent-filter>
</receiver>
<receiver android:name=".nearby.UsbDeviceAttachedReceiver">
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</receiver>
<receiver android:name=".nearby.UsbDeviceDetachedReceiver">
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_DETACHED"
android:resource="@xml/device_filter" />
</receiver>
<receiver android:name=".nearby.UsbDeviceMediaMountedReceiver">
<intent-filter>
<action android:name="android.intent.action.MEDIA_EJECT" />
<action android:name="android.intent.action.MEDIA_REMOVED" />
<action android:name="android.intent.action.MEDIA_MOUNTED" />
<action android:name="android.intent.action.MEDIA_BAD_REMOVAL" />
<data android:scheme="content" />
<data android:scheme="file" />
</intent-filter>
</receiver>
<service
android:name=".nearby.WifiStateChangeService"
android:exported="false" />
<service android:name=".nearby.SwapService" />
<service
android:name=".nearby.LocalRepoService"
android:exported="false" />
<service
android:name=".nearby.TreeUriScannerIntentService"
android:exported="false" />
<service
android:name=".nearby.SDCardScannerService"
android:exported="false" />
</application>
</manifest>

View File

@ -0,0 +1,123 @@
package javax.jmdns.impl;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.UnknownHostException;
import javax.jmdns.ServiceInfo;
import javax.jmdns.impl.util.ByteWrangler;
/**
* The ServiceInfo class needs to be serialized in order to be sent as an Android broadcast.
* In order to make it Parcelable (or Serializable for that matter), there are some package-scope
* methods which needed to be used. Thus, this class is in the javax.jmdns.impl package so that
* it can access those methods. This is as an alternative to modifying the source code of JmDNS.
*/
public class FDroidServiceInfo extends ServiceInfoImpl implements Parcelable {
public FDroidServiceInfo(ServiceInfo info) {
super(info);
}
/**
* Return the fingerprint of the signing key, or {@code null} if it is not set.
*/
public String getFingerprint() {
// getPropertyString() will return "true" if the value is a zero-length byte array
// so we just do a custom version using getPropertyBytes()
byte[] data = getPropertyBytes("fingerprint");
if (data == null || data.length == 0) {
return null;
}
String fingerprint = ByteWrangler.readUTF(data, 0, data.length);
if (TextUtils.isEmpty(fingerprint)) {
return null;
}
return fingerprint;
}
public String getRepoAddress() {
return getURL(); // Automatically appends the "path" property if present, so no need to do it ourselves.
}
private static byte[] readBytes(Parcel in) {
byte[] bytes = new byte[in.readInt()];
in.readByteArray(bytes);
return bytes;
}
public FDroidServiceInfo(Parcel in) {
super(
in.readString(),
in.readString(),
in.readString(),
in.readInt(),
in.readInt(),
in.readInt(),
in.readByte() != 0,
readBytes(in)
);
int addressCount = in.readInt();
for (int i = 0; i < addressCount; i++) {
try {
addAddress((Inet4Address) Inet4Address.getByAddress(readBytes(in)));
} catch (UnknownHostException e) {
e.printStackTrace();
}
}
addressCount = in.readInt();
for (int i = 0; i < addressCount; i++) {
try {
addAddress((Inet6Address) Inet6Address.getByAddress(readBytes(in)));
} catch (UnknownHostException e) {
e.printStackTrace();
}
}
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(getType());
dest.writeString(getName());
dest.writeString(getSubtype());
dest.writeInt(getPort());
dest.writeInt(getWeight());
dest.writeInt(getPriority());
dest.writeByte(isPersistent() ? (byte) 1 : (byte) 0);
dest.writeInt(getTextBytes().length);
dest.writeByteArray(getTextBytes());
dest.writeInt(getInet4Addresses().length);
for (int i = 0; i < getInet4Addresses().length; i++) {
Inet4Address address = getInet4Addresses()[i];
dest.writeInt(address.getAddress().length);
dest.writeByteArray(address.getAddress());
}
dest.writeInt(getInet6Addresses().length);
for (int i = 0; i < getInet6Addresses().length; i++) {
Inet6Address address = getInet6Addresses()[i];
dest.writeInt(address.getAddress().length);
dest.writeByteArray(address.getAddress());
}
}
public static final Parcelable.Creator<FDroidServiceInfo> CREATOR = new Parcelable.Creator<FDroidServiceInfo>() {
public FDroidServiceInfo createFromParcel(Parcel source) {
return new FDroidServiceInfo(source);
}
public FDroidServiceInfo[] newArray(int size) {
return new FDroidServiceInfo[size];
}
};
}

View File

@ -0,0 +1,94 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.logging;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public abstract class AbstractLogger implements LoggerInterface {
protected String category;
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.ENGLISH);
public AbstractLogger(String category) {
this.category = category;
}
protected String format(String level, String message) {
return String.format("%s %s %s: %s\n", dateFormat.format(new Date()), level, category, message);
}
protected abstract void write(String level, String message, Throwable t);
protected void writeFixNullMessage(String level, String message, Throwable t) {
if (message == null) {
if (t != null) message = t.getClass().getName();
else message = "null";
}
write(level, message, t);
}
public void debug(String message, Throwable t) {
writeFixNullMessage(DEBUG, message, t);
}
public void debug(String message) {
writeFixNullMessage(DEBUG, message, null);
}
public void error(String message, Throwable t) {
writeFixNullMessage(ERROR, message, t);
}
public void error(String message) {
writeFixNullMessage(ERROR, message, null);
}
public void info(String message, Throwable t) {
writeFixNullMessage(INFO, message, t);
}
public void info(String message) {
writeFixNullMessage(INFO, message, null);
}
public void warning(String message, Throwable t) {
writeFixNullMessage(WARNING, message, t);
}
public void warning(String message) {
writeFixNullMessage(WARNING, message, null);
}
public boolean isDebugEnabled() {
return true;
}
public boolean isErrorEnabled() {
return true;
}
public boolean isInfoEnabled() {
return true;
}
public boolean isWarningEnabled() {
return true;
}
}

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.logging;
public class ConsoleLoggerFactory implements LoggerFactory {
public LoggerInterface getLogger(String category) {
return new StreamLogger(category, System.out);
}
}

View File

@ -0,0 +1,22 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.logging;
public interface LoggerFactory {
public LoggerInterface getLogger(String category);
}

View File

@ -0,0 +1,52 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.logging;
public interface LoggerInterface {
public static final String ERROR = "ERROR";
public static final String WARNING = "WARNING";
public static final String INFO = "INFO";
public static final String DEBUG = "DEBUG";
public boolean isErrorEnabled();
public void error(String message);
public void error(String message, Throwable t);
public boolean isWarningEnabled();
public void warning(String message);
public void warning(String message, Throwable t);
public boolean isInfoEnabled();
public void info(String message);
public void info(String message, Throwable t);
public boolean isDebugEnabled();
public void debug(String message);
public void debug(String message, Throwable t);
}

View File

@ -0,0 +1,41 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.logging;
import java.util.Map;
import java.util.TreeMap;
public class LoggerManager {
static LoggerFactory factory = new NullLoggerFactory();
static Map<String, LoggerInterface> loggers = new TreeMap<String, LoggerInterface>();
public static void setLoggerFactory(LoggerFactory f) {
factory = f;
}
public static LoggerInterface getLogger(String category) {
LoggerInterface logger = loggers.get(category);
if (logger == null) {
logger = factory.getLogger(category);
loggers.put(category, logger);
}
return logger;
}
}

View File

@ -0,0 +1,70 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.logging;
public class NullLoggerFactory implements LoggerFactory {
static LoggerInterface logger = new LoggerInterface() {
public void debug(String message) {
}
public void debug(String message, Throwable t) {
}
public void error(String message) {
}
public void error(String message, Throwable t) {
}
public void info(String message) {
}
public void info(String message, Throwable t) {
}
public boolean isDebugEnabled() {
return false;
}
public boolean isErrorEnabled() {
return false;
}
public boolean isInfoEnabled() {
return false;
}
public boolean isWarningEnabled() {
return false;
}
public void warning(String message) {
}
public void warning(String message, Throwable t) {
}
};
public LoggerInterface getLogger(String category) {
return logger;
}
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.logging;
import java.io.PrintStream;
public class StreamLogger extends AbstractLogger {
PrintStream out;
public StreamLogger(String category, PrintStream out) {
super(category);
this.out = out;
}
@Override
protected void write(String level, String message, Throwable t) {
out.print(format(level, message));
if (t != null) t.printStackTrace(out);
}
}

View File

@ -0,0 +1,15 @@
package kellinwood.security.zipsigner;
public class AutoKeyException extends RuntimeException {
private static final long serialVersionUID = 1L;
public AutoKeyException(String message) {
super(message);
}
public AutoKeyException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -0,0 +1,130 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.security.zipsigner;
import kellinwood.logging.LoggerInterface;
import kellinwood.logging.LoggerManager;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.lang.reflect.Method;
/*
* This class provides Base64 encoding services using one of several possible
* implementations available elsewhere in the classpath. Supported implementations
* are android.util.Base64 and org.bouncycastle.util.encoders.Base64Encoder.
* These APIs are accessed via reflection, and as long as at least one is available
* Base64 encoding is possible. This technique provides compatibility across different
* Android OS versions, and also allows zipsigner-lib to operate in desktop environments
* as long as the BouncyCastle provider jar is in the classpath.
*
* android.util.Base64 was added in API level 8 (Android 2.2, Froyo)
* org.bouncycastle.util.encoders.Base64Encoder was removed in API level 11 (Android 3.0, Honeycomb)
*
*/
@SuppressWarnings("unchecked")
public class Base64 {
static Method aEncodeMethod = null; // Reference to the android.util.Base64.encode() method, if available
static Method aDecodeMethod = null; // Reference to the android.util.Base64.decode() method, if available
static Object bEncoder = null; // Reference to an org.bouncycastle.util.encoders.Base64Encoder instance, if available
static Method bEncodeMethod = null; // Reference to the bEncoder.encode() method, if available
static Object bDecoder = null; // Reference to an org.bouncycastle.util.encoders.Base64Encoder instance, if available
static Method bDecodeMethod = null; // Reference to the bEncoder.encode() method, if available
static LoggerInterface logger = null;
static {
Class<Object> clazz;
logger = LoggerManager.getLogger(Base64.class.getName());
try {
clazz = (Class<Object>) Class.forName("android.util.Base64");
// Looking for encode( byte[] input, int flags)
aEncodeMethod = clazz.getMethod("encode", byte[].class, Integer.TYPE);
aDecodeMethod = clazz.getMethod("decode", byte[].class, Integer.TYPE);
logger.info(clazz.getName() + " is available.");
} catch (ClassNotFoundException x) {
} // Ignore
catch (Exception x) {
logger.error("Failed to initialize use of android.util.Base64", x);
}
try {
clazz = (Class<Object>) Class.forName("org.bouncycastle.util.encoders.Base64Encoder");
bEncoder = clazz.newInstance();
// Looking for encode( byte[] input, int offset, int length, OutputStream output)
bEncodeMethod = clazz.getMethod("encode", byte[].class, Integer.TYPE, Integer.TYPE, OutputStream.class);
logger.info(clazz.getName() + " is available.");
// Looking for decode( byte[] input, int offset, int length, OutputStream output)
bDecodeMethod = clazz.getMethod("decode", byte[].class, Integer.TYPE, Integer.TYPE, OutputStream.class);
} catch (ClassNotFoundException x) {
} // Ignore
catch (Exception x) {
logger.error("Failed to initialize use of org.bouncycastle.util.encoders.Base64Encoder", x);
}
if (aEncodeMethod == null && bEncodeMethod == null)
throw new IllegalStateException("No base64 encoder implementation is available.");
}
public static String encode(byte[] data) {
try {
if (aEncodeMethod != null) {
// Invoking a static method call, using null for the instance value
byte[] encodedBytes = (byte[]) aEncodeMethod.invoke(null, data, 2);
return new String(encodedBytes);
} else if (bEncodeMethod != null) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bEncodeMethod.invoke(bEncoder, data, 0, data.length, baos);
return new String(baos.toByteArray());
}
} catch (Exception x) {
throw new IllegalStateException(x.getClass().getName() + ": " + x.getMessage());
}
throw new IllegalStateException("No base64 encoder implementation is available.");
}
public static byte[] decode(byte[] data) {
try {
if (aDecodeMethod != null) {
// Invoking a static method call, using null for the instance value
byte[] decodedBytes = (byte[]) aDecodeMethod.invoke(null, data, 2);
return decodedBytes;
} else if (bDecodeMethod != null) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bDecodeMethod.invoke(bEncoder, data, 0, data.length, baos);
return baos.toByteArray();
}
} catch (Exception x) {
throw new IllegalStateException(x.getClass().getName() + ": " + x.getMessage());
}
throw new IllegalStateException("No base64 encoder implementation is available.");
}
}

View File

@ -0,0 +1,36 @@
package kellinwood.security.zipsigner;
import java.util.Locale;
/**
* Default resource adapter.
*/
public class DefaultResourceAdapter implements ResourceAdapter {
@Override
public String getString(Item item, Object... args) {
switch (item) {
case INPUT_SAME_AS_OUTPUT_ERROR:
return "Input and output files are the same. Specify a different name for the output.";
case AUTO_KEY_SELECTION_ERROR:
return "Unable to auto-select key for signing " + args[0];
case LOADING_CERTIFICATE_AND_KEY:
return "Loading certificate and private key";
case PARSING_CENTRAL_DIRECTORY:
return "Parsing the input's central directory";
case GENERATING_MANIFEST:
return "Generating manifest";
case GENERATING_SIGNATURE_FILE:
return "Generating signature file";
case GENERATING_SIGNATURE_BLOCK:
return "Generating signature block file";
case COPYING_ZIP_ENTRY:
return String.format(Locale.ENGLISH, "Copying zip entry %d of %d", args[0], args[1]);
default:
throw new IllegalArgumentException("Unknown item " + item);
}
}
}

View File

@ -0,0 +1,73 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.security.zipsigner;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
/**
* Produces the classic hex dump with an address column, hex data
* section (16 bytes per row) and right-column printable character dislpay.
*/
public class HexDumpEncoder {
static HexEncoder encoder = new HexEncoder();
public static String encode(byte[] data) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
encoder.encode(data, 0, data.length, baos);
byte[] hex = baos.toByteArray();
StringBuilder hexDumpOut = new StringBuilder();
for (int i = 0; i < hex.length; i += 32) {
int max = Math.min(i + 32, hex.length);
StringBuilder hexOut = new StringBuilder();
StringBuilder chrOut = new StringBuilder();
hexOut.append(String.format("%08x: ", (i / 2)));
for (int j = i; j < max; j += 2) {
hexOut.append(Character.valueOf((char) hex[j]));
hexOut.append(Character.valueOf((char) hex[j + 1]));
if ((j + 2) % 4 == 0) hexOut.append(' ');
int dataChar = data[j / 2];
if (dataChar >= 32 && dataChar < 127) chrOut.append(Character.valueOf((char) dataChar));
else chrOut.append('.');
}
hexDumpOut.append(hexOut.toString());
for (int k = hexOut.length(); k < 50; k++) hexDumpOut.append(' ');
hexDumpOut.append(" ");
hexDumpOut.append(chrOut);
hexDumpOut.append("\n");
}
return hexDumpOut.toString();
} catch (IOException x) {
throw new IllegalStateException(x.getClass().getName() + ": " + x.getMessage());
}
}
}

View File

@ -0,0 +1,182 @@
package kellinwood.security.zipsigner;
/*
This file is a copy of org.bouncycastle.util.encoders.HexEncoder.
Please note: our license is an adaptation of the MIT X11 License and should be read as such.
License
Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import java.io.IOException;
import java.io.OutputStream;
public class HexEncoder {
protected final byte[] encodingTable =
{
(byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7',
(byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f'
};
/*
* set up the decoding table.
*/
protected final byte[] decodingTable = new byte[128];
protected void initialiseDecodingTable() {
for (int i = 0; i < encodingTable.length; i++) {
decodingTable[encodingTable[i]] = (byte) i;
}
decodingTable['A'] = decodingTable['a'];
decodingTable['B'] = decodingTable['b'];
decodingTable['C'] = decodingTable['c'];
decodingTable['D'] = decodingTable['d'];
decodingTable['E'] = decodingTable['e'];
decodingTable['F'] = decodingTable['f'];
}
public HexEncoder() {
initialiseDecodingTable();
}
/**
* encode the input data producing a Hex output stream.
*
* @return the number of bytes produced.
*/
public int encode(
byte[] data,
int off,
int length,
OutputStream out)
throws IOException {
for (int i = off; i < (off + length); i++) {
int v = data[i] & 0xff;
out.write(encodingTable[(v >>> 4)]);
out.write(encodingTable[v & 0xf]);
}
return length * 2;
}
private boolean ignore(
char c) {
return (c == '\n' || c == '\r' || c == '\t' || c == ' ');
}
/**
* decode the Hex encoded byte data writing it to the given output stream,
* whitespace characters will be ignored.
*
* @return the number of bytes produced.
*/
public int decode(
byte[] data,
int off,
int length,
OutputStream out)
throws IOException {
byte b1, b2;
int outLen = 0;
int end = off + length;
while (end > off) {
if (!ignore((char) data[end - 1])) {
break;
}
end--;
}
int i = off;
while (i < end) {
while (i < end && ignore((char) data[i])) {
i++;
}
b1 = decodingTable[data[i++]];
while (i < end && ignore((char) data[i])) {
i++;
}
b2 = decodingTable[data[i++]];
out.write((b1 << 4) | b2);
outLen++;
}
return outLen;
}
/**
* decode the Hex encoded String data writing it to the given output stream,
* whitespace characters will be ignored.
*
* @return the number of bytes produced.
*/
public int decode(
String data,
OutputStream out)
throws IOException {
byte b1, b2;
int length = 0;
int end = data.length();
while (end > 0) {
if (!ignore(data.charAt(end - 1))) {
break;
}
end--;
}
int i = 0;
while (i < end) {
while (i < end && ignore(data.charAt(i))) {
i++;
}
b1 = decodingTable[data.charAt(i++)];
while (i < end && ignore(data.charAt(i))) {
i++;
}
b2 = decodingTable[data.charAt(i++)];
out.write((b1 << 4) | b2);
length++;
}
return length;
}
}

View File

@ -0,0 +1,95 @@
/*
* Copyright (C) 2010 Ken Ellinwood
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.security.zipsigner;
import java.security.PrivateKey;
import java.security.cert.X509Certificate;
public class KeySet {
String name;
// certificate
X509Certificate publicKey = null;
// private key
PrivateKey privateKey = null;
// signature block template
byte[] sigBlockTemplate = null;
String signatureAlgorithm = "SHA1withRSA";
public KeySet() {
}
public KeySet(String name, X509Certificate publicKey, PrivateKey privateKey, byte[] sigBlockTemplate) {
this.name = name;
this.publicKey = publicKey;
this.privateKey = privateKey;
this.sigBlockTemplate = sigBlockTemplate;
}
public KeySet(String name, X509Certificate publicKey, PrivateKey privateKey, String signatureAlgorithm, byte[] sigBlockTemplate) {
this.name = name;
this.publicKey = publicKey;
this.privateKey = privateKey;
if (signatureAlgorithm != null) this.signatureAlgorithm = signatureAlgorithm;
this.sigBlockTemplate = sigBlockTemplate;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public X509Certificate getPublicKey() {
return publicKey;
}
public void setPublicKey(X509Certificate publicKey) {
this.publicKey = publicKey;
}
public PrivateKey getPrivateKey() {
return privateKey;
}
public void setPrivateKey(PrivateKey privateKey) {
this.privateKey = privateKey;
}
public byte[] getSigBlockTemplate() {
return sigBlockTemplate;
}
public void setSigBlockTemplate(byte[] sigBlockTemplate) {
this.sigBlockTemplate = sigBlockTemplate;
}
public String getSignatureAlgorithm() {
return signatureAlgorithm;
}
public void setSignatureAlgorithm(String signatureAlgorithm) {
if (signatureAlgorithm == null) signatureAlgorithm = "SHA1withRSA";
else this.signatureAlgorithm = signatureAlgorithm;
}
}

View File

@ -0,0 +1,52 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.security.zipsigner;
public class ProgressEvent {
public static final int PRORITY_NORMAL = 0;
public static final int PRORITY_IMPORTANT = 1;
private String message;
private int percentDone;
private int priority;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public int getPercentDone() {
return percentDone;
}
public void setPercentDone(int percentDone) {
this.percentDone = percentDone;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
}

View File

@ -0,0 +1,80 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.security.zipsigner;
import java.util.ArrayList;
public class ProgressHelper {
private int progressTotalItems = 0;
private int progressCurrentItem = 0;
private ProgressEvent progressEvent = new ProgressEvent();
public void initProgress() {
progressTotalItems = 10000;
progressCurrentItem = 0;
}
public int getProgressTotalItems() {
return progressTotalItems;
}
public void setProgressTotalItems(int progressTotalItems) {
this.progressTotalItems = progressTotalItems;
}
public int getProgressCurrentItem() {
return progressCurrentItem;
}
public void setProgressCurrentItem(int progressCurrentItem) {
this.progressCurrentItem = progressCurrentItem;
}
public void progress(int priority, String message) {
progressCurrentItem += 1;
int percentDone;
if (progressTotalItems == 0) percentDone = 0;
else percentDone = (100 * progressCurrentItem) / progressTotalItems;
// Notify listeners here
for (ProgressListener listener : listeners) {
progressEvent.setMessage(message);
progressEvent.setPercentDone(percentDone);
progressEvent.setPriority(priority);
listener.onProgress(progressEvent);
}
}
private ArrayList<ProgressListener> listeners = new ArrayList<ProgressListener>();
@SuppressWarnings("unchecked")
public synchronized void addProgressListener(ProgressListener l) {
ArrayList<ProgressListener> list = (ArrayList<ProgressListener>) listeners.clone();
list.add(l);
listeners = list;
}
@SuppressWarnings("unchecked")
public synchronized void removeProgressListener(ProgressListener l) {
ArrayList<ProgressListener> list = (ArrayList<ProgressListener>) listeners.clone();
list.remove(l);
listeners = list;
}
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.security.zipsigner;
public interface ProgressListener {
/**
* Called to notify the listener that progress has been made during
* the zip signing operation.
*/
public void onProgress(ProgressEvent event);
}

View File

@ -0,0 +1,23 @@
package kellinwood.security.zipsigner;
/**
* Interface to obtain internationalized strings for the progress events.
*/
public interface ResourceAdapter {
public enum Item {
INPUT_SAME_AS_OUTPUT_ERROR,
AUTO_KEY_SELECTION_ERROR,
LOADING_CERTIFICATE_AND_KEY,
PARSING_CENTRAL_DIRECTORY,
GENERATING_MANIFEST,
GENERATING_SIGNATURE_FILE,
GENERATING_SIGNATURE_BLOCK,
COPYING_ZIP_ENTRY
}
;
public String getString(Item item, Object... args);
}

View File

@ -0,0 +1,68 @@
/*
* Copyright (C) 2010 Ken Ellinwood.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.security.zipsigner;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.PrivateKey;
@SuppressWarnings("restriction")
public class ZipSignature {
byte[] beforeAlgorithmIdBytes = {0x30, 0x21};
// byte[] algorithmIdBytes;
// algorithmIdBytes = sun.security.x509.AlgorithmId.get("SHA1").encode();
byte[] algorithmIdBytes = {0x30, 0x09, 0x06, 0x05, 0x2B, 0x0E, 0x03, 0x02, 0x1A, 0x05, 0x00};
byte[] afterAlgorithmIdBytes = {0x04, 0x14};
Cipher cipher;
MessageDigest md;
public ZipSignature() throws IOException, GeneralSecurityException {
md = MessageDigest.getInstance("SHA1");
cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
}
public void initSign(PrivateKey privateKey) throws InvalidKeyException {
cipher.init(Cipher.ENCRYPT_MODE, privateKey);
}
public void update(byte[] data) {
md.update(data);
}
public void update(byte[] data, int offset, int count) {
md.update(data, offset, count);
}
public byte[] sign() throws BadPaddingException, IllegalBlockSizeException {
cipher.update(beforeAlgorithmIdBytes);
cipher.update(algorithmIdBytes);
cipher.update(afterAlgorithmIdBytes);
cipher.update(md.digest());
return cipher.doFinal();
}
}

View File

@ -0,0 +1,796 @@
/*
* Copyright (C) 2010 Ken Ellinwood
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* This file is a heavily modified version of com.android.signapk.SignApk.java.
* The changes include:
* - addition of the signZip() convenience methods
* - addition of a progress listener interface
* - removal of main()
* - switch to a signature generation method that verifies
* in Android recovery
* - eliminated dependency on sun.security and sun.misc APIs by
* using signature block template files.
*/
package kellinwood.security.zipsigner;
import kellinwood.logging.LoggerInterface;
import kellinwood.logging.LoggerManager;
import kellinwood.zipio.ZioEntry;
import kellinwood.zipio.ZipInput;
import kellinwood.zipio.ZipOutput;
import javax.crypto.Cipher;
import javax.crypto.EncryptedPrivateKeyInfo;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.lang.reflect.Method;
import java.net.URL;
import java.security.DigestOutputStream;
import java.security.GeneralSecurityException;
import java.security.Key;
import java.security.KeyFactory;
import java.security.KeyStore;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.Provider;
import java.security.Security;
import java.security.cert.Certificate;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;
import java.security.spec.PKCS8EncodedKeySpec;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Observable;
import java.util.Observer;
import java.util.TreeMap;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
import java.util.regex.Pattern;
/**
* This is a modified copy of com.android.signapk.SignApk.java. It provides an
* API to sign JAR files (including APKs and Zip/OTA updates) in
* a way compatible with the mincrypt verifier, using SHA1 and RSA keys.
* <p>
* Please see the README.txt file in the root of this project for usage instructions.
*/
public class ZipSigner {
private boolean canceled = false;
private ProgressHelper progressHelper = new ProgressHelper();
private ResourceAdapter resourceAdapter = new DefaultResourceAdapter();
static LoggerInterface log = null;
private static final String CERT_SF_NAME = "META-INF/CERT.SF";
private static final String CERT_RSA_NAME = "META-INF/CERT.RSA";
// Files matching this pattern are not copied to the output.
private static Pattern stripPattern =
Pattern.compile("^META-INF/(.*)[.](SF|RSA|DSA)$");
Map<String, KeySet> loadedKeys = new HashMap<String, KeySet>();
KeySet keySet = null;
public static LoggerInterface getLogger() {
if (log == null) log = LoggerManager.getLogger(ZipSigner.class.getName());
return log;
}
public static final String MODE_AUTO_TESTKEY = "auto-testkey";
public static final String MODE_AUTO_NONE = "auto-none";
public static final String MODE_AUTO = "auto";
public static final String KEY_NONE = "none";
public static final String KEY_TESTKEY = "testkey";
// Allowable key modes.
public static final String[] SUPPORTED_KEY_MODES =
new String[]{MODE_AUTO_TESTKEY, MODE_AUTO, MODE_AUTO_NONE, "media", "platform", "shared", KEY_TESTKEY, KEY_NONE};
String keymode = KEY_TESTKEY; // backwards compatible with versions that only signed with this key
Map<String, String> autoKeyDetect = new HashMap<String, String>();
AutoKeyObservable autoKeyObservable = new AutoKeyObservable();
public ZipSigner() throws ClassNotFoundException, IllegalAccessException, InstantiationException {
// MD5 of the first 1458 bytes of the signature block generated by the key, mapped to the key name
autoKeyDetect.put("aa9852bc5a53272ac8031d49b65e4b0e", "media");
autoKeyDetect.put("e60418c4b638f20d0721e115674ca11f", "platform");
autoKeyDetect.put("3e24e49741b60c215c010dc6048fca7d", "shared");
autoKeyDetect.put("dab2cead827ef5313f28e22b6fa8479f", "testkey");
}
public ResourceAdapter getResourceAdapter() {
return resourceAdapter;
}
public void setResourceAdapter(ResourceAdapter resourceAdapter) {
this.resourceAdapter = resourceAdapter;
}
// when the key mode is automatic, the observers are called when the key is determined
public void addAutoKeyObserver(Observer o) {
autoKeyObservable.addObserver(o);
}
public String getKeymode() {
return keymode;
}
public void setKeymode(String km) throws IOException, GeneralSecurityException {
if (getLogger().isDebugEnabled()) getLogger().debug("setKeymode: " + km);
keymode = km;
if (keymode.startsWith(MODE_AUTO)) {
keySet = null;
} else {
progressHelper.initProgress();
loadKeys(keymode);
}
}
public static String[] getSupportedKeyModes() {
return SUPPORTED_KEY_MODES;
}
protected String autoDetectKey(String mode, Map<String, ZioEntry> zioEntries)
throws NoSuchAlgorithmException, IOException {
boolean debug = getLogger().isDebugEnabled();
if (!mode.startsWith(MODE_AUTO)) return mode;
// Auto-determine which keys to use
String keyName = null;
// Start by finding the signature block file in the input.
for (Map.Entry<String, ZioEntry> entry : zioEntries.entrySet()) {
String entryName = entry.getKey();
if (entryName.startsWith("META-INF/") && entryName.endsWith(".RSA")) {
// Compute MD5 of the first 1458 bytes, which is the size of our signature block templates --
// e.g., the portion of the sig block file that is the same for a given certificate.
MessageDigest md5 = MessageDigest.getInstance("MD5");
byte[] entryData = entry.getValue().getData();
if (entryData.length < 1458) break; // sig block too short to be a supported key
md5.update(entryData, 0, 1458);
byte[] rawDigest = md5.digest();
// Create the hex representation of the digest value
StringBuilder builder = new StringBuilder();
for (byte b : rawDigest) {
builder.append(String.format("%02x", b));
}
String md5String = builder.toString();
// Lookup the key name
keyName = autoKeyDetect.get(md5String);
if (debug) {
if (keyName != null) {
getLogger().debug(String.format("Auto-determined key=%s using md5=%s", keyName, md5String));
} else {
getLogger().debug(String.format("Auto key determination failed for md5=%s", md5String));
}
}
if (keyName != null) return keyName;
}
}
if (mode.equals(MODE_AUTO_TESTKEY)) {
// in auto-testkey mode, fallback to the testkey if it couldn't be determined
if (debug) getLogger().debug("Falling back to key=" + keyName);
return KEY_TESTKEY;
} else if (mode.equals(MODE_AUTO_NONE)) {
// in auto-node mode, simply copy the input to the output when the key can't be determined.
if (debug) getLogger().debug("Unable to determine key, returning: " + KEY_NONE);
return KEY_NONE;
}
return null;
}
public void issueLoadingCertAndKeysProgressEvent() {
progressHelper.progress(ProgressEvent.PRORITY_IMPORTANT, resourceAdapter.getString(ResourceAdapter.Item.LOADING_CERTIFICATE_AND_KEY));
}
// Loads one of the built-in keys (media, platform, shared, testkey)
public void loadKeys(String name)
throws IOException, GeneralSecurityException {
keySet = loadedKeys.get(name);
if (keySet != null) return;
keySet = new KeySet();
keySet.setName(name);
loadedKeys.put(name, keySet);
if (KEY_NONE.equals(name)) return;
issueLoadingCertAndKeysProgressEvent();
// load the private key
URL privateKeyUrl = getClass().getResource("/keys/" + name + ".pk8");
keySet.setPrivateKey(readPrivateKey(privateKeyUrl, null));
// load the certificate
URL publicKeyUrl = getClass().getResource("/keys/" + name + ".x509.pem");
keySet.setPublicKey(readPublicKey(publicKeyUrl));
// load the signature block template
URL sigBlockTemplateUrl = getClass().getResource("/keys/" + name + ".sbt");
if (sigBlockTemplateUrl != null) {
keySet.setSigBlockTemplate(readContentAsBytes(sigBlockTemplateUrl));
}
}
public void setKeys(String name, X509Certificate publicKey, PrivateKey privateKey, byte[] signatureBlockTemplate) {
keySet = new KeySet(name, publicKey, privateKey, signatureBlockTemplate);
}
public void setKeys(String name, X509Certificate publicKey, PrivateKey privateKey, String signatureAlgorithm, byte[] signatureBlockTemplate) {
keySet = new KeySet(name, publicKey, privateKey, signatureAlgorithm, signatureBlockTemplate);
}
public KeySet getKeySet() {
return keySet;
}
// Allow the operation to be canceled.
public void cancel() {
canceled = true;
}
// Allow the instance to sign again if previously canceled.
public void resetCanceled() {
canceled = false;
}
public boolean isCanceled() {
return canceled;
}
@SuppressWarnings("unchecked")
public void loadProvider(String providerClassName)
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
Class providerClass = Class.forName(providerClassName);
Provider provider = (Provider) providerClass.newInstance();
Security.insertProviderAt(provider, 1);
}
public X509Certificate readPublicKey(URL publicKeyUrl)
throws IOException, GeneralSecurityException {
InputStream input = publicKeyUrl.openStream();
try {
CertificateFactory cf = CertificateFactory.getInstance("X.509");
return (X509Certificate) cf.generateCertificate(input);
} finally {
input.close();
}
}
/**
* Decrypt an encrypted PKCS 8 format private key.
* <p>
* Based on ghstark's post on Aug 6, 2006 at
* http://forums.sun.com/thread.jspa?threadID=758133&messageID=4330949
*
* @param encryptedPrivateKey The raw data of the private key
* @param keyPassword the key password
*/
private KeySpec decryptPrivateKey(byte[] encryptedPrivateKey, String keyPassword)
throws GeneralSecurityException {
EncryptedPrivateKeyInfo epkInfo;
try {
epkInfo = new EncryptedPrivateKeyInfo(encryptedPrivateKey);
} catch (IOException ex) {
// Probably not an encrypted key.
return null;
}
char[] keyPasswd = keyPassword.toCharArray();
SecretKeyFactory skFactory = SecretKeyFactory.getInstance(epkInfo.getAlgName());
Key key = skFactory.generateSecret(new PBEKeySpec(keyPasswd));
Cipher cipher = Cipher.getInstance(epkInfo.getAlgName());
cipher.init(Cipher.DECRYPT_MODE, key, epkInfo.getAlgParameters());
try {
return epkInfo.getKeySpec(cipher);
} catch (InvalidKeySpecException ex) {
getLogger().error("signapk: Password for private key may be bad.");
throw ex;
}
}
/**
* Fetch the content at the specified URL and return it as a byte array.
*/
public byte[] readContentAsBytes(URL contentUrl) throws IOException {
return readContentAsBytes(contentUrl.openStream());
}
/**
* Fetch the content from the given stream and return it as a byte array.
*/
public byte[] readContentAsBytes(InputStream input) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[2048];
int numRead = input.read(buffer);
while (numRead != -1) {
baos.write(buffer, 0, numRead);
numRead = input.read(buffer);
}
byte[] bytes = baos.toByteArray();
return bytes;
}
/**
* Read a PKCS 8 format private key.
*/
public PrivateKey readPrivateKey(URL privateKeyUrl, String keyPassword)
throws IOException, GeneralSecurityException {
DataInputStream input = new DataInputStream(privateKeyUrl.openStream());
try {
byte[] bytes = readContentAsBytes(input);
KeySpec spec = decryptPrivateKey(bytes, keyPassword);
if (spec == null) {
spec = new PKCS8EncodedKeySpec(bytes);
}
try {
return KeyFactory.getInstance("RSA").generatePrivate(spec);
} catch (InvalidKeySpecException ex) {
return KeyFactory.getInstance("DSA").generatePrivate(spec);
}
} finally {
input.close();
}
}
/**
* Add the SHA1 of every file to the manifest, creating it if necessary.
*/
private Manifest addDigestsToManifest(Map<String, ZioEntry> entries)
throws IOException, GeneralSecurityException {
Manifest input = null;
ZioEntry manifestEntry = entries.get(JarFile.MANIFEST_NAME);
if (manifestEntry != null) {
input = new Manifest();
input.read(manifestEntry.getInputStream());
}
Manifest output = new Manifest();
Attributes main = output.getMainAttributes();
if (input != null) {
main.putAll(input.getMainAttributes());
} else {
main.putValue("Manifest-Version", "1.0");
main.putValue("Created-By", "1.0 (Android SignApk)");
}
// BASE64Encoder base64 = new BASE64Encoder();
MessageDigest md = MessageDigest.getInstance("SHA1");
byte[] buffer = new byte[512];
int num;
// We sort the input entries by name, and add them to the
// output manifest in sorted order. We expect that the output
// map will be deterministic.
TreeMap<String, ZioEntry> byName = new TreeMap<String, ZioEntry>();
byName.putAll(entries);
boolean debug = getLogger().isDebugEnabled();
if (debug) getLogger().debug("Manifest entries:");
for (ZioEntry entry : byName.values()) {
if (canceled) break;
String name = entry.getName();
if (debug) getLogger().debug(name);
if (!entry.isDirectory() && !name.equals(JarFile.MANIFEST_NAME) &&
!name.equals(CERT_SF_NAME) && !name.equals(CERT_RSA_NAME) &&
(stripPattern == null ||
!stripPattern.matcher(name).matches())) {
progressHelper.progress(ProgressEvent.PRORITY_NORMAL, resourceAdapter.getString(ResourceAdapter.Item.GENERATING_MANIFEST));
InputStream data = entry.getInputStream();
while ((num = data.read(buffer)) > 0) {
md.update(buffer, 0, num);
}
Attributes attr = null;
if (input != null) {
java.util.jar.Attributes inAttr = input.getAttributes(name);
if (inAttr != null) attr = new Attributes(inAttr);
}
if (attr == null) attr = new Attributes();
attr.putValue("SHA1-Digest", Base64.encode(md.digest()));
output.getEntries().put(name, attr);
}
}
return output;
}
/**
* Write the signature file to the given output stream.
*/
private void generateSignatureFile(Manifest manifest, OutputStream out)
throws IOException, GeneralSecurityException {
out.write(("Signature-Version: 1.0\r\n").getBytes());
out.write(("Created-By: 1.0 (Android SignApk)\r\n").getBytes());
// BASE64Encoder base64 = new BASE64Encoder();
MessageDigest md = MessageDigest.getInstance("SHA1");
PrintStream print = new PrintStream(
new DigestOutputStream(new ByteArrayOutputStream(), md),
true, "UTF-8");
// Digest of the entire manifest
manifest.write(print);
print.flush();
out.write(("SHA1-Digest-Manifest: " + Base64.encode(md.digest()) + "\r\n\r\n").getBytes());
Map<String, Attributes> entries = manifest.getEntries();
for (Map.Entry<String, Attributes> entry : entries.entrySet()) {
if (canceled) break;
progressHelper.progress(ProgressEvent.PRORITY_NORMAL, resourceAdapter.getString(ResourceAdapter.Item.GENERATING_SIGNATURE_FILE));
// Digest of the manifest stanza for this entry.
String nameEntry = "Name: " + entry.getKey() + "\r\n";
print.print(nameEntry);
for (Map.Entry<Object, Object> att : entry.getValue().entrySet()) {
print.print(att.getKey() + ": " + att.getValue() + "\r\n");
}
print.print("\r\n");
print.flush();
out.write(nameEntry.getBytes());
out.write(("SHA1-Digest: " + Base64.encode(md.digest()) + "\r\n\r\n").getBytes());
}
}
/**
* Write a .RSA file with a digital signature.
*/
@SuppressWarnings("unchecked")
private void writeSignatureBlock(KeySet keySet, byte[] signatureFileBytes, OutputStream out)
throws IOException, GeneralSecurityException {
if (keySet.getSigBlockTemplate() != null) {
// Can't use default Signature on Android. Although it generates a signature that can be verified by jarsigner,
// the recovery program appears to require a specific algorithm/mode/padding. So we use the custom ZipSignature instead.
// Signature signature = Signature.getInstance("SHA1withRSA");
ZipSignature signature = new ZipSignature();
signature.initSign(keySet.getPrivateKey());
signature.update(signatureFileBytes);
byte[] signatureBytes = signature.sign();
out.write(keySet.getSigBlockTemplate());
out.write(signatureBytes);
if (getLogger().isDebugEnabled()) {
MessageDigest md = MessageDigest.getInstance("SHA1");
md.update(signatureFileBytes);
byte[] sfDigest = md.digest();
getLogger().debug("Sig File SHA1: \n" + HexDumpEncoder.encode(sfDigest));
getLogger().debug("Signature: \n" + HexDumpEncoder.encode(signatureBytes));
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
cipher.init(Cipher.DECRYPT_MODE, keySet.getPublicKey());
byte[] tmpData = cipher.doFinal(signatureBytes);
getLogger().debug("Signature Decrypted: \n" + HexDumpEncoder.encode(tmpData));
}
} else {
try {
byte[] sigBlock = null;
// Use reflection to call the optional generator.
Class generatorClass = Class.forName("kellinwood.security.zipsigner.optional.SignatureBlockGenerator");
Method generatorMethod = generatorClass.getMethod("generate", KeySet.class, (new byte[1]).getClass());
sigBlock = (byte[]) generatorMethod.invoke(null, keySet, signatureFileBytes);
out.write(sigBlock);
} catch (Exception x) {
throw new RuntimeException(x.getMessage(), x);
}
}
}
/**
* Copy all the files in a manifest from input to output. We set
* the modification times in the output to a fixed time, so as to
* reduce variation in the output file and make incremental OTAs
* more efficient.
*/
private void copyFiles(Manifest manifest, Map<String, ZioEntry> input, ZipOutput output, long timestamp)
throws IOException {
Map<String, Attributes> entries = manifest.getEntries();
List<String> names = new ArrayList<String>(entries.keySet());
Collections.sort(names);
int i = 1;
for (String name : names) {
if (canceled) break;
progressHelper.progress(ProgressEvent.PRORITY_NORMAL, resourceAdapter.getString(ResourceAdapter.Item.COPYING_ZIP_ENTRY, i, names.size()));
i += 1;
ZioEntry inEntry = input.get(name);
inEntry.setTime(timestamp);
output.write(inEntry);
}
}
/**
* Copy all the files from input to output.
*/
private void copyFiles(Map<String, ZioEntry> input, ZipOutput output)
throws IOException {
int i = 1;
for (ZioEntry inEntry : input.values()) {
if (canceled) break;
progressHelper.progress(ProgressEvent.PRORITY_NORMAL, resourceAdapter.getString(ResourceAdapter.Item.COPYING_ZIP_ENTRY, i, input.size()));
i += 1;
output.write(inEntry);
}
}
/**
* @deprecated - use the version that takes the passwords as char[]
*/
public void signZip(URL keystoreURL,
String keystoreType,
String keystorePw,
String certAlias,
String certPw,
String inputZipFilename,
String outputZipFilename)
throws ClassNotFoundException, IllegalAccessException, InstantiationException,
IOException, GeneralSecurityException {
signZip(keystoreURL, keystoreType, keystorePw.toCharArray(), certAlias, certPw.toCharArray(), "SHA1withRSA", inputZipFilename, outputZipFilename);
}
public void signZip(URL keystoreURL,
String keystoreType,
char[] keystorePw,
String certAlias,
char[] certPw,
String signatureAlgorithm,
String inputZipFilename,
String outputZipFilename)
throws ClassNotFoundException, IllegalAccessException, InstantiationException,
IOException, GeneralSecurityException {
InputStream keystoreStream = null;
try {
KeyStore keystore = null;
if (keystoreType == null) keystoreType = KeyStore.getDefaultType();
keystore = KeyStore.getInstance(keystoreType);
keystoreStream = keystoreURL.openStream();
keystore.load(keystoreStream, keystorePw);
Certificate cert = keystore.getCertificate(certAlias);
X509Certificate publicKey = (X509Certificate) cert;
Key key = keystore.getKey(certAlias, certPw);
PrivateKey privateKey = (PrivateKey) key;
setKeys("custom", publicKey, privateKey, signatureAlgorithm, null);
signZip(inputZipFilename, outputZipFilename);
} finally {
if (keystoreStream != null) keystoreStream.close();
}
}
/**
* Sign the input with the default test key and certificate.
* Save result to output file.
*/
public void signZip(Map<String, ZioEntry> zioEntries, String outputZipFilename)
throws IOException, GeneralSecurityException {
progressHelper.initProgress();
signZip(zioEntries, new FileOutputStream(outputZipFilename), outputZipFilename);
}
/**
* Sign the file using the given public key cert, private key,
* and signature block template. The signature block template
* parameter may be null, but if so
* android-sun-jarsign-support.jar must be in the classpath.
*/
public void signZip(String inputZipFilename, String outputZipFilename)
throws IOException, GeneralSecurityException {
File inFile = new File(inputZipFilename).getCanonicalFile();
File outFile = new File(outputZipFilename).getCanonicalFile();
if (inFile.equals(outFile)) {
throw new IllegalArgumentException(resourceAdapter.getString(ResourceAdapter.Item.INPUT_SAME_AS_OUTPUT_ERROR));
}
progressHelper.initProgress();
progressHelper.progress(ProgressEvent.PRORITY_IMPORTANT, resourceAdapter.getString(ResourceAdapter.Item.PARSING_CENTRAL_DIRECTORY));
ZipInput input = null;
OutputStream outStream = null;
try {
input = ZipInput.read(inputZipFilename);
outStream = new FileOutputStream(outputZipFilename);
signZip(input.getEntries(), outStream, outputZipFilename);
} finally {
if (input != null) input.close();
if (outStream != null) outStream.close();
}
}
/**
* Sign the
* and signature block template. The signature block template
* parameter may be null, but if so
* android-sun-jarsign-support.jar must be in the classpath.
*/
public void signZip(Map<String, ZioEntry> zioEntries, OutputStream outputStream, String outputZipFilename)
throws IOException, GeneralSecurityException {
boolean debug = getLogger().isDebugEnabled();
progressHelper.initProgress();
if (keySet == null) {
if (!keymode.startsWith(MODE_AUTO))
throw new IllegalStateException("No keys configured for signing the file!");
// Auto-determine which keys to use
String keyName = this.autoDetectKey(keymode, zioEntries);
if (keyName == null)
throw new AutoKeyException(resourceAdapter.getString(ResourceAdapter.Item.AUTO_KEY_SELECTION_ERROR, new File(outputZipFilename).getName()));
autoKeyObservable.notifyObservers(keyName);
loadKeys(keyName);
}
ZipOutput zipOutput = null;
try {
zipOutput = new ZipOutput(outputStream);
if (KEY_NONE.equals(keySet.getName())) {
progressHelper.setProgressTotalItems(zioEntries.size());
progressHelper.setProgressCurrentItem(0);
copyFiles(zioEntries, zipOutput);
return;
}
// Calculate total steps to complete for accurate progress percentages.
int progressTotalItems = 0;
for (ZioEntry entry : zioEntries.values()) {
String name = entry.getName();
if (!entry.isDirectory() && !name.equals(JarFile.MANIFEST_NAME) &&
!name.equals(CERT_SF_NAME) && !name.equals(CERT_RSA_NAME) &&
(stripPattern == null ||
!stripPattern.matcher(name).matches())) {
progressTotalItems += 3; // digest for manifest, digest in sig file, copy data
}
}
progressTotalItems += 1; // CERT.RSA generation
progressHelper.setProgressTotalItems(progressTotalItems);
progressHelper.setProgressCurrentItem(0);
// Assume the certificate is valid for at least an hour.
long timestamp = keySet.getPublicKey().getNotBefore().getTime() + 3600L * 1000;
// MANIFEST.MF
// progress(ProgressEvent.PRORITY_NORMAL, JarFile.MANIFEST_NAME);
Manifest manifest = addDigestsToManifest(zioEntries);
if (canceled) return;
ZioEntry ze = new ZioEntry(JarFile.MANIFEST_NAME);
ze.setTime(timestamp);
manifest.write(ze.getOutputStream());
zipOutput.write(ze);
// CERT.SF
ze = new ZioEntry(CERT_SF_NAME);
ze.setTime(timestamp);
ByteArrayOutputStream out = new ByteArrayOutputStream();
generateSignatureFile(manifest, out);
if (canceled) return;
byte[] sfBytes = out.toByteArray();
if (debug) {
getLogger().debug("Signature File: \n" + new String(sfBytes) + "\n" +
HexDumpEncoder.encode(sfBytes));
}
ze.getOutputStream().write(sfBytes);
zipOutput.write(ze);
// CERT.RSA
progressHelper.progress(ProgressEvent.PRORITY_NORMAL, resourceAdapter.getString(ResourceAdapter.Item.GENERATING_SIGNATURE_BLOCK));
ze = new ZioEntry(CERT_RSA_NAME);
ze.setTime(timestamp);
writeSignatureBlock(keySet, sfBytes, ze.getOutputStream());
zipOutput.write(ze);
if (canceled) return;
// Everything else
copyFiles(manifest, zioEntries, zipOutput, timestamp);
if (canceled) return;
} finally {
if (zipOutput != null) zipOutput.close();
if (canceled) {
try {
if (outputZipFilename != null) new File(outputZipFilename).delete();
} catch (Throwable t) {
getLogger().warning(t.getClass().getName() + ":" + t.getMessage());
}
}
}
}
public void addProgressListener(ProgressListener l) {
progressHelper.addProgressListener(l);
}
public synchronized void removeProgressListener(ProgressListener l) {
progressHelper.removeProgressListener(l);
}
public static class AutoKeyObservable extends Observable {
@Override
public void notifyObservers(Object arg) {
super.setChanged();
super.notifyObservers(arg);
}
}
}

View File

@ -0,0 +1,135 @@
package kellinwood.security.zipsigner.optional;
import kellinwood.security.zipsigner.KeySet;
import org.bouncycastle.jce.X509Principal;
import org.bouncycastle.x509.X509V3CertificateGenerator;
import java.io.File;
import java.io.IOException;
import java.math.BigInteger;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.KeyStore;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.util.Date;
/**
* All methods create self-signed certificates.
*/
public class CertCreator {
/**
* Creates a new keystore and self-signed key. The key will have the same password as the key, and will be
* RSA 2048, with the cert signed using SHA1withRSA. The certificate will have a validity of
* 30 years).
*
* @param storePath - pathname of the new keystore file
* @param password - keystore and key password
* @param keyName - the new key will have this as its alias within the keystore
* @param distinguishedNameValues - contains Country, State, Locality,...,Common Name, etc.
*/
public static void createKeystoreAndKey(String storePath, char[] password,
String keyName, DistinguishedNameValues distinguishedNameValues) {
createKeystoreAndKey(storePath, password, "RSA", 2048, keyName, password, "SHA1withRSA", 30,
distinguishedNameValues);
}
public static KeySet createKeystoreAndKey(String storePath, char[] storePass,
String keyAlgorithm, int keySize, String keyName, char[] keyPass,
String certSignatureAlgorithm, int certValidityYears, DistinguishedNameValues distinguishedNameValues) {
try {
KeySet keySet = createKey(keyAlgorithm, keySize, keyName, certSignatureAlgorithm, certValidityYears,
distinguishedNameValues);
KeyStore privateKS = KeyStoreFileManager.createKeyStore(storePath, storePass);
privateKS.setKeyEntry(keyName, keySet.getPrivateKey(),
keyPass,
new java.security.cert.Certificate[]{keySet.getPublicKey()});
File sfile = new File(storePath);
if (sfile.exists()) {
throw new IOException("File already exists: " + storePath);
}
KeyStoreFileManager.writeKeyStore(privateKS, storePath, storePass);
return keySet;
} catch (RuntimeException x) {
throw x;
} catch (Exception x) {
throw new RuntimeException(x.getMessage(), x);
}
}
/**
* Create a new key and store it in an existing keystore.
*/
public static KeySet createKey(String storePath, char[] storePass,
String keyAlgorithm, int keySize, String keyName, char[] keyPass,
String certSignatureAlgorithm, int certValidityYears,
DistinguishedNameValues distinguishedNameValues) {
try {
KeySet keySet = createKey(keyAlgorithm, keySize, keyName, certSignatureAlgorithm, certValidityYears,
distinguishedNameValues);
KeyStore privateKS = KeyStoreFileManager.loadKeyStore(storePath, storePass);
privateKS.setKeyEntry(keyName, keySet.getPrivateKey(),
keyPass,
new java.security.cert.Certificate[]{keySet.getPublicKey()});
KeyStoreFileManager.writeKeyStore(privateKS, storePath, storePass);
return keySet;
} catch (RuntimeException x) {
throw x;
} catch (Exception x) {
throw new RuntimeException(x.getMessage(), x);
}
}
public static KeySet createKey(String keyAlgorithm, int keySize, String keyName,
String certSignatureAlgorithm, int certValidityYears, DistinguishedNameValues distinguishedNameValues) {
try {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(keyAlgorithm);
keyPairGenerator.initialize(keySize);
KeyPair KPair = keyPairGenerator.generateKeyPair();
X509V3CertificateGenerator v3CertGen = new X509V3CertificateGenerator();
X509Principal principal = distinguishedNameValues.getPrincipal();
// generate a postitive serial number
BigInteger serialNumber = BigInteger.valueOf(new SecureRandom().nextInt());
while (serialNumber.compareTo(BigInteger.ZERO) < 0) {
serialNumber = BigInteger.valueOf(new SecureRandom().nextInt());
}
v3CertGen.setSerialNumber(serialNumber);
v3CertGen.setIssuerDN(principal);
v3CertGen.setNotBefore(new Date(System.currentTimeMillis() - 1000L * 60L * 60L * 24L * 30L));
v3CertGen.setNotAfter(new Date(System.currentTimeMillis() + (1000L * 60L * 60L * 24L * 366L * (long) certValidityYears)));
v3CertGen.setSubjectDN(principal);
v3CertGen.setPublicKey(KPair.getPublic());
v3CertGen.setSignatureAlgorithm(certSignatureAlgorithm);
X509Certificate PKCertificate = v3CertGen.generate(KPair.getPrivate(), "BC");
KeySet keySet = new KeySet();
keySet.setName(keyName);
keySet.setPrivateKey(KPair.getPrivate());
keySet.setPublicKey(PKCertificate);
return keySet;
} catch (Exception x) {
throw new RuntimeException(x.getMessage(), x);
}
}
}

View File

@ -0,0 +1,39 @@
package kellinwood.security.zipsigner.optional;
import kellinwood.security.zipsigner.ZipSigner;
import java.security.Key;
import java.security.KeyStore;
import java.security.PrivateKey;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
/**
*/
public class CustomKeySigner {
/**
* KeyStore-type agnostic. This method will sign the zip file, automatically handling JKS or BKS keystores.
*/
public static void signZip(ZipSigner zipSigner,
String keystorePath,
char[] keystorePw,
String certAlias,
char[] certPw,
String signatureAlgorithm,
String inputZipFilename,
String outputZipFilename)
throws Exception {
zipSigner.issueLoadingCertAndKeysProgressEvent();
KeyStore keystore = KeyStoreFileManager.loadKeyStore(keystorePath, keystorePw);
Certificate cert = keystore.getCertificate(certAlias);
X509Certificate publicKey = (X509Certificate) cert;
Key key = keystore.getKey(certAlias, certPw);
PrivateKey privateKey = (PrivateKey) key;
zipSigner.setKeys("custom", publicKey, privateKey, signatureAlgorithm, null);
zipSigner.signZip(inputZipFilename, outputZipFilename);
}
}

View File

@ -0,0 +1,89 @@
package kellinwood.security.zipsigner.optional;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.x500.style.BCStyle;
import org.bouncycastle.jce.X509Principal;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Vector;
/**
* Helper class for dealing with the distinguished name RDNs.
*/
public class DistinguishedNameValues extends LinkedHashMap<ASN1ObjectIdentifier, String> {
public DistinguishedNameValues() {
put(BCStyle.C, null);
put(BCStyle.ST, null);
put(BCStyle.L, null);
put(BCStyle.STREET, null);
put(BCStyle.O, null);
put(BCStyle.OU, null);
put(BCStyle.CN, null);
}
public String put(ASN1ObjectIdentifier oid, String value) {
if (value != null && value.equals("")) value = null;
if (containsKey(oid)) super.put(oid, value); // preserve original ordering
else {
super.put(oid, value);
// String cn = remove(BCStyle.CN); // CN will always be last.
// put(BCStyle.CN,cn);
}
return value;
}
public void setCountry(String country) {
put(BCStyle.C, country);
}
public void setState(String state) {
put(BCStyle.ST, state);
}
public void setLocality(String locality) {
put(BCStyle.L, locality);
}
public void setStreet(String street) {
put(BCStyle.STREET, street);
}
public void setOrganization(String organization) {
put(BCStyle.O, organization);
}
public void setOrganizationalUnit(String organizationalUnit) {
put(BCStyle.OU, organizationalUnit);
}
public void setCommonName(String commonName) {
put(BCStyle.CN, commonName);
}
@Override
public int size() {
int result = 0;
for (String value : values()) {
if (value != null) result += 1;
}
return result;
}
public X509Principal getPrincipal() {
Vector<ASN1ObjectIdentifier> oids = new Vector<ASN1ObjectIdentifier>();
Vector<String> values = new Vector<String>();
for (Map.Entry<ASN1ObjectIdentifier, String> entry : entrySet()) {
if (entry.getValue() != null && !entry.getValue().equals("")) {
oids.add(entry.getKey());
values.add(entry.getValue());
}
}
return new X509Principal(oids, values);
}
}

View File

@ -0,0 +1,71 @@
package kellinwood.security.zipsigner.optional;
import kellinwood.logging.LoggerInterface;
import kellinwood.logging.LoggerManager;
import kellinwood.security.zipsigner.Base64;
import org.bouncycastle.util.encoders.HexTranslator;
import java.security.MessageDigest;
import java.util.Locale;
/**
* User: ken
* Date: 1/17/13
*/
public class Fingerprint {
static LoggerInterface logger = LoggerManager.getLogger(Fingerprint.class.getName());
static byte[] calcDigest(String algorithm, byte[] encodedCert) {
byte[] result = null;
try {
MessageDigest messageDigest = MessageDigest.getInstance(algorithm);
messageDigest.update(encodedCert);
result = messageDigest.digest();
} catch (Exception x) {
logger.error(x.getMessage(), x);
}
return result;
}
public static String hexFingerprint(String algorithm, byte[] encodedCert) {
try {
byte[] digest = calcDigest(algorithm, encodedCert);
if (digest == null) return null;
HexTranslator hexTranslator = new HexTranslator();
byte[] hex = new byte[digest.length * 2];
hexTranslator.encode(digest, 0, digest.length, hex, 0);
StringBuilder builder = new StringBuilder();
for (int i = 0; i < hex.length; i += 2) {
builder.append((char) hex[i]);
builder.append((char) hex[i + 1]);
if (i != (hex.length - 2)) builder.append(':');
}
return builder.toString().toUpperCase(Locale.ENGLISH);
} catch (Exception x) {
logger.error(x.getMessage(), x);
}
return null;
}
// public static void main(String[] args) {
// byte[] data = "The Silence of the Lambs is a really good movie.".getBytes();
// System.out.println(hexFingerprint("MD5", data));
// System.out.println(hexFingerprint("SHA1", data));
// System.out.println(base64Fingerprint("SHA1", data));
//
// }
public static String base64Fingerprint(String algorithm, byte[] encodedCert) {
String result = null;
try {
byte[] digest = calcDigest(algorithm, encodedCert);
if (digest == null) return result;
return Base64.encode(digest);
} catch (Exception x) {
logger.error(x.getMessage(), x);
}
return result;
}
}

View File

@ -0,0 +1,500 @@
/* JKS.java -- implementation of the "JKS" key store.
Copyright (C) 2003 Casey Marshall <rsdio@metastatic.org>
Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation. No representations are made about the
suitability of this software for any purpose. It is provided "as is"
without express or implied warranty.
This program was derived by reverse-engineering Sun's own
implementation, using only the public API that is available in the 1.4.1
JDK. Hence nothing in this program is, or is derived from, anything
copyrighted by Sun Microsystems. While the "Binary Evaluation License
Agreement" that the JDK is licensed under contains blanket statements
that forbid reverse-engineering (among other things), it is my position
that US copyright law does not and cannot forbid reverse-engineering of
software to produce a compatible implementation. There are, in fact,
numerous clauses in copyright law that specifically allow
reverse-engineering, and therefore I believe it is outside of Sun's
power to enforce restrictions on reverse-engineering of their software,
and it is irresponsible for them to claim they can. */
package kellinwood.security.zipsigner.optional;
import javax.crypto.EncryptedPrivateKeyInfo;
import javax.crypto.spec.SecretKeySpec;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.DigestInputStream;
import java.security.DigestOutputStream;
import java.security.Key;
import java.security.KeyFactory;
import java.security.KeyStoreException;
import java.security.KeyStoreSpi;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.UnrecoverableKeyException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Vector;
/**
* This is an implementation of Sun's proprietary key store
* algorithm, called "JKS" for "Java Key Store". This implementation was
* created entirely through reverse-engineering.
* <p>
* <p>The format of JKS files is, from the start of the file:
* <p>
* <ol>
* <li>Magic bytes. This is a four-byte integer, in big-endian byte
* order, equal to <code>0xFEEDFEED</code>.</li>
* <li>The version number (probably), as a four-byte integer (all
* multibyte integral types are in big-endian byte order). The current
* version number (in modern distributions of the JDK) is 2.</li>
* <li>The number of entrires in this keystore, as a four-byte
* integer. Call this value <i>n</i></li>
* <li>Then, <i>n</i> times:
* <ol>
* <li>The entry type, a four-byte int. The value 1 denotes a private
* key entry, and 2 denotes a trusted certificate.</li>
* <li>The entry's alias, formatted as strings such as those written
* by <a
* href="http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataOutput.html#writeUTF(java.lang.String)">DataOutput.writeUTF(String)</a>.</li>
* <li>An eight-byte integer, representing the entry's creation date,
* in milliseconds since the epoch.
* <p>
* <p>Then, if the entry is a private key entry:
* <ol>
* <li>The size of the encoded key as a four-byte int, then that
* number of bytes. The encoded key is the DER encoded bytes of the
* <a
* href="http://java.sun.com/j2se/1.4.1/docs/api/javax/crypto/EncryptedPrivateKeyInfo.html">EncryptedPrivateKeyInfo</a> structure (the
* encryption algorithm is discussed later).</li>
* <li>A four-byte integer, followed by that many encoded
* certificates, encoded as described in the trusted certificates
* section.</li>
* </ol>
* <p>
* <p>Otherwise, the entry is a trusted certificate, which is encoded
* as the name of the encoding algorithm (e.g. X.509), encoded the same
* way as alias names. Then, a four-byte integer representing the size
* of the encoded certificate, then that many bytes representing the
* encoded certificate (e.g. the DER bytes in the case of X.509).
* </li>
* </ol>
* </li>
* <li>Then, the signature.</li>
* </ol>
* </ol>
* </li>
* </ol>
* <p>
* <p>(See <a href="genkey.java">this file</a> for some idea of how I
* was able to figure out these algorithms)</p>
* <p>
* <p>Decrypting the key works as follows:
* <p>
* <ol>
* <li>The key length is the length of the ciphertext minus 40. The
* encrypted key, <code>ekey</code>, is the middle bytes of the
* ciphertext.</li>
* <li>Take the first 20 bytes of the encrypted key as a seed value,
* <code>K[0]</code>.</li>
* <li>Compute <code>K[1] ... K[n]</code>, where
* <code>|K[i]| = 20</code>, <code>n = ceil(|ekey| / 20)</code>, and
* <code>K[i] = SHA-1(UTF-16BE(password) + K[i-1])</code>.</li>
* <li><code>key = ekey ^ (K[1] + ... + K[n])</code>.</li>
* <li>The last 20 bytes are the checksum, computed as <code>H =
* SHA-1(UTF-16BE(password) + key)</code>. If this value does not match
* the last 20 bytes of the ciphertext, output <code>FAIL</code>. Otherwise,
* output <code>key</code>.</li>
* </ol>
* <p>
* <p>The signature is defined as <code>SHA-1(UTF-16BE(password) +
* US_ASCII("Mighty Aphrodite") + encoded_keystore)</code> (yup, Sun
* engineers are just that clever).
* <p>
* <p>(Above, SHA-1 denotes the secure hash algorithm, UTF-16BE the
* big-endian byte representation of a UTF-16 string, and US_ASCII the
* ASCII byte representation of the string.)
* <p>
* <p>The source code of this class should be available in the file <a
* href="http://metastatic.org/source/JKS.java">JKS.java</a>.
*
* @author Casey Marshall (rsdio@metastatic.org)
* <p>
* Changes by Ken Ellinwood:
* ** Fixed a NullPointerException in engineLoad(). This method must return gracefully if the keystore input stream is null.
* ** engineGetCertificateEntry() was updated to return the first cert in the chain for private key entries.
* ** Lowercase the alias names, otherwise keytool chokes on the file created by this code.
* ** Fixed the integrity check in engineLoad(), previously the exception was never thrown regardless of password value.
*/
public class JKS extends KeyStoreSpi {
// Constants and fields.
// ------------------------------------------------------------------------
/**
* Ah, Sun. So goddamned clever with those magic bytes.
*/
private static final int MAGIC = 0xFEEDFEED;
private static final int PRIVATE_KEY = 1;
private static final int TRUSTED_CERT = 2;
private final Vector aliases;
private final HashMap trustedCerts;
private final HashMap privateKeys;
private final HashMap certChains;
private final HashMap dates;
// Constructor.
// ------------------------------------------------------------------------
public JKS() {
super();
aliases = new Vector();
trustedCerts = new HashMap();
privateKeys = new HashMap();
certChains = new HashMap();
dates = new HashMap();
}
// Instance methods.
// ------------------------------------------------------------------------
public Key engineGetKey(String alias, char[] password)
throws NoSuchAlgorithmException, UnrecoverableKeyException {
alias = alias.toLowerCase(Locale.ENGLISH);
if (!privateKeys.containsKey(alias))
return null;
byte[] key = decryptKey((byte[]) privateKeys.get(alias),
charsToBytes(password));
Certificate[] chain = engineGetCertificateChain(alias);
if (chain.length > 0) {
try {
// Private and public keys MUST have the same algorithm.
KeyFactory fact = KeyFactory.getInstance(
chain[0].getPublicKey().getAlgorithm());
return fact.generatePrivate(new PKCS8EncodedKeySpec(key));
} catch (InvalidKeySpecException x) {
throw new UnrecoverableKeyException(x.getMessage());
}
} else
return new SecretKeySpec(key, alias);
}
public Certificate[] engineGetCertificateChain(String alias) {
alias = alias.toLowerCase(Locale.ENGLISH);
return (Certificate[]) certChains.get(alias);
}
public Certificate engineGetCertificate(String alias) {
alias = alias.toLowerCase(Locale.ENGLISH);
if (engineIsKeyEntry(alias)) {
Certificate[] certChain = (Certificate[]) certChains.get(alias);
if (certChain != null && certChain.length > 0) return certChain[0];
}
return (Certificate) trustedCerts.get(alias);
}
public Date engineGetCreationDate(String alias) {
alias = alias.toLowerCase(Locale.ENGLISH);
return (Date) dates.get(alias);
}
// XXX implement writing methods.
public void engineSetKeyEntry(String alias, Key key, char[] passwd, Certificate[] certChain)
throws KeyStoreException {
alias = alias.toLowerCase(Locale.ENGLISH);
if (trustedCerts.containsKey(alias))
throw new KeyStoreException("\"" + alias + " is a trusted certificate entry");
privateKeys.put(alias, encryptKey(key, charsToBytes(passwd)));
if (certChain != null)
certChains.put(alias, certChain);
else
certChains.put(alias, new Certificate[0]);
if (!aliases.contains(alias)) {
dates.put(alias, new Date());
aliases.add(alias);
}
}
public void engineSetKeyEntry(String alias, byte[] encodedKey, Certificate[] certChain)
throws KeyStoreException {
alias = alias.toLowerCase(Locale.ENGLISH);
if (trustedCerts.containsKey(alias))
throw new KeyStoreException("\"" + alias + "\" is a trusted certificate entry");
try {
new EncryptedPrivateKeyInfo(encodedKey);
} catch (IOException ioe) {
throw new KeyStoreException("encoded key is not an EncryptedPrivateKeyInfo");
}
privateKeys.put(alias, encodedKey);
if (certChain != null)
certChains.put(alias, certChain);
else
certChains.put(alias, new Certificate[0]);
if (!aliases.contains(alias)) {
dates.put(alias, new Date());
aliases.add(alias);
}
}
public void engineSetCertificateEntry(String alias, Certificate cert)
throws KeyStoreException {
alias = alias.toLowerCase(Locale.ENGLISH);
if (privateKeys.containsKey(alias))
throw new KeyStoreException("\"" + alias + "\" is a private key entry");
if (cert == null)
throw new NullPointerException();
trustedCerts.put(alias, cert);
if (!aliases.contains(alias)) {
dates.put(alias, new Date());
aliases.add(alias);
}
}
public void engineDeleteEntry(String alias) throws KeyStoreException {
alias = alias.toLowerCase(Locale.ENGLISH);
aliases.remove(alias);
}
public Enumeration engineAliases() {
return aliases.elements();
}
public boolean engineContainsAlias(String alias) {
alias = alias.toLowerCase(Locale.ENGLISH);
return aliases.contains(alias);
}
public int engineSize() {
return aliases.size();
}
public boolean engineIsKeyEntry(String alias) {
alias = alias.toLowerCase(Locale.ENGLISH);
return privateKeys.containsKey(alias);
}
public boolean engineIsCertificateEntry(String alias) {
alias = alias.toLowerCase(Locale.ENGLISH);
return trustedCerts.containsKey(alias);
}
public String engineGetCertificateAlias(Certificate cert) {
for (Iterator keys = trustedCerts.keySet().iterator(); keys.hasNext(); ) {
String alias = (String) keys.next();
if (cert.equals(trustedCerts.get(alias)))
return alias;
}
return null;
}
public void engineStore(OutputStream out, char[] passwd)
throws IOException, NoSuchAlgorithmException, CertificateException {
MessageDigest md = MessageDigest.getInstance("SHA1");
md.update(charsToBytes(passwd));
md.update("Mighty Aphrodite".getBytes("UTF-8"));
DataOutputStream dout = new DataOutputStream(new DigestOutputStream(out, md));
dout.writeInt(MAGIC);
dout.writeInt(2);
dout.writeInt(aliases.size());
for (Enumeration e = aliases.elements(); e.hasMoreElements(); ) {
String alias = (String) e.nextElement();
if (trustedCerts.containsKey(alias)) {
dout.writeInt(TRUSTED_CERT);
dout.writeUTF(alias);
dout.writeLong(((Date) dates.get(alias)).getTime());
writeCert(dout, (Certificate) trustedCerts.get(alias));
} else {
dout.writeInt(PRIVATE_KEY);
dout.writeUTF(alias);
dout.writeLong(((Date) dates.get(alias)).getTime());
byte[] key = (byte[]) privateKeys.get(alias);
dout.writeInt(key.length);
dout.write(key);
Certificate[] chain = (Certificate[]) certChains.get(alias);
dout.writeInt(chain.length);
for (int i = 0; i < chain.length; i++)
writeCert(dout, chain[i]);
}
}
byte[] digest = md.digest();
dout.write(digest);
}
public void engineLoad(InputStream in, char[] passwd)
throws IOException, NoSuchAlgorithmException, CertificateException {
MessageDigest md = MessageDigest.getInstance("SHA");
if (passwd != null) md.update(charsToBytes(passwd));
md.update("Mighty Aphrodite".getBytes("UTF-8")); // HAR HAR
aliases.clear();
trustedCerts.clear();
privateKeys.clear();
certChains.clear();
dates.clear();
if (in == null) return;
DataInputStream din = new DataInputStream(new DigestInputStream(in, md));
if (din.readInt() != MAGIC)
throw new IOException("not a JavaKeyStore");
din.readInt(); // version no.
final int n = din.readInt();
aliases.ensureCapacity(n);
if (n < 0)
throw new LoadKeystoreException("Malformed key store");
for (int i = 0; i < n; i++) {
int type = din.readInt();
String alias = din.readUTF();
aliases.add(alias);
dates.put(alias, new Date(din.readLong()));
switch (type) {
case PRIVATE_KEY:
int len = din.readInt();
byte[] encoded = new byte[len];
din.read(encoded);
privateKeys.put(alias, encoded);
int count = din.readInt();
Certificate[] chain = new Certificate[count];
for (int j = 0; j < count; j++)
chain[j] = readCert(din);
certChains.put(alias, chain);
break;
case TRUSTED_CERT:
trustedCerts.put(alias, readCert(din));
break;
default:
throw new LoadKeystoreException("Malformed key store");
}
}
if (passwd != null) {
byte[] computedHash = md.digest();
byte[] storedHash = new byte[20];
din.read(storedHash);
if (!MessageDigest.isEqual(storedHash, computedHash)) {
throw new LoadKeystoreException("Incorrect password, or integrity check failed.");
}
}
}
// Own methods.
// ------------------------------------------------------------------------
private static Certificate readCert(DataInputStream in)
throws IOException, CertificateException, NoSuchAlgorithmException {
String type = in.readUTF();
int len = in.readInt();
byte[] encoded = new byte[len];
in.read(encoded);
CertificateFactory factory = CertificateFactory.getInstance(type);
return factory.generateCertificate(new ByteArrayInputStream(encoded));
}
private static void writeCert(DataOutputStream dout, Certificate cert)
throws IOException, CertificateException {
dout.writeUTF(cert.getType());
byte[] b = cert.getEncoded();
dout.writeInt(b.length);
dout.write(b);
}
private static byte[] decryptKey(byte[] encryptedPKI, byte[] passwd)
throws UnrecoverableKeyException {
try {
EncryptedPrivateKeyInfo epki =
new EncryptedPrivateKeyInfo(encryptedPKI);
byte[] encr = epki.getEncryptedData();
byte[] keystream = new byte[20];
System.arraycopy(encr, 0, keystream, 0, 20);
byte[] check = new byte[20];
System.arraycopy(encr, encr.length - 20, check, 0, 20);
byte[] key = new byte[encr.length - 40];
MessageDigest sha = MessageDigest.getInstance("SHA1");
int count = 0;
while (count < key.length) {
sha.reset();
sha.update(passwd);
sha.update(keystream);
sha.digest(keystream, 0, keystream.length);
for (int i = 0; i < keystream.length && count < key.length; i++) {
key[count] = (byte) (keystream[i] ^ encr[count + 20]);
count++;
}
}
sha.reset();
sha.update(passwd);
sha.update(key);
if (!MessageDigest.isEqual(check, sha.digest()))
throw new UnrecoverableKeyException("checksum mismatch");
return key;
} catch (Exception x) {
throw new UnrecoverableKeyException(x.getMessage());
}
}
private static byte[] encryptKey(Key key, byte[] passwd)
throws KeyStoreException {
try {
MessageDigest sha = MessageDigest.getInstance("SHA1");
SecureRandom rand = SecureRandom.getInstance("SHA1PRNG");
byte[] k = key.getEncoded();
byte[] encrypted = new byte[k.length + 40];
byte[] keystream = rand.getSeed(20);
System.arraycopy(keystream, 0, encrypted, 0, 20);
int count = 0;
while (count < k.length) {
sha.reset();
sha.update(passwd);
sha.update(keystream);
sha.digest(keystream, 0, keystream.length);
for (int i = 0; i < keystream.length && count < k.length; i++) {
encrypted[count + 20] = (byte) (keystream[i] ^ k[count]);
count++;
}
}
sha.reset();
sha.update(passwd);
sha.update(k);
sha.digest(encrypted, encrypted.length - 20, 20);
// 1.3.6.1.4.1.42.2.17.1.1 is Sun's private OID for this
// encryption algorithm.
return new EncryptedPrivateKeyInfo("1.3.6.1.4.1.42.2.17.1.1",
encrypted).getEncoded();
} catch (Exception x) {
throw new KeyStoreException(x.getMessage());
}
}
private static byte[] charsToBytes(char[] passwd) {
byte[] buf = new byte[passwd.length * 2];
for (int i = 0, j = 0; i < passwd.length; i++) {
buf[j++] = (byte) (passwd[i] >>> 8);
buf[j++] = (byte) passwd[i];
}
return buf;
}
}

View File

@ -0,0 +1,13 @@
package kellinwood.security.zipsigner.optional;
import java.security.KeyStore;
public class JksKeyStore extends KeyStore {
public JksKeyStore() {
super(new JKS(), KeyStoreFileManager.getProvider(), "jks");
}
}

View File

@ -0,0 +1,5 @@
package kellinwood.security.zipsigner.optional;
public class KeyNameConflictException extends Exception {
}

View File

@ -0,0 +1,285 @@
package kellinwood.security.zipsigner.optional;
import kellinwood.logging.LoggerInterface;
import kellinwood.logging.LoggerManager;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.security.Key;
import java.security.KeyStore;
import java.security.Provider;
import java.security.Security;
import java.security.cert.Certificate;
import java.util.Locale;
/**
*/
public class KeyStoreFileManager {
static Provider provider = new BouncyCastleProvider();
public static Provider getProvider() {
return provider;
}
public static void setProvider(Provider provider) {
if (KeyStoreFileManager.provider != null) Security.removeProvider(KeyStoreFileManager.provider.getName());
KeyStoreFileManager.provider = provider;
Security.addProvider(provider);
}
static LoggerInterface logger = LoggerManager.getLogger(KeyStoreFileManager.class.getName());
static {
// Add the bouncycastle version of the BC provider so that the implementation classes returned
// from the keystore are all from the bouncycastle libs.
Security.addProvider(getProvider());
}
public static KeyStore loadKeyStore(String keystorePath, String encodedPassword)
throws Exception {
char password[] = null;
try {
if (encodedPassword != null) {
password = PasswordObfuscator.getInstance().decodeKeystorePassword(keystorePath, encodedPassword);
}
return loadKeyStore(keystorePath, password);
} finally {
if (password != null) PasswordObfuscator.flush(password);
}
}
public static KeyStore createKeyStore(String keystorePath, char[] password)
throws Exception {
KeyStore ks = null;
if (keystorePath.toLowerCase(Locale.ENGLISH).endsWith(".bks")) {
ks = KeyStore.getInstance("bks", new BouncyCastleProvider());
} else ks = new JksKeyStore();
ks.load(null, password);
return ks;
}
public static KeyStore loadKeyStore(String keystorePath, char[] password)
throws Exception {
KeyStore ks = null;
try {
ks = new JksKeyStore();
FileInputStream fis = new FileInputStream(keystorePath);
ks.load(fis, password);
fis.close();
return ks;
} catch (LoadKeystoreException x) {
// This type of exception is thrown when the keystore is a JKS keystore, but the file is malformed
// or the validity/password check failed. In this case don't bother to attempt loading it as a BKS keystore.
throw x;
} catch (Exception x) {
// logger.warning( x.getMessage(), x);
try {
ks = KeyStore.getInstance("bks", getProvider());
FileInputStream fis = new FileInputStream(keystorePath);
ks.load(fis, password);
fis.close();
return ks;
} catch (Exception e) {
throw new RuntimeException("Failed to load keystore: " + e.getMessage(), e);
}
}
}
public static void writeKeyStore(KeyStore ks, String keystorePath, String encodedPassword)
throws Exception {
char password[] = null;
try {
password = PasswordObfuscator.getInstance().decodeKeystorePassword(keystorePath, encodedPassword);
writeKeyStore(ks, keystorePath, password);
} finally {
if (password != null) PasswordObfuscator.flush(password);
}
}
public static void writeKeyStore(KeyStore ks, String keystorePath, char[] password)
throws Exception {
File keystoreFile = new File(keystorePath);
try {
if (keystoreFile.exists()) {
// I've had some trouble saving new versions of the keystore file in which the file becomes empty/corrupt.
// Saving the new version to a new file and creating a backup of the old version.
File tmpFile = File.createTempFile(keystoreFile.getName(), null, keystoreFile.getParentFile());
FileOutputStream fos = new FileOutputStream(tmpFile);
ks.store(fos, password);
fos.flush();
fos.close();
/* create a backup of the previous version
int i = 1;
File backup = new File( keystorePath + "." + i + ".bak");
while (backup.exists()) {
i += 1;
backup = new File( keystorePath + "." + i + ".bak");
}
renameTo(keystoreFile, backup);
*/
renameTo(tmpFile, keystoreFile);
} else {
FileOutputStream fos = new FileOutputStream(keystorePath);
ks.store(fos, password);
fos.close();
}
} catch (Exception x) {
try {
File logfile = File.createTempFile("zipsigner-error", ".log", keystoreFile.getParentFile());
PrintWriter pw = new PrintWriter(new FileWriter(logfile));
x.printStackTrace(pw);
pw.flush();
pw.close();
} catch (Exception y) {
}
throw x;
}
}
static void copyFile(File srcFile, File destFile, boolean preserveFileDate) throws IOException {
if (destFile.exists() && destFile.isDirectory()) {
throw new IOException("Destination '" + destFile + "' exists but is a directory");
}
FileInputStream input = new FileInputStream(srcFile);
try {
FileOutputStream output = new FileOutputStream(destFile);
try {
byte[] buffer = new byte[4096];
long count = 0;
int n = 0;
while (-1 != (n = input.read(buffer))) {
output.write(buffer, 0, n);
count += n;
}
} finally {
try {
output.close();
} catch (IOException x) {
} // Ignore
}
} finally {
try {
input.close();
} catch (IOException x) {
}
}
if (srcFile.length() != destFile.length()) {
throw new IOException("Failed to copy full contents from '" +
srcFile + "' to '" + destFile + "'");
}
if (preserveFileDate) {
destFile.setLastModified(srcFile.lastModified());
}
}
public static void renameTo(File fromFile, File toFile)
throws IOException {
copyFile(fromFile, toFile, true);
if (!fromFile.delete()) throw new IOException("Failed to delete " + fromFile);
}
public static void deleteKey(String storePath, String storePass, String keyName)
throws Exception {
KeyStore ks = loadKeyStore(storePath, storePass);
ks.deleteEntry(keyName);
writeKeyStore(ks, storePath, storePass);
}
public static String renameKey(String keystorePath, String storePass, String oldKeyName, String newKeyName, String keyPass)
throws Exception {
char[] keyPw = null;
try {
KeyStore ks = loadKeyStore(keystorePath, storePass);
if (ks instanceof JksKeyStore) newKeyName = newKeyName.toLowerCase(Locale.ENGLISH);
if (ks.containsAlias(newKeyName)) throw new KeyNameConflictException();
keyPw = PasswordObfuscator.getInstance().decodeAliasPassword(keystorePath, oldKeyName, keyPass);
Key key = ks.getKey(oldKeyName, keyPw);
Certificate cert = ks.getCertificate(oldKeyName);
ks.setKeyEntry(newKeyName, key, keyPw, new Certificate[]{cert});
ks.deleteEntry(oldKeyName);
writeKeyStore(ks, keystorePath, storePass);
return newKeyName;
} finally {
PasswordObfuscator.flush(keyPw);
}
}
public static KeyStore.Entry getKeyEntry(String keystorePath, String storePass, String keyName, String keyPass)
throws Exception {
char[] keyPw = null;
KeyStore.PasswordProtection passwordProtection = null;
try {
KeyStore ks = loadKeyStore(keystorePath, storePass);
keyPw = PasswordObfuscator.getInstance().decodeAliasPassword(keystorePath, keyName, keyPass);
passwordProtection = new KeyStore.PasswordProtection(keyPw);
return ks.getEntry(keyName, passwordProtection);
} finally {
if (keyPw != null) PasswordObfuscator.flush(keyPw);
if (passwordProtection != null) passwordProtection.destroy();
}
}
public static boolean containsKey(String keystorePath, String storePass, String keyName)
throws Exception {
KeyStore ks = loadKeyStore(keystorePath, storePass);
return ks.containsAlias(keyName);
}
/**
* @param keystorePath
* @param encodedPassword
* @throws Exception if the password is invalid
*/
public static void validateKeystorePassword(String keystorePath, String encodedPassword)
throws Exception {
char[] password = null;
try {
KeyStore ks = KeyStoreFileManager.loadKeyStore(keystorePath, encodedPassword);
} finally {
if (password != null) PasswordObfuscator.flush(password);
}
}
/**
* @param keystorePath
* @param keyName
* @param encodedPassword
* @throws java.security.UnrecoverableKeyException if the password is invalid
*/
public static void validateKeyPassword(String keystorePath, String keyName, String encodedPassword)
throws Exception {
char[] password = null;
try {
KeyStore ks = KeyStoreFileManager.loadKeyStore(keystorePath, (char[]) null);
password = PasswordObfuscator.getInstance().decodeAliasPassword(keystorePath, keyName, encodedPassword);
ks.getKey(keyName, password);
} finally {
if (password != null) PasswordObfuscator.flush(password);
}
}
}

View File

@ -0,0 +1,25 @@
package kellinwood.security.zipsigner.optional;
import java.io.IOException;
/**
* Thrown by JKS.engineLoad() for errors that occur after determining the keystore is actually a JKS keystore.
*/
public class LoadKeystoreException extends IOException {
public LoadKeystoreException() {
}
public LoadKeystoreException(String message) {
super(message);
}
public LoadKeystoreException(String message, Throwable cause) {
super(message, cause);
}
public LoadKeystoreException(Throwable cause) {
super(cause);
}
}

View File

@ -0,0 +1,147 @@
package kellinwood.security.zipsigner.optional;
import kellinwood.logging.LoggerInterface;
import kellinwood.logging.LoggerManager;
import kellinwood.security.zipsigner.Base64;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.Writer;
public class PasswordObfuscator {
private static PasswordObfuscator instance = null;
static final String x = "harold-and-maude";
LoggerInterface logger;
SecretKeySpec skeySpec;
private PasswordObfuscator() {
logger = LoggerManager.getLogger(PasswordObfuscator.class.getName());
skeySpec = new SecretKeySpec(x.getBytes(), "AES");
}
public static PasswordObfuscator getInstance() {
if (instance == null) instance = new PasswordObfuscator();
return instance;
}
public String encodeKeystorePassword(String keystorePath, String password) {
return encode(keystorePath, password);
}
public String encodeKeystorePassword(String keystorePath, char[] password) {
return encode(keystorePath, password);
}
public String encodeAliasPassword(String keystorePath, String aliasName, String password) {
return encode(keystorePath + aliasName, password);
}
public String encodeAliasPassword(String keystorePath, String aliasName, char[] password) {
return encode(keystorePath + aliasName, password);
}
public char[] decodeKeystorePassword(String keystorePath, String password) {
return decode(keystorePath, password);
}
public char[] decodeAliasPassword(String keystorePath, String aliasName, String password) {
return decode(keystorePath + aliasName, password);
}
public String encode(String junk, String password) {
if (password == null) return null;
char[] c = password.toCharArray();
String result = encode(junk, c);
flush(c);
return result;
}
/**
* <b>This uses the AES-ECB cipher which is known to be insecure</b>
*
* @see <a href="https://blog.filippo.io/the-ecb-penguin/">The ECB Penguin</a>
*/
@Deprecated
@SuppressWarnings("GetInstance")
public String encode(String junk, char[] password) {
if (password == null) return null;
try {
// Instantiate the cipher
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Writer w = new OutputStreamWriter(baos);
w.write(junk);
w.write(password);
w.flush();
byte[] encoded = cipher.doFinal(baos.toByteArray());
return Base64.encode(encoded);
} catch (Exception x) {
logger.error("Failed to obfuscate password", x);
}
return null;
}
/**
* <b>This uses the AES-ECB cipher which is known to be insecure</b>
*
* @see <a href="https://blog.filippo.io/the-ecb-penguin/">The ECB Penguin</a>
*/
@Deprecated
@SuppressWarnings("GetInstance")
public char[] decode(String junk, String password) {
if (password == null) return null;
try {
// Instantiate the cipher
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
SecretKeySpec skeySpec = new SecretKeySpec(x.getBytes(), "AES");
cipher.init(Cipher.DECRYPT_MODE, skeySpec);
byte[] bytes = cipher.doFinal(Base64.decode(password.getBytes()));
BufferedReader r = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(bytes)));
char[] cb = new char[128];
int length = 0;
int numRead;
while ((numRead = r.read(cb, length, 128 - length)) != -1) {
length += numRead;
}
if (length <= junk.length()) return null;
char[] result = new char[length - junk.length()];
int j = 0;
for (int i = junk.length(); i < length; i++) {
result[j] = cb[i];
j += 1;
}
flush(cb);
return result;
} catch (Exception x) {
logger.error("Failed to decode password", x);
}
return null;
}
public static void flush(char[] charArray) {
if (charArray == null) return;
for (int i = 0; i < charArray.length; i++) {
charArray[i] = '\0';
}
}
public static void flush(byte[] charArray) {
if (charArray == null) return;
for (int i = 0; i < charArray.length; i++) {
charArray[i] = 0;
}
}
}

View File

@ -0,0 +1,63 @@
package kellinwood.security.zipsigner.optional;
import kellinwood.security.zipsigner.KeySet;
import org.bouncycastle.cert.jcajce.JcaCertStore;
import org.bouncycastle.cms.CMSProcessableByteArray;
import org.bouncycastle.cms.CMSSignedData;
import org.bouncycastle.cms.CMSSignedDataGenerator;
import org.bouncycastle.cms.CMSTypedData;
import org.bouncycastle.cms.SignerInfoGenerator;
import org.bouncycastle.cms.jcajce.JcaSignerInfoGeneratorBuilder;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;
import org.bouncycastle.util.Store;
import java.util.ArrayList;
import java.util.List;
/**
*
*/
public class SignatureBlockGenerator {
/**
* Sign the given content using the private and public keys from the keySet, and return the encoded CMS (PKCS#7) data.
* Use of direct signature and DER encoding produces a block that is verifiable by Android recovery programs.
*/
public static byte[] generate(KeySet keySet, byte[] content) {
try {
List certList = new ArrayList();
CMSTypedData msg = new CMSProcessableByteArray(content);
certList.add(keySet.getPublicKey());
Store certs = new JcaCertStore(certList);
CMSSignedDataGenerator gen = new CMSSignedDataGenerator();
JcaContentSignerBuilder jcaContentSignerBuilder = new JcaContentSignerBuilder(keySet.getSignatureAlgorithm()).setProvider("BC");
ContentSigner sha1Signer = jcaContentSignerBuilder.build(keySet.getPrivateKey());
JcaDigestCalculatorProviderBuilder jcaDigestCalculatorProviderBuilder = new JcaDigestCalculatorProviderBuilder().setProvider("BC");
DigestCalculatorProvider digestCalculatorProvider = jcaDigestCalculatorProviderBuilder.build();
JcaSignerInfoGeneratorBuilder jcaSignerInfoGeneratorBuilder = new JcaSignerInfoGeneratorBuilder(digestCalculatorProvider);
jcaSignerInfoGeneratorBuilder.setDirectSignature(true);
SignerInfoGenerator signerInfoGenerator = jcaSignerInfoGeneratorBuilder.build(sha1Signer, keySet.getPublicKey());
gen.addSignerInfoGenerator(signerInfoGenerator);
gen.addCertificates(certs);
CMSSignedData sigData = gen.generate(msg, false);
return sigData.toASN1Structure().getEncoded("DER");
} catch (Exception x) {
throw new RuntimeException(x.getMessage(), x);
}
}
}

View File

@ -0,0 +1,105 @@
/*
* Copyright (C) 2010 Ken Ellinwood
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.zipio;
import kellinwood.logging.LoggerInterface;
import kellinwood.logging.LoggerManager;
import java.io.IOException;
public class CentralEnd {
public int signature = 0x06054b50; // end of central dir signature 4 bytes
public short numberThisDisk = 0; // number of this disk 2 bytes
public short centralStartDisk = 0; // number of the disk with the start of the central directory 2 bytes
public short numCentralEntries; // total number of entries in the central directory on this disk 2 bytes
public short totalCentralEntries; // total number of entries in the central directory 2 bytes
public int centralDirectorySize; // size of the central directory 4 bytes
public int centralStartOffset; // offset of start of central directory with respect to the starting disk number 4 bytes
public String fileComment; // .ZIP file comment (variable size)
private static LoggerInterface log;
public static CentralEnd read(ZipInput input) throws IOException {
int signature = input.readInt();
if (signature != 0x06054b50) {
// back up to the signature
input.seek(input.getFilePointer() - 4);
return null;
}
CentralEnd entry = new CentralEnd();
entry.doRead(input);
return entry;
}
public static LoggerInterface getLogger() {
if (log == null) log = LoggerManager.getLogger(CentralEnd.class.getName());
return log;
}
private void doRead(ZipInput input) throws IOException {
boolean debug = getLogger().isDebugEnabled();
numberThisDisk = input.readShort();
if (debug) log.debug(String.format("This disk number: 0x%04x", numberThisDisk));
centralStartDisk = input.readShort();
if (debug) log.debug(String.format("Central dir start disk number: 0x%04x", centralStartDisk));
numCentralEntries = input.readShort();
if (debug) log.debug(String.format("Central entries on this disk: 0x%04x", numCentralEntries));
totalCentralEntries = input.readShort();
if (debug) log.debug(String.format("Total number of central entries: 0x%04x", totalCentralEntries));
centralDirectorySize = input.readInt();
if (debug) log.debug(String.format("Central directory size: 0x%08x", centralDirectorySize));
centralStartOffset = input.readInt();
if (debug) log.debug(String.format("Central directory offset: 0x%08x", centralStartOffset));
short zipFileCommentLen = input.readShort();
fileComment = input.readString(zipFileCommentLen);
if (debug) log.debug(".ZIP file comment: " + fileComment);
}
public void write(ZipOutput output) throws IOException {
boolean debug = getLogger().isDebugEnabled();
output.writeInt(signature);
output.writeShort(numberThisDisk);
output.writeShort(centralStartDisk);
output.writeShort(numCentralEntries);
output.writeShort(totalCentralEntries);
output.writeInt(centralDirectorySize);
output.writeInt(centralStartOffset);
output.writeShort((short) fileComment.length());
output.writeString(fileComment);
}
}

View File

@ -0,0 +1,632 @@
/*
* Copyright (C) 2010 Ken Ellinwood
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.zipio;
import kellinwood.logging.LoggerInterface;
import kellinwood.logging.LoggerManager;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.SequenceInputStream;
import java.util.Date;
import java.util.Locale;
import java.util.zip.CRC32;
import java.util.zip.Inflater;
import java.util.zip.InflaterInputStream;
public class ZioEntry implements Cloneable {
private ZipInput zipInput;
// public int signature = 0x02014b50;
private short versionMadeBy;
private short versionRequired;
private short generalPurposeBits;
private short compression;
private short modificationTime;
private short modificationDate;
private int crc32;
private int compressedSize;
private int size;
private String filename;
private byte[] extraData;
private short numAlignBytes = 0;
private String fileComment;
private short diskNumberStart;
private short internalAttributes;
private int externalAttributes;
private int localHeaderOffset;
private long dataPosition = -1;
private byte[] data = null;
private ZioEntryOutputStream entryOut = null;
private static byte[] alignBytes = new byte[4];
private static LoggerInterface log;
public ZioEntry(ZipInput input) {
zipInput = input;
}
public static LoggerInterface getLogger() {
if (log == null) log = LoggerManager.getLogger(ZioEntry.class.getName());
return log;
}
public ZioEntry(String name) {
filename = name;
fileComment = "";
compression = 8;
extraData = new byte[0];
setTime(System.currentTimeMillis());
}
public ZioEntry(String name, String sourceDataFile)
throws IOException {
zipInput = new ZipInput(sourceDataFile);
filename = name;
fileComment = "";
this.compression = 0;
this.size = (int) zipInput.getFileLength();
this.compressedSize = this.size;
if (getLogger().isDebugEnabled())
getLogger().debug(String.format(Locale.ENGLISH, "Computing CRC for %s, size=%d", sourceDataFile, size));
// compute CRC
CRC32 crc = new CRC32();
byte[] buffer = new byte[8096];
int numRead = 0;
while (numRead != size) {
int count = zipInput.read(buffer, 0, Math.min(buffer.length, (this.size - numRead)));
if (count > 0) {
crc.update(buffer, 0, count);
numRead += count;
}
}
this.crc32 = (int) crc.getValue();
zipInput.seek(0);
this.dataPosition = 0;
extraData = new byte[0];
setTime(new File(sourceDataFile).lastModified());
}
public ZioEntry(String name, String sourceDataFile, short compression, int crc32, int compressedSize, int size)
throws IOException {
zipInput = new ZipInput(sourceDataFile);
filename = name;
fileComment = "";
this.compression = compression;
this.crc32 = crc32;
this.compressedSize = compressedSize;
this.size = size;
this.dataPosition = 0;
extraData = new byte[0];
setTime(new File(sourceDataFile).lastModified());
}
// Return a copy with a new name
public ZioEntry getClonedEntry(String newName) {
ZioEntry clone;
try {
clone = (ZioEntry) this.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("clone() failed!");
}
clone.setName(newName);
return clone;
}
public void readLocalHeader() throws IOException {
ZipInput input = zipInput;
int tmp;
boolean debug = getLogger().isDebugEnabled();
input.seek(localHeaderOffset);
if (debug) getLogger().debug(String.format("FILE POSITION: 0x%08x", input.getFilePointer()));
// 0 4 Local file header signature = 0x04034b50
int signature = input.readInt();
if (signature != 0x04034b50) {
throw new IllegalStateException(String.format("Local header not found at pos=0x%08x, file=%s", input.getFilePointer(), filename));
}
// This method is usually called just before the data read, so
// its only purpose currently is to position the file pointer
// for the data read. The entry's attributes might also have
// been changed since the central dir entry was read (e.g.,
// filename), so throw away the values here.
int tmpInt;
short tmpShort;
// 4 2 Version needed to extract (minimum)
/* versionRequired */
tmpShort = input.readShort();
if (debug) log.debug(String.format("Version required: 0x%04x", tmpShort /*versionRequired*/));
// 6 2 General purpose bit flag
/* generalPurposeBits */
tmpShort = input.readShort();
if (debug) log.debug(String.format("General purpose bits: 0x%04x", tmpShort /* generalPurposeBits */));
// 8 2 Compression method
/* compression */
tmpShort = input.readShort();
if (debug) log.debug(String.format("Compression: 0x%04x", tmpShort /* compression */));
// 10 2 File last modification time
/* modificationTime */
tmpShort = input.readShort();
if (debug) log.debug(String.format("Modification time: 0x%04x", tmpShort /* modificationTime */));
// 12 2 File last modification date
/* modificationDate */
tmpShort = input.readShort();
if (debug) log.debug(String.format("Modification date: 0x%04x", tmpShort /* modificationDate */));
// 14 4 CRC-32
/* crc32 */
tmpInt = input.readInt();
if (debug) log.debug(String.format("CRC-32: 0x%04x", tmpInt /*crc32*/));
// 18 4 Compressed size
/* compressedSize*/
tmpInt = input.readInt();
if (debug) log.debug(String.format("Compressed size: 0x%04x", tmpInt /*compressedSize*/));
// 22 4 Uncompressed size
/* size */
tmpInt = input.readInt();
if (debug) log.debug(String.format("Size: 0x%04x", tmpInt /*size*/));
// 26 2 File name length (n)
short fileNameLen = input.readShort();
if (debug) log.debug(String.format("File name length: 0x%04x", fileNameLen));
// 28 2 Extra field length (m)
short extraLen = input.readShort();
if (debug) log.debug(String.format("Extra length: 0x%04x", extraLen));
// 30 n File name
String filename = input.readString(fileNameLen);
if (debug) log.debug("Filename: " + filename);
// Extra data
byte[] extra = input.readBytes(extraLen);
// Record the file position of this entry's data.
dataPosition = input.getFilePointer();
if (debug) log.debug(String.format("Data position: 0x%08x", dataPosition));
}
public void writeLocalEntry(ZipOutput output) throws IOException {
if (data == null && dataPosition < 0 && zipInput != null) {
readLocalHeader();
}
localHeaderOffset = (int) output.getFilePointer();
boolean debug = getLogger().isDebugEnabled();
if (debug) {
getLogger().debug(String.format("Writing local header at 0x%08x - %s", localHeaderOffset, filename));
}
if (entryOut != null) {
entryOut.close();
size = entryOut.getSize();
data = ((ByteArrayOutputStream) entryOut.getWrappedStream()).toByteArray();
compressedSize = data.length;
crc32 = entryOut.getCRC();
}
output.writeInt(0x04034b50);
output.writeShort(versionRequired);
output.writeShort(generalPurposeBits);
output.writeShort(compression);
output.writeShort(modificationTime);
output.writeShort(modificationDate);
output.writeInt(crc32);
output.writeInt(compressedSize);
output.writeInt(size);
output.writeShort((short) filename.length());
numAlignBytes = 0;
// Zipalign if the file is uncompressed, i.e., "Stored", and file size is not zero.
if (compression == 0) {
long dataPos = output.getFilePointer() + // current position
2 + // plus size of extra data length
filename.length() + // plus filename
extraData.length; // plus extra data
short dataPosMod4 = (short) (dataPos % 4);
if (dataPosMod4 > 0) {
numAlignBytes = (short) (4 - dataPosMod4);
}
}
// 28 2 Extra field length (m)
output.writeShort((short) (extraData.length + numAlignBytes));
// 30 n File name
output.writeString(filename);
// Extra data
output.writeBytes(extraData);
// Zipalign bytes
if (numAlignBytes > 0) {
output.writeBytes(alignBytes, 0, numAlignBytes);
}
if (debug) getLogger().debug(String.format(Locale.ENGLISH, "Data position 0x%08x", output.getFilePointer()));
if (data != null) {
output.writeBytes(data);
if (debug) getLogger().debug(String.format(Locale.ENGLISH, "Wrote %d bytes", data.length));
} else {
if (debug) getLogger().debug(String.format("Seeking to position 0x%08x", dataPosition));
zipInput.seek(dataPosition);
int bufferSize = Math.min(compressedSize, 8096);
byte[] buffer = new byte[bufferSize];
long totalCount = 0;
while (totalCount != compressedSize) {
int numRead = zipInput.in.read(buffer, 0, (int) Math.min(compressedSize - totalCount, bufferSize));
if (numRead > 0) {
output.writeBytes(buffer, 0, numRead);
if (debug) getLogger().debug(String.format(Locale.ENGLISH, "Wrote %d bytes", numRead));
totalCount += numRead;
} else
throw new IllegalStateException(String.format(Locale.ENGLISH, "EOF reached while copying %s with %d bytes left to go", filename, compressedSize - totalCount));
}
}
}
public static ZioEntry read(ZipInput input) throws IOException {
// 0 4 Central directory header signature = 0x02014b50
int signature = input.readInt();
if (signature != 0x02014b50) {
// back up to the signature
input.seek(input.getFilePointer() - 4);
return null;
}
ZioEntry entry = new ZioEntry(input);
entry.doRead(input);
return entry;
}
private void doRead(ZipInput input) throws IOException {
boolean debug = getLogger().isDebugEnabled();
// 4 2 Version needed to extract (minimum)
versionMadeBy = input.readShort();
if (debug) log.debug(String.format("Version made by: 0x%04x", versionMadeBy));
// 4 2 Version required
versionRequired = input.readShort();
if (debug) log.debug(String.format("Version required: 0x%04x", versionRequired));
// 6 2 General purpose bit flag
generalPurposeBits = input.readShort();
if (debug) log.debug(String.format("General purpose bits: 0x%04x", generalPurposeBits));
// Bits 1, 2, 3, and 11 are allowed to be set (first bit is bit zero). Any others are a problem.
if ((generalPurposeBits & 0xF7F1) != 0x0000) {
throw new IllegalStateException("Can't handle general purpose bits == " + String.format("0x%04x", generalPurposeBits));
}
// 8 2 Compression method
compression = input.readShort();
if (debug) log.debug(String.format("Compression: 0x%04x", compression));
// 10 2 File last modification time
modificationTime = input.readShort();
if (debug) log.debug(String.format("Modification time: 0x%04x", modificationTime));
// 12 2 File last modification date
modificationDate = input.readShort();
if (debug) log.debug(String.format("Modification date: 0x%04x", modificationDate));
// 14 4 CRC-32
crc32 = input.readInt();
if (debug) log.debug(String.format("CRC-32: 0x%04x", crc32));
// 18 4 Compressed size
compressedSize = input.readInt();
if (debug) log.debug(String.format("Compressed size: 0x%04x", compressedSize));
// 22 4 Uncompressed size
size = input.readInt();
if (debug) log.debug(String.format("Size: 0x%04x", size));
// 26 2 File name length (n)
short fileNameLen = input.readShort();
if (debug) log.debug(String.format("File name length: 0x%04x", fileNameLen));
// 28 2 Extra field length (m)
short extraLen = input.readShort();
if (debug) log.debug(String.format("Extra length: 0x%04x", extraLen));
short fileCommentLen = input.readShort();
if (debug) log.debug(String.format("File comment length: 0x%04x", fileCommentLen));
diskNumberStart = input.readShort();
if (debug) log.debug(String.format("Disk number start: 0x%04x", diskNumberStart));
internalAttributes = input.readShort();
if (debug) log.debug(String.format("Internal attributes: 0x%04x", internalAttributes));
externalAttributes = input.readInt();
if (debug) log.debug(String.format("External attributes: 0x%08x", externalAttributes));
localHeaderOffset = input.readInt();
if (debug) log.debug(String.format("Local header offset: 0x%08x", localHeaderOffset));
// 30 n File name
filename = input.readString(fileNameLen);
if (debug) log.debug("Filename: " + filename);
extraData = input.readBytes(extraLen);
fileComment = input.readString(fileCommentLen);
if (debug) log.debug("File comment: " + fileComment);
generalPurposeBits = (short) (generalPurposeBits & 0x0800); // Don't write a data descriptor, preserve UTF-8 encoded filename bit
// Don't write zero-length entries with compression.
if (size == 0) {
compressedSize = 0;
compression = 0;
crc32 = 0;
}
}
/**
* Returns the entry's data.
*/
public byte[] getData() throws IOException {
if (data != null) return data;
byte[] tmpdata = new byte[size];
InputStream din = getInputStream();
int count = 0;
while (count != size) {
int numRead = din.read(tmpdata, count, size - count);
if (numRead < 0)
throw new IllegalStateException(String.format(Locale.ENGLISH, "Read failed, expecting %d bytes, got %d instead", size, count));
count += numRead;
}
return tmpdata;
}
// Returns an input stream for reading the entry's data.
public InputStream getInputStream() throws IOException {
return getInputStream(null);
}
// Returns an input stream for reading the entry's data.
public InputStream getInputStream(OutputStream monitorStream) throws IOException {
if (entryOut != null) {
entryOut.close();
size = entryOut.getSize();
data = ((ByteArrayOutputStream) entryOut.getWrappedStream()).toByteArray();
compressedSize = data.length;
crc32 = entryOut.getCRC();
entryOut = null;
InputStream rawis = new ByteArrayInputStream(data);
if (compression == 0) return rawis;
else {
// Hacky, inflate using a sequence of input streams that returns 1 byte more than the actual length of the data.
// This extra dummy byte is required by InflaterInputStream when the data doesn't have the header and crc fields (as it is in zip files).
return new InflaterInputStream(new SequenceInputStream(rawis, new ByteArrayInputStream(new byte[1])), new Inflater(true));
}
}
ZioEntryInputStream dataStream;
dataStream = new ZioEntryInputStream(this);
if (monitorStream != null) dataStream.setMonitorStream(monitorStream);
if (compression != 0) {
// Note: When using nowrap=true with Inflater it is also necessary to provide
// an extra "dummy" byte as input. This is required by the ZLIB native library
// in order to support certain optimizations.
dataStream.setReturnDummyByte(true);
return new InflaterInputStream(dataStream, new Inflater(true));
} else return dataStream;
}
// Returns an output stream for writing an entry's data.
public OutputStream getOutputStream() {
entryOut = new ZioEntryOutputStream(compression, new ByteArrayOutputStream());
return entryOut;
}
public void write(ZipOutput output) throws IOException {
boolean debug = getLogger().isDebugEnabled();
output.writeInt(0x02014b50);
output.writeShort(versionMadeBy);
output.writeShort(versionRequired);
output.writeShort(generalPurposeBits);
output.writeShort(compression);
output.writeShort(modificationTime);
output.writeShort(modificationDate);
output.writeInt(crc32);
output.writeInt(compressedSize);
output.writeInt(size);
output.writeShort((short) filename.length());
output.writeShort((short) (extraData.length + numAlignBytes));
output.writeShort((short) fileComment.length());
output.writeShort(diskNumberStart);
output.writeShort(internalAttributes);
output.writeInt(externalAttributes);
output.writeInt(localHeaderOffset);
output.writeString(filename);
output.writeBytes(extraData);
if (numAlignBytes > 0) output.writeBytes(alignBytes, 0, numAlignBytes);
output.writeString(fileComment);
}
/*
* Returns timetamp in Java format
*/
public long getTime() {
int year = (int) (((modificationDate >> 9) & 0x007f) + 80);
int month = (int) (((modificationDate >> 5) & 0x000f) - 1);
int day = (int) (modificationDate & 0x001f);
int hour = (int) ((modificationTime >> 11) & 0x001f);
int minute = (int) ((modificationTime >> 5) & 0x003f);
int seconds = (int) ((modificationTime << 1) & 0x003e);
Date d = new Date(year, month, day, hour, minute, seconds);
return d.getTime();
}
/*
* Set the file timestamp (using a Java time value).
*/
public void setTime(long time) {
Date d = new Date(time);
long dtime;
int year = d.getYear() + 1900;
if (year < 1980) {
dtime = (1 << 21) | (1 << 16);
} else {
dtime = (year - 1980) << 25 | (d.getMonth() + 1) << 21 |
d.getDate() << 16 | d.getHours() << 11 | d.getMinutes() << 5 |
d.getSeconds() >> 1;
}
modificationDate = (short) (dtime >> 16);
modificationTime = (short) (dtime & 0xFFFF);
}
public boolean isDirectory() {
return filename.endsWith("/");
}
public String getName() {
return filename;
}
public void setName(String filename) {
this.filename = filename;
}
/**
* Use 0 (STORED), or 8 (DEFLATE).
*/
public void setCompression(int compression) {
this.compression = (short) compression;
}
public short getVersionMadeBy() {
return versionMadeBy;
}
public short getVersionRequired() {
return versionRequired;
}
public short getGeneralPurposeBits() {
return generalPurposeBits;
}
public short getCompression() {
return compression;
}
public int getCrc32() {
return crc32;
}
public int getCompressedSize() {
return compressedSize;
}
public int getSize() {
return size;
}
public byte[] getExtraData() {
return extraData;
}
public String getFileComment() {
return fileComment;
}
public short getDiskNumberStart() {
return diskNumberStart;
}
public short getInternalAttributes() {
return internalAttributes;
}
public int getExternalAttributes() {
return externalAttributes;
}
public int getLocalHeaderOffset() {
return localHeaderOffset;
}
public long getDataPosition() {
return dataPosition;
}
public ZioEntryOutputStream getEntryOut() {
return entryOut;
}
public ZipInput getZipInput() {
return zipInput;
}
}

View File

@ -0,0 +1,141 @@
/*
* Copyright (C) 2010 Ken Ellinwood
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.zipio;
import kellinwood.logging.LoggerInterface;
import kellinwood.logging.LoggerManager;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.RandomAccessFile;
import java.util.Locale;
/**
* Input stream used to read just the data from a zip file entry.
*/
public class ZioEntryInputStream extends InputStream {
RandomAccessFile raf;
int size;
int offset;
LoggerInterface log;
boolean debug;
boolean returnDummyByte = false;
OutputStream monitor = null;
public ZioEntryInputStream(ZioEntry entry) throws IOException {
log = LoggerManager.getLogger(this.getClass().getName());
debug = log.isDebugEnabled();
offset = 0;
size = entry.getCompressedSize();
raf = entry.getZipInput().in;
long dpos = entry.getDataPosition();
if (dpos >= 0) {
if (debug) log.debug(String.format(Locale.ENGLISH, "Seeking to %d", entry.getDataPosition()));
raf.seek(entry.getDataPosition());
} else {
// seeks to, then reads, the local header, causing the
// file pointer to be positioned at the start of the data.
entry.readLocalHeader();
}
}
public void setReturnDummyByte(boolean returnExtraByte) {
returnDummyByte = returnExtraByte;
}
// For debugging, if the monitor is set we write all data read to the monitor.
public void setMonitorStream(OutputStream monitorStream) {
monitor = monitorStream;
}
@Override
public void close() throws IOException {
}
@Override
public boolean markSupported() {
return false;
}
@Override
public int available() throws IOException {
int available = size - offset;
if (debug) log.debug(String.format(Locale.ENGLISH, "Available = %d", available));
if (available == 0 && returnDummyByte) return 1;
else return available;
}
@Override
public int read() throws IOException {
if ((size - offset) == 0) {
if (returnDummyByte) {
returnDummyByte = false;
return 0;
} else return -1;
}
int b = raf.read();
if (b >= 0) {
if (monitor != null) monitor.write(b);
if (debug) log.debug("Read 1 byte");
offset += 1;
} else if (debug) log.debug("Read 0 bytes");
return b;
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
return readBytes(b, off, len);
}
private int readBytes(byte[] b, int off, int len) throws IOException {
if ((size - offset) == 0) {
if (returnDummyByte) {
returnDummyByte = false;
b[off] = 0;
return 1;
} else return -1;
}
int numToRead = Math.min(len, available());
int numRead = raf.read(b, off, numToRead);
if (numRead > 0) {
if (monitor != null) monitor.write(b, off, numRead);
offset += numRead;
}
if (debug) log.debug(String.format(Locale.ENGLISH, "Read %d bytes for read(b,%d,%d)", numRead, off, len));
return numRead;
}
@Override
public int read(byte[] b) throws IOException {
return readBytes(b, 0, b.length);
}
@Override
public long skip(long n) throws IOException {
long numToSkip = Math.min(n, available());
raf.seek(raf.getFilePointer() + numToSkip);
if (debug) log.debug(String.format(Locale.ENGLISH, "Skipped %d bytes", numToSkip));
return numToSkip;
}
}

View File

@ -0,0 +1,87 @@
/*
* Copyright (C) 2010 Ken Ellinwood
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.zipio;
import java.io.IOException;
import java.io.OutputStream;
import java.util.zip.CRC32;
import java.util.zip.Deflater;
import java.util.zip.DeflaterOutputStream;
public class ZioEntryOutputStream extends OutputStream {
int size = 0; // tracks uncompressed size of data
CRC32 crc = new CRC32();
int crcValue = 0;
OutputStream wrapped;
OutputStream downstream;
Deflater deflater;
public ZioEntryOutputStream(int compression, OutputStream wrapped) {
this.wrapped = wrapped;
if (compression != 0) {
deflater = new Deflater(Deflater.BEST_COMPRESSION, true);
downstream = new DeflaterOutputStream(wrapped, deflater);
} else {
downstream = wrapped;
}
}
public void close() throws IOException {
downstream.flush();
downstream.close();
crcValue = (int) crc.getValue();
if (deflater != null) {
deflater.end();
}
}
public int getCRC() {
return crcValue;
}
public void flush() throws IOException {
downstream.flush();
}
public void write(byte[] b) throws IOException {
downstream.write(b);
crc.update(b);
size += b.length;
}
public void write(byte[] b, int off, int len) throws IOException {
downstream.write(b, off, len);
crc.update(b, off, len);
size += len;
}
public void write(int b) throws IOException {
downstream.write(b);
crc.update(b);
size += 1;
}
public int getSize() {
return size;
}
public OutputStream getWrappedStream() {
return wrapped;
}
}

View File

@ -0,0 +1,232 @@
/*
* Copyright (C) 2010 Ken Ellinwood
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.zipio;
import kellinwood.logging.LoggerInterface;
import kellinwood.logging.LoggerManager;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.jar.Manifest;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
*/
public class ZipInput implements Closeable {
static LoggerInterface log;
public String inputFilename;
RandomAccessFile in = null;
long fileLength;
int scanIterations = 0;
Map<String, ZioEntry> zioEntries = new LinkedHashMap<String, ZioEntry>();
CentralEnd centralEnd;
Manifest manifest;
public ZipInput(String filename) throws IOException {
this.inputFilename = filename;
in = new RandomAccessFile(new File(inputFilename), "r");
fileLength = in.length();
}
private static LoggerInterface getLogger() {
if (log == null) log = LoggerManager.getLogger(ZipInput.class.getName());
return log;
}
public String getFilename() {
return inputFilename;
}
public long getFileLength() {
return fileLength;
}
public static ZipInput read(String filename) throws IOException {
ZipInput zipInput = new ZipInput(filename);
zipInput.doRead();
return zipInput;
}
public ZioEntry getEntry(String filename) {
return zioEntries.get(filename);
}
public Map<String, ZioEntry> getEntries() {
return zioEntries;
}
/**
* Returns the names of immediate children in the directory with the given name.
* The path value must end with a "/" character. Use a value of "/"
* to get the root entries.
*/
public Collection<String> list(String path) {
if (!path.endsWith("/")) throw new IllegalArgumentException("Invalid path -- does not end with '/'");
if (path.startsWith("/")) path = path.substring(1);
Pattern p = Pattern.compile(String.format("^%s([^/]+/?).*", path));
Set<String> names = new TreeSet<String>();
for (String name : zioEntries.keySet()) {
Matcher m = p.matcher(name);
if (m.matches()) names.add(m.group(1));
}
return names;
}
public Manifest getManifest() throws IOException {
if (manifest == null) {
ZioEntry e = zioEntries.get("META-INF/MANIFEST.MF");
if (e != null) {
manifest = new Manifest(e.getInputStream());
}
}
return manifest;
}
/**
* Scan the end of the file for the end of central directory record (EOCDR).
* Returns the file offset of the EOCD signature. The size parameter is an
* initial buffer size (e.g., 256).
*/
public long scanForEOCDR(int size) throws IOException {
if (size > fileLength || size > 65536)
throw new IllegalStateException("End of central directory not found in " + inputFilename);
int scanSize = (int) Math.min(fileLength, size);
byte[] scanBuf = new byte[scanSize];
in.seek(fileLength - scanSize);
in.readFully(scanBuf);
for (int i = scanSize - 22; i >= 0; i--) {
scanIterations += 1;
if (scanBuf[i] == 0x50 && scanBuf[i + 1] == 0x4b && scanBuf[i + 2] == 0x05 && scanBuf[i + 3] == 0x06) {
return fileLength - scanSize + i;
}
}
return scanForEOCDR(size * 2);
}
private void doRead() {
try {
long posEOCDR = scanForEOCDR(256);
in.seek(posEOCDR);
centralEnd = CentralEnd.read(this);
boolean debug = getLogger().isDebugEnabled();
if (debug) {
getLogger().debug(String.format(Locale.ENGLISH, "EOCD found in %d iterations", scanIterations));
getLogger().debug(String.format(Locale.ENGLISH, "Directory entries=%d, size=%d, offset=%d/0x%08x", centralEnd.totalCentralEntries,
centralEnd.centralDirectorySize, centralEnd.centralStartOffset, centralEnd.centralStartOffset));
ZipListingHelper.listHeader(getLogger());
}
in.seek(centralEnd.centralStartOffset);
for (int i = 0; i < centralEnd.totalCentralEntries; i++) {
ZioEntry entry = ZioEntry.read(this);
zioEntries.put(entry.getName(), entry);
if (debug) ZipListingHelper.listEntry(getLogger(), entry);
}
} catch (Throwable t) {
t.printStackTrace();
}
}
@Override
public void close() {
if (in != null) try {
in.close();
} catch (Throwable t) {
}
}
public long getFilePointer() throws IOException {
return in.getFilePointer();
}
public void seek(long position) throws IOException {
in.seek(position);
}
public byte readByte() throws IOException {
return in.readByte();
}
public int readInt() throws IOException {
int result = 0;
for (int i = 0; i < 4; i++) {
result |= (in.readUnsignedByte() << (8 * i));
}
return result;
}
public short readShort() throws IOException {
short result = 0;
for (int i = 0; i < 2; i++) {
result |= (in.readUnsignedByte() << (8 * i));
}
return result;
}
public String readString(int length) throws IOException {
byte[] buffer = new byte[length];
for (int i = 0; i < length; i++) {
buffer[i] = in.readByte();
}
return new String(buffer);
}
public byte[] readBytes(int length) throws IOException {
byte[] buffer = new byte[length];
for (int i = 0; i < length; i++) {
buffer[i] = in.readByte();
}
return buffer;
}
public int read(byte[] b, int offset, int length) throws IOException {
return in.read(b, offset, length);
}
}

View File

@ -0,0 +1,53 @@
/*
* Copyright (C) 2010 Ken Ellinwood
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.zipio;
import kellinwood.logging.LoggerInterface;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/**
*
*/
public class ZipListingHelper {
static DateFormat dateFormat = new SimpleDateFormat("MM-dd-yy HH:mm", Locale.ENGLISH);
public static void listHeader(LoggerInterface log) {
log.debug(" Length Method Size Ratio Date Time CRC-32 Name");
log.debug("-------- ------ ------- ----- ---- ---- ------ ----");
}
public static void listEntry(LoggerInterface log, ZioEntry entry) {
int ratio = 0;
if (entry.getSize() > 0) ratio = (100 * (entry.getSize() - entry.getCompressedSize())) / entry.getSize();
log.debug(String.format(Locale.ENGLISH, "%8d %6s %8d %4d%% %s %08x %s",
entry.getSize(),
entry.getCompression() == 0 ? "Stored" : "Defl:N",
entry.getCompressedSize(),
ratio,
dateFormat.format(new Date(entry.getTime())),
entry.getCrc32(),
entry.getName()));
}
}

View File

@ -0,0 +1,154 @@
/*
* Copyright (C) 2010 Ken Ellinwood
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kellinwood.zipio;
import kellinwood.logging.LoggerInterface;
import kellinwood.logging.LoggerManager;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
/**
*
*/
public class ZipOutput {
static LoggerInterface log;
String outputFilename;
OutputStream out = null;
int filePointer = 0;
List<ZioEntry> entriesWritten = new LinkedList<ZioEntry>();
Set<String> namesWritten = new HashSet<String>();
public ZipOutput(String filename) throws IOException {
this.outputFilename = filename;
File ofile = new File(outputFilename);
init(ofile);
}
public ZipOutput(File outputFile) throws IOException {
this.outputFilename = outputFile.getAbsolutePath();
File ofile = outputFile;
init(ofile);
}
private void init(File ofile) throws IOException {
if (ofile.exists()) ofile.delete();
out = new FileOutputStream(ofile);
if (getLogger().isDebugEnabled()) ZipListingHelper.listHeader(getLogger());
}
public ZipOutput(OutputStream os) throws IOException {
out = os;
}
private static LoggerInterface getLogger() {
if (log == null) log = LoggerManager.getLogger(ZipOutput.class.getName());
return log;
}
public void write(ZioEntry entry) throws IOException {
String entryName = entry.getName();
if (namesWritten.contains(entryName)) {
getLogger().warning("Skipping duplicate file in output: " + entryName);
return;
}
entry.writeLocalEntry(this);
entriesWritten.add(entry);
namesWritten.add(entryName);
if (getLogger().isDebugEnabled()) ZipListingHelper.listEntry(getLogger(), entry);
}
public void close() throws IOException {
CentralEnd centralEnd = new CentralEnd();
centralEnd.centralStartOffset = (int) getFilePointer();
centralEnd.numCentralEntries = centralEnd.totalCentralEntries = (short) entriesWritten.size();
for (ZioEntry entry : entriesWritten) {
entry.write(this);
}
centralEnd.centralDirectorySize = (int) (getFilePointer() - centralEnd.centralStartOffset);
centralEnd.fileComment = "";
centralEnd.write(this);
if (out != null) try {
out.close();
} catch (Throwable t) {
}
}
public int getFilePointer() throws IOException {
return filePointer;
}
public void writeInt(int value) throws IOException {
byte[] data = new byte[4];
for (int i = 0; i < 4; i++) {
data[i] = (byte) (value & 0xFF);
value = value >> 8;
}
out.write(data);
filePointer += 4;
}
public void writeShort(short value) throws IOException {
byte[] data = new byte[2];
for (int i = 0; i < 2; i++) {
data[i] = (byte) (value & 0xFF);
value = (short) (value >> 8);
}
out.write(data);
filePointer += 2;
}
public void writeString(String value) throws IOException {
byte[] data = value.getBytes();
out.write(data);
filePointer += data.length;
}
public void writeBytes(byte[] value) throws IOException {
out.write(value);
filePointer += value.length;
}
public void writeBytes(byte[] value, int offset, int length) throws IOException {
out.write(value, offset, length);
filePointer += length;
}
}

Some files were not shown because too many files have changed in this diff Show More