Commit graph

255 commits

Author SHA1 Message Date
Torsten Grote
15969e0d88 Cache folder contents in K/V backup/restore
This speeds up things significantly and was needed due to poor
performance of call log backup.
2020-10-22 03:22:49 +05:30
Chirayu Desai
02438c91d3 Drop prebuilt deployment
* With Android.bp support merged in (and working well for both 10 and 11),
  we keep that as the primary and supported method to integrate Seedvault.
* Gradle can still be used for development
* You can still use your own prebuilts if you want, we just won't be
  putting them out ourselves
2020-10-22 03:22:49 +05:30
Michael Bestas
fac1eada12 Make seedvault compile in AOSP properly
* Add Android.bp to compile using AOSP build system instead of gradle
* Add prebuilt external libs that are not available on AOSP

Fixes #97

Co-authored-by: Chirayu Desai <chirayudesai1@gmail.com>
2020-10-22 03:22:49 +05:30
Michael Bestas
e9fd97c41e Upgrade androidx-lifecycle-livedata to 2.3.0-alpha05
* All previous aar versions have their modified date set to 0 which trigger
  the following openjdk bug:
  https://bugs.openjdk.java.net/browse/JDK-8184940
  This fixes the following compilation error while building in AOSP environment:

    java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
2020-10-22 03:22:49 +05:30
Michael Bestas
0ce613b64d Drop dependency on kotlin-android-extensions
* Not available on AOSP.
2020-10-22 03:22:49 +05:30
Torsten Grote
b12adcd4c0 Don't use BuildConfig, because it is only available for gradle builds
and not in AOSP builds which will break
2020-10-22 03:22:49 +05:30
Torsten Grote
30e70527fb Don't let the user start a new backup when one is already in progress 2020-10-22 03:22:49 +05:30
Torsten Grote
b9ffe2c03e Show notification for backup running in the background
The system triggers backup jobs periodically or when a package is
announcing that its data has changed. So far we were not showing
notifications for those. This commit shows a notification with an
indeterminate progress bar as we don't have any information about how
many packages will get backed up.
2020-10-22 03:22:49 +05:30
Torsten Grote
72871d3d66 Enable backup of call logs
It turned out that call log backup is already in AOSP, but it is
disabled by an undocumented flag. This commit sets this flag (for new
and existing installs) to enable call log backup.
2020-10-22 03:22:49 +05:30
Torsten Grote
425459fe79 When restoring, set token from RestoreSet as new token 2020-10-22 03:22:49 +05:30
Torsten Grote
f6ea5c1db5 Clean up backup transport initialization logic
This commit makes creating new RestoreSets explicit.
Initializing a backup transport now actually cleans its data as the AOSP
documentation demands. This should be fine as we usually do a fresh
backup after a new initialization.
Contrary to before, an initialization does not create new RestoreSets
anymore, but works within the existing set. For now, only manually
choosing a new storage location creates a new RestoreSet.
2020-10-22 03:22:49 +05:30
Torsten Grote
a425ae706e Show percentages in progress notification and x of n status at the end
Fine-grained progress reporting causes apps to show up twice which is
confusing. Also @pm@ metadata and opt-out APKs are too much detail for
normal users. So we decided to only show a percentage in the progress
notification.

When the backup finished, the app now shows "x of n apps backed up"
which is more positive when the previous negative message of how many
apps were not backed up.

