678 Commits

Author SHA1 Message Date
relan
3434d71569 Split "unsigned" and "unverified"
Since now we don't have problems with list item height, we can use two
different text labels for unsigned and unverified repositories
indication. Code now only switches visibility for them.
2015-09-27 11:41:59 +03:00
relan
5f06910cf9 Remove last update header
This is technical detail that should not be exposed to users, at least
not before repositories list which are the main data in the activity.
Last update label didn't work properly anyway: it was not updated on
repositories refresh, just on activity creation.
2015-09-27 11:41:41 +03:00
relan
8b15fb4cb1 Define repo_item layout in XML instead of run time 2015-09-27 09:56:13 +03:00
relan
d3f7e9555e Fix repo_item layout parameters resolution
See http://www.doubleencore.com/2013/05/layout-inflation-as-intended
2015-09-27 09:56:13 +03:00
Daniel Martí
c0f69e2daa Optimize imports 2015-09-24 16:17:41 -07:00
Daniel Martí
f2ac130517 Install privileged: don't do sound/vibration
Only enable the light if it's a default. The vibration was causing issues
since we don't have the vibrate permission, and the sound is unnecessary.

Fixes #346.
2015-09-24 15:17:26 -07:00
Daniel Martí
5dd9842bdc UpdateService: contentIntent not necessary in 4.0
The workardound is necessary in <4.0, not <4.1. The "contentintent == null"
check is gone in the 4.0.1 source tree.
2015-09-23 22:35:21 -07:00
Toby Kurien
2642c14cb7 Better handle download errors from DownloadManager
Rebased and squashed from !141.
2015-09-23 22:26:49 -07:00
Daniel Martí
6eddfb8b97 Avoid NPE in normalizeUrl
Found it when trying to add a repo manually:

E/AndroidRuntime(30549): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.replaceAll(java.lang.String, java.lang.String)' on a null object reference
E/AndroidRuntime(30549):        at org.fdroid.fdroid.views.ManageReposActivity$AddRepo.normalizeUrl(ManageReposActivity.java:547)
E/AndroidRuntime(30549):        at org.fdroid.fdroid.views.ManageReposActivity$AddRepo.validateRepoDetails(ManageReposActivity.java:358)
E/AndroidRuntime(30549):        at org.fdroid.fdroid.views.ManageReposActivity$AddRepo.access$700(ManageReposActivity.java:218)
E/AndroidRuntime(30549):        at org.fdroid.fdroid.views.ManageReposActivity$AddRepo$4.afterTextChanged(ManageReposActivity.java:342)
E/AndroidRuntime(30549):        at android.widget.TextView.sendAfterTextChanged(TextView.java:7698)
2015-09-23 22:17:23 -07:00
Daniel Martí
735ac0eb3d Remove Dogecoin donation support
Analogous to the server commit that removes it on its side. If an index
includes it, we will fail silently since unrecognised tags are ignored.

SQLite doesn't allow deleting columns, so don't do a DB version bump to try to
remove it. It will be gone on new installs, and it doesn't keep current
installs from working. Tested both cases.
2015-09-18 19:14:09 -07:00
Daniel Martí
f65dcdd66f AppDetails: Simplify link list logic 2015-09-18 18:50:57 -07:00
Daniel Martí
4eea995c89 Trim newlines from the description in a safer way
This avoids problems in a few corner cases:

* The description is empty (it would probably throw an exception)
* The description doens't end in newlines (as seen in #422)

For the general case that was already working, the result is the same.
2015-09-18 18:36:39 -07:00
Daniel Martí
a1fb4636d2 Simplify view_all_description logic
* Use a positive if condition
* Invert bool in one place
2015-09-18 18:35:27 -07:00
Hans-Christoph Steiner
c8b64281c2 sync up logcat tags with the class names 2015-09-16 13:00:32 +02:00
Hans-Christoph Steiner
d37b473e10 temporary workaround to NPE crash on first install
The solution is really to get rid of the Fragment and do everything in the
Activity, especially since this nullguard will probably leave things in a
not good state.  But that's better than a crash, I think.

