664 Commits

Author SHA1 Message Date
Ciaran Gultnieks
7dc56e6009 Add database field to enforce max age on index (per repo) 2013-11-26 16:29:42 +00:00
Hans-Christoph Steiner
95f932f79f update database to store repo key fingerprint
The stored fingerprint is needed for comparing new, incoming repos that are
in the Add Repo dialog.  This is to prevent malicious use of the automated
adding of repos via QR Codes, NFC, etc.  The only other option that I could
think of for handling this situation is for the Add Repo dialog to open a
socket to the proposed repo to get its pubkey.  That seems much less
desirable than just storing the fingerprints in the database.
2013-11-23 13:42:22 -05:00
Hans-Christoph Steiner
ee21a2724c generate fingerprint as a hex String, leave formatting for display code
When the fingerprint is generated to be stored in the database in the repo
table, make it a single String that is a hex number.  This is a natural
format for working with the fingerprints programmatically.  The display
formatting can then be handled by the display code, and can freely change
without affecting the underlying function of the code.
2013-11-23 13:42:22 -05:00
Hans-Christoph Steiner
9b485bece3 switch repo key fingerprint to SHA-256 since SHA-1 is considered deprecated
* a number of sources have said to avoid SHA-1 in new implementations
* nothing currently depends on the SHA-1 fingerprint in the code, it is
  only used to display on the repo list.
* Java 7 requires SHA-256 to be included
* keytool -list -v shows the SHA-256 fingerprint
2013-11-23 13:42:22 -05:00
Hans-Christoph Steiner
fd28883429 break out signing key fingerprint calculation into its own method
This will be needed for checking an incoming repo URL with a fingerprint
included to see if that uri/fingerprint already exists in the database.
2013-11-23 13:42:22 -05:00
Hans-Christoph Steiner
240f03d372 add "proper" Java decorators that Android ADT insists on adding
Everytime I save a java file with Android ADT, it adds @Override decorators
and throws errors if a method is called that is not supported in API 4. My
setup might be more sensitive since its setup with the official Android
style plugin for Eclipse.  But the decorators are "correct" Java style, so
it would be nice to have them in F-Droid.
2013-11-23 13:39:26 -05:00
Hans-Christoph Steiner
36da418660 add CheckBox to enable overwriting of existing repos when adding new ones
The "Add" button is disabled until the user turns overwrite on.  It should
prevent accidental overwriting, but I imagine this could be handled better.
2013-11-20 00:06:12 -05:00
Hans-Christoph Steiner
14c525e7ff add fingerprint field to Add Repo dialog, and alert if repo already exists
Previously, anything added via the Add New Repository dialog would just
overwrite any existing repo config that was there.  This has become a
bigger issue with the QR Code scanning since it could become an attack
vector.  This is the first step towards making this Add Repo dialog give
more info to the user about the state of things, and what the user might
replace by clicking OK.
2013-11-20 00:06:12 -05:00
Hans-Christoph Steiner
6928bd1244 accept froidrepo and fdroidrepos URIs, which can be scanned via QRCode, etc
This patch makes F-Droid register with Android that it accepts the URI
schemes of fdroidrepo (HTTP) and fdroidrepos(HTTPS).  When F-Droid receives
one of these URIs, it launches the ManageRepo Activity and then launches
the New Repository dialog.

refs #2454
2013-11-19 10:56:38 -05:00
Aleksey Tulinov
d687b7341e Setting 32x32dp for compact layout, bumped summary to name 2013-11-17 22:09:04 +02:00
Aleksey Tulinov
89b15b534f Setting up ImageLoader for multiple loads to the same ImageView 2013-11-17 22:06:15 +02:00
Ciaran Gultnieks
1b8ea8f3d5 Handle unrecognises antifeatures more gracefully
This allows us to add new ones without making a mess in the client.
Prior to this change it would add empty lines, and also if the only
antifeature was an unrecognised one, would enable the antifeature view
box but with nothing in it. It should now ignore them completely.
2013-11-17 11:33:05 +00:00
Aleksey Tulinov
5786d014dc Shifted summary to the right of icon to give icon more space, aligned status with license 2013-11-17 06:42:33 +02:00
Aleksey Tulinov
4f717c663b Issue #413: removed "compacts" array to always re-layout reused views 2013-11-17 06:23:12 +02:00
Daniel Martí
afb5762a71 Save ignore settings in onPause, fixes #409 2013-11-16 23:26:03 +01:00
Paul Sokolovsky
f7b3e0b81c finish(): Check for app non-null before accessing it.
finish() may be called from reset() which sets app to null. This issues
hits for example when clicking on wiki-link of an app which doesn't
currenty exist in client index, throws:

