6020 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
a9aafa080d move JoinWifiView to pure XML view 2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
1e1ea03bc3 move ConfirmReceiveView to pure XML SwapView with logic in Presenter 2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
d5f2e26ea7 use one method everywhere for the "swap back" requests 2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
014fb0b99d move WifiQrView and SendFDroidView to pure XML views
This puts the logic in the "Presenter": SwapWorkflowActivity
2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
69ce8dbe8c move all WiFi/QR logic to Presenter (SwapWorkflowActivity) 2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
ea3b47f705 purge CacheSwapAppsService in favor of InstalledAppProvider
The most expensive part of this whole process is calculating the hash of the
whole APK.  InstalledAppProvider already caches that, and the rest is OK to
query.  If any particular part of the query is expensive, it could also be
moved to InstalledAppProviderService.
2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner
85410504da LocalRepoService for setting up the local swap repo
This moves all logic for setting up the local fdroid repo to its own
IntentService.  That makes it much easier to interact with since things can
just use the static helper method to request it to update, and it'll do the
right thing.
2019-05-24 10:00:01 +02:00
Hans-Christoph Steiner
9fc1ecd5a4
doh! only change translations in Weblate, or suffer merge conflicts! 2019-05-21 14:50:47 +02:00
Hans-Christoph Steiner
866a7276a4 Merge branch 'bugfixes' into 'master'
a few bug fixes

Closes #1737, #1782, and #1769

See merge request fdroid/fdroidclient!824
2019-05-20 13:38:28 +00:00
Hans-Christoph Steiner
c5a6445239 fix bottom bar loading the wrong "Updates" string
closes #1785
2019-05-20 14:14:29 +02:00
Hans-Christoph Steiner
1cc14b3499 show progress spinner on Updates Tab if index is being updated
The "Congrats, your apps are up to date" message isn't quite right in this
context.

closes #1769
2019-05-20 14:14:29 +02:00
Hans-Christoph Steiner
dffc8e5925 make sure ImageLoader is inited before trying to use it
closes #1782
2019-05-20 14:14:29 +02:00
Hans-Christoph Steiner
86908ceeaa the calculated ETag should be compared to the stored ETag
Thanks to @amiraliakbari for tracking this down!

closes fdroid/fdroidclient#1737
2019-05-20 14:14:29 +02:00
Hans-Christoph Steiner
8d60f40e98 Merge branch 'snackbars' into 'master'
Show snackbars with undo buttons. Fix #1756.

Closes #1756

See merge request fdroid/fdroidclient!823
2019-05-20 12:09:30 +00:00
Hans-Christoph Steiner
200548d6ba Merge branch 'move-swap-views-towards-mvc' into 'master'
Move swap views towards MVC

See merge request fdroid/fdroidclient!822
2019-05-14 11:56:01 +00:00
Hocuri
dbfe267540
Show snackbars with undo buttons. 2019-05-13 17:55:09 +02:00
Hans-Christoph Steiner
291e4c4c3c change 'fragment' name to avoid confusion, Swap doesn't use Fragments 2019-05-13 15:01:37 +02:00
Hans-Christoph Steiner
9d6c95d51d move menu handling to SwapView and SwapWorkflowActivity
The menus originate in the Activity, so avoid pushing it to the Views.
2019-05-13 15:01:37 +02:00
Hans-Christoph Steiner
fe59522666 SwapView base class so all swap views can just be XML
Almost all of the nearby/swap view classes could be condensed into a single
base class that is instantiated in the view XML.  This is the first step
towards making that happen.

It also lays the groundwork where "steps" are all SwapViews.  The
original concept of "steps" put all steps together, whether
F-Droid could control them or not.  For example, the Views were
mixed with the system Bluetooth prompts.  This is the first step
towards converting the steps to always be SwapViews, which are
always under control of this app.

