4294 Commits

Author SHA1 Message Date
Chirayu Desai
5e59138082 Remove unused permission org.fdroid.fdroid.privileged.USE_SERVICE
* This was removed by [1] and a whitelist is being used instead
  of this signature protected permission
* Closes #861

[1]: 80452dec24
2017-02-23 22:46:20 +05:30
Peter Serwylo
75eb72c50b Show material-design-ripple in background when touching list item.
Also ensure it shows this animation correctly when expanding "Versions".
This is done by changing from `notifyDataSetChanged()` to the more
specific `notifyItemRange(Inserted|Removed)`, which ensures the
"Versions" item doesn't get rebuilt midway through an animation.
2017-02-22 10:31:40 +11:00
Peter Serwylo
2101ec4bbc Remove Privileged Installer preference when appropriate.
Fixes #817.

As discussed in #817, this preference is not useful on Android >= 5.0.
As such, the preference should just be removed. However, it should stay
if the privileged installer is already installed (e.g. via update.zip or
included as part of the ROM).
2017-02-22 08:41:41 +11:00
F-Droid Translatebot
109c795dd1 Pull translation updates from Weblate
Translators:

Ahmad Zafrullah  Indonesian
Allan Nordhøy    Norwegian Bokmål
Balázs Úr        Hungarian
Hasan İlingi     Kurdish
Jonatan Nyberg   Swedish
Juraj Harasta    Czech
Michalis         Greek
Michalis         Spanish
Nick Bishop      Greek
Verdulo          Esperanto
yiannakis        Greek
2017-02-20 16:00:03 +11:00
Peter Serwylo
81aacac592 Make 3rd party AppCompatListPreference adhere to our checkstyle rules.
Added braces around one line if statements.
2017-02-20 08:47:59 +11:00
Peter Serwylo
79ecffc91c Use AppCompatListPreference from QuickLyric to fix dialog themes.
Fixes Issue #750.

This new class makes sure to use the correct `AlertDialog.Builder` from
the support lib. This in turn ensures the correct styles get applied to
the result alert dialog.
2017-02-20 08:42:25 +11:00
Peter Serwylo
2c1a059da9 Use AppCompatActivity instead of deprecated ActionBarActivity
Doesn't change anything, just removes a deprecation warning.
AppCompatActivity currently extends ActionBarActivity and doesn't
provide any further imnplementation.
2017-02-20 08:41:52 +11:00
F-Droid Translatebot
2db46e0794 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz      Catalan
Ajeje Brazorf              Sardinian
Alaa Issa                  Arabic
Alberto Moshpirit          Spanish
Alexander Georgievskiy     Russian
András Lengyel-Nagy        Hungarian
André Marcelo Alvarenga    Portuguese (Brazil)
Anteri                     Finnish
Athmane MOKRAOUI           Arabic
Claus Rüdinger             German
Cyxae Dexyc                French
dark159123                 Danish
Dmitriy Bogdanov           Russian
Enol P                     Asturian
ezjerry liao               Chinese (Traditional)
Gregor Santner             German
Hsiu-Ming Chang            Chinese (Traditional)
Jean-Baptiste              French
John Doe                   Turkish
Jonatan Nyberg             Swedish
Kheireddine Mkh            Arabic
Lari Oesch                 Finnish
Luca Bianchi               Italian
Marcelo Santana            Portuguese (Brazil)
Marian Hanzel              Slovak
Michael                    German
Mladen Pejaković           Serbian
msrn                       Finnish
naofum                     Japanese
Olexandr Nesterenko        Ukrainian
Osoitz                     Basque
Raphaël Barman             French
Sveinn í Felli             Icelandic
Sylvia van Os              Dutch
Tobias Bannert             German
Verdulo                    Esperanto
Verdulo                    Polish
Yaron Shahrabani           Hebrew
zmni                       Indonesian
2017-01-04 12:01:10 +00:00
Daniel Martí
56ccc09f90 Merge branch 'ci-update' into 'master'
Update CI image and build-tools to 25.0.2

See merge request !427
2016-12-23 16:35:16 +00:00
Daniel Martí
3d20a07c8a Update CI image and build-tools to 25.0.2
The new CI image also contains the support repo r41, with the support
libs version 25.1.0.
2016-12-23 12:55:28 +01:00
Peter Serwylo
6a6cede4de More specific paddings round the "collapsable lists" at the bottom of app details.
Also tried a more specific naming scheme for dimens to make it clearer where
they are to be used. This increased the padding on the left/right of the collapsable
lists. It also decreased the padding above/below.
2016-12-21 23:05:15 +11:00
Peter Serwylo
d54c138a1d Work on the "Donate" styles.
Still needs some better assets for the actual donate buttons, but now it includes
the relevant text about donating to developers. It also puts the donation options
in a grid layout and lets them flow across so that if there is more than three, they
will end up on the second line.
2016-12-21 23:05:08 +11:00
Daniel Martí
7997024a18 Adjust 0.102 release date in changelog
Forgot to do this when tagging.
2016-12-13 18:39:41 +00:00
Peter Serwylo
f9f0a0f91c Merge branch 'app_details_749' into 'master'
App details 749

