1535 Commits

Author SHA1 Message Date
Sylvia van Os
e95e99018a Always include repo name in exception toasts 2021-01-27 15:32:14 +00:00
Hans-Christoph Steiner
9eba243092 use TAG to identify CleanCacheWorker to WorkManager
TAG is already there, and it is meant to identify this class, and be
unique.
2021-01-27 15:38:43 +01:00
Hans-Christoph Steiner
2e10c7ba03 move static helper method into its class: CleanCacheWorker 2021-01-25 15:29:09 +01:00
Isira Seneviratne
7c81b1ad15 Use WorkManager to clean the cache. 2021-01-21 06:17:28 +05:30
Isira Seneviratne
0835b777a9 Use ViewCompat.requireViewById(). 2020-12-20 05:26:25 +05:30
Hans-Christoph Steiner
be3ac52000 rename PackageProvider to PackageIdProvider 2020-11-19 14:02:12 +01:00
Hans-Christoph Steiner
331d4a174d
fix checkstyle EmptyStatement 2020-11-18 23:30:35 +01:00
Hans-Christoph Steiner
7248375a3a
linkify web URLs in description in App Details
fdroid-website#510
fdroid-website#167
fdroidserver#845
fdroiddata@d6c5315a
jekyll-fdroid!60
2020-11-18 23:20:37 +01:00
Hans-Christoph Steiner
f4ae1aacc7 Merge branch 'usb-otg-nearby-repos' into 'master'
fix repo handling on SDCard/USB-OTG

See merge request fdroid/fdroidclient!950
2020-11-18 21:57:39 +00:00
Isira Seneviratne
ae4b6a8b7c Use HtmlCompat.fromHtml(). 2020-11-12 06:45:25 +05:30
Hans-Christoph Steiner
8209bf9a0b allow SDCard/TreeUri scans to be manually triggered by user button press
Before, the preference blocked all scans.  That lead to confusing UX
since the "Try it" and USB-OTG buttons would do nothing.
2020-11-11 18:25:30 +01:00
Hans-Christoph Steiner
6fd7970ca5 update USB-OTG status every time the user switches to Nearby
The USB-OTG device can be plugged and unplugged anytime, so the Nearby view
should be updated each time the user switches to this screen.  Registered
callbacks should handle updating the USB-OTG status while the Nearby view
is active.
2020-11-11 18:25:30 +01:00
Isira Seneviratne
fb8922b252 Use ContextCompat.getSystemService(). 2020-11-06 16:27:11 +05:30
Isira Seneviratne
8b9c624d75 Use ContextCompat.startForegroundService(). 2020-11-06 16:26:37 +05:30
Isira Seneviratne
5254a6f1aa Use ContextCompat.getColor(). 2020-11-06 16:26:34 +05:30
Isira Seneviratne
6a0cd0a14a Use ContextCompat.getDrawable(). 2020-11-06 16:25:23 +05:30
Isira Seneviratne
07f3e778d3 Use ContextCompat.startActivity(). 2020-11-06 16:23:25 +05:30
Hans-Christoph Steiner
2f0994d16f Merge branch 'master' into 'master'
ApplicationID / PackageName is defined as case-sensitive

See merge request fdroid/fdroidclient!944
2020-11-06 10:12:41 +00:00
Isira Seneviratne
1924f38bc6 Replace refresh PNGs with a vector drawable. 2020-10-23 17:31:44 +05:30
Isira Seneviratne
dd5153e445 Replace error PNGs with a vector drawable. 2020-10-23 17:31:43 +05:30
Isira Seneviratne
b6f8f8d6b7 Replace lock PNGs with a vector drawable. 2020-10-23 17:31:42 +05:30
Isira Seneviratne
6c241c8e4a Replace alphabetical order PNGs with a vector drawable. 2020-10-23 17:31:41 +05:30
Isira Seneviratne
d5d9aa897c Replace expand PNGs with vector drawables. 2020-10-23 17:31:40 +05:30
Isira Seneviratne
2fa3ff166b Replace access time and last updated PNGs with a vector drawable. 2020-10-23 16:10:05 +05:30
Hans-Christoph Steiner
f51527befa
ApplicationID / PackageName is defined as case-sensitive
* fdroidserver uses case-sensitive naming since it is based on GNU/Linux
  filesystems, which are case-sensitive by default.

* "the application ID looks like a traditional Java package name, the naming
   rules for the application ID are a bit more restrictive"
   https://developer.android.com/studio/build/application-id

* Java is a case-sensitive language for all names used in .java files:
  "In the Java programming universe, case-sensitive String keys are ubiquitous"
  "Java package names... are case-sensitive"
  https://docs.oracle.com/javase/8/docs/technotes/guides/preferences/designfaq.html
2020-10-22 10:59:44 +02:00
Hans-Christoph Steiner
3b2b9ae1df
fix ApkVerifierTest when running on android-29+
fdroid/fdroidclient!856
2020-10-21 11:52:24 +02:00
Hans-Christoph Steiner
15a024b06e
update javadocs 2020-10-21 11:52:22 +02:00
Hans-Christoph Steiner
c0344c1eed
handle .obf.zip by unzipping the map file then installing it 2020-10-21 11:52:21 +02:00
Hans-Christoph Steiner
021d5cc1ff
EXTRA_CANONICAL_URL instance must always be a String 2020-10-21 11:52:19 +02:00
Hans-Christoph Steiner
b316eab85d
post-install Intent to tell OsmAnd to import "installed" OBF
OsmAnd will import map files from a file:// URL pointing to an OBF file,
but this currently only works for file:// and not the proper content://.
This uses a hack to disable the warning about file:// URIs but only for the
final stage of installing the .obf file.

Hopefully in the future, this can be changed to use a proper content:// URL
as I suggested to them in this merge request:
https://github.com/osmandapp/OsmAnd/pull/10043
2020-10-21 11:52:18 +02:00
Hans-Christoph Steiner
8cf267ea6c
code formatting 2020-10-21 11:52:15 +02:00
Hans-Christoph Steiner
4bb158ef77
handle installing OTA files separately from generic .zip files
It is valid to include .zip files in a repo, but only OTA ZIP files
should be installed into the OTA dir.
2020-10-21 11:52:13 +02:00
Hans-Christoph Steiner
5a0092d42e
use shared method for getting full installed path for media files 2020-10-21 11:52:08 +02:00
Hans-Christoph Steiner
fe45b33851
use case-insensitive file extension comparison for Apk.isApk()
foo.APK is valid and installable, though not recommended.  Without this,
foo.APK would be copied to /sdcard/Downloads, which seems wrong
2020-10-21 11:30:51 +02:00
Hans-Christoph Steiner
0797d82d67
fix emulator test breakage from !873
Use Mockito to mock LocaleList rather than changing App.java.  The only
reliably working emulator tests on gitlab-ci are emulator-22. The change to
App.java in 3406edefcd1807cc9352589ac86dbb725c3165b0 broke there:

E/ACRA    ( 2231): Caused by: java.lang.NoClassDefFoundError: android.os.LocaleList
E/ACRA    ( 2231): 	at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
E/ACRA    ( 2231): 	at java.lang.Class.getDexCacheType(Class.java:479)
E/ACRA    ( 2231): 	at java.lang.reflect.ArtMethod.getDexCacheType(ArtMethod.java:191)
E/ACRA    ( 2231): 	at java.lang.reflect.ArtMethod.getReturnType(ArtMethod.java:145)
E/ACRA    ( 2231): 	at java.lang.reflect.Method.getReturnType(Method.java:184)
E/ACRA    ( 2231): 	at java.lang.Class.getDeclaredMethods(Class.java:771)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.util.ClassUtil.getClassMethods(ClassUtil.java:1172)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector._addMemberMethods(AnnotatedMethodCollector.java:117)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector.collect(AnnotatedMethodCollector.java:49)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector.collectMethods(AnnotatedMethodCollector.java:40)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.AnnotatedClass._methods(AnnotatedClass.java:382)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.AnnotatedClass.memberMethods(AnnotatedClass.java:322)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addMethods(POJOPropertiesCollector.java:555)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collectAll(POJOPropertiesCollector.java:323)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getPropertyMap(POJOPropertiesCollector.java:287)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getProperties(POJOPropertiesCollector.java:186)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.BasicBeanDescription._properties(BasicBeanDescription.java:164)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.introspect.BasicBeanDescription.findProperties(BasicBeanDescription.java:239)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._findCreatorsFromProperties(BasicDeserializerFactory.java:292)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._constructDefaultValueInstantiator(BasicDeserializerFactory.java:276)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findValueInstantiator(BasicDeserializerFactory.java:224)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:220)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:143)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:414)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:458)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.createContextual(ObjectArrayDeserializer.java:128)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.DeserializationContext.handleSecondaryContextualization(DeserializationContext.java:696)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:496)
E/ACRA    ( 2231): 	at com.fasterxml.jackson.databind.Objec
2020-10-21 11:30:48 +02:00
Marcus Hoffmann
3406edefcd
tests for locale selection 2020-10-20 23:17:25 +02:00
Jonas Kalderstam
87d4779c2d Fixed translations preferring secondary locale over english
In the case where a non-standard region has been set for the primary
system language, the secondary locale will be used for localized
strings when available instead of the expected primary language.

For example, set system locales to [en-SE, ja-JP], that is English
with region Sweden, and Japanese with region Japan, most apps will
display English descriptions but those which have a Japanese
translation will display that instead.

This commit adds a fallback case for when the primary locale has not
matched any translations, but it's language part does.
2020-10-20 17:40:56 +00:00
Hans-Christoph Steiner
10a586100e Merge branch 'kunpw-master-patch-10611' into 'master'
Measure http download progress by size of complete file in resumed downloads

See merge request fdroid/fdroidclient!923
2020-09-29 14:51:19 +00:00
Isira Seneviratne
dbbedc7ab1 Create and use notification channels on Android Oreo and higher. 2020-09-22 06:41:41 +05:30
Isira Seneviratne
f4409bad02 Add Android 11 to ANDROID_VERSION_NAMES. 2020-08-26 14:52:46 +05:30
kunpw
1c6ab58a30 Measure http download progress by size of complete file in resumed downloads 2020-08-25 15:12:56 +00:00
Hans-Christoph Steiner
a8f1a58f2d Merge branch 'Use_ConnectivityManagerCompat' into 'master'
Use ConnectivityManagerCompat.isActiveNetworkMetered().

See merge request fdroid/fdroidclient!915
2020-08-25 11:35:30 +00:00
Hans-Christoph Steiner
48c520e343 Merge branch 'Use_ConfigurationCompat' into 'master'
Use ConfigurationCompat.getLocales().

See merge request fdroid/fdroidclient!916
2020-08-25 11:29:28 +00:00
Hans-Christoph Steiner
e0cb3f8afc
App.isLocalized() marks whether relevant translations are available
!886
2020-07-22 19:46:54 +02:00
Glenn Carremans
2021f43761
Changed isLocalized logic
`isLocalized` will be true when App will contain 1 or more valid locales for this device
2020-07-22 19:43:03 +02:00
Isira Seneviratne
a44829d33f Use ConfigurationCompat.getLocales(). 2020-07-22 11:10:32 +05:30
Isira Seneviratne
7b8c12bc78 Use ConnectivityManagerCompat.isActiveNetworkMetered(). 2020-07-22 08:48:12 +05:30
Hans-Christoph Steiner
1ee0d7568b Merge branch 'bottom-nav-colors' into 'master'
make bottom nav color configurable

See merge request fdroid/fdroidclient!906
2020-07-15 08:17:16 +00:00
Dominik Schürmann
319b615da0 Remove unused imports, fix line lengths 2020-07-14 14:10:22 +02:00
Dominik Schürmann
f6b3c4bbe2 Migrate AntiFeaturesListingView to AndroidX 2020-07-14 14:10:22 +02:00