1086 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
ea9dec34b3 include upper case URI schemes for matching URIs from QR Codes
Android's scheme matcher is case-sensitive, so include
ALL CAPS versions to support ALL CAPS URLs in QR Codes.
QR Codes have a special ALL CAPS mode that uses a reduced
character set, making for more compact QR Codes.

This reverts:
We should not encourage all caps urls
2651b81792bdeed0db3c3960d0b7283536611012
2014-01-22 22:07:03 -05:00
Peter Serwylo
1f38a84fa9 Replaced repoId constructer argument with setArguments()
As suggested by android lint.
Also removed unused imports.
2014-01-23 14:02:47 +11:00
Peter Serwylo
f8893431fb Refactored Repo db access from DB class to ContentProvider.
The performance improvement from this will not be noticable (perhaps
there isn't one), however it is part of the bigger plan to move all of
the DB access to ContentProviders. This will make a big improvement to
the startup time of the app, given we are currently loading all of the
apps to populate the list of apps.

It will come at the cost of some apparantly weird code convensions. Most
notably, when loading data from a content provder, you only ask
for the fields that you intend to use. As a result of my Helper class which
converts results from the content providers cursor into Repo value objects,
there is no guarantee that certain attributes will be available on the
value object. E.g. if I load repos and only ask for "_ID" and "ADDRESS",
then it is meaningless to ask the resulting Repo object for its "VERSION"
(it wont be there), despite it being a perfectly legal attribute from
the Java compilers perspective.

Repo.id field has also been made private (sqlite is the only
entity should be able to set id's), and made id a long (sqlite stores
identifiers as longs rather than ints).
db-version/37
2014-01-23 13:03:07 +11:00
Daniel Martí
cad37b0d55 Revert AB.setTitle, support titles before 3.0 too 2014-01-22 10:05:49 +01:00
Hans-Christoph Steiner
cbb182c18a add method for updating a single repo while leaving the rest as is
Now, clicking Update in "Repo Detail" only updates that repo, not all of
the repos.  This will also be very useful for more transitory repos, like
p2p repos that are reached via bluetooth, local wifi, etc.
2014-01-21 21:52:56 -05:00
Hans-Christoph Steiner
10106bf6dd reorganize update process to set up updating individual repos
This keeps the same logic as was in place before, but splits out code from
onHandleIntent() so that it can be used to update specific repos, rather
than always updating all repos.  This is needed for transient repos, like
p2p repos connected via bluetooth or local wifi.
2014-01-21 20:54:59 -05:00
Hans-Christoph Steiner
62008e85c6 show repo name in ActionBar in "Repo Details"
Before, "Repo Details" always had a title of "Repositories". Now
it shows the name of the repo as the title.  This also enables the
ActionBar back button (aka "display home as up") to return to
"Manage Repos".
2014-01-21 19:21:34 -05:00
Hans-Christoph Steiner
526c978328 add ActionBarCompat.setTitle() method
Now the title can be easily set in the ActionBar to reflect the current
Activity.
2014-01-21 19:17:06 -05:00
Hans-Christoph Steiner
47659b5cec relabel misnamed items from "signature" to "repo fingerprint"
In the new Repo Details screen, there is some elements that are labels as
the "signature".  This is not quite right, it is actually referring to the
fingerprint of the repo signing key.  Since a repo will also usually have a
HTTPS certificate fingerprint, there will also be a fingerprint for that
certificate.
2014-01-21 18:30:02 -05:00
Hans-Christoph Steiner
4cd73c12f0 add my recent changes to the changelog 2014-01-21 16:56:41 -05:00
F-Droid Translatebot
7e87f8b81f Translation updates 2014-01-21 11:23:43 +00:00
Daniel Martí
fd998b7566 Avoid possible crashes when checking signatures
Might fix https://f-droid.org/forums/topic/nullpointerexception-when-trying-to-update-puzzles
2014-01-20 14:32:21 +01:00
Daniel Martí
077548eb72 Note that automatic building via gradle is not supported 2014-01-19 20:50:11 +01:00
Daniel Martí
b734b210e3 Add pd0x's entries to changelog 2014-01-19 20:47:39 +01:00
Daniel Martí
1f99c00899 Revert "New setting: "Small screen" to avoid ellipsizing on small screens"
This reverts commit a5c66a8c6ed9c9fd174aeb448e428d288e52f1e1.

Conflicts:
	src/org/fdroid/fdroid/AppDetails.java
2014-01-17 21:06:37 +01:00
Daniel Martí
9500c987cc Finish getting rid of hard-coded preferences 2014-01-16 09:40:24 +01:00
Daniel Martí
305daf5a10 DB.java: remove unused prefs, use pref names from Preferences.java 2014-01-15 23:51:24 +01:00
Daniel Martí
d99e3edb52 Incompatible apks are always in memory, no need to reload 2014-01-15 23:48:42 +01:00
Daniel Martí
a6ed36808d Don't show permissions list if there are no versions shown 2014-01-15 23:45:11 +01:00
Daniel Martí
4a70097c64 Show version updates in the updates tab 2014-01-15 23:44:56 +01:00
Kevin Everets
ca1a07677a Move up the setting of Prefences in AppDetails so they are actually respected
Without this, no matter how the user set the preferences, they could not see
incompatible APKs in the AppDetails.
2014-01-15 16:12:33 -05:00
Kevin Everets
68067a81c9 Show incompatible reasons if they exist 2014-01-15 16:12:33 -05:00
Kevin Everets
763b4d3ea0 Keep track of the reason that an apk is incompatible 2014-01-15 16:12:30 -05:00
Daniel Martí
d8df407b02 Don't hard-code apks.get(0) when showing permissions 2014-01-15 16:33:09 +01:00
Daniel Martí
b58cb74612 Revert "Specify that the version is for Android"
This reverts commit aff6a03fa2c2ea84cee6597a44dcfb32fa7006f5.

Conflicts:
	res/values/strings.xml
2014-01-14 13:27:04 +01:00
Daniel Martí
99808969d7 Get rid of remaining UPDATE_REPO stuff from FDroid.java 2014-01-10 23:32:53 +01:00
Daniel Martí
27452ac31b Use View.GONE instead of setText("") 2014-01-10 22:52:35 +01:00
Daniel Martí
3567d9e113 Make fix-ellipsis.sh more accurate
* Don't do dirs like res/layout
* Do xml files other than strings.xml like arrays.xml
2014-01-10 22:41:50 +01:00
Daniel Martí
3ae9fd7b88 Try to support AndroidPinning via gradle (won't work as-is) 2014-01-10 22:37:26 +01:00
Daniel Martí
a5c66a8c6e New setting: "Small screen" to avoid ellipsizing on small screens 2014-01-10 22:12:57 +01:00
Daniel Martí
7c472c8e18 Merge branch 'development' 2014-01-10 22:06:43 +01:00
Daniel Martí
15c1b98d5c Release 0.58 0.58 2014-01-10 21:29:25 +01:00
Daniel Martí
6a49d9656c Update changelog 2014-01-10 21:02:27 +01:00
Daniel Martí
b9628a6960 Merge branch 'master' into development 2014-01-10 18:03:45 +01:00
Daniel Martí
9f4bfe015c Fix: Use PreferencesActivity resultCodes properly
This fixes useless restarts/reloads, and missing ones too.
2014-01-10 18:03:02 +01:00
Daniel Martí
9b28fde89f Rename build.prop to ant.prop, add ant-prepare.sh 2014-01-09 12:35:38 +01:00
Daniel Martí
350d77aec6 Merge branch 'master' into development 2014-01-09 12:25:35 +01:00
Daniel Martí
c0fad0fe26 Fix: Don't crash if an app has no categories 2014-01-09 12:25:20 +01:00
Daniel Martí
2d3c333b21 AndroidPinning uses a weird target, force android-17 2014-01-08 23:55:16 +01:00
Daniel Martí
1c988a0b5a DBHelper refactor fix: re-add version column 2014-01-08 23:54:59 +01:00
Daniel Martí
a666b53ace Add ignore=dirty to submodules 2014-01-08 23:44:44 +01:00
Daniel Martí
30140d7a3b Indenting fixes 2014-01-08 23:23:32 +01:00
Daniel McCarney
254327f9a7 Adding support for SPKI pins, trust-on-first-use of TLS certs.
In order to support F-droid repositories hosted with HTTPS using
a self-signed certificate the f-droid client should prompt the user to
trust or 'memorize' the certificate presented by a repository. The
MemorizingTrustManager[0] project enables easy integration of
a prompting activity and corresponding trust manager implementation.
This behaviour is useful to projects such as Kerplapp[1] that boostrap
an F-droid repository on a user's device where it isn't possible to
acquire a long lived CA vetted TLS certificate.

In addition to Trust-on-First-Use (TOFU) behaviour, this patch
integrates the PinningTrustManager [2] project by Moxie Marlinspike to
allow the FDroid client to ship a hardcoded set of Subject Public Key
Identifier pins [3] for the official FDroid repository TLS certificate,
and the Guardian Project TLS certificate. Additional pins can be added
to the FDroidPins.java class.

The upstream release of AndroidPinning by moxie0 uses a minsdk value of
8. The Fdroid client has a minsdk of 5, presenting compatibility issues
using the AndroidPinning lib as a submodule. Fortunately it seems there
is no technical reason preventing using a minSDK of 5 with
AndroidPinning. I have created a fork with this change and submitted
a pull req upstream. Until this pull is merged we can use my fork of
AndroidPinning as the submodule.

The new 'flow' for deciding if a repositories presented TLS certificate
should be trusted is as follows:

1) If the certificate was previously trusted by a TOFU action, then the
   certificate is accepted as trusted

2) If the certificate wasn't previously trusted by a TOFU action but
   there is a matching SPKI pin then the certificate is accepted as
   trusted

