103 Commits

Author SHA1 Message Date
Peter Serwylo
ba6d2e7793 WIP: Fixing styles and removing unused styles. 2015-08-09 22:12:55 +10:00
Peter Serwylo
5ee8307703 Merge branch 'master' into new-swap--updated-downloader
Fixed multiple conflicts to do with the repo updater moving to
broadcasts from the previous progress listeners.
2015-08-09 22:12:09 +10:00
Peter Serwylo
b2bde89834 Merge remote-tracking branch 'Nutomic/no-download-dialog' into integration2/mr-102-and-107 2015-08-03 22:59:38 +10:00
Hans-Christoph Steiner
4fd914ac7a convert repo update dialog to a notification
Since the repo updates are happening in an IntentService, they are already
running in a separate thread.  Ironically, the dialog was showing in spite
of that.  This removes the dialog entirely and instead puts up a
Notification with the same messages.  Ultimately, the "refresh" button
should go away, the repos should be updated whenever someone goes to
install an app, and all APK downloads should also show up in the same
Notification.

This removes UpdateReceiver entirely and replaces it with local broadcasts,
since that is a common pattern in FDroid and Android.  It also reduces the
amount of code here.

refs #103 https://gitlab.com/fdroid/fdroidclient/issues/103
2015-08-01 20:58:14 +02:00
Peter Serwylo
760eae5a7b WIP: Fixing swap UI for earlier versions of Android.
Replaced `Switch` with `SwitchCompat`. In the future, should completely remove
F-Droid's `SwitchCompat` class. Fixed paddingLeft/paddingStart, except for some
places where lint complained. Apparantly that is for some Samsung tablets on
Android-16. Will have to create a layout-v17 version in the end for these.
2015-07-29 18:49:11 +10:00
Daniel Martí
083ceca893 Remove unused resources
These went unnoticed because apparently lint.xml was omitting all unused
resources, not just default_repo.xml.
2015-07-28 22:04:45 -07:00
Felix Ableitner
8c25134031 Replaced download dialog with embedded progress bar (fixes #270). 2015-07-27 13:04:42 +02:00
Peter Serwylo
0e5c039536 Merge branch 'master' into new-swap
Fixed lots of (minor) conflicts. Some due to earlier rebasing of
material stuff that was subsequently merged into master with a
different commit hash (I guess, that's what it looked like anyway).
2015-07-27 18:42:16 +10:00
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
relan
28ba6921d1 Tint links
Apply the accent color to links.
2015-07-23 09:46:33 +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
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
0a373de7a4 Merge branch 'nathan-bluetooth-swap' into nearby-peers-with-bluetooth 2015-07-15 17:42:03 +10: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
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
Peter Serwylo
0b1e2732c2 Refactored SwapService + SwapManager into single SwapService 2015-07-09 11:43:34 +10:00
relan
c6a2b1174e Apply new UI colors
Action bar color is Blue 700.
Status bar color is Blue 900.
Accent color is not from Material Design palette.

See https://www.google.com/design/spec/style/color.html for color values.
2015-07-04 21:32:38 +03:00
Peter Serwylo
a3af6b8b9f WIP: Serialize bonjour peers correctly. Refactor mini-service APIs.
The reference to mini-services above are not full blown Android
services. Rather, they are utility classes which can be started,
stopped, and send broadcasts about their status.

Made the list of apps to install better, with buttons for install
or upgrade, and statuses for incompatible and installed.
2015-06-30 19:04:06 +10:00
Peter Serwylo
22b072962e WIP: Don't show self in Bonjour peer list. Implement UI for peer list.
Peers are shown as proper list items now, subject to feedback from Carrie.
TODO: Need to figure out how to combine bluetooth and bonjour with same
fingerprint.
2015-06-27 10:12:26 +10:00
Peter Serwylo
30669f8058 WIP: Hooking up specific peers from the "nearby peers".
Touching the peers will prompt app selection for swap, then skip the
wifi and NFC screens, then show updating info, then a list of apps to
swap.
2015-06-26 00:13:52 +10:00
Peter Serwylo
ff93f96959 WIP: MOre ui stuff for "Start Swap" screen. 2015-06-23 22:46:52 +10:00
Peter Serwylo
0100415e3e WIP: Refactoring Bonjour from manage repos to swap.
Implementing the bare bones of a generic "peer finder" framework. This
may or may not eventuate to something which can live in its own library
and be used by other projects. Might go hand in hand with Carries idea
of having a common UI to be shared among projects.

Got Bluetooth and Bonjour kinda working, but the UI is crud,
and it doesn't remove items and ends up with duplicates. Otherwise,
on our way to a proper "nearby peers" screen.
2015-06-22 08:59:37 +10:00
Peter Serwylo
a30ec646b2 WIP: Refactoring Bonjour from manage repos to swap.
Implementing the bare bones of a generic "peer finder" framework. This
may or may not eventuate to something which can live in its own library
and be used by other projects. Might go hand in hand with Carries idea
of having a common UI to be shared among projects.
2015-06-22 08:55:46 +10:00
Peter Serwylo
593aaf3894 WIP: I18n of start swap screen, colouring of text, add header.
Styled "send fdroid" and "qr code" buttons correctly.
2015-06-22 08:54:23 +10:00
Daniel Martí
515ca01d38 Replace all occurences of FDroid with F-Droid
Except FDroid.apk, since that is actually its name. Thanks to @SylvieLorxu for
spotting.
2015-06-21 13:48:10 +02:00
Peter Serwylo
a48deb9160 WIP: More work on UI for initial swap screen. 2015-06-21 10:05:38 +10:00
Nico Alt
5be35d1d87 Merge branch 'material-design' into 'master'
Material Design

Similar to !94, this wants to merge from the F-Droid branch.
Old MR is !84.

See merge request !95
2015-06-18 21:17:36 +00:00
Daniel Martí
7f3db513e5 Don't mention automatic app updates, closes #280
This feature is not yet implemented. The new sentence is more generic and
doesn't get us into trouble.
2015-06-17 12:08:24 +02:00
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
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
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
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
1b2678d6ed WIP: Applying styles correctly to views refactored from fragments. 2015-05-23 01:25:06 +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