312 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
3a1b814603 fix RO translation's formats, based on lint warning
Inconsistent formatting types for argument #1 in format string
searchres_napps ('%s'): Found both 'd' and 's' (in values/strings.xml)

This lint check ensures the following: (1) If there are multiple
translations of the format string, then all translations use the same type
for the same numbered arguments (2) The usage of the format string in Java
consistent with the format string, meaning that the parameter types passed
to String.format matches those in the format string.

<string name="searchres_napps">Sa gasit o aplicatie potrivita cu %s\'</string>
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-02-14 23:17:48 -05:00
Hans-Christoph Steiner
c0cd0d33bf send the FDroid.apk via bluetooth on devices that support it
This is another easy method to send FDroid to a device that doesn't have it
yet.  Unfortunately, stock Android blocks the receiving of APKs, but many
ROMs and even some Samsung devices do not have this block.

You can find the lengthy backstory on this work here:
https://dev.guardianproject.info/issues/2084
2014-02-14 22:45:48 -05:00
Hans-Christoph Steiner
ea7f82ed1a add menu item to enable NFC to RepoDetails view
It is now possible to beam a repo config via NFC but just selecting the
repo in FDroid, then touching two NFC devices together, and clicking on the
FDroid one.  There is no indication that NFC is off, so this commit adds a
menu item that makes it easy to enable the required NFC settings for
sending a repo to another device via NFC.
2014-02-12 21:19:19 -05:00
Hans-Christoph Steiner
fc511fd94f use https for fdroid.org everywhere, avoid redirects 2014-02-12 21:19:19 -05:00
Daniel Martí
a3b316c4a8 Fix a couple regressions 2014-02-12 20:46:32 +01:00
Daniel Martí
4c58514152 Apply similar layout improvement to app list elements 2014-02-12 20:23:19 +01:00
Daniel Martí
f35528cd78 Fix remaining issues related to vertical length and centering 2014-02-12 20:15:43 +01:00
Daniel Martí
9bd236d66c Some much needed fixes to appdetails headers
* If the info is taller than the icon, grow larger to fit it in
* Center icon vertically
* Move padding out of the header
* Revert some font sizes to how they were some time ago, a bit smaller
2014-02-12 19:30:26 +01:00
Daniel Martí
9b2e5c2426 Don't let AppDetails header textviews overflow 2014-02-12 19:10:47 +01:00
Daniel Martí
34cdacc303 Run remove-unused-trans again 2014-02-10 09:23:40 +01:00
Daniel Martí
f525af993f Run optipng -o4 on all png files 2014-02-09 16:40:38 +01:00
Daniel Martí
9b6bb724d6 Run remove-unused-trans 2014-02-09 16:37:39 +01:00
Peter Serwylo
da8e41249b Removed DB, implemented AppProvider.
Yay!

As expected, a lot of the stuff in DB class is due to UpdateService
requiring it to process the downloaded indexes and insert data into
the database. Thus, this change is about removing that stuff from
the DB class and migrating to ContentProviders.

This required a bit of a change to the way that UpdateService decides
what to do with the data from indexes, but I hope it will make
understanding and changing UpdateService easier in the long term.
For example, it used to read the app details from database, then
if a repo wasn't updated (due to unchanged index) then it would take
the app details for that repo from the list of apps, and re-update
the database (or something like that).

Now, it has been refactored into the following methods:
 * updateOrInsertApps(appsToUpdate);
 * updateOrInsertApks(apksToUpdate);
 * removeApksFromRepos(disabledRepos);
 * removeApksNoLongerInRepo(appsToUpdate, updatedRepos);
 * removeAppsWithoutApks();
 * and probably some others...
Which hopefully are self-explanitory.

The recent change to implement single repo updates was re-implemented
with in light of the methods above. The interface to UpdateService for
scheduling a single repo update is the same as it was before, but
the implementation is completely different. Still works though.

Using batch content provider operations for repo updates,
but they suffer from the problem of not all being under the same
transaction, so if an insert/update stuffs up half way through, we
are left with only half of the update being complete. In the future,
if there is some way to implement notifications from the content provider's
applyBatch method, then we can do it all in the one transaction, and
still have notifications. Currently we break it into several calls
to applyBatch (and hence several transactions) to inform the user
of the progress.

Also adding the beginnings of some tests for AppProvider. In the future, I'll
work on adding better coverage, including instrumentation to test UI features.

==========================
Below is a list of many of the minor changes that also happened along the way
==========================

Make "Can update" tab stay up to date using content observer, rather
than manually deciding when to refresh the tab label as before.

The installed app list is now cached in Utils, because it is invoked
quite a few times, especially when rendering the app lists. The cache is
invalidated when PackageReceiver is notified of new apps.

The content providers don't notify changes if we are in batch mode.
I've left the notification at the end of the batch updates as the
responsibility of the UpdateService. However, it would be nice if this
was somehow handled by the content, as they are really the ones who
should worry about it.

