2363 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
5d4bdf6139 all Downloaders have a URL, so make the base class store it for use
This lets the local broadcasts include the URL as an extra, and other
tricks.
2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
9a9bf92126 make all Downloaders get a Context so the base class can use those tricks
Having a Context in Downloader means that the communications can be changed
to a LocalBroadcastManager, following the pattern that is in a lot of this
app already.
2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
80063eb786 simplify Downloader constructors
Since all Downloaders are created via the DownloaderFactory, put the temp
file creation there, then we can remove lots of constructors.
2015-08-01 20:58:14 +02: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
Hans-Christoph Steiner
1d263b2aee fix sending repo via NFC
This was my stupid mistake: using a String for a class, instead of a .class
so that when ManageRepo was renamed to ManageRepoActivity, this broke.
2015-08-01 20:55:37 +02:00
Hans-Christoph Steiner
46978e1086 make RepoDetails scrollable and add a QR code to the bottom
Having a QR Code of the repo makes it easy for people to share the repo to
someone else.
2015-08-01 20:55:37 +02:00
Hans-Christoph Steiner
7ea294bb66 switch RepoDetailsActivity to plain structure, purge RepoDetailsFragment
No need for a reusable Fragment here, its only used in one place.  This
changes the structure to be a regular Activity, with all View and Menu
setup in XML files loaded in onCreate().

This also converts the URL to a TextView.  Having it editable in this
Activity makes for a confusing user experience.  Instead, the "Add Repo"
input should validate the URL and not allow creating repos that don't work.

This also purges the use of UpdateService.UpdateReceiver, it will be going
away in the upcoming commits.
2015-08-01 20:55:37 +02:00
Daniel Martí
50ac03e97d Bump gradle plugin to 1.3.0 2015-07-31 17:13:42 -07:00
Daniel Martí
7f3acb215e Bundling support-v4 as a binary dep is no longer necessary 2015-07-30 20:24:25 -07:00
Daniel Martí
040c900be5 Bump to 0.95-alpha2, prepare for stable v0.95-alpha2 2015-07-30 10:28:40 -07:00
Daniel Martí
e9ce43832a Finish up changelog
* Don't imply that material design is completely finished
* Shorten changelog links item
2015-07-30 10:24:11 -07:00
Daniel Martí
4935ba5c8d Merge branch 'ensure-large-icon-urls-exist' of https://gitlab.com/pserwylo/fdroidclient 2015-07-30 10:19:49 -07:00
Peter Serwylo
92f7d5e197 Add changelog entry about changelogs. Mind blown.
Made sure to include a comment about needing to update the index
in order to get changelogs to show.
2015-07-30 21:39:59 +10:00
Nico Alt
92f8678b3d Prompt for beta updates
Fixes #313
2015-07-30 13:06:53 +02:00
Peter Serwylo
4565f58a75 Clear out the etag from the repo table to "force" update.
We are not forcing an update, in the sense that we make the update
service run. Rather, we are ensuring that the next update wont return
after doing nothing, with the message "repos already up to date".
In this case, the repo metadata (and hence its etag) is the same,
but we made changes in the client to handle the metadata correctly.
Thus, we don't care that it hasn't changed, we want to update anyhow.
2015-07-30 21:06:30 +10:00
Peter Serwylo
e1a8c42f9e Ensure icon URLs are always populated when database is upgraded.
Did this by using the same query which is used to update the icon URLs
after updating the index. To make this same method accessible, without
causing sad database locking, had to expose the method from AppProvider
in a way which would let DBHelper access it. See comments in code for
further explainations.

While there, removed the final lint warning in my Android Studio for
the AppProvider. This was a warning because we could have ended up
iterating over a null object. Although it turns out there was a correct
guard in place which would ensure this didn't happen, it wasn't in such
a way that lint would understand. Thus, I changed the guard condition
around `for( String blah : CommaSeparatedList.make() ) {}` to let lint
relax and not be so pedantic.
db-version/50
2015-07-30 21:06:30 +10: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í
a5c65f7b30 Unused resource cleanup #2 2015-07-28 22:15:58 -07:00
Daniel Martí
6ebd24e2bb Re-run remove-unused-trans after unused resource cleanup 2015-07-28 22:08:26 -07: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
Daniel Martí
b152c682fa Move lint config to build.gradle
* Removed UnusedResources from default_repo.xml, since there are none of those
  warnings anymore
* Same for TrulyRandom in the whole project
2015-07-28 21:39:33 -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
8ddc6a656d Failed attempt at fixing bluetooth timeout error.
Kept getting a message in the Bluetooth _client_, which said the
socket timed out or received an invalid response or something. Most
people seem to believe that it is due to a bug in the Bluetooth stack
on Android 4.2.1 and suggest using reflection to access a method that
actually works as intented. I couldn't get it to work correctly though.
Kept the code here because this whole branch is a WIP, and we need
to figure out how to make Bluetooth work one way or another.
2015-07-27 17:26:13 +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
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