2565 Commits

Author SHA1 Message Date
Daniel Martí
c586de61d2 Add unsigned repos dropping to the changelog 2015-05-15 17:20:49 +02:00
Peter Serwylo
f8578b178e Fix #254 - regression where TOFU repos were not working.
The code for promoting an untrusted repo with no fingerprint, to
a repo with a pubkey and a fingerprint, was still there. The problem
was that it was being executed after we verified the index.jar cert
against the pubkey stored against the repo (which is empty for TOFU
repos).

This change makes it so that if we are updating a repo without a
fingerprint, then it is a TOFU request, and we don't try to verify
the certificates.

closes #85 https://gitlab.com/fdroid/fdroidclient/merge_requests/85
closes #254 https://gitlab.com/fdroid/fdroidclient/issues/254
2015-05-14 23:23:14 -04:00
Daniel Martí
f65824857c Merge branch 'cm-build' into 'master'
fix paths in Android.mk

It turned out i only tested the build with an outdated source tree so the last commit (38c25f0ecce48ef9cfe5b0b41956ac9a4e2047fd) broke the Android.mk build. Sorry for that.

See merge request !86
2015-05-14 23:07:58 +00:00
Simon Wörne
886919adb7 fixed apk output path 2015-05-15 00:25:44 +02:00
Daniel Martí
c5bb3adfdc Following 09444b0 - also use maxSdk when building an index 2015-05-14 17:11:14 +02:00
Daniel Martí
a936b5d070 Properly list maxSdkVersion as an incompatible reason 2015-05-14 17:07:32 +02:00
Daniel Martí
09444b0181 Also populate maxSdkVersion when parsing a package
There is no reason why this should fail, so make the default be 0.
2015-05-14 17:03:33 +02:00
Daniel Martí
70a93b01db Don't crash if links on descriptions cannot be handled
Basically the same safety net for ActivityNotFoundException that we had for
links in the menus, but for links in the descriptions too now.
2015-05-14 16:39:11 +02:00
Peter Serwylo
40925009bb Shortened log tags to below 23 chars (required by lint) 2015-05-14 22:24:40 +10:00
Peter Serwylo
52c4554877 Removed localrepo classes that were used before "swap".
All of the relevant code from them has been ported across to swap,
and they are no longer needed as a reference for how to implement
app swapping.
2015-05-14 22:24:40 +10:00
Daniel Martí
ec44c1efe5 ACCESS_SUPERUSER permission is now deprecated 2015-05-14 12:29:52 +02:00
Daniel Martí
647d63cd10 Add a couple of changelog entries 2015-05-14 12:18:53 +02:00
Daniel Martí
80fffdac61 Merge branch 'cm-build' into 'master'
added Android.mk with gradle build

Allow ROM build with fdroid using Android.mk

See merge request !81
2015-05-14 10:14:48 +00:00
Simon Wörne
38c25f0ecc build only F-Droid without unneeded libraries 2015-05-14 12:05:55 +02:00
Peter Serwylo
92430e163e WIP 2015-05-14 18:40:25 +10:00
Peter Serwylo
cb73e6352c Cleaned up some lint errors, i18n some strings. 2015-05-14 10:00:11 +10:00
Peter Serwylo
6f3ca8b9c4 WIP: Making 'scan' UI more solid 2015-05-13 16:54:50 +10:00
Peter Serwylo
d7b7af76b7 Cleanup after rebase. 2015-05-13 16:54:17 +10:00
Peter Serwylo
5e80b04266 WIP: Improving streme handling for bluetooth swap connections.
Brought in an Apache 2.0 licensed file from apache commons to help
with this, which is one of many similar classes online that do the
same thing. At this stage, didn't feel like pulling in all of apache
commons as a dependency.
2015-05-13 16:54:17 +10:00
Peter Serwylo
41b3eab1fd WIP: Bluetooth successfully sending entire HTTP responses to GET requests.
Now to move the code into a BluetoothDownloader and decide how best
to handle connections, error handling, multiple downloads over one
socket, etc.
2015-05-13 16:54:16 +10:00
Peter Serwylo
7dff9a9499 WIP: Bluetooth communication between devices is up and running (not finished).
Devices now make themselves discoverable, and the client sends a test ping.
They UI is not styles properly though, and it doesn't handle the case where
somebody chooses to make their device not-discoverable (because the desired
peer is already paired and it is unneccesary). It also doesn't handle failure
anywhere.
2015-05-13 16:53:10 +10:00
Peter Serwylo
fba02e32b5 WIP: Bluetooth list of paired devices. 2015-05-13 16:39:10 +10:00
Peter Serwylo
45a3efa2b3 WIP: Started to implement the general concept of BluetoothDownloader
I'm not 100% sure it is the right architecture yet, there wil no doubt be
things that crop up as I continue to implement it. However it seems to
be alright to work with so far.
2015-05-13 16:37:41 +10:00
Peter Serwylo
92e4d99c1c Added material icons from CC licensed "Google material icons" set.
Fixes #240.