When coming back to a SwapView/step, it does not seem feasible to handle
automatically restarting things like permissions and Bluetooth prompts. If
there is a way, it should be possible to first load the proper SwapView
instance, then trigger the system prompt.  The makes the SwapView a pure
View, without any Controller in it.
2019-05-13 15:01:32 +02:00
Hans-Christoph Steiner
6a8f5fb4a7 rename SwapAppsView things to "Swap Success" 2019-05-13 14:55:13 +02:00
Hans-Christoph Steiner
568abe9f3b rename swap_blank to swap_start_swap to match View name 2019-05-13 14:55:13 +02:00
Hans-Christoph Steiner
68cc241bc0 rename ConfirmReceive to ConfirmReceiveView to match standard 2019-05-13 14:55:13 +02:00
Hans-Christoph Steiner
9aa73b95e4 rename SwapConnecting to ConnectingView to match standard 2019-05-13 14:55:13 +02:00
Hans-Christoph Steiner
40c52821fa standardized code format for all swap layout XML 2019-05-13 14:55:13 +02:00
Hans-Christoph Steiner
a8fc3d2b2c gitlab-ci: output versions for base 'tools' and 'emulator' packages 2019-05-13 14:13:27 +02:00
Hans-Christoph Steiner
fac36457ea Merge branch 'bug-fixes-1.7' into 'master'
Bug fixes 1.7

Closes #1678 and #1757

See merge request fdroid/fdroidclient!820
2019-05-10 18:56:47 +00:00
Hans-Christoph Steiner
826d70f2c9 script to automatically cherry-pick complete translations from Weblate
This creates a branch 'merge_weblate' and cherry picks commits from Weblate
that contain 100% complete translations.
2019-05-10 16:30:26 +02:00
Hans-Christoph Steiner
1d359f82ce actually use index added/lastUpdated dates in UTC
The date/time written to index.xml and index-v1.json should always be in
UTC format.  These formats are often in the form of just a date, e.g.
2019-04-28.  Those are then converted to UNIX seconds, which includes the
time.  In the date only case, the time is assumed to be 00:00, which will
be different per time zone.

index-v1.json is better since it mostly uses Java-style UNIX time in millis
but the dates/times are parsed then stored in the local database in the old
format yyyy-MM-dd_HH:mm:ss which will result in different UNIX times when
the device is in different time zones.

fdroid/fdroidclient#1757
2019-05-10 16:30:23 +02:00
Hans-Christoph Steiner
c0c5721f6a Normalize Repo.lastUpdated values to contain the date and time
This also converts old Repo.lastUpdated values rather than just failing.
index.xml handling used to store the Repo "Last Updated" date used to store
the value as just an ISO date (2019-04-29), then the time was added.  So if
date/time parsing fails, this falls back to trying to parse just the date.
null is returned when parsing fails, and the Latest Tab shows nothing if
the Last Updated is null.

Some related tests were also tweaked.

Hopefully:
closes fdroid/fdroidclient#1757
2019-05-10 14:13:23 +02:00
Hans-Christoph Steiner
d62c0cf723 AppDetails: use inline OnClickListeners in Android style
no need to declare variables that are used in one place.  Also, reordered
related lines a bit for clarity.
2019-05-10 14:13:23 +02:00
Hans-Christoph Steiner
a71489a102 set max width on places where the translations get too long
closes #1678
2019-05-10 14:13:23 +02:00
ioTY
67af661640 Check whether fdroidPrivileged enabled 2019-05-10 14:13:23 +02:00
Hans-Christoph Steiner
af1040443e ignore Errors and Exceptions in background services
Throwable includes Errors and Exceptions.  Fixes stacktraces like these:

java.lang.RuntimeException: An error occurred while executing doInBackground()
	at android.os.AsyncTask$3.done(AsyncTask.java:325)
	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
	at java.util.concurrent.FutureTask.run(FutureTask.java:242)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
	at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.NoSuchMethodError: No virtual method toPath()Ljava/nio/file/Path; in class Ljava/io/File; or its super classes (declaration of 'java.io.File' appears in /system/framework/core-oj.jar)
	at org.apache.commons.io.FileUtils.isSymlink(FileUtils.java:3107)
	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1616)
	at org.fdroid.fdroid.DeleteCacheService.onHandleWork(DeleteCacheService.java:32)
	at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:391)
	at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:382)
	at android.os.AsyncTask$2.call(AsyncTask.java:305)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	... 3 more
