327 Commits

Author SHA1 Message Date
Peter Serwylo
b0b285bc1f Merge branch 'swap/bluetooth' into swap-demolition-material-mockups 2015-06-17 00:41:37 +10:00
Peter Serwylo
a345788dba 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-06-15 21:19:14 +02:00
Peter Serwylo
71605e98dc Made swap button text white. 2015-06-15 21:19:14 +02:00
Peter Serwylo
6452d2da96 More colours beyond colorPrimary.
Signed-off-by: Nico Alt <nicoalt@posteo.org>
2015-06-15 21:19:14 +02:00
Peter Serwylo
d94e8a4ad2 Made category Spinner style correctly.
Signed-off-by: Nico Alt <nicoalt@posteo.org>
2015-06-15 21:19:14 +02:00
Nico Alt
03c5a224de fix #91: Material Design
- 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)
2015-06-15 21:19:14 +02:00
Peter Serwylo
78b5f489ef Merge branch 'fix-263/explicitly-add-swap-repo' into 'master'
Fix #263 "cannot manually add repo that was swapped before"

Pretends that the swap repo never existed, by deleting it before adding
the new repo, and showing the same message that is shown when a new
repo is added. This does not change behaviour for existing non-swap
repos. They are not deleted before being added again, or else we would
lose the ability to verify the fingerprint of an existing repo is the
same as a newly added one with the same URL.

Note that this has the effect that the fingerprint/pubkey of the swap
repo is nuked when adding that repo manually.

Internationalised the string "BAD FINGERPRINT" while I was at it.

To test it out, here is some instructions to make life easier:

Firstly, go into manage repos and delete the guardian project main repo (going to pretend to use this for swapping to make life easier).

Then if you run `sqlite3 /data/data/org.fdroid.fdroid/databases/fdroid` and execute the query:

`select substr(fingerprint, 0, 10), substr(pubkey, 70, 10), address, isSwap from fdroid_repo order by fingerprint desc;`

You should see:

```
B7C2EEFD8|081ad310b3|https://guardianproject.info/fdroid/archive|0
43238D512|071310b300|https://f-droid.org/archive|0
43238D512|071310b300|https://f-droid.org/repo/|0
```

Now simulate a swap session like so:

```
adb shell am start -a android.intent.action.VIEW -d 'https://guardianproject.info/fdroid/repo?swap=1'
```

Which results in the following database:

```
B7C2EEFD8|081ad310b3|https://guardianproject.info/fdroid/archive|0
B7C2EEFD8|081ad310b3|https://guardianproject.info/fdroid/repo|1
43238D512|071310b300|https://f-droid.org/archive|0
43238D512|071310b300|https://f-droid.org/repo/|0
```

Note the last column (`isSwap`) is `1` for the newly added swap repo. Now we will add the repo (without a fingerprint) to the Manage Repo activity. If you are feeling lazy, execute:

```
adb shell am start -a android.intent.action.VIEW -d https://guardianproject.info/fdroid/repo
```

The repo will be removed, then re-added as a TOFU repo:

```
B7C2EEFD8|081ad310b3|https://guardianproject.info/fdroid/archive|0
43238D512|071310b300|https://f-droid.org/archive|0
43238D512|071310b300|https://f-droid.org/repo/|0
||https://guardianproject.info/fdroid/repo/|0
```

I noticed some bugginess with sending the same intent and it being ignored, I'll have to look at this another day (not caused by this change, it already existed in master).

See merge request !90
2015-06-15 09:33:06 +00:00
Daniel Martí
62f9c84252 Merge branch 'fdroid-system-install' 2015-06-14 18:15:19 +02:00
Nico Alt
e92be5322d update icons
- icons for dogecoin and litecoin
- updated icons for website, bitcoin, donate, flattr and issues