The new App Details screen (issue #749), now accessible by long-clicking on an app in the application list.

See merge request !419
2016-12-08 01:19:49 +00:00
Daniel Martí
2b088bc438 README: clarify AM/PM meeting time via 24h format 2016-12-07 22:31:27 +00:00
mvp76
2c0a5fcb21 Checkstyle fixes 2016-12-07 23:25:34 +01:00
Daniel Martí
42b188a005 Merge branch 'correct-meeting-time' into 'master'
Correct meeting time

With the discussion on IRC [starting here](https://botbot.me/freenode/fdroid-dev/2016-11-14/?msg=76442333&page=1), the time in `README.md` is wrong.

> We are on `#fdroid` and `#fdroid-dev` on Freenode. We hold weekly dev meetings on `#fdroid-dev` on Tuesdays at 20h UTC, which usually last half an hour.

[It should be](https://botbot.me/freenode/fdroid-dev/2016-11-15/?msg=76516527&page=1) be:

> We are on `#fdroid` and `#fdroid-dev` on Freenode. We hold weekly dev meetings on `#fdroid-dev` on Thursdays at 8:30h UTC, which usually last half an hour.

See merge request !424
2016-12-07 21:39:28 +00:00
Nico Alt
2b98f5477b Correct meeting time
With the discussion on IRC [starting here](https://botbot.me/freenode/fdroid-dev/2016-11-14/?msg=76442333&page=1), the time in `README.md` is wrong.

> We are on `#fdroid` and `#fdroid-dev` on Freenode. We hold weekly dev meetings on `#fdroid-dev` on Tuesdays at 20h UTC, which usually last half an hour.

[It should be](https://botbot.me/freenode/fdroid-dev/2016-11-15/?msg=76516527&page=1) be:

> We are on `#fdroid` and `#fdroid-dev` on Freenode. We hold weekly dev meetings on `#fdroid-dev` on Thursdays at 8:30h UTC, which usually last half an hour.
2016-12-07 22:33:19 +01:00
mvp76
56575c3291 Bugfix, don't show "more" if we have MAX_LINES lines. 2016-12-06 09:45:35 +01:00
mvp76
65b16beb61 Make sure right view is selected as anchor on "more"-expansion 2016-12-06 09:44:46 +01:00
mvp76
734741c8f4 New implementation that is commented + easier to understand 2016-12-05 18:31:41 +01:00
Peter Serwylo
ccf763199f Replace if's with switches
Required changing some local variable names to prevent the same
`view` variable being declared multiple times. Otherwise it should
be a verbatim change from if statements to switch statements.
2016-12-05 22:56:27 +11:00
Peter Serwylo
a00534c7c7 Obey checkstyle rule preventing 'm' prefix for member variables
Required a couple of undesirable changes, such as:
 * sCollated -> collated
 * mFDroidApp -> fdroidApp (note the lower case 'd')

Otherwise it was relatively minor given how many member variables there are
in the code base.
2016-12-05 22:56:27 +11:00
Peter Serwylo
4f7116fcfb Add checkstyle rule to catch usage of member variables prefixed with 'm' 2016-12-05 22:56:26 +11:00
Peter Serwylo
22d9f55afb Move business logic from onBindViewHolder logic into respective ViewHolder subclasses. 2016-12-01 12:32:39 +11:00
Peter Serwylo
c50c9f2ea0 Appease pmd
Can be run via `gradle pmd`.

Mostly making fields final where appropriate.
2016-12-01 12:15:36 +11:00
Peter Serwylo
1f83cf1eca Appease checkstyle
Can be run via `gradle checkstyle`.

Mostly:
 * Removing one line if statements in favour of braces.
 * Whitespace between typecast and expression.
2016-12-01 12:15:36 +11:00
Peter Serwylo
539455bd16 Remove unnesseary class prefix 2016-12-01 12:15:36 +11:00
Peter Serwylo
0847bb6008 Inline check for 'isInstalled()'.
The adapter has its own copy of the `App`, and so can ask directly
instead of delegating to the activity.
2016-12-01 12:15:36 +11:00
Peter Serwylo
6e0ea68bab Push notifyDataSetChanged invocation into adapter.
That is probably the place most responsible for knowing if the dataset has changed
and broadcasting that fact.
2016-12-01 12:15:36 +11:00
Peter Serwylo
17c97e577e Format comments 2016-12-01 12:15:36 +11:00
Peter Serwylo
598d604ca5 Ported code for handling 'ignore this/all' from AppDetails
Allows the two menu items "Ignore All Updates" and "Ignore This Update"
to be checked and save the relevant preferences to the database in response.

The old code waited until the activity was paused before saving the
preferences to the database. This code does not, and as such incurs
a database write on the main UI thread as soon as the user checks the
menu items. However that database code has recently been refactored so
it should be much more performant. If it turns out to still be problematic
then we can revert to the old behaviour of hodling onto any state changes until
onPause then persisting to the database.
2016-12-01 12:15:36 +11:00
Peter Serwylo
9f758c4f86 Prefer Javadoc where possible 2016-12-01 12:15:36 +11:00
Peter Serwylo
003b9459da Removed need for upcast by parameterising mIntents over ResolveInfo instead of Object
Allows the type checking to be done by the compiler rather than the developer.
It was possible here because there is only two types of view, and the first type
will only have one or zero entries in the adapter. Thus, I've swapped the usage
of a `String` type for a `null` and checked for null instead of `instanceof String`.
2016-12-01 12:15:36 +11:00
Peter Serwylo
0b09d591ea Clarifying comment 2016-12-01 12:15:36 +11:00
Peter Serwylo
4e664c3d92 ints to Constants for viewtypes 2016-12-01 12:15:36 +11:00
Peter Serwylo
d0a326aa2c Lowercase stray N 2016-12-01 12:15:36 +11:00
Peter Serwylo
d2787d8d09 Add annotation as per the parent class. 2016-12-01 12:15:36 +11:00
Peter Serwylo
65f2c0eac7 Extracted string literals into constants. 2016-12-01 12:15:36 +11:00
Peter Serwylo
88661757f6 Added clarifying comment. 2016-12-01 12:15:36 +11:00
Peter Serwylo
a67ef806d2 Finalised property which is calculated once during construction 2016-12-01 12:15:36 +11:00
Peter Serwylo
ab72797a41 Added test for trailing newline stripping. Renamed method for clarity. Doccomments.
Changed the helpful comments to a Javadoc comment, as tooling such as editors
will be more likely to make use of it like that.

Renamed to emphasise that only trailing new lines are stripped.

Added a basic test for this function to ensure it only strips trailing,
and also that it does actually strip trailing slashes.
2016-12-01 12:15:36 +11:00
Peter Serwylo
ab917b6272 Remove need for setTag and (String) getTag()
Can use the argument passed to addLinkItemView() instead. Requires making
it final so that the anonymous inner class can read it.
2016-12-01 12:15:35 +11:00
Peter Serwylo
2709d00b70 Point to R.id.information, not R.id.text
Although the `textView` in `DonateViewHolder is currently not used, it was
pointing to an id which was not in the layout. This has been fixed in case
future devs choose to use this text view. Alternatively, we could remove it
completely if we don't think it is going to be used in this upcoming UI work.
2016-12-01 12:15:35 +11:00
Peter Serwylo
5f09c80914 Make constants static.
Not any need at this point for them to be object properties.
2016-12-01 12:15:35 +11:00
Peter Serwylo
2e1484bcb2 Correctly check whether mailto: links can be handled
Similar to the litecoin/bitcoin/flattr stuff, we need to check that a
proper URI can be handled via an intent. This previously just checked
whether the email address could be handled without the mailto: prefix.
2016-12-01 12:15:35 +11:00
Peter Serwylo
a0c40bcaae Remove some commented out code 2016-12-01 12:15:35 +11:00
Peter Serwylo
920e6499ab Minor formatting 2016-12-01 12:15:35 +11:00
Peter Serwylo
4a92a37df2 Use TextUtils.isEmpty instead of null and length check 2016-12-01 12:15:35 +11:00
Peter Serwylo
46eb6ee3b4 Added initial test for AppDetailsRecyclerViewAdapter.
Doesn't do anything except create an app with no versions,
no donate links, anything like that, and ensure that the adapter
is able to create the view holders for each resulting item.

In the future we can beef this up to check more exotic conditions,
such as calling `updateItems(App)` with different apps, each
with different combinations of versions, donation links, permissions,
etc.
2016-12-01 12:15:31 +11:00