2339 Commits

Author SHA1 Message Date
Peter Serwylo
c57f7105e1 Attempt to show "Setting up [wifi/bluetooth]..." in UI.
Not sure it is working as intended yet, but the idea should be close to what is required.
2015-07-27 17:21:21 +10:00
Peter Serwylo
4d11c97d51 Cleanup misc TODO's that are floating around (swap and general f-droid)
`SwapService`: Remove unneccesary TODO's and unused constant. Also
added other TODO's there which will need to be done before swap is
stable. Can make them into issues in gitlab, but will leave there for
now.

`SwapWorkflowActivity`: Clarified TODO's, fixed issue with cancelling
swap when in the "connecting" state (before it would not show the
right view again, now it goes back to the first view).

`WifiQrView`: Make scanning of QR code initiated by `SwapActivity`.
This is because the activity is actually the one who is able to listen
for a response anyway.

`BluetoothFinder`: Cleaned up TODO's in  but didn't actually address
them.

`BluetoothPeer`: Removed TODO about fingerprints, because TOFO is
probably the way to go with Bluetooth anyhow.

`BonjourFinder`: Remove dead code, prevent NPE by using final local
variable rather than member variable (the member variable gets set
to null in a different thread).

`BonjourPeer`: Fix bug with prompting other device to swap back.

`BluetoothDownloader`: Fix typo in comment.

`Downloader`: Removed TODO that was left over from a refactor, and
was never actually correct. The code after refactoring was broken
because it created an `InputStream` which was never closed. Now it
doesn't do that, because it was fixed in an earlier commit in this
branch.

`HttpDownloader`: Remove TODO, but clarify that the downloader does
not follow 30x redirects.
2015-07-27 17:19:51 +10:00
Daniel Martí
f3e08bdc68 Add a few changelog items 2015-07-25 21:24:35 -07:00
Daniel Martí
378c177490 Remove android-support-v4 jar since it was only needed by ant 2015-07-25 21:15:22 -07:00
Daniel Martí
96906ec35a Remove test jar libs since gradle pulls them from jcenter 2015-07-25 21:13:55 -07:00
Daniel Martí
5e0683df23 Remove ant stuff from the test project
Forgot to get rid of those when removing ant support
2015-07-25 21:06:53 -07:00
Daniel Martí
07c19aef37 Prepare jenkins-build for gradle 2015-07-25 21:04:32 -07:00
Daniel Martí
49400a9ed9 Remove ant from HACKING 2015-07-25 21:02:40 -07:00
Daniel Martí
340cba3ebe Bump gradle plugin version 2015-07-25 21:01:39 -07:00
Peter Serwylo
9180c9f5c0 WIP: Bluetooth can actually transfer indexes and apks over HTTPish!
It is very hacky, and I did it through the non-swap interface, and it
only works once then the state stuffs up and it no longer accepts incomming
connections, but it worked! Now to smooth out all the things.
2015-07-26 07:44:12 +10:00
Daniel Martí
17b6ca83d7 Merge branch 'master' of https://gitlab.com/relan/fdroidclient 2015-07-24 10:21:08 -07:00
relan
8f2c827280 Fix padding in dialogs
Padding around content area should be 24dp. See the Material Design spec:

	http://www.google.com/design/spec/components/dialogs.html#dialogs-specs