To make this easier, I added a script to aid in downloading icons.
Checkout F-Droid/tools/download-material-icon.sh for more details.

The icons are licensed under the CCv4 attribution license, which I
added a shout out to under "License" in the README.md.
2015-05-12 01:26:31 +10:00
Peter Serwylo
1203cacbe4 Made swap button text white. 2015-05-11 16:27:41 +10:00
Peter Serwylo
96bffff8ac Updated support libraries to 22.1.0 2015-05-11 15:54:19 +10:00
Peter Serwylo
239ccbf0f3 Updated changelog
Added comment about preventing addition of the same repo multiple
times.

More specific comment about pname et al, so that people don't think
they can use the regular search feature of F-Droid to search by
package name with a pname: prefix. Instead, it is only applicable to
incoming intents.
2015-05-11 09:14:18 +10:00
Peter Serwylo
c33cacedaf Merge branch 'master' into 'master'
improved, but still rudimentary, hotspot handling in swap

My previous merge request fdroid/fdroidclient!78 was based on one broken assumption: `WIFI_STATE_UNKNOWN` means that the hotspot is active.  Apparently, that's not always the case.  Also, sometimes when the hotspot is active, its `WIFI_STATE_DISABLED`.  Even worse, there is no broadcast message sent on final config of the hotspot.  There is only a `WIFI_STATE_DISABLING` from turning off the wifi, but then never a broadcast for `WIFI_STATE_UNKNOWN` and/or `WIFI_STATE_DISABLED`.  But I found some tricks that seem to work for now.  We'll need to use your library, @mvdan, to really get good support of hotspots.

This also includes some basic UI tweaks to represent the hotspot mode in the swap wifi screen.

See merge request !79
2015-05-10 22:39:12 +00:00
Daniel Martí
da9396fff1 Remove unnecessary and confusing import 2015-05-10 16:08:43 +02:00
Peter Serwylo
3df03bbb1e Fix #250. Fix #251. Normalize URLs before saving, and disallow invalid URLs.
Removes trailing slashes from URLs, replaces multiple consecutive forward
slashes in the path with a single slash. Canonicalizes the URL.

If the URL is invalid, display a message to the user and don't let it get
added.