Made curVersion, curVercode and curApk work with providers.
This was done by removing curApk (otherwise we'd need to query the db each
time we fetched one app to get a reference to that apk (resulting in hundreds
of queries). Instead, UpdateService now calculates curVercode and curVersion
and saves them to the database. We then use these where possible. If we really
need curApk (because we want info other than its version and code) we still have
the option of ApkProvider.Helper.find(app.id, app.curVercode). I considered
putting this inside the app value object, e.g. in getCurApk() but thought
better of it as it will likely result in people invoking it all the time,
without realising it causes a DB query.

incompatibleReasons required a minor UI tweak, removing the "min sdk"
ui element from the Apk list. It is replaced by the "Requires: %s" view
(which only appears when the app is incompatible). In the process, and in
response to some feedback from mvdan, I left the min sdk in there, but
only made it show when in "expert mode", just like the architecture.

In order to make the "installed apps" query work under test conditions,
needed to change the way the InstalledApkCache be replaceable with a
mock object.

Pause UIL loading on fast scroll of list, as the list was very choppy for
some reason.

Re-added "Last repo scan" info to the Manage Repo list view.

Fixed up some misc TODO's, removed some unused/empty functions.
2014-02-08 11:29:59 +11:00
Daniel Martí
2a8c570a00 Release 0.59-test 2014-01-29 23:45:42 +01:00
Daniel Martí
102ff2d0be Run remove-unused-trans 2014-01-29 23:44:04 +01:00
Daniel Martí
b8998d711a Run fix-ellipsis.sh 2014-01-29 23:33:39 +01:00
Hans-Christoph Steiner
04b5db1f4c update display of signing key fingerprint
Update Utils.formatFingerprint() to create a more readible version of the
SHA-256 fingerprint of the signing key of the repo.
2014-01-28 20:31:47 -05:00
Hans-Christoph Steiner
7b7da9a110 when receiving a repo URI with wifi info, warn user if on different wifi
A repo URI can include info such as the current wifi SSID and BSSID that
the repo is hosted on.  This is for when local repos are transmitted via
QRCode, NFC, etc.  The receiver of this URI then checks to make sure it is
on the same wifi access point, and warns the user if not.

In the future, it should do more than just warn the user, but instead give
concrete actions for the user to take, like associating to that wifi.
2014-01-28 20:31:46 -05:00
Hans-Christoph Steiner
126d96e4ba prevent soft keyboard from popping up on RepoDetails
Its quite annoying to have the URI EditText in focus and the soft keyboard
pop up when viewing the RepoDetails since the vast majority of the time,
the user will be viewing the info there, not editing the URL.

This commit just moves the focus to the frame, and prevents the soft
keyboard from showing up by default.  The user can still click on the URI
EditText to edit it and the soft keyboard will pop up.
2014-01-28 20:31:46 -05:00
Hans-Christoph Steiner
bcb7c048b5 protect ManageRepo from malformed incoming URIs
URIs can come from clicking a web page, NFC transmission, QR Code scan, and
more.  This code stops badly formed Uri strings from crashing F-Droid.  It
then shows a Toast error message that it can't understand the incoming URI.
2014-01-22 22:12:52 -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
F-Droid Translatebot
7e87f8b81f Translation updates 2014-01-21 11:23:43 +00: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í
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í
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 2014-01-10 21:29:25 +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
Daniel Martí
ac739de345 Run fix-ellipsis for the first time 2014-01-08 13:09:53 +01:00
Daniel Martí
61ba6d52d0 Change # for Number in @string/repo_num_apps 2014-01-08 10:38:19 +01:00
Daniel Martí
b4a51c4a91 Merge branch 'master' into development 2014-01-08 09:50:04 +01:00
Daniel Martí
4edd90d7aa Remove translations of removed strings 2014-01-08 09:49:29 +01:00
Daniel Martí
abc3631b16 Merge branch 'master' into development 2014-01-07 23:57:25 +01:00
Daniel Martí
837683217b Release 0.57-test 2014-01-07 23:49:23 +01:00
Daniel Martí
db01c9c476 Merge branch 'master' into development 2014-01-07 23:36:38 +01:00
Ciaran Gultnieks
a2fb86f518 Remove bogus translations 2014-01-07 16:28:10 +00:00
F-Droid Translatebot
34211bb1b7 Translation updates 2014-01-07 16:13:48 +00:00
Peter Serwylo
3731ed8f23 Merge remote-tracking branch 'upstream/master' into improvement/16/manage-repos
Conflicts:
	res/values/strings.xml
	src/org/fdroid/fdroid/DB.java
	src/org/fdroid/fdroid/ManageRepo.java
	src/org/fdroid/fdroid/RepoXMLHandler.java
	src/org/fdroid/fdroid/Utils.java
2014-01-04 20:45:52 +11:00
Peter Serwylo
ffa2c962dc Merge branch 'master' into improvement/16/manage-repos
Conflicts:
	res/layout/appdetails.xml
	res/values/strings.xml
	src/org/fdroid/fdroid/DB.java
	src/org/fdroid/fdroid/FDroid.java
	src/org/fdroid/fdroid/ManageRepo.java
2014-01-04 20:19:27 +11:00
Daniel Martí
aff6a03fa2 Specify that the version is for Android 2014-01-03 17:55:23 +01:00
Daniel Martí
8a90687867 Slightly larger margin separating minsdk 2014-01-03 04:47:42 +01:00
Daniel Martí
aee57c448b Sightly more margins in app list views 2014-01-03 02:52:12 +01:00
Daniel Martí
50f68d34b9 Support minSdk info in version list views 2014-01-03 02:44:24 +01:00
Daniel Martí
ab6f41ec68 More layout tweaks, fix landscape 2014-01-03 02:17:32 +01:00
Daniel Martí
cd00760cc4 Remove compact icons, replace installed with a symbol 2014-01-01 21:45:20 +01:00
Daniel Martí
753bc43452 Use AppDetails title as indicator where we come from 2014-01-01 21:34:41 +01:00
Daniel Martí
771947536e Add categories to AppDetails, layout tweaks 2014-01-01 21:08:41 +01:00
Daniel Martí
e302baa340 Do paddings for the icon and not the whole applist item 2014-01-01 17:09:01 +01:00
Daniel Martí
b31d8cb55b Temporarily remove en-rGB, mainly since it breaks the whole app 2014-01-01 14:46:33 +01:00