5141 Commits

Author SHA1 Message Date
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 1.2-alpha0 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.
db-version/78
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