716 Commits

Author SHA1 Message Date
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í
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
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
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
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í
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í
1e8bbbd1f9 checkstyle: Add curly checks 2015-10-09 11:40:50 +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í
bd68caa152 checkstyle: Add FallThrough
With bonus bugfix.
2015-10-08 23:33:29 +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í
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í
2b0e6dade1 checkstyle: enable ModifierOrder and apply it 2015-10-08 18:59:41 +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í
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