E/AndroidRuntime(17630): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.fdroid.fdroid/org.fdroid.fdroid.AppDetails}: java.lang.NullPointerException
E/AndroidRuntime(17630): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
E/AndroidRuntime(17630): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
E/AndroidRuntime(17630): 	at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime(17630): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
E/AndroidRuntime(17630): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(17630): 	at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime(17630): 	at android.app.ActivityThread.main(ActivityThread.java:3691)
E/AndroidRuntime(17630): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(17630): 	at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(17630): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
E/AndroidRuntime(17630): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
E/AndroidRuntime(17630): 	at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(17630): Caused by: java.lang.NullPointerException
E/AndroidRuntime(17630): 	at org.fdroid.fdroid.AppDetails.finish(AppDetails.java:1012)
E/AndroidRuntime(17630): 	at org.fdroid.fdroid.AppDetails.reset(AppDetails.java:353)
E/AndroidRuntime(17630): 	at org.fdroid.fdroid.AppDetails.onCreate(AppDetails.java:243)
E/AndroidRuntime(17630): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(17630): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
2013-11-16 19:32:30 +02:00
Daniel Martí
7d5179b38a Fix remaining crashes when switching categories 2013-11-10 20:14:29 +01:00
Daniel Martí
9b5c2656ee Fix crashes when trying to view categories (fixes: #408) 2013-11-10 18:55:35 +01:00
Daniel Martí
080bab482d Fix possible crashes when entering AppDetails 2013-11-10 18:55:35 +01:00
Daniel Martí
dc18bab86f Show categories on older devices properly (fixes #406) 2013-11-10 18:55:35 +01:00
Daniel Martí
a6507bcc8c Small fixes 2013-11-04 12:30:30 +01:00
Daniel Martí
8db488bbae Use new <categories> xml element, sort categories 2013-11-03 19:28:40 +01:00
Daniel Martí
a76a465cf1 Re-add theming, much better this time 2013-11-03 16:12:22 +01:00
Daniel Martí
ed49eced45 Change setting "Incompatible apps" to "Incompatible versions"
Rather large rewrite, basically doing:
* Always show incompatible apps
* Don't fetch incompatible apks if the new setting is off
* Start using result codes when returning from PreferencesActivity
2013-11-02 18:27:02 +01:00
Daniel Martí
533c16af0a Some changes to app list adapters
* Only change compact layout stuff when really needed
* No need to use StringBuilders in some cases
* No need to keep setting status and license to "" when in compact
2013-11-02 12:32:54 +01:00
Daniel Martí
154b0bda45 Don't repopulate app lists if no repos were changed on update (much faster) 2013-11-02 12:29:12 +01:00
Daniel Martí
651f40ea25 Use launcher icon as notification icon on pre-3.0 devices 2013-11-02 10:57:49 +01:00
Daniel Martí
85b633750e Fix categories on pre-3.0 devices 2013-11-02 10:57:16 +01:00
Daniel Martí
327de12f1a Support multiple categories as CommaSeparatedList 2013-11-02 00:57:38 +01:00
Daniel Martí
be5dbbfc55 Easier and faster isInCategory 2013-11-02 00:55:52 +01:00
Daniel Martí
c7ace4ff8e New loading/default app icon (kudos to mray) 2013-11-01 19:53:18 +01:00
Kevin Everets
b3f0034140 Change wording in App Details from "Update" to "Upgrade"
An "Update" in that context implies that the details will update, not
that the app itself will be upgraded.
2013-10-25 15:27:32 -04:00
Daniel Martí
17b33108c5 2 threads for 2.2 and lower instead of 1 2013-10-25 19:57:04 +02:00
Daniel Martí
f7531fcdb5 Place an empty drawable before icons are loaded; faster animations 2013-10-25 18:53:19 +02:00
Daniel Martí
1346d370cb More changes to make icons smooth on older devices
* Never do any kind of scaling (was only done in low resolution screens)
* Don't animate (fade-in) on older devices
2013-10-25 17:24:00 +02:00
Daniel Martí
e2d5b619be Be nicer on phones with mid-low memory size 2013-10-24 20:56:17 +02:00
Daniel Martí
2483e5289e Ignore leading "pname:" on market search links 2013-10-24 17:44:09 +02:00
Daniel Martí
6facb9ae98 Search by app id as well 2013-10-24 17:38:30 +02:00
Daniel Martí
d6f0fbca98 New setting: Automatic app list updates only on wifi (fixes: #380) 2013-10-24 14:21:35 +02:00
Daniel Martí
f16234e084 Also keep ignoreThisUpdate integer between repo updates 2013-10-23 18:27:13 +02:00
Daniel Martí
1cc01b6c73 Fix crashes when changing ignore updates checkboxes 2013-10-23 18:14:54 +02:00
Daniel Martí
86af7638e8 Re-add filtering by Root 2013-10-23 17:53:36 +02:00
Daniel Martí
991b91dfdc Remove filter by root, replaced by ACCESS_SUPERUSER permission 2013-10-23 01:13:39 +02:00
Daniel Martí
804496b50b Set label for ACCESS_SUPERUSER if the system doesn't have it yet 2013-10-23 00:52:54 +02:00
Daniel Martí
4fb720e271 Capitalize permission labels 2013-10-23 00:52:46 +02:00
Daniel Martí
19712433bc Always show apps with AFs; Always display AF list in bold red at top of AppDetails 2013-10-23 00:52:25 +02:00
Daniel Martí
fd8f7c6e74 Remove duplicate drawable 2013-10-22 15:34:25 +02:00
Daniel Martí
8669460088 Switch to proper updates notification iconography
Following http://developer.android.com/design/style/iconography.html

Original design and graphics by mray
2013-10-22 14:56:15 +02:00
Daniel Martí
2528df2f10 Set ImageLoader workers to 2 * number of processors 2013-10-15 21:14:36 +02:00
Daniel Martí
2707f49c43 Don't fetch our own PackageInfo (slight speed-up) 2013-10-15 16:04:05 +02:00