3) If the certificate wasn't previously trusted by a TOFU action and
   there is no SPKI pin but the certificate is signed by a trusted
   Certificate Authority it is accepted as trusted (This is the
   behaviour of the FDroid client prior to this patch with all other
   conditions being a hard-fail).

4) If the certificate wasn't previously trusted by a TOFU action and
   there is no SPKI pin and the certificate is not signed by a trusted
   CA (i.e. self signed or otherwise) then the user is prompted to TOFU
   the certificate. The user may choose to trust the certificate for the
   current connection or forever. If the user chooses an option other
   than "deny" the certificate is accepted as trusted for the specified
   duration.

Users currently using a TLS protected repository will see *no
difference* in user experience after this patch is merged as the only
TLS protected repositories that would function prior to this patch were
providing certificates that match condition #3.

[0] https://github.com/ge0rg/MemorizingTrustManager/wiki/Integration
[1] https://github.com/guardianproject/kerplapp
[2] https://github.com/moxie0/AndroidPinning
[3] https://www.imperialviolet.org/2011/05/04/pinning.html
2014-01-08 11:01:12 -08:00
Daniel Martí
5f22877e1c Merge branch 'master' into development 2014-01-08 15:06:29 +01:00
Daniel Martí
5b4c40fe07 Log the icons dir for the device density 2014-01-08 15:05:36 +01:00
Daniel Martí
7279dfacac ViewHolder classes are now private 2014-01-08 14:59:07 +01:00
Daniel Martí
ff9620caf5 Add build.properties with the same encoding as gradle 2014-01-08 14:18:04 +01:00
Daniel Martí
dc5dd51462 Specify UTF-8 in build.gradle 2014-01-08 14:14:43 +01:00
Daniel Martí
499c9e50c5 Move "https://" addrepo default into a string 2014-01-08 13:36:45 +01:00
Daniel Martí
3f19888b11 res/drawable/btn_check_*.png are no longer used 2014-01-08 13:32:51 +01:00