W  java.lang.NullPointerException
W      at org.fdroid.fdroid.views.fragments.AvailableAppsFragment$CategoryObserver.onChange(AvailableAppsFragment.java:88)
W      at org.fdroid.fdroid.views.fragments.AvailableAppsFragment$CategoryObserver.onChange(AvailableAppsFragment.java:103)
W      at android.database.ContentObserver.dispatchChange(ContentObserver.java:163)
W      at android.database.ContentObserver$Transport.onChange(ContentObserver.java:195)
W      at android.database.IContentObserver$Stub.onTransact(IContentObserver.java:60)
W      at android.os.Binder.execTransact(Binder.java:404)
W      at dalvik.system.NativeStart.run(Native Method)
2015-09-16 13:00:32 +02:00
Hans-Christoph Steiner
69b210a4b8 fix swap to follow repo.fingerprint logic: null means unset
The repo.fingerprint logic is based on null meaning that the fingerprint
has not been set.  This ensures that a "" does not sneak in somehow as a
valid fingerprint.
2015-09-16 13:00:32 +02:00
Hans-Christoph Steiner
03d074a0e8 always use Locale.ENGLISH for formatting Strings for the machine
For Strings that are meant to be displayed to humans, using the default
Locale makes sense.  But this String is meant to be parsed by code, so it
should force the Locale to make sure the digits are always rendered in the
same format.
2015-09-16 12:48:33 +02:00
Hans-Christoph Steiner
003f5331fa revert to previous, proven index.xml writing
It was added in c831cf77ccf9ecfa792d0ffdc84f272053fa945a and changed in
42d31eb0e6e5d5c9e7fe9c35435a56258ad90578
2015-09-16 12:48:33 +02:00
Daniel Martí
cdfe1566fa Give more context on some strings, split installed
As per !140, some languages require different translations for an app being
installed and the tab name for installed apps. Namely, one is plural while the
other isn't. Separate the two.
2015-09-14 15:00:14 -07:00
Nico Alt
ab2c1d49b6 Prompt for unstable updates globally 2015-09-14 18:58:52 +02:00
Daniel Martí
42ab9a757c Utils: remove unused code 2015-09-13 11:33:07 -07:00
Daniel Martí
dd8a3440d6 Rework about dialog
* Don't have website link twice
* Add source code link
* Don't have trailing spaces in strings
2015-09-12 23:26:14 -07:00
Daniel Martí
6c81216bc2 Add Utils.getVersionName(Context) 2015-09-12 22:38:52 -07:00
Daniel Martí
f8bb714d25 Fix string resource name typo 2015-09-12 21:35:07 -07:00
Daniel Martí
852d88de84 Toast strings are full sentences. #415 2015-09-12 18:38:20 -07:00
Peter Serwylo
198cc7357c Update UI in response to WiFi enabling, not Bonjour discovery enabling.
The Bonjour stuff takes a while to start, and isn't strictly neccesary
in order to swap over WiFi. Rather, it is more of a convenience. Also,
it was causing the UI to appear to lag quite a lot. This way, the WiFi
swap gets setup almost instantly, and is available to swap - therefore
the UI seems much more responsive.
2015-09-13 08:26:33 +10:00
Peter Serwylo
90ede44790 Check for null netmask variable to prevent NPE.
Not sure if this is the correct course of action to prevent the problem,
but it prevents the crash documented in Issue #413.
2015-09-13 08:26:33 +10:00
Peter Serwylo
828cc272ee Only start Bluetooth in UI thread, WiFi needs background.
While we're at it, use `Thread`s rather than `AsyncTask`s because
they are more concise. Not 100% sure, but I think `AsyncTask`s
need to wait for the UI event loop to get to them in order kick off.
2015-09-13 08:26:33 +10:00
Peter Serwylo
4bb2a0e0d0 Added massive amounts of logging to pin down problem.
Trying to pin down why the UI takes one or two seconds to catch up
after performing the "Enable WiFi" toggle. This is best done via
logging rather than using the debugger.

Also changed to Utils.DebugLog instead of Log.d, and removed some
comments and fixed a typo in one comment.
2015-09-13 08:26:28 +10:00
Daniel Martí
de44771755 Exception logging improvements
* On error logs, always print the stack trace
* Log full stack traces instead of just exception names or messages
* Never use printStackTrace
2015-09-11 17:43:59 -07:00
Daniel Martí
c0a13ad65f Some Java 1.7 string switch goodness 2015-09-11 17:30:58 -07:00
Daniel Martí
a2c8c4678e Remove duplicate debug log
D/AvailableAppsFragment(18359): Selected category: Reading
D/AvailableAppsFragment(18359): Category 'Reading' selected.
D/AvailableAppsFragment(18359): Selected category: What's New
D/AvailableAppsFragment(18359): Category 'What's New' selected.
2015-09-11 17:17:37 -07:00
Daniel Martí
be87a31b84 Apply some PMD fixes 2015-09-11 17:00:24 -07:00
Daniel Martí
90822e9258 Utils: don't capitalize method names 2015-09-11 16:43:03 -07:00
Daniel Martí
132eeda4a0 Fix small variable mistake in RepoDetailsActivity
qrUriString was supposed to be used. Moreover, it does look like execute()
must be called with an upper case string. Caught since qrUriString is an
unused variable.
2015-09-11 15:48:55 -07:00
Daniel Martí
b4e23c2cbc Make most fields in AsyncDownloader final 2015-09-11 15:48:21 -07:00
Daniel Martí
0c9c93e493 Fix some javadoc warnings 2015-09-11 15:47:38 -07:00
Daniel Martí
9cbefca4bb Code cleanup via AS 2015-09-11 15:34:05 -07:00
Daniel Martí
0f8c310c8d Optimize imports via AS 2015-09-11 15:32:22 -07:00
Daniel Martí
110a004d59 AppDetalis: Avoid division by zero crash 2015-09-11 15:26:56 -07:00
Toby Kurien
6d6d9bc7cd Follow download progress in AppDetails
Added a new thread to update the AppDetails screen with the progress of the
download once per second.
2015-09-11 15:14:22 -07:00
Daniel Martí
860bc8ae97 Apply some checkstyle fixes 2015-09-11 14:45:19 -07:00
Daniel Martí
1dfe3d962f Hasher cleanup and simplification 2015-09-11 13:07:53 -07:00
Daniel Martí
27f212f3ec Use Writer, always close FileWriter exactly once 2015-09-11 13:07:53 -07:00
Daniel Martí
d415ceae15 Block formatting fixes 2015-09-10 19:04:18 -07:00
Daniel Martí
cba2e67a70 Cleanup after bluetooth-swap merge 2015-09-10 19:00:09 -07:00
Daniel Martí
42d31eb0e6 Fix build after bluetooth-swap merge 2015-09-10 18:56:47 -07:00
Daniel Martí
2159b3d49b Merge branch 'bluetooth-swap' of https://gitlab.com/n8fr8/fdroidclient 2015-09-10 18:52:52 -07:00
Daniel Martí
cc8b9bb41d Fix formatting error in WifiStateChangeService
It's %d, not %i.
2015-09-10 18:29:48 -07:00
n8fr8
6dec9fb928 remove unnecessary whitespace 2015-09-10 21:26:28 -04:00