Thanks to xphnx (https://gitlab.com/xphnx)
2015-06-14 14:57:15 +02:00
Peter Serwylo
4a8ff47fce WIP: Implementing mockups from Carrie, added "Toolbar"
The Toolbar is the new thing from Google which acts as an ActionBar.
It is not a special view like the action bar is, it is
implemented and added to your layout the same as any view.

The InnerView classes of the swap workflow have the choice of what
colour to make the toolbar, so that they can distinguish themselves
as per the mockups (some deep blue, others bright blue).

Added icons for close, but they don't do anything yet.

Minor tweaks to layout so that it looks more like the latest mockups.
2015-06-12 22:45:55 +10:00
Peter Serwylo
0d4c61df96 WIP: Implementing UI mockup, different "selected" indicator for swap.
Using stock icons from Google Material Icons. Need to use the actual
icons provided by carrie, but will do so in the future.
2015-06-11 08:21:10 +10:00
Nico Alt
f0c00c144c Add support for changelog links 2015-06-10 15:48:50 +02:00
Nico Alt
a653b0156a improve AppDetails
- App icon is now 72dp x 72dp
- Description is expandable
- License, categories, Website, Source Code, Issues and Donate (#232) are moved from header to summary
- Buttons to install, update and run are moved from action bar to header
- Permissions are expandable and always shown
- Add myself to copyright holders of "F-Droid/res/layout/app_details_header.xml", "F-Droid/res/layout/app_details_summary.xml" and
"F-Droid/src/org/fdroid/fdroid/AppDetails.java"
2015-06-10 15:48:11 +02:00
Daniel Martí
ee6daf356b Bump all bundled repo versions to 13 2015-06-10 15:48:02 +02:00
Daniel Martí
ab7067f247 Also bundle repo versions in the client
Without them, some features like proper density icons only worked after the
first update, but not on the first index update itself since the version
defaulted to 0.
2015-06-08 23:53:07 +02:00
Dominik Schürmann
2e6984bfbe Use new icon for install into system notifications 2015-06-08 16:34:04 +02:00
Peter Serwylo
c6bc8b5e37 Merge branch 'material-design' into swap-demolition-material 2015-06-04 08:26:46 +10:00
Peter Serwylo
f9bcf33d50 WIP: Fixed minor UI issues.
"Confirm swap" background was white but should have been blue.

SwapWorkflowActivity now extends ActionBarActivity instead of
FragmentActivity so older devices have an action bar (though it is
not styled with blue action buttons on android-10 devices).
2015-06-03 23:55:11 +10:00
Daniel Martí
9795b31b69 Add missing language code for Sardinian in the settings
Closes #272
2015-05-30 12:19:39 +02:00
Peter Serwylo
c26c6b9e89 Removed old SwapActivity + Fragments.
All the code from the activity and the fragments has been successfully
ported to the SwapWorkflowActivity + Views. Thus, the code is no longer
useful, as it was only kept over the previous WIP commits so that it
can be referred to to help re-implement fragments with views.
2015-05-25 16:07:49 +10:00
Peter Serwylo
1b2678d6ed WIP: Applying styles correctly to views refactored from fragments. 2015-05-23 01:25:06 +10:00
Peter Serwylo
38eafdeedd WIP: Refactored wifi QR fragment into view.
As per the select apps list, there is quite a bit of business logic
in this class, which is now spread between the activity and the view.
The activity needs to handle some stuff, because the zxing library
routes intents to either an activity or a fragment.
2015-05-23 01:11:16 +10:00
Peter Serwylo
97994c5e43 WIP: Refactored NFC fragment to view. 2015-05-23 00:55:39 +10:00
Peter Serwylo
1fd6e447af WIP: Refactored join wifi fragment into view.
There is quite a lot of business logic that was moved directly from
the fragment to the view. Before this feature is complete, that logic
should either be moved into the activity, or into some sort of
associated Presenter class for the JoinWifiView.
2015-05-23 00:46:40 +10:00
Peter Serwylo
4f7f7b2cb5 WIP: Refactored select apps to swap into view.
Not worrying about styling yet, just functionality. Added an InnerView
interface that these views can implement. Currently it asks them to
populate the menu. It may be slightly inefficient if we end up with a
popup menu, because it is called onPrepareOptionsMenu, but expects the
inner view to inflate the menu. However, for swap this shouldn't be an
issue, as all the menus pretty much fit in the action bar of most screen
sizes.
2015-05-23 00:10:50 +10:00
Peter Serwylo
b6415dadb4 WIP: Refactored start swap fragment into a view.
Added a SwapWorkflowActivity to re-implement the SwapActivity.
Once all the fragments have been refactored into views, then the
SwapActivity will be removed.
2015-05-23 00:10:07 +10:00
Dominik Schürmann
29c1aaf33c Touch instead of Click 2015-05-21 00:07:23 +02:00
Dominik Schürmann
fc631c8781 Better strings for system installer, cleanup 2015-05-20 23:27:57 +02:00
Dominik Schürmann
b393befb70 Implement notification for install into system feature 2015-05-20 21:59:24 +02:00
Dominik Schürmann
2befa22b2c Remove uneeded case of no new permissions in InstallConfirmActivity 2015-05-20 21:59:24 +02:00
Daniel Martí
8e62d9ae7e Add install confirm+perms screen to SystemInstaller 2015-05-20 21:59:24 +02:00
Daniel Martí
6e89a55879 Add confirmation dialog to uninstalling via SystemInstaller 2015-05-20 21:56:45 +02:00
Dominik Schürmann
a7aa554f66 Remove root installer 2015-05-20 21:56:45 +02:00
Dominik Schürmann
f328a9de5e Install F-Droid as system-app via root access 2015-05-20 21:56:44 +02:00
Peter Serwylo
5065c37e13 Fix #263 "cannot manually add repo that was swapped before"
Pretends that the swap repo never existed, by deleting it before adding
the new repo, and showing the same message that is shown when a new
repo is added. This does not change behaviour for existing non-swap
repos. They are not deleted before being added again, or else we would
lose the ability to verify the fingerprint of an existing repo is the
same as a newly added one with the same URL.

Note that this has the effect that the fingerprint/pubkey of the swap
repo is nuked when adding that repo manually.

Internationalised the string "BAD FINGERPRINT" while I was at it.
2015-05-20 08:26:57 +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
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
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
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
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
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
Peter Serwylo
ec67059128 More colours beyond colorPrimary.
Signed-off-by: Nico Alt <nicoalt@posteo.org>
2015-05-07 22:06:01 +02:00
Peter Serwylo
b57a122ac1 Made category Spinner style correctly.
Signed-off-by: Nico Alt <nicoalt@posteo.org>
2015-05-07 22:06:01 +02:00
Nico Alt
315265fbb4 fix #91: Material Design
- 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)
2015-05-07 22:06:01 +02:00