4509 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
7702e72acb move lint config to lint.xml to enable ignoring specific files 2017-05-11 09:38:59 +02:00
Hans-Christoph Steiner
151c83218c do not crash if there are no cached APKs
closes #1012
2017-05-11 09:38:59 +02:00
Hans-Christoph Steiner
eff483d73e gitlab-ci: fail if translation strings need corrections
Since we have all these lovely scripts for cleaning up the
translations, gitlab-ci is a handy way to enforce that they get used.
Since weblate merges happen via merge requests, this will work nicely
now.  I can't think of any false positives that will arise, but we
shall find out!
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
2ef9b279a8 remove all blank items from plurals 2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
38403338da remove xmlns tools:ignore from translations
XML namespaces are a massive pain to deal with in, and they are totally
unneeded in the translation files.  xmlns:tools is only needed in the
source file to ignore some lint warnings.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
3df626aed1 sync up translation scripts to use the same code
To keep these scripts simple and readible, it makes sense to keep them
as separate scripts.  But they should use the same approach as much as
possible.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
082b6091fc move all translation scripts to tools/
I think we should just move all the scripts to tools/, app/tools is
confusing, not very visible, and non-standard.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
b99e95304e remove pull-trans.sh, weblate is merged via merge requests now
gitlab handles the squashing, then we have a publicly available history
of the unsquashed commits in the merge request.
2017-05-10 23:18:28 +02:00
monolifed
924f192d97 Translated using Weblate (Turkish)
Currently translated at 100.0% (388 of 388 strings)
2017-05-10 23:18:03 +02:00
Jonatan Nyberg
4200d997a2 Translated using Weblate (Swedish)
Currently translated at 100.0% (388 of 388 strings)
2017-05-10 23:18:03 +02:00
Nine Lima
c2545aee88 Translated using Weblate (Afrikaans)
Currently translated at 100.0% (388 of 388 strings)
2017-05-10 23:18:03 +02:00
Hans-Christoph Steiner
e19cfd2831 Merge branch 'weblate' into 'master'
Weblate

See merge request !512
2017-05-10 18:25:29 +00:00
Hans-Christoph Steiner
3cd4abb510 Weblate 2017-05-10 18:25:27 +00:00
Hans-Christoph Steiner
6c9d4f899e Merge branch 'fix-feature-image' into 'master'
Fix feature images from only displaying the first one loaded.

See merge request !510
2017-05-09 12:02:14 +00:00
Peter Serwylo
67a29bae8f Include an images full URL in the cache path.
All feature graphics are called `featureGraphic.png`, and so our cache
was presuming all feature graphics were the same image. By including
the full path from the server in the cached name, we don't overwrite
images any more.
2017-05-09 16:03:27 +10:00
Peter Serwylo
bd5503b4cd Rename method as icons are no longer the only thing stored here. 2017-05-09 16:02:08 +10:00
Peter Serwylo
ca4e1c24a3 Merge branch 'fix-1006' into 'master'
prevent crash if installing app without icon

Closes #1006

See merge request !509
2017-05-09 06:01:40 +00:00
Hans-Christoph Steiner
4e375ca7f8 prevent crash if installing app without icon (closes #1006)
Right now, org.fdroid.fdroid.privileged.ota and FFupdater do not
provide any icons and it seems that that triggers this crash:

ACRA caught a NullPointerException for org.fdroid.fdroid
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.lastIndexOf(int)' on a null object reference
    at org.fdroid.fdroid.FDroidApp$5.generate(FDroidApp.java:282)
    at com.nostra13.universalimageloader.cache.disc.impl.BaseDiskCache.getFile(BaseDiskCache.java:167)
    at com.nostra13.universalimageloader.cache.disc.impl.BaseDiskCache.get(BaseDiskCache.java:98)
    at com.nostra13.universalimageloader.cache.disc.impl.LimitedAgeDiskCache.get(LimitedAgeDiskCache.java:74)
    at com.nostra13.universalimageloader.utils.DiskCacheUtils.findInCache(DiskCacheUtils.java:36)
    at org.fdroid.fdroid.NotificationHelper.getLargeIconForEntry(NotificationHelper.java:506)
    at org.fdroid.fdroid.NotificationHelper.createUpdateNotification(NotificationHelper.java:300)
    at org.fdroid.fdroid.NotificationHelper.createNotification(NotificationHelper.java:191)
    at org.fdroid.fdroid.NotificationHelper.access$400(NotificationHelper.java:37)
    at org.fdroid.fdroid.NotificationHelper$1.onReceive(NotificationHelper.java:106)
    at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297)
    at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46)
    at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5254)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
2017-05-08 20:16:39 +02:00
Hans-Christoph Steiner
5e031a5ac1 Merge branch 'patch-1' into 'master'
Delete duplicate text in update screen

See merge request !507
2017-05-04 20:01:53 +00:00
Licaon_Kter
3558117e3c Delete duplicate text 2017-05-04 12:20:35 +00:00
Hans-Christoph Steiner
fe8ce530fe Merge branch 'final-localization-cleanup' into 'master'
Final localization cleanup

See merge request !506
v0.103
2017-05-02 20:53:09 +00:00
Hans-Christoph Steiner
7135cdef48 Bump to 0.103 2017-05-02 22:03:08 +02:00
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