java.lang.NoSuchMethodError: No virtual method toPath()Ljava/nio/file/Path; in class Ljava/io/File; or its super classes (declaration of 'java.io.File' appears in /system/framework/core-oj.jar)
	at org.apache.commons.io.FileUtils.isSymlink(FileUtils.java:3107)
	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1616)
	at org.fdroid.fdroid.DeleteCacheService.onHandleWork(DeleteCacheService.java:32)
	at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:391)
	at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:382)
	at android.os.AsyncTask$2.call(AsyncTask.java:305)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
	at java.lang.Thread.run(Thread.java:761)
2019-05-10 14:13:23 +02:00
Hans-Christoph Steiner
5cce64e153
version code 1007000 2019-05-10 14:13:15 +02:00
Hans-Christoph Steiner
738a4be9fd
update ChangeLog 2019-05-10 14:13:07 +02:00
Hans-Christoph Steiner
5a3e9f2f58 Merge branch 'master' into 'master'
IndexV1Updater: Closing JarFile on end of use. Closes issue #1382.

Closes #1382

See merge request fdroid/fdroidclient!819
2019-05-10 10:34:16 +00:00
AmirAli Akbari
f76f9357d7 IndexV1Updater: Closing JarFile on end of use. Closes issue #1382. 2019-05-10 10:34:16 +00:00
Hans-Christoph Steiner
0d9a203447
Revert "gitlab-ci: job must be called 'pages' to deploy to GitLab Pages"
This reverts commit c5daf1981a7f00de16e19120ac42575c0e4bc424.

Turns I was confused here.  Yes, the job has to be called "pages" if the
job is deploying to GitLab Pages.  But in the case of `fdroid nightly`, the
thing that is deploying to GitLab Pages is the .gitlab-ci.yml that is in
the *-nightly repo, which is auto-generated by `fdroid nightly`.

fdroid/fdroidserver#649
2019-04-26 10:46:39 +02:00
Hans-Christoph Steiner
080f93eb9c Merge branch 'fix-emulator-tests' into 'master'
Fix emulator tests

See merge request fdroid/fdroidclient!816
2019-04-25 22:57:08 +00:00
Hans-Christoph Steiner
306786c9e5 gitlab-ci: run tests three times before marking whole job as failed
There are soo many of these:

org.fdroid.fdroid.net.HttpDownloaderTest > downloadThenCancel[avd27(AVD) - 8.1.0] FAILED
Test failed to run to completion. Reason: 'Instrumentation run failed due to 'Process crashed.''. Check device logcat for details
2019-04-26 00:00:47 +02:00
Hans-Christoph Steiner
ad093d49e6 add weblate config file for wlc CLI tool 2019-04-25 21:19:09 +02:00
Hans-Christoph Steiner
b1fd5395b6 gitlab-ci: download proven emulator version
based on https://aur.archlinux.org/android-emulator.git
2019-04-25 21:19:09 +02:00
Hans-Christoph Steiner
951375f526 gitlab-ci: ensure standard RAM sizes if it needs to be downscaled
gitlab.com says they always use 4GB instances now anyways.
2019-04-23 17:57:23 +02:00
Hans-Christoph Steiner
b8dba454e3 gitlab-ci: only run Espresso tests on emulators newer than 25 2019-04-23 16:34:57 +02:00
Hans-Christoph Steiner
854941363d Merge branch 'test-nightly-fix' into 'master'
fix nightly

See merge request fdroid/fdroidclient!814
2019-04-18 16:54:04 +00:00
Hans-Christoph Steiner
003c448bba gitlab-ci: only set ramsize if host has <4GB RAM 2019-04-17 19:40:31 +02:00
Hans-Christoph Steiner
dbe65f0365 gitlab-ci: fix emulator install for android-Q 2019-04-17 19:28:31 +02:00
Hans-Christoph Steiner
c5daf1981a gitlab-ci: job must be called 'pages' to deploy to GitLab Pages
https://docs.gitlab.com/ee/user/project/pages/getting_started_part_four.html#job

fdroid/fdroidserver#649
2019-04-17 15:51:21 +02:00
Hans-Christoph Steiner
d7453d878d fix lint: Repeated word "do" in message: possible typo 2019-04-17 15:51:21 +02:00
Hans-Christoph Steiner
3915abccc0 version code 1006050 2019-04-10 00:59:51 +02:00