Some further minor tweets were done to app counting to report proper
totals.
2020-10-22 03:22:49 +05:30
Torsten Grote
d2c426db93 Let backup notification report more fine-grained progress
This adds @pm@ record backup and APK backup of opt-out apps to the
progress reporting since these two operations are slow when using a
cloud storage SAF backend.
2020-10-22 03:22:49 +05:30
Torsten Grote
740fe53a52 Improve DocumentsProvider tests against Nextcloud 2020-10-22 03:22:49 +05:30
Torsten Grote
897fd8473e Explain better how we force initialization via the SettingsManager 2020-10-22 03:22:49 +05:30
Torsten Grote
77ce3f6fe8 Make app blacklist accessible by multiple threads
Might fix #83
2020-10-22 03:22:49 +05:30
Torsten Grote
0b6742df44 Only consider apps that really opt-out of backup for early APK backup 2020-10-22 03:22:49 +05:30
Torsten Grote
a63a893a61 Ensure streams get closed eventually 2020-10-22 03:22:49 +05:30
Torsten Grote
5515e5c88f Fix icon color of storage locations (Nextcloud icon got tinted) 2020-10-22 03:22:49 +05:30
Torsten Grote
30e66f368e Make PluginTest work for Nextcloud as well
Only issue left was a different maximum file name length for Nextcloud
2020-10-22 03:22:49 +05:30
Torsten Grote
2958c8fac8 Replace all instances of DocumentFile#findFile with #findFileBlocking
Also start sticking closer to the official Kotlin formatting style
2020-10-22 03:22:49 +05:30
Torsten Grote
18d83767b3 Check for loading cursor also when checking if files exist
Loading cursors can happen with cloud-based documents providers
such as Nextcloud.
When they return a cursor that is still loading,
we might continue with stale information.
So now we wait for a loading cursor to be fully loaded
before continuing.
2020-10-22 03:22:49 +05:30
Torsten Grote
131c5b6b29 Add test to reproduce the loading cursor phenomena with Nextcloud
See: https://commonsware.com/blog/2019/12/14/scoped-storage-stories-listfiles-woe.html
2020-10-22 03:22:49 +05:30
Torsten Grote
22aaaeb1fd Add instrumentation tests for storage plugin (SAF) 2020-10-22 03:22:49 +05:30
Torsten Grote
2f62e9515c Upgrade gradle 2020-10-22 03:22:49 +05:30
Michael Bestas
b563893304 String improvements
* Don't use camel case, following AOSP applications
* Set app name and Nextcloud as untranslatable
2020-10-22 03:22:49 +05:30
Robin Schneider
f5f341b7b7 Remove wrongly inserted "g" char from AndroidManifest.xml
Introduced in: 78e217c7d8
2020-10-22 03:22:49 +05:30
Torsten Grote
326fc32f7a
Merge pull request #105 from steadfasterX/patch-1
add requirements topic
2020-08-04 15:02:04 -03:00
stay steadfast
18c1baaacd
set to Android 10 only
.. as it is unclear if A11 and/or later will be supported
2020-07-31 15:57:17 +02:00
stay steadfast
0e7fca896a
add requirements topic
let users know that A10 or higher is needed
2020-07-27 10:48:15 +02:00
Steve Soltys
a585324c71
Merge pull request #75 from stevesoltys/develop
Merge develop into master
2020-03-07 15:50:20 -05:00
Steve Soltys
78e217c7d8 Bump version code in Android manifest 2020-03-07 15:46:02 -05:00
Steve Soltys
bd52749c76 Version bump - 1.0.0 2020-03-07 15:41:49 -05:00
Steve Soltys
60e84808c5
Merge pull request #73 from grote/notification-fix
Fix Notification icon and hide navigation bar in SetupWizard
2020-01-22 14:31:23 -05:00
Torsten Grote
65905a7160
Hide navigation bar in SetupWizard for more visual consistency 2020-01-22 12:31:14 -03:00
Torsten Grote
3cdd381b51
Don't cache notification builders to always show the right icon 2020-01-22 12:25:32 -03:00
Steve Soltys
ee6d359c50
Merge pull request #72 from grote/70-app-backup-toggle
Allow the user to exclude apps from backup
2020-01-20 14:03:44 -05:00
Torsten Grote
c52d372442
Don't make the app immersive in SetupWizard
Fixes third item in #63
2020-01-20 11:58:38 -03:00
Torsten Grote
324da2a9e9
Allow the user to exclude apps from backup
Closes #70
2020-01-20 11:58:38 -03:00
Torsten Grote
c92b9a3606
Credit Glenn Sorrentino on About page 2020-01-20 10:01:44 -03:00
Torsten Grote
5d38f061d9
Make some app status list tweaks suggested by our designer Glenn 2020-01-20 09:53:51 -03:00
Steve Soltys
3ae600ea8e
Merge pull request #71 from grote/69-app-backup-status
Show list of apps and their backup status
2020-01-19 12:50:46 -05:00
Torsten Grote
a98364efbe
Back up APKs as early as possible to not miss any
Fixes #68
2020-01-18 16:42:26 -03:00
Torsten Grote
fcf17fe23a
Show list of apps and their backup status 2020-01-18 16:38:55 -03:00
Steve Soltys
6afdb7f4f7
Merge pull request #67 from grote/51-removable-storage-ux
Improve UX for auto-restore when using removable storage
2020-01-17 18:39:50 -05:00
Steve Soltys
97f82bc79e
Merge pull request #64 from grote/apk-backups
Optional App APK Backups
2020-01-14 23:58:40 -05:00
Torsten Grote
de16032905
Don't use wildcard imports, because they are considered harmful 2020-01-14 15:40:56 -03:00
Torsten Grote
6ed522bfb7
Show one single progress bar in the notification
Also don't show individual package results,
but a single dismissible status notification in the end.

Closes #59, #61
2020-01-14 15:18:16 -03:00
Torsten Grote
2bcf82d607
Show heads-up notification when auto-restore fails due to removed storage 2020-01-14 10:17:38 -03:00
Torsten Grote
783e676be2
Optimize the restore of a single application (e.g. auto restore)
This restores only the @pm@ keys that are really needed
and thus speeds up installation with auto restore considerably
when using cloud storage such as NextCloud for example.
2020-01-14 10:17:37 -03:00