2015-07-23 09:47:27 +03:00
relan
28ba6921d1 Tint links
Apply the accent color to links.
2015-07-23 09:46:33 +03:00
relan
0b7c5fb616 Tint preference dialogs
Apply the accent color to EditTextPreference and ListPreference. They
use android.app.AlertDialog.Builder, not
android.support.v7.app.AlertDialog.Builder, so the theme has to be
specified using "android:alertDialogTheme" attribute in addition to
AppCompat's "alertDialogTheme". For the same reason those dialogs won't
be tinted on pre-Lollipop Android versions.
2015-07-23 09:41:37 +03:00
relan
04e8b591ab Tint alert dialogs
Apply the accent color to alert dialog buttons. Note that without
"android:windowMinWidthMajor" and "android:windowMinWidthMinor" attributes
dialog width is calculated incorrectly resulting in visual artifacts.
2015-07-23 09:19:20 +03:00
Daniel Martí
85ae6f86b1 Quote version patterns as well 0.95-alpha1 2015-07-21 11:48:09 -07:00
Daniel Martí
cfff0ba0e8 Bump to 0.95-alpha1 2015-07-21 11:47:14 -07:00
Daniel Martí
79943b9d4a Explain new versioning scheme in the README 2015-07-21 11:47:14 -07:00
Daniel Martí
97f5697af7 Don't have extremely long lines in the README 2015-07-21 11:06:13 -07:00
relan
4b699d5376 Use AlertDialog from the support library
This unifies look of alert dialogs across various Android versions and
allows proper tinting.
2015-07-20 11:17:40 +03:00
Daniel Martí
c9f6be61b5 Merge branch 'crash-app-on-unknown-cursor-column' of https://gitlab.com/slackydeb/fdroidclient 2015-07-19 20:43:15 -07:00
Luca Favatella
b7527e78e7 Log error when view finds unknown column in model
This stricter behaviour would have reported a more meaningful error
easing investigation for issue #276 on Android 2.1.
2015-07-20 03:26:22 +01:00
Daniel Martí
f875c6902f Merge branch 'master' of https://gitlab.com/relan/fdroidclient 2015-07-19 11:55:22 -07:00
relan
bcb3ac1fe0 Fix identical bitmaps across various configurations
No need to put mdpi images into drawable/ directory since F-Droid does not
support Android 1.5. This fixes appropriate warning from lint.
2015-07-19 19:34:25 +03:00
Peter Serwylo
9da6893ac3 Added verbose debugging to diagnose swap state. Foreground/background service correctly. 2015-07-19 23:52:47 +10:00
Daniel Martí
f97b1851e6 Merge branch 'master' of https://gitlab.com/relan/fdroidclient 2015-07-17 09:52:09 -07:00
Peter Serwylo
240bcce445 Remove bonjour preference. Separate bluetooth and wifi more clearly.
Before, you could "Enable swapping" without specifying which type
of protocol to enable. Now, the two switches are clearly delimited
between bluetooth and wifi.
2015-07-18 01:48:56 +10:00
Peter Serwylo
4f4310c0ca Clean up after merging swap stuff. 2015-07-18 00:08:25 +10:00
relan
6ddd1571c7 Change repositories icon
Use ic_toc_white instead of ic_view_headline_white. The latter often used
to show navigation drawer and thus may be confusing.
2015-07-17 15:43:42 +03:00
relan
2dc689e2a1 Remove icons from dialogs titles
Dialogs should not have icons in their title bars. See the Material Design
spec:

    http://www.google.com/design/spec/components/dialogs.html
2015-07-17 09:59:34 +03:00
relan
f0f0bd09d3 Reuse existing refresh icon
Use Material-style icon instead of the old Holo-style one.
2015-07-17 09:20:47 +03:00
relan
cc43561bf2 Reduce action bar icons size from 48dp to 24dp
From the Material Design spec:

> DP unit grid

> System icons are displayed at 24dp.

See http://www.google.com/design/spec/style/icons.html#icons-system-icons

Script used to update the icons:

    function download {
        F-Droid/tools/download-material-icon.sh F-Droid/res $1 $2
    }

    download content add
    download device bluetooth
    download action delete
    download notification do_not_disturb
    download image edit
    download action help
    download device nfc
    download av play_arrow
    download navigation refresh
    download action search
    download action settings
    download social share
    download action view_headline
2015-07-17 08:34:32 +03:00
Peter Serwylo
0a373de7a4 Merge branch 'nathan-bluetooth-swap' into nearby-peers-with-bluetooth 2015-07-15 17:42:03 +10:00
Peter Serwylo
a653e6392c Merge branch 'repoupdater-simplify-and-streams' into 'master'
simplify RepoUpdater and use more streams

This is an overhaul of `RepoUpdater` to make its code match the architecture that is in use now: only download and use a signed index.jar.  It also streams index.xml directly out of the index.jar and directly into the XML parser.  That makes the update process quicker and more reliable because it no longer has to write out an index.xml to the filesystem, then read it in.  Ultimately I hope to stream the index.jar download directly to the XML parser, so not even the index.jar needs to be written to disk.  You can see that work in my git repo under the branches SKETCH-JarURLConnection and SKETCH-verify-with-JarInputStream for two different approaches.

This also changes the index parsing process to be based on bytes for now.  The progress is based on the stream now, and this will still work once the full streaming mode is implemented.  It also simplifies `RepoXMPHandler`.

This includes tests for index.jar signature verification. The tests all pass on my machine and our Jenkins.

