645 Commits

Author SHA1 Message Date
Daniel Martí
ed5de47197 Merge branch 'enhanced-priv-install' of https://gitlab.com/dschuermann/fdroidclient 2015-09-09 21:21:06 -07: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í
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
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
85c8e7035d Move shared AIDL files into lib, restructure, start of install/delete code 2015-09-07 01:38:48 +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í
e72ccd3012 Bump to 0.97-alpha0 2015-09-02 17:54:55 -07:00