5237 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
50bce42940 switch to com.android.support:preference-v14 for Material themes 2018-04-24 18:07:38 +02:00
Hans-Christoph Steiner
c04a867b9b format preferences.xml with Android Studio Ctrl-Alt-L 2018-04-24 18:02:38 +02:00
Hans-Christoph Steiner
40635c36e5 rename Preferences constants to be readable, Java style 2018-04-24 18:02:38 +02:00
Hans-Christoph Steiner
16d15a358d include signer fingerprint in Apk instance created from a file 2018-04-24 18:02:38 +02:00
Hans-Christoph Steiner
ba2f1e1919 document AppListActivity 2018-04-24 18:02:38 +02:00
Hans-Christoph Steiner
4ff4f8056f Merge branch 'remove-gradle-witness' into 'master'
update to Gradle Android Plugin v3.0 semantics, remove gradle-witness

See merge request fdroid/fdroidclient!604
2018-04-24 16:01:07 +00:00
Hans-Christoph Steiner
b3bd4ff2f7 stop forcing Java 1.7, it is the oldest supported version now
This was introduced in 2014:
2f9c3b805675f02653a433637b33188b61f90c1e
2018-04-23 12:57:27 +02:00
Hans-Christoph Steiner
40fdccf262 purge gradle-witness until it is compatible with 'implementation'
https://github.com/signalapp/gradle-witness/issues/27
2018-04-23 12:57:18 +02:00
Hans-Christoph Steiner
518537f23a purge broken Javadoc generation that is very out of date
Introduced in 2014 to keep ant compatibility:
b3107eb6b249c9b1d595b32ea177f60b6040c709
2018-04-23 12:33:24 +02:00
Hans-Christoph Steiner
96e10d7bf1 migrate dependencies to new Gradle Android Plugin 3.0 terms
Fixes this warning:

WARNING: Configuration 'compile' is obsolete and has been replaced with
'implementation' and 'api'.  It will be removed at the end of 2018. For
more information see:
http://d.android.com/r/tools/update-dependency-configurations.html

https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html
2018-04-23 12:33:22 +02:00
Hans-Christoph Steiner
9f839bcca7 purge obsolete block in settings.gradle
missed this in dd169069823720a57d04a53b7e317e67cf55cf55
fdroid/fdroidclient!676
2018-04-23 12:31:28 +02:00
Hans-Christoph Steiner
b15fff082e force disk space calc to Long on < android-18
closes #1424
2018-04-23 11:46:31 +02:00
Hans-Christoph Steiner
8903a089ba Merge branch 'minSdkVersion-to-android14' into 'master'
The Great Upgrade to minSdkVersion 14!

Closes #1379, #1383, and #248

See merge request fdroid/fdroidclient!676
2018-04-23 08:16:46 +00:00
Hans-Christoph Steiner
71f7762521 remove unused NFC-ish <intent-filter> with lint error
Looks like an aborted effort to do:
https://developer.android.com/guide/topics/connectivity/nfc/nfc.html#mime
2018-04-19 16:36:35 +02:00
Hans-Christoph Steiner
15b0736252 new lint is more aggressive about erroring on upper case URI schemes 2018-04-19 16:29:53 +02:00
Hans-Christoph Steiner
7b679ef57c new version of lint is more aggressive at announcing UnusedResources
These are in fact needed:

  /export/share/code/fdroid/client/app/src/main/res/values/dimens.xml:25: Error: The resource R.dimen.fixed_width_padding appears to be unused [UnusedResources]
      <dimen name="fixed_width_padding">2dp</dimen>
             ~~~~~~~~~~~~~~~~~~~~~~~~~~
  /export/share/code/fdroid/client/app/src/main/res/values/styles.xml:162: Error: The resource R.style.SwapTheme_StartSwap appears to be unused [UnusedResources]
      <style name="SwapTheme.StartSwap" parent="AppThemeLight">
             ~~~~~~~~~~~~~~~~~~~~~~~~~~
  /export/share/code/fdroid/client/app/src/main/res/values/styles.xml:166: Error: The resource R.style.SwapTheme_StartSwap_Text appears to be unused [UnusedResources]
      <style name="SwapTheme.StartSwap.Text" parent="@style/SwapTheme.StartSwap">
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-04-19 16:27:41 +02:00
Hans-Christoph Steiner
898c731fcc don't run checkstyle or pmd on zipsigner, the format is too different
If someone wants to clean this up, feel free...
2018-04-19 16:19:21 +02:00
Hans-Christoph Steiner
4e4dd2385b reformat all zipsigner code with Android Studio Ctrl-Alt-L 2018-04-19 16:18:24 +02:00
Hans-Christoph Steiner
a3d9850a42 update to latest robolectric 3.8 and mockito 2.7.22
http://robolectric.org/getting-started/#building-with-gradle
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
14474aed01 reenable line length errors on ProperMultiRepoUpdaterTest 2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
e00fe0dcda switch to latest official BottomNavigation release
#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
5c6c54cadf switch from spongycastle to latest official bouncycastle
#1379
2018-04-19 15:51:44 +02:00
Greg Leach
dd2f43dcde Make sure to close streams when done with them.
488f8cd3b4

closes #1383
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
dd16906982 move zipsigner into this app, its not maintained anywhere else 2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
a2597ae3e8 switch to official nanohttpd releases
closes #248
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
404796a9fa switch to official support PreferenceFragment
#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
dfc6524fc1 switch Robolectric to use compile SDK version 2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
2a9c3fee5b purge all code blocks for < android-14, except installer stuff
The installer stuff should hopefully become a standalone library, so that
might as well keep the old support in place.