See merge request !101
2015-07-13 20:50:50 +00:00
n8fr8
2a6b514232 change BT request handling to operate directly on files
We don't want to depend on HTTP being active in case there is
no wifi that exists at all. In some cases, local 127.0.0.1 does not
exist if the Wifi is not connected. This commit takes the code
from LocalHTTPD and repurposes it for the BluetoothServer needs.
2015-07-13 16:45:53 -04:00
n8fr8
e930e03378 improvement on scan/re-scan logic to avoid failure 2015-07-13 16:05:13 -04:00
n8fr8
c53df989b8 small UI clean-up of header display 2015-07-13 16:05:00 -04:00
n8fr8
c399a17369 add more checks for possible NPE and simplify the UI 2015-07-13 15:04:38 -04:00
n8fr8
cc6b2736ce add logic for setting/re-setting "Fdroid" name tag for bluetooth device 2015-07-13 14:41:21 -04:00
n8fr8
d662c15fb8 list background should be white 2015-07-13 14:40:22 -04:00
n8fr8
99a86c4080 handle null adapter case 2015-07-13 14:40:11 -04:00
Hans-Christoph Steiner
01fce7f94f re-enable Lollipop spongycastle hack
It doesn't look like there is an easy way around this, so re-enable it in
the new structure.

#111 https://gitlab.com/fdroid/fdroidclient/issues/111
2015-07-13 10:32:08 -07:00
Hans-Christoph Steiner
2910acc906 break out TOFU so all connections also run through regular verification
This drastically simplifies the very important index.jar signature
verification process by splitting out the Trust On First Use (TOFU) part of
the process into its own method, and makes the TOFU write happen separately
from the `RepoUpdateRememberer`.  It requires all connections go through
the normal verification process.
2015-07-13 10:32:08 -07:00
Hans-Christoph Steiner
43cc017c91 Utils.closeQuietly() for closing things in finally {} blocks 2015-07-13 10:32:08 -07:00
Hans-Christoph Steiner
675151b4ef rename string status_processing_xml to prevent crashes on old translations
Thanks to @mvdan for catching that.  Turns out Java's String formatting is
not as tolerant as C's printf().  Java crashes when the format is wrong,
while C just ignores extras.
2015-07-13 10:32:08 -07:00
Hans-Christoph Steiner
64d709c142 create ProgressBufferedInputStream to get progress info while parsing XML
Might as well tap into the stream to get the byte counts, that's best
progress info I can think of when parsing a file.

This is a step towards a single progress bar for the whole process, instead
of showing one progress for downloading, another for parsing XML, then a
third for processing the new app info.
2015-07-13 10:32:08 -07:00
Hans-Christoph Steiner
4f2650cd47 update logic to match only parsing signed index files
Now that there is only ever the index.jar, the whole flow of RepoUpdater
has changed quite a bit.  This updates the logic for deciding when to store
the current repo's pubkey in the database for future reference.

This changes the flow to stop writing the unpacked index.xml and instead
stream it directly to the XML parser from the index.jar.  This should speed
things up some.
refs #259 https://gitlab.com/fdroid/fdroidclient/issues/259

This is also work towards running the whole thing in the background:
refs #103 https://gitlab.com/fdroid/fdroidclient/issues/103

This also removes the progress stuff since it will need to change a lot to
work with the streaming mode
2015-07-13 10:32:07 -07:00
Hans-Christoph Steiner
d7efc99bdb simplify RepoUpdater to remove cruft from previous code structure
Before, there was an abstract RepoUpdater class with two subclasses, one
for signed and unsigned.  Now there is just a single class, and it only
ever starts with the index.jar.  So this removes lots of code that was
there to handle that more complicated structure.  For example, there is no
longer the need to separately work on the index.xml vs index.jar.
2015-07-13 10:32:07 -07:00
Hans-Christoph Steiner
3c6389c004 fix failing symlink test
the dest.txt  symlink was produced, but it was pointing to a non-existent
file.
2015-07-13 10:32:07 -07:00
Peter Serwylo
a8dedd8ac2 Removed SwapAppListActivity, implemented UI mockup for swap app list.
Still need to hook up the buttons in the app list, but this change
shows the correct status and/or buttons for installable/upgradable/
incompatible/installed apps in the swap list. This change also hooks
up UIL to download icons for apps and thus display them in the list.
2015-07-13 22:52:51 +10:00