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.
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
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
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)
* 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
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#370https://gitlab.com/fdroid/fdroidclient/issues/370
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.
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).
- 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)
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.
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.
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.