4487 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
2e2a6bd419 show Toast when file type cannot be installed
This is just a placeholder until we implement proper "installing" for
non-APK files.

!504
#982
2017-05-02 22:00:48 +02:00
Hans-Christoph Steiner
a12d8e0c6d remove comment from <plurals>, its finding its way into translations 2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
7e12ae45e3 remove odd quoting from strings 2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
62a670ba3a tools: check strings for odd quoting detritus
I don't know where this is coming from, and I can't see anyway that it
would be helpful
2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
1222a9b4c7 tools: allow check-string-format to be called from anywhere 2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
676b2b9093 correct SPDX links when the License: tag contains a +
The "+" is syntax on top of the license name:
https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60
2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
27453855b2 Merge branch 'nonapk' into 'master'
Add a DummyInstaller to handle non apk files

See merge request !504
2017-05-02 19:52:07 +00:00
Hans-Christoph Steiner
0f5aa55dab Merge branch 'weblate' into 'master'
0.103 weblate import

See merge request !505
2017-05-02 19:50:22 +00:00
Hans-Christoph Steiner
a3c5e9631b 0.103 weblate import 2017-05-02 19:50:22 +00:00
Chirayu Desai
bbd77c5b79 Add a DummyInstaller to handle non apk files
* Avoids crashes when trying to treat non apk files, such as
  privileged extension ota update.zip as apks
* Doesn't do anything at all for now.

One issue with this is the app is always in the not installed state,
so what would be appropriate here would be to change the text of the
install button to download, and update that accrodingly.
However that is outside of the scope of this change.

TODO:
Add toast indicating the user that they need to install
manually, in case of OTA update.zip
2017-05-03 00:29:03 +05:30
Hans-Christoph Steiner
66612e906c Merge branch 'fix-986--too-many-change-notifications' into 'master'
Bunch together notifications to prevent flickering in UI.

Closes #986

See merge request !502
2017-05-02 14:29:20 +00:00
Hans-Christoph Steiner
16ddcbd5d8 Merge branch 'wipe-etag-on-language-change' into 'master'
Force repo update after changing language.

See merge request !503
2017-05-02 11:18:11 +00:00
Peter Serwylo
b7fc904a6a Merge branch '0.103-fixes' into 'master'
0.103 fixes

Closes #991, #943, and #960

See merge request !501
2017-05-02 11:12:54 +00:00
Peter Serwylo
18f8817388 Force repo update after changing language.
This zeros out the etag in the fdroid_repo table and then asks
the update service to perform an update.

The end result is that changing the language will result in the metadata
being shown in that language.

Note: This doesn't immediately work due to pending changes around
Locale.setDefault() and the change in case from Summary to summary in
the server metadata.
2017-05-02 16:24:04 +10:00
Peter Serwylo
a9d817441f Bunch together notifications to prevent flickering in UI.
This reverts to the previous behaviour before 8faf151.
Then, the InstalledAppProviderService would queue up a series of
changes, and only notify after 1 second of nothing being added to
the queue. This was good because CursorAdapters and LoaderManagers
would not continually requery the database several times a second (only
once at the end), but it meant there was a lag in the AppDetails screen
getting updated after installing/upgrading/deleting packages.