NOTE: This does *not* normalize existing URLs in the database.
2015-05-10 23:22:35 +10:00
Peter Serwylo
93339cbbfb Fix issue 246: Rewrite process for verifying existing repos.
Previously it would only compare the details of a new repo to existing
ones if the new repo came via an intent. Now it does it whenever you
change the text in the new repo dialog (shouldn't be too much of a
performance hit, it isn't doing very much).

The things it (still) doesn't do is:
 * verify that the url looks like a url
 * sanitize the newly input uri and compare it to sanitized saved repos

The second point means that you can end up with:
 http://10.0.1.50/ and
 http://10.0.1.50

both in the list. I'm going to log an issue for this, because it should
be fixed, but doesn't need to hold this up.
2015-05-10 21:56:40 +10:00
Hans-Christoph Steiner
12b3a5af12 initial sketch of how to display hotspot mode on the swap wifi screen
This is really just a placeholder, there is lots of work to be done here.
Really, this screen should have the SSID of the hotspot, but we need to use
a private API to get that.  Coming soon...

The icon is free software from:
https://commons.wikimedia.org/wiki/File:Wifi.svg
2015-05-10 00:37:05 -04:00
Hans-Christoph Steiner
962a2fb3d6 improve detection of hotspot mode
hotspot mode is not well represented with the WifiState stuff.  It can be
active when the WifiState is DISABLED or UNKNOWN.  Also, when switching
from active wifi to hotspot mode, WIFI_STATE_DISABLING broadcasts will be
sent, but WIFI_STATE_DISABLED/WIFI_STATE_UNKNOWN will not.
2015-05-10 00:37:05 -04:00
Daniel Martí
0db225e07c Bump to 0.89-test 0.89-test 2015-05-09 22:34:04 +02:00
Daniel Martí
05332409be Suppress fallthrough java warning 2015-05-09 22:24:41 +02:00
Hans-Christoph Steiner
96b7c35a2a rework WifiStateChangeService to support hotspots (aka WiFi AP on device)
When a device is setup as a WiFi Access Point aka "hotspot", the standard
API for getting the WiFi settings returns nothing.  We have to use a
separate API to get the IP address of the WiFi AP.  As far as I could tell,
there is no public API for getting the SSID/BSSID of the WiFi AP, so for
now that is left blank.  That means the wifi screen in swap is confusing
because it will say it is not attached when the device is a hotspot

@mvdan's https://github.com/mvdan/libaccesspoint should help there

#193 https://gitlab.com/fdroid/fdroidclient/issues/193
2015-05-09 13:41:30 -04:00
Hans-Christoph Steiner
edb3564e29 unified IP/Wifi state handling in WifiStateChangeService
To handle hotspots, this code will become more complicated.  Therefore,
first simplify things by putting all of the logic into one place, rather
than spread out across FDroidApp, the receiver, and the service
2015-05-09 13:41:30 -04:00
Hans-Christoph Steiner
2b59644e02 eliminate nested try/catch blocks for clearer code 2015-05-09 13:41:30 -04:00
Hans-Christoph Steiner
6703fa3652 rename to FDroidApp.restartLocalRepoServiceIfRunning() for clarity
This method handles checking if the service is running, and only restarts
it if it was running.
2015-05-09 13:41:30 -04:00
Hans-Christoph Steiner
c1b0b854fc on launch, check wifi if WIFI_STATE_ENABLED, the receiver handles the rest
On launch, we need to get the current state of the Wifi.  We only need to
start the WifiStateChangeService on WIFI_STATE_ENABLED, since any other
wifi state will be received by WifiStateChangeReceiver, which will launch
WifiStateChangeService when appropriate.

This reduces the chance that WifiStateChangeService will start when it is
not needed.
2015-05-09 13:41:29 -04:00
Hans-Christoph Steiner
bdc190a7d6 reset swap wifi info if it is not connected
Before, it was keeping the last active wifi, which is confusing when you
are not connected.
2015-05-09 13:41:29 -04:00
Daniel Martí
29b78df530 Remove "fdroid." from TAGs, add a comment on filtering by packagename 2015-05-08 23:28:32 +02:00
Hans-Christoph Steiner
0702183210 merge Fragment into ConnectSwapActivity to fix crash on rotate
I was getting frequent crash-on-rotate NullPointerExceptions after scanning
QR Codes.  This fixes it for me.

ConfirmReceiveSwapFragment is only ever used once in ConnectSwapActivity,
so it is a pointless abstraction.  It makes the code a lot more complicated
and also creates very complicated situations to handle when the screen is
rotated.  All of this gets much easier when everything is just included in
the Activity, since there is no problem being solved by the Fragments.
Fragments are for reusing chunks of UI in multiple places, or for showing
multiple chunks of UI in the same Activity.  Both of those cases can also
be handled, arguably better, without using Fragments:
https://corner.squareup.com/2014/10/advocating-against-android-fragments.html
2015-05-08 15:44:11 -04:00
Hans-Christoph Steiner
367387f967 move RepoUpdaterTest to the same package as RepoUpdater 2015-05-08 12:51:46 -04:00
Hans-Christoph Steiner
6e5912a633 move RepoUpdater from .updater package next to RepoXMLHandler
This gets rid of the .updater package, which now only contains RepoUpdater
2015-05-07 22:11:05 -04:00
Hans-Christoph Steiner
157b1e242f remove support for unsigned repos
This has been discussed quite a bit now.  It is very easy to generate a
signed repo on the server, and supporting unsigned repos adds complexity
and security issues, including "BZ-01-002 TOFU Requests too easy to
recognize and intercept" from the audit.

https://gitlab.com/fdroid/fdroidserver/merge_requests/48
closes #12 https://gitlab.com/fdroid/fdroidclient/issues/12
2015-05-07 22:11:05 -04:00
Hans-Christoph Steiner
1c5256a5d7 remove importRepo() method, it is very short and only used in one place 2015-05-07 22:11:05 -04:00
Hans-Christoph Steiner
4820ab3694 add forgotten import (I'm better at merge requests than direct pulls) 2015-05-07 22:10:38 -04:00
Daniel Martí
f4d9191ed5 Merge branch 'small-swap-repo-fixes' of https://gitlab.com/eighthave/fdroidclient 2015-05-08 00:34:49 +02:00
Daniel Martí
91541748a2 Update changelog 2015-05-08 00:33:49 +02:00