1599 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
8856f19277 move Latest Tab sort closer to where it is actually used 2021-02-09 17:57:40 +01:00
Hans-Christoph Steiner
a81140be47 run Android Studio default code formatter with Ctrl-Alt-L 2021-02-09 17:51:19 +01:00
Angus Gratton
3cb6cc747b Add Repo.getFileUrl() method to get file URL in a standard way 2021-02-09 09:01:12 +11:00
Angus Gratton
5187b88a08 RepoUrlsTest: Add new tests for correct repo URL formatting 2021-02-09 08:03:55 +11:00
Hans-Christoph Steiner
4caab6a135
rename WhatsNew* to Latest* to match source string name 2021-02-08 13:16:04 +01:00
Hans-Christoph Steiner
bdbb95110b normalize whitespace in AppProvider using Android Studio Ctrl-Alt-L 2021-02-08 09:51:37 +01:00
Hans-Christoph Steiner
a11d214039 workaround Locale.toLanguageTag() requiring android-21 2021-02-08 09:51:04 +01:00
Hans-Christoph Steiner
cb1b4330ef App: rename "locales" to "supportedLocales" for clarity 2021-02-08 09:51:04 +01:00
Hans-Christoph Steiner
57cee93647 trim leading/trailing whitespace from name/summary/video
This should make for predictable layouts, since fastlane entries are likely
to have a tailing newline, but entries in the metadata YAML will not.
2021-02-08 09:51:04 +01:00
Hans-Christoph Steiner
19215db243 convert Latest Tab's selection into a sort
This removes the convoluted logic of both a selection and a sort, and just
does all the ordering in the sort.

closes #939
closes #2024
2021-02-08 09:50:07 +01:00
Hans-Christoph Steiner
3d9a68c1e3 rename AppProvider "Recently Updated" to "Latest Tab"
This is only used for the Latest Tab, so it should be named accordingly.
2021-02-08 09:36:46 +01:00
Hans-Christoph Steiner
e35335d59c totally overhaul choosing locales from app metadata based on LocaleList
This makes the selection logic heed the list of preferred locales from the
user Settings.

closes #987
closes #1186
refs #1440 #1882 #1730
!886
2021-02-08 09:36:46 +01:00
proletarius101
4737b32a60 fix icon and text tinting and replace some pixel maps with vector graphs
added vector graphs are the rounded variant
2021-02-04 21:43:59 +00:00
proletarius101
e2979f632d Change Activity to AppCompatActivity 2021-01-28 16:52:58 +00:00
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