This restores that behaviour where general events (e.g. "some misc apps
in the database were changed") are "debounced" for 1 second. However it
also emits a more specific "package org.blah.com was changed" instantly.

In the long term, it would be good to remove any dependency on
ContentObservers and `notifyChange()` altogether, in preference of
either LocalBroadcastManager or RxJava. However this will depend on how
we go about changing the database layer in the future. The fact we now
depend on ContentProviders means that it would be a big change to move
away from LoaderManager + notifyChange().

Fixes #986.
2017-05-02 11:09:00 +10:00
Peter Serwylo
b7bdd40ab4 Merge branch 'gitlab-ci-tests' into 'master'
troubleshoot flaky connected24 gitlab-ci test

See merge request !498
2017-05-02 01:06:46 +00:00
Hans-Christoph Steiner
c7e4a0f3df gitlab-ci: provide debug info for connected24 failures
connected24 tests are frequently failing saying that while an emulator
is running, its not compatible.  This is bizarre. This just adds debug
output to help troubleshoot that.
2017-05-01 23:46:13 +02:00
Hans-Christoph Steiner
c7d9235951 update gradle to 3.2.1, the version included in Debian/stretch 2017-05-01 23:46:13 +02:00
Hans-Christoph Steiner
1f8330fd06 use gradle android plugin v2.2.2
Starting with v2.2.2, it zeroes out timestamps in the APK's ZIP header
https://android-developers.googleblog.com/2016/11/understanding-apk-packaging-in-android-studio-2-2.html

This version is also the version that is included in Debian/stretch.
2017-05-01 23:46:13 +02:00
Hans-Christoph Steiner
6c64e1943a fix formats in Persian translation 2017-05-01 23:40:41 +02:00
Danial Behzadi
3e7b549f48 Translated using Weblate (Persian)
Currently translated at 100.0% (386 of 386 strings)
2017-05-01 23:32:16 +02:00
Hans-Christoph Steiner
653f577bf9 re-add Sardinian to the Language menu list
closes #991
2017-05-01 23:31:14 +02:00
Hans-Christoph Steiner
2eaf00f9f1 include magic method for setting local via Languages menu
I have found no explanation of what should work and why, but language
choosers seem to always include this line.  This also seems to fix the
bug:

closes #943
2017-05-01 23:31:14 +02:00
Hans-Christoph Steiner
de1cc566a1 show license in the links section
This makes the license a link to the spdx.org page for the app's
license.  I think this is an improvement over the way the license was
displayed before 0.103 since it provides a direct link to the actual
text of the license.

The license icon is a modified version of the public domain icon:
https://commons.wikimedia.org/wiki/File:Cc-sa_white.svg

closes #960
2017-05-01 23:31:14 +02:00
Hans-Christoph Steiner
e02c0cb555 Merge branch 'new-ui/getInstalledApk' into 'master'
AppDetails2: bring back getInstalledApk() from AppDetails

Closes #985

See merge request !500
2017-05-01 19:33:30 +00:00
Hans-Christoph Steiner
39e382b810 Merge branch 'weblate' into 'master'
weblate import for 0.103-alpha4

See merge request !499
2017-05-01 19:30:24 +00:00
Hans-Christoph Steiner
53417955c9 weblate import for 0.103-alpha4 2017-05-01 19:30:22 +00:00
Chirayu Desai
ef6c03c45d AppDetails2: bring back getInstalledApk() from AppDetails
* Addition: Try to get apk details via InstalledAppProvider too.
 * In certain cases, such as the "UnifiedNlp (no GAPPS)" app on a device
   with actualy GAPPS / GMS installed, apk can be null which leads
   to a crash
 * Ask InstalledAppProvider for the app's details too, like it
   was done in the old UX AppDetails.
 * Also seen when uninstalling app with a signing key different,
   fixes #985
2017-05-02 00:47:08 +05:30
Peter Serwylo
11c42f6a2f Merge branch 'pre-0.103-alpha4-rename' into 'master'
nail down language pref handling for localized index metadata

See merge request !496
2017-04-30 12:20:18 +00:00
Hans-Christoph Steiner
0a59c5c6e5 fully write up locale choosing for the 'localized' block
This is how locales are handled when parsing the index from the server.
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
d946678568 remove redundant "About" header in Settings view 2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
4d785bd6bd use better variable name for the set of available locales 2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
03168ff99e separate index locale preference handling on >= android-24
In android-24 and newer, the user can specify multiple languages in a
priority list. Therefore, the locale chooser logic here does not need
to work so hard to find a language match.  For example, if the user
wanted to see country-specific variants, they would add them to the
preference list.

With older versions of Android, the pref is only a single locale. So
chances are that someone who specified de_AT would rather see de or
de_DE than en_US.  Same goes for es_AR, ar_EG, etc.  This could annoy
Chinese speakers, since someone who sets zh_TW could potentially see
zh_CN, which are written pretty differently.
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
dc57fd712b rename index-v1 'localized' key names to match fdroidserver
This makes the key names standardized across fdroidclient,
fdroidserver, and index-v1.json.

fdroidserver!261
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
bdc9a14c2a use android-24+ LocaleList when choosing localized index data
When choosing localized data from the index, this includes the new
LocaleList feature that represents the user's preferred locale ranking

https://developer.android.com/reference/android/os/LocaleList.html
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
add570ab4b hide Languages pref on >= android-24
Android 24 and later provides tons of languages, and a way to rank
multiple languages instead of choosing one.  The Languages pref is a
big hack and can be problematic, so its better to disable it when its
not needed.  This will make it so it is no longer possible to set
F-Droid to a language that the system does not support.

#943
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
50982060ac support index locales that do not include country (e.g. 'en') 2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
2586e87524 clear Languages pref when using System Default
Keeps things clean if System Default clears out the pref entirely.
2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
5febedebd6 fix mispelled Languages.getLanguages() 2017-04-28 10:41:30 +02:00
Hans-Christoph Steiner
561a18ad2b Merge branch 'fix-962--notify-of-downloaded' into 'master'
Show downloaded + not installed apps in "Updates"

Closes #962

See merge request !488
2017-04-28 08:38:12 +00:00
Hans-Christoph Steiner
7199e829f3 Merge branch 'fix-974--repo-priorities-and-suggested-vercode' into 'master'
Don't suggest lower versions, despite repository priorities.

Closes #974

See merge request !497
2017-04-28 08:34:10 +00:00
Peter Serwylo
6c08e054f5 Calc suggested versioncode properly, regardless of repo priorities.
There was a bug where the repo with the highest priority would be
responsible for specifying the suggested version code. When doing so, it
would only select from the list of apks available in that repo. This
improves the calculation so that when any given repos app gets a
suggested version code assigned, it selects from _all_ available apks,
not just those from the repository in question.

Fixes #974.
2017-04-28 11:50:08 +10:00
Peter Serwylo
294e1d2821 Simulate armeabi as the architecture during multi-repo test
This allows us to test "installing" Adaway, which has a native code
dependency that the default Robolectric setup doesn't support (defaults
to armeabi-v7a).
2017-04-28 11:50:05 +10:00
Peter Serwylo
b1a1c68ad7 Improved tests to catch incorrect suggested versions with multi repos.
This is the bug outlined in #974. This commit just adds a test which
catches the problem, but does not fix it yet.
2017-04-28 10:17:27 +10:00
Peter Serwylo
69816b5b82 Only and if there are any there. 2017-04-28 09:12:53 +10:00
Peter Serwylo
25edfffcbe Remove version check, allow version downgrades to appear in Updates tab correctly.
The version check guarded against downgrades, and would not notify the
user if it found a downgrade in the apk cache. However this was from
before we could ask `AppUpdateStatusManager#isPendingInstall(hash)`. Now
we don't need to care whether it is an upgrade or a downgrade, because
there is a more authoritative source as to whether this apk is
interesting to us or not.
2017-04-28 09:12:33 +10:00
Peter Serwylo
0d1e00b6cf Don't accidentally return Apk instances from the wrong repo
There may be multiple apk files with the same hash. Although it is not a
security issue to install one or the other (they are exactly the same
binary), they may have different metadata to display in the client.
Thus, it may result in weirdness if one has a different
name/description/summary etc).

This change takes each of the matching Apk objects from the database,
then asks them where they expect to be downloaded. It matches this
against the File that we are looking at and only returns if they match.
2017-04-28 08:34:00 +10:00
Hans-Christoph Steiner
f8c9d7ec8e Merge branch '0.103-alpha3--ui-fixes' into 'master'
0.103-alpha3  UI fixes

Closes #981, #967, and #965

See merge request !490
2017-04-26 10:34:02 +00:00
Peter Serwylo
06088e2b35 Send acra report about crash we are getting, but don't crash F-Droid 2017-04-26 19:39:26 +10:00
Hans-Christoph Steiner
8e168b46a7 Merge branch '0.103-fixes--pre-21-crashes' into 'master'
Don't use attr for color value in drawables.

Closes #979

See merge request !493
2017-04-26 07:20:10 +00:00