2669 Commits

Author SHA1 Message Date
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 v0.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 v0.97-alpha4 2015-10-02 17:34:42 -07:00