3039 Commits

Author SHA1 Message Date
Peter Serwylo
0b3b32dab3 CR: Add overloaded createNewRepo method which provides default arguments.
Instead of passing in `null` each time you don't have a username/password,
this change provides those as meaningful default values in an overloaded
version of the method. This takes care of Java's lack of default argument
support.
2015-11-16 18:05:31 +11:00
Peter Serwylo
3426b3bb2d CR: Better deal with the possibility of crashes during database update.
This is for an abundance of caution. If the guard condition checks
for the presence of both username _and_ password fields, then a crash
or some sort of force close during the update (after adding username
but before password) will mean that next time the app runs, this
condition will evaluate to false and the password field will never
get added.
2015-11-16 18:05:16 +11:00
Peter Serwylo
97b60d937d CR: Apply database changes in chronological order.
As with the previous commit, there is probably not any harm doing this
in the way it was done. However it helps reason about the code if
changes are applied in the order that they were introduced. Especially
because each of them does something depending on the version of the
database at that point. With this change, you always know that at the
point that the function is run, the database version will be 51 (and
hence the structure of the database will be predictable).
2015-11-16 18:05:03 +11:00
Peter Serwylo
6957721479 CR: Leave old db update code as it was.
This may not have caused any trouble, but the principle behind the old
behaviour is that at the point that that was required, the fdroid_repo
table had that particular structure. There is a small chance that it
_may_ have some unintended consequences when upgrading clients with very
old database versions. Probably not, but may as well leave it as is.
2015-11-16 18:04:54 +11:00
Christian Morgner
34838fd0dc Added username & password fields to the REPO table, increased DB version to 52.
Extended DownloaderFactory to support optional username & password parameters.

Extended HttpDownloader to check for HTTP 401 Authorization Required status code
and send a simple HTTP Basic Authentication header with all requests.

Extended ManageReposActivity to support repositories that use HTTP Basic
Authentication, added a dialog to prompt for username and password.

Extended RepoDetailsActivity to be able to display and modify the authentication
credentials.
db-version/52
2015-11-15 13:04:23 +01:00
Daniel Martí
31313bc9ee Specify why the DM downloader is disabled
Closes both issues since they don't affect official builds anymore, for
as long as this is disabled.

Closes #445.
Closes #459.
2015-11-14 17:18:15 +01:00
Daniel Martí
4e81aba841 Remove spongycastle, use maven repos in zipsigner 2015-11-14 17:14:28 +01:00
Daniel Martí
51676bf255 Update spongycastle to 1.53.0.0
Which sits on top of bouncycastle 1.53.
2015-11-14 17:14:27 +01:00
Daniel Martí
34ac4319c0 Merge branch 'tests-lint' into 'master'
Close all cursors in tests



See merge request !170
2015-11-14 15:12:18 +00:00
Daniel Martí
b6e2f2d691 Remove one lone Log.d in prod code 2015-11-14 14:19:29 +01:00
Daniel Martí
11e2fb7540 test: close all cursors
This makes lint happy and avoids tons of warnings on the logcat due to
StrictMode.
2015-11-14 14:18:08 +01:00
Daniel Martí
5d048a7c53 Specify why we use proguard in debug builds 2015-11-14 14:05:15 +01:00
Daniel Martí
9fc1aba8bc Checkstyle fix 2015-11-13 20:46:52 +01:00
Daniel Martí
04e7b8d7ab Collapse identical catch statements in tests 2015-11-13 18:51:28 +01:00
Daniel Martí
52ada0131a Deduplicate types in tests 2015-11-13 18:50:43 +01:00
Daniel Martí
14a79b5577 Remove unused parameters 2015-11-13 18:50:43 +01:00
Daniel Martí
d951ccd221 Make a few declarations final 2015-11-13 18:44:08 +01:00
Daniel Martí
682cf58aa9 Merge branch 'search-widget' into 'master'
Replace search dialog with a search widget

SearchView is the recommended way to implement search UI. See https://developer.android.com/guide/topics/search/search-dialog.html#UsingSearchWidget

The UX is still far from ideal but looks much better now.

Before and after (Gingerbred):

![gingerbred-before](/uploads/f724afaf152aeef8ff9cb3e838427d22/gingerbred-before.png)
![gingerbred-after](/uploads/da67fe57d2a55e64cce7d0cba31aa181/gingerbred-after.png)

Before and after (Lollipop):

![lollipop-before](/uploads/4a50258993a8304d984450456d07e3bb/lollipop-before.png)
![lollipop-after](/uploads/4b49b2f802eca567c6713fe653b10331/lollipop-after.png)


See merge request !168
2015-11-13 17:22:19 +00:00
Daniel Martí
7581d8443e Merge branch 'lint-unused-resources' of https://gitlab.com/relan/fdroidclient
Fix some lint warnings about unused resources

No functional changes, just cleanups.
2015-11-13 18:19:13 +01:00
F-Droid Translatebot
3afe248159 Pull translation updates from Weblate
Translators:

AtomiKe                 French
Erwin Scheuch-Heilig    German
Ldm Public              French
Michal Čihař            Czech
pizzaiolo               Esperanto
2015-11-13 18:16:36 +01:00
Daniel Martí
04a2c4b70d Fix tests by never caching a null signature
This also keeps us from future possible NPE or null signature issues, if
we ever call getPackageSig on a PackageInfo with no signatures.
2015-11-13 11:42:47 +01:00
Daniel Martí
41b2ad6a9d Merge branch 'master' into 'master'
Enable HttpDownloader to use URL-based HTTP Basic Authentication.

This is a very small merge request that adds the possibility to use URL-based HTTP Basic Authentication in a repository URL. With this change you can for example use `https://user:password@my.repo.com` to authenticate against a private repository.

It would be great if you could merge my little feature request into the master, or let me know what I can do or have to change in order for the merge request to get accepted.

I'm of course open for discussion. My use-case is the identification of individual users. We dynamically create a signed index.jar file for each user which contains an individual set of apps depending on the permissions of the user etc.

HTTP Basic Authentication is on of the possible solutions, another solution would be to use the Android Account Manager, but this would be a much larger change.

Thank you for your consideration.

Best regards,
Christian Morgner


See merge request !167
2015-11-13 10:00:20 +00:00
Christian Morgner
405e411200 Enable HttpDownloader to use URL-based HTTP Basic Authentication. 2015-11-13 09:30:08 +01:00
relan
c3fd3984b8 Remove the code related to the compact layout
Compact layout preference is gone.
2015-11-13 09:25:49 +03:00
relan
7458dff6e9 Remove unused string repo_icon 2015-11-13 09:14:45 +03:00
relan
0324631a4e Remove unused string repo_update 2015-11-13 09:14:44 +03:00
relan
bb5665ab23 Remove unused color 2015-11-13 08:58:06 +03:00
relan
5c9e314c9b Suppress lint warnings about unused categories names
They are actually used from the code.
2015-11-13 08:58:06 +03:00
relan
e841d63ea9 Replace search dialog with a search widget
SearchView is the recommended way to implement search UI. See
https://developer.android.com/guide/topics/search/search-dialog.html#UsingSearchWidget
2015-11-13 08:27:55 +03:00
relan
f0d72a3ec4 Remove search button from the search results activity
It violates app navigation logic.
2015-11-13 08:27:55 +03:00
relan
32413a2753 Put empty text below the categories spinner
When an on-screen keyboard is used to enter a search query, empty text
can overlap categories spinner on small screens.
2015-11-13 08:19:57 +03:00
Daniel Martí
f7a0063495 proguard: only keep zipsigner 2015-11-12 20:21:48 +01:00
F-Droid Translatebot
e0c09853b9 Pull translation updates from Weblate
Translators:

ageru               French
Benedikt Geißler    German
Kiril LastName      Bulgarian
Marcelo Santana     Portuguese (Brazil)
Marvin W            German
2015-11-09 17:12:35 +01:00
Daniel Martí
ad4e53098a Merge branch 'clean-up-tabs-fragments' into 'master'
Clean up tabs fragments

No functional changes, just refactoring. The only visual change is that empty text is now positioned at the center which was the initial design (as far as I understand):

![screenshot](/uploads/1f930f283dae86f20675c11c861183f2/screenshot.png)


See merge request !165
2015-11-09 16:09:20 +00:00
relan
b533bc2112 Remove unused string swap_tap_to_select_apps 2015-11-09 15:51:18 +03:00
relan
3bbcca9966 Remove unused string update_all 2015-11-09 15:47:20 +03:00
relan
96ffb5f0fd Remove unused layouts 2015-11-09 15:45:47 +03:00
relan
7fdcd706fd Split tabs layouts
Use separate layouts for the three tabs. This simplifies code and improves
maintainability.
2015-11-09 15:43:09 +03:00
relan
950854318b Add styles for app list and empty text
Those styles will be used in the three layouts that will define the
look of the fragments.
2015-11-09 15:43:09 +03:00
relan
080527bf2e Remove ThemeableListFragment
Not sure why it was added initially but now it appears to be unneeded:
the support library does everything right and the lists are themed
properly without any hacks.
2015-11-09 15:42:52 +03:00
relan
817cac3002 Remove dead code in CanUpdateAppsFragment
Remove unused layout creation code. If needed, it can be re-added later as
an XML resource which is a much more maintainable way to define layouts.
2015-11-09 15:08:53 +03:00
Daniel Martí
3e44ab2474 Merge branch 'download-local-files-through-fdroid' into 'master'
Never fallback to UIL for handling image downloads, only use for displaying.

@relan picked up a bug I introduced while refactoring the icon downloading code in !139. This fixes that bug.

Our `IconDownloader` extended `BaseImageDownloader` from UIL. There was an
explicit check in the F-Droid `IconDownloader` which looks for
HTTP/HTTPS/Bluetooth schemes. If it wasn't one of these, it fell back
to the base class. This was what was happening for local cached image
files. As such, when the `getInputStream(...)` method was refactored
to only use F-Droids `DownloadFactory` and not delegate to the base class,
it failed on local "file://" URLs.

This change introduces a `LocalFileDownloader` and makes the `DownloaderFactory`
aware of it.

The `BaseImageDownloader` class only provides support for the following schemes:

 * HTTP
 * HTTPS
 * File
 * Android content providers
 * Android assets
 * Android drawables

F-Droid now supports HTTP, HTTPS, and File URLs. There is not currently any
need for content proiders, assets or drawables to get icons for apps in F-Droid.
If there is a need in the future (e.g. an issue currently discusses loading
icons from installed apps if possible) then that specific `Downloader` can get
introduced to solve the problem.

See merge request !164
2015-11-08 10:07:27 +00:00
Peter Serwylo
1a5bd84fad Never fallback to UIL for handling image downloads, only use for displaying.
Our `IconDownloader` extended `BaseImageDownloader` from UIL. There was an
explicit check in the F-Droid `IconDownloader` which looks for
HTTP/HTTPS/Bluetooth schemes. If it wasn't one of these, it fell back
to the base class. This was what was happening for local cached image
files. As such, when the `getInputStream(...)` method was refactored
to only use F-Droids `DownloadFactory` and not delegate to the base class,
it failed on local "file://" URLs.

This change introduces a `LocalFileDownloader` and makes the `DownloaderFactory`
aware of it.

The `BaseImageDownloader` class only provides support for the following schemes:

 * HTTP
 * HTTPS
 * File
 * Android content providers
 * Android assets
 * Android drawables

F-Droid now supports HTTP, HTTPS, and File URLs. There is not currently any
need for content proiders, assets or drawables to get icons for apps in F-Droid.
If there is a need in the future (e.g. an issue currently discusses loading
icons from installed apps if possible) then that specific `Downloader` can get
introduced to solve the problem.
2015-11-08 10:30:23 +11:00
F-Droid Translatebot
447dbe73ea Pull translation updates from Weblate
Translators:

ageru                French
Phạm Nguyễn Hoàng    Esperanto
Phạm Nguyễn Hoàng    Vietnamese
2015-11-07 14:03:48 +01:00
Daniel Martí
3df93940c8 Merge branch 'installed-sig' into 'master'
Cache installed signature

This will later be useful for #122 and others. Also a few more fixes related to signatures and package information.

CC @pserwylo

See merge request !158
2015-11-07 13:01:21 +00:00
Daniel Martí
eefbee969e Store installed app signature in cache
This means we can fetch the signatures only once instead of every time we need
them. Start by using the cache in AppDetails.
db-version/51
2015-11-07 13:57:34 +01:00
Daniel Martí
bb9426763c Remove <p> from comments
These are written manually and mostly don't contain HTML. Some html is
fine if you want to use links or markup, but <p> elements are just
pointless and very seldom used. Be consistent in not using them.
2015-11-07 13:25:01 +01:00
Daniel Martí
40092a07dd Don't duplicate repo info in UpdateException
The exception already contains the repo object, so don't hard-code the
address in the message string again.
2015-11-07 13:19:30 +01:00
Daniel Martí
4412b0a557 CI: Bump sdk to 24.4.1 2015-11-07 13:15:54 +01:00
Daniel Martí
dd9a7207ac Bump to 0.98-alpha0 after stable 2015-11-07 13:15:21 +01:00