#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
e923427232 gitlab-ci: convert connected10 job to connected14
#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
6fbdd1210e update to the latest version of the Android support libraries
This requires bumping compile and built-tools verisons.
2018-04-19 15:51:43 +02:00
Hans-Christoph Steiner
3a2c10f077 update to latest Gradle Android Plugin (3.1.1) and gradle (4.4.1)
#1379
2018-04-19 15:51:43 +02:00
Hans-Christoph Steiner
5ec9789e73 switch minSdkVersion to 14 (Android 4.0)
#1379
2018-04-19 11:28:27 +02:00
Hans-Christoph Steiner
38a3ccda17 Merge branch 'update-scheduling' into 'master'
modernize update scheduling

See merge request fdroid/fdroidclient!416
2018-04-18 22:04:55 +00:00
Hans-Christoph Steiner
9e0de9ac69 rudimentary support for JobScheduler to run updates
The new JobScheduler API can opportunitistically run a job based on whether
there is good internet, connected to power, etc.  This is very useful for
running updates.  Ideally, updates would always happen in the background
while on unmetered internet and connected to power.

#588
2018-04-18 23:07:36 +02:00
Hans-Christoph Steiner
e36d7719b3 trigger an update after joining good wifi without JobSchedule
Each time the device connects to a wifi network, this waits for 2 minutes,
then if the wifi is still connected, it re-schedules the index update to
happen now.  The goal is to favor unmetered networks as much as possible
when downloading the index and any automatic app updates.

This is only needed on older platforms, JobScheduler handles this for us on
android-21+
2018-04-18 23:07:36 +02:00
Hans-Christoph Steiner
7d9f5e880c move update scheduling entirely to AlarmManager
This changes the flow of the update triggering so that any Intent sent to
UpdateService can potentially trigger an update, depending only on the
state of the internet and the "Only on WiFi" preference.  Instead of having
a timer that checks every hour to see if it is time to run the update, just
let AlarmManager send a trigger Intent based on the timing in the
"Update Interval" setting.

The update schedule is reset each time F-Droid restarts, and also each time
the user returns from the settings, so if AlarmManager fails us in the time
being, the updates will be rescheduled next time F-Droid is restarted, the
device is rebooted, etc.

refs #662
2018-04-18 22:04:52 +02:00
Hans-Christoph Steiner
5f3e952958 move "Update Interval" pref handling to Preferences class
Basically all of the settings are handled in the Preferences class now,
this was an outlier.
2018-04-18 21:56:14 +02:00
Hans-Christoph Steiner
552da24d30 fix HttpDownloaderTest after refactoring
HttpDownloaderTest doesn't get run in gitlab-ci since it was too flaky with
internet connections in the emulator.  So these were missed until I manually
ran the tests.

688057b3e7e214db49566b84d5b3dcd0db30dc2b
195aaae7e52dc1c47741965904ed17bdc816a71c
df08e84e7829652d7999eee5451080a012b00a1e
2018-04-18 20:29:27 +02:00
Hans-Christoph Steiner
d917d6d007 version code 1002051 2018-04-18 20:21:23 +02:00
Hans-Christoph Steiner
6a86762cd2 update CHANGELOG 2018-04-18 20:20:58 +02:00
Antón Méixome
e7bc6f1fd7 Translated using Weblate (Galician)
Currently translated at 96.8% (405 of 418 strings)
2018-04-18 20:15:08 +02:00
ezjerry liao
7ce639f4dd Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (418 of 418 strings)
2018-04-18 20:15:06 +02:00
Hans-Christoph Steiner
ce8d089dc7 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!675
2018-04-18 18:16:21 +00:00
Hans-Christoph Steiner
9b8f60c4fe Weblate 2018-04-18 18:16:21 +00:00
Hans-Christoph Steiner
9a33a751a1 Merge branch '1.2.1-polish' into 'master'
1.2.1 polish

Closes #577 and #440

See merge request fdroid/fdroidclient!674
2018-04-18 17:57:09 +00:00
Hans-Christoph Steiner
2615c461f2 debounce incoming "WiFi Connected" events for reliable status
Some devices send multiple copies of given events, like a Moto G often
sends three {@code CONNECTED} events.  So they have to be debounced to
keep the {@link #BROADCAST} useful.
2018-04-18 17:14:22 +02:00
Hans-Christoph Steiner
045fc1a35e make "Scan QR" immediately show the QR screen, not "Select Apps" 2018-04-18 17:14:22 +02:00
Hans-Christoph Steiner
fa1331139f delete all swap repos when before swap starts and after it stops
For now, swap repos are only trusted as long as swapping is active.  They
should have a long lived trust based on the signing key, but that requires
that the repos are stored in the database by fingerprint, not by URL
address.

#295
#703
2018-04-18 17:14:22 +02:00
Hans-Christoph Steiner
b9c247e2b1 if WifiManager fails to return netmask, directly query net interfaces
Google broke returning the netmask somewhere around android-21. This could
be done using more official APIs, but this reuses stuff that needs to be
there anyway.

closes #577
https://code.google.com/p/android/issues/detail?id=82477#c5
https://issuetracker.google.com/issues/37015180
2018-04-18 17:14:22 +02:00
Hans-Christoph Steiner
3fd1b055b3 tame debug logging in CompatibilityChecker
It makes a huge dump on every index refresh, making troubleshooting other
things around the index hard.
2018-04-18 17:14:22 +02:00