Commit graph

600 commits

Author SHA1 Message Date
Torsten Grote
3487c91ba3 Do not re-install apps that require splits
The app will be shown as failed during restore and the user will be given the opportunity to re-install it manually via an installed ap store
2020-10-13 18:32:04 +05:30
Torsten Grote
643247b600 Change UI for re-installation of system apps
We are re-installing system apps if they are present on the restore device as a system app and have a newer version code.
Before, when one of those conditions is not true, we were showing a failure and gave the user the option to re-install the app from an app store.
Now, we don't offer the manual re-install option anymore and only show a success when a newer or same version of the system app is already installed.
2020-10-13 18:32:04 +05:30
Torsten Grote
0971c5db19 Do not back up APKs of test-only apps, as we can not re-install them anyway
The flag to allow installation gets filtered out after we set it:
http://aosp.opersys.com/xref/android-11.0.0_r5/xref/frameworks/base/services/core/java/com/android/server/pm/PackageInstallerService.java#544
2020-10-13 18:32:04 +05:30
Torsten Grote
0a8a286826 Update state of opt-out apps, even if they never had any state 2020-10-13 18:32:04 +05:30
Torsten Grote
a9402f4644 Update app install state after user comes back from manually installing an app
This way, the list of failed apps ideally keeps shrinking, allowing the user to see which apps are still left in a failed state.
2020-10-13 18:32:04 +05:30
Torsten Grote
1a81e2ddd6 If possible, open the app store an app was originally installed with
When an app fails to install during restore, we offer the option to manually install it.
If this doesn't happen with the same app store,
it is likely that the installed app will have a different signature (e.g. Aurora vs. F-Droid).
If the signature doesn't match, the data restore will fail.
Therefore, we attempt to let the user only use the same store for re-install.

There's a known issue that F-Droid doesn't report the proper package name:
https://gitlab.com/fdroid/fdroidclient/-/issues/2085
2020-10-13 18:32:04 +05:30
Torsten Grote
d6cb34c211 Allow the user to manually re-install apps before data restore starts
When one or more apps fail to install, the user is shown a dialog explaining that we need the apps installed in order for restore to work.
After the dialog is dismissed, the list of apps is resorted so failed apps are at the top. They are made clickable and the user is brought to an app store to re-install them.
2020-10-13 18:32:04 +05:30
Torsten Grote
747384fb59 Refactor InstallResult to be more extensible 2020-10-13 18:32:04 +05:30
Torsten Grote
f45411d81b Refactor code related to APK installs as preparation for upcoming changes 2020-10-13 18:32:04 +05:30
Torsten Grote
9830d2db95 Show different app state messages for backup and restore 2020-10-13 18:32:04 +05:30
Torsten Grote
3a31e09a04 Back up split APKs as well and store them in the metadata
This will enable us to check compatibility of the splits with the restore device and if compatible, re-install them.
2020-10-13 18:32:04 +05:30
Torsten Grote
af2bf4f60a Support APK splits in metadata 2020-10-13 18:32:04 +05:30
Torsten Grote
46e8a46c63 Pull out code in ApkBackup and ApkRestore into own methods 2020-10-13 18:32:04 +05:30
Torsten Grote
741e5ef1a0 Fix storage chooser title if the translation is long 2020-10-08 19:27:51 +05:30
Torsten Grote
9ae3c6e835 Add some documentation to the transport methods 2020-10-08 19:27:51 +05:30
Torsten Grote
fbdfa40300 Load app status data off the UI thread
Previously, the data was loaded on the UI thread which produced a
visible freeze after clicking "App backup status".
2020-10-08 19:27:51 +05:30
Torsten Grote
0612f79195 Fix or permit certain disk reads on UI thread 2020-10-08 19:27:51 +05:30
Torsten Grote
1d2c74bf2c Ensure that metadata cache streams get closed 2020-10-08 19:27:51 +05:30
Torsten Grote
4387353227 Enable StrictMode for userdebug builds 2020-10-08 19:27:51 +05:30
Torsten Grote
948cd597d8 Show proper transport labels for OS transport selection
If an AOSP-based ROM allows the user to choose a backup transport, these labels will be shown.
2020-10-08 19:27:51 +05:30
Torsten Grote
6c531066e7 Enable automatic coding style linting with ktlint (also on CI)
This way the coding style is guaranteed to stay consistent.
2020-10-07 19:44:05 +05:30
Torsten Grote
53937bda2f Auto-format code style of all files to match official style
This also adds a note to the README
and the Android Studio coding style files.
2020-10-07 19:44:05 +05:30
Torsten Grote
55909ce305 Fix lint issues with translations and ignore missing translations
as weblate doesn't seem to have a way to only import completed
translations.
2020-10-07 19:01:39 +05:30
Torsten Grote
d2ed3a10f0 Fix dependency issues by strictly requiring specific versions
Otherwise gradle pulls in newer versions of some libraries that require
a newer Kotlin version at runtime and then make the app crash.

This also moves the dependency declarations into a dedicated file.
2020-10-07 19:01:39 +05:30
Torsten Grote
57f404281c Fix lint warnings 2020-10-07 19:01:39 +05:30
Torsten Grote
af4b6807f2 Fix compile warnings on AOSP 11 2020-10-07 19:01:39 +05:30
Torsten Grote
ceac5fc5ce Clean up koin-android dependencies and upgrade koin 2020-10-07 19:01:39 +05:30
Torsten Grote
cfcf7b35ba Clean up BIP39 dependencies 2020-10-07 19:01:39 +05:30
Torsten Grote
6cde6be997 Sync AndroidX dependencies with those available in AOSP 2020-10-07 19:01:39 +05:30
Torsten Grote
8f91138e9f Remove dependency on commons-io library 2020-10-07 19:01:39 +05:30
Torsten Grote
8bdbe6d681 Handle new FLAG_DATA_NOT_CHANGED for K/V backups 2020-10-07 19:01:39 +05:30
Torsten Grote
25695d72b8 Fix storage selection screen (icon color and available bytes) 2020-10-07 19:01:39 +05:30
Torsten Grote
918d7a712a Add QUERY_ALL_PACKAGES permission which is now needed on Android 11 2020-10-07 19:01:39 +05:30
Torsten Grote
6e58ec0340 Fix instrumentation tests on Android 11 2020-10-07 19:01:39 +05:30
Torsten Grote
45ac8883a0 Fix roboelectric unit tests 2020-10-07 19:01:39 +05:30
Torsten Grote
415b5729d5 Bump AOSP versions for gradle build 2020-10-07 19:01:39 +05:30
Torsten Grote
ca309df03d Upgrade AOSP libraries for gradle build 2020-10-07 19:01:39 +05:30
Chirayu Desai
680ad8b7db Fix translations manually, replacing &lt;&gt; by <>
* Previous attempt via weblate failed, let's just do it here this way
2020-09-25 20:05:15 +05:30
Hosted Weblate
7af61ac92d Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/
Translation: CalyxOS/Seedvault
2020-09-25 20:05:15 +05:30
Chirayu Desai
ddc13516d3 Translated using Weblate (French)
Currently translated at 80.3% (90 of 112 strings)

Translated using Weblate (Icelandic)

Currently translated at 81.8% (90 of 110 strings)

Translated using Weblate (Spanish (American))

Currently translated at 80.9% (89 of 110 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 78.1% (86 of 110 strings)

Translated using Weblate (French)

Currently translated at 81.8% (90 of 110 strings)

Co-authored-by: Chirayu Desai <chirayudesai1@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/es_US/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/fr/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/is/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/nb_NO/
Translation: CalyxOS/Seedvault
2020-09-25 20:05:15 +05:30
ssantos
d1e4cdb137 Translated using Weblate (Portuguese)
Currently translated at 100.0% (110 of 110 strings)

Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/pt/
Translation: CalyxOS/Seedvault
2020-09-25 20:05:15 +05:30
Milo Ivir
688753d55f Translated using Weblate (Croatian)
Currently translated at 100.0% (110 of 110 strings)

Co-authored-by: Milo Ivir <mail@milotype.de>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/hr/
Translation: CalyxOS/Seedvault
2020-09-25 20:05:15 +05:30
Michael Bestas
4dbb73aaaf Translated using Weblate (Greek)
Currently translated at 100.0% (110 of 110 strings)

Co-authored-by: Michael Bestas <mkbestas@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/el/
Translation: CalyxOS/Seedvault
2020-09-25 20:05:15 +05:30
H
1aef02e1ed Translated using Weblate (Spanish)
Currently translated at 99.0% (109 of 110 strings)

Co-authored-by: H <joaquinfc@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/es/
Translation: CalyxOS/Seedvault
2020-09-25 20:05:15 +05:30
Nikita Epifanov
a0c70293aa Translated using Weblate (Russian)
Currently translated at 100.0% (110 of 110 strings)

Co-authored-by: Nikita Epifanov <nikgreens@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/ru/
Translation: CalyxOS/Seedvault
2020-09-25 20:05:15 +05:30
Samuel Carvalho de Araújo
fc35acadb9 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (110 of 110 strings)

Co-authored-by: Samuel Carvalho de Araújo <samuelnegro12345@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/pt_BR/
Translation: CalyxOS/Seedvault
2020-09-25 20:05:15 +05:30
Hosted Weblate
f636831f9e Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 79.6% (86 of 108 strings)

Translated using Weblate (Spanish)

Currently translated at 99.0% (107 of 108 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 72.2% (78 of 108 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 14.8% (16 of 108 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 94.4% (102 of 108 strings)

Translated using Weblate (Russian)

Currently translated at 7.4% (8 of 108 strings)

Translated using Weblate (Russian)

Currently translated at 6.4% (7 of 108 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 3.7% (4 of 108 strings)

Translated using Weblate (German)

Currently translated at 70.3% (76 of 108 strings)

Translated using Weblate (Icelandic)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Spanish (American))

Currently translated at 97.2% (105 of 108 strings)

Translated using Weblate (Spanish)

Currently translated at 34.2% (37 of 108 strings)

Translated using Weblate (Italian)

Currently translated at 60.1% (65 of 108 strings)

Translated using Weblate (Italian)

Currently translated at 38.8% (42 of 108 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 94.4% (102 of 108 strings)

Translated using Weblate (German)

Currently translated at 10.1% (11 of 108 strings)

Translated using Weblate (French)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (French)

Currently translated at 65.7% (71 of 108 strings)

Added translation using Weblate (Dutch)

Added translation using Weblate (Zulu)

Added translation using Weblate (Chinese (Traditional, Hong Kong))

Added translation using Weblate (Chinese (Traditional))

Added translation using Weblate (Chinese (Simplified))

Added translation using Weblate (Vietnamese)

Added translation using Weblate (Uzbek)

Added translation using Weblate (Urdu)

Added translation using Weblate (Ukrainian)

Added translation using Weblate (Turkish)

Added translation using Weblate (Tagalog)

Added translation using Weblate (Thai)

Added translation using Weblate (Telugu)

Added translation using Weblate (Tamil)

Added translation using Weblate (Swahili)

Added translation using Weblate (Swedish)

Added translation using Weblate (Serbian (latin))

Added translation using Weblate (Serbian)

Added translation using Weblate (Albanian)

Added translation using Weblate (Slovenian)

Added translation using Weblate (Slovak)

Added translation using Weblate (Sinhala)

Added translation using Weblate (Romanian)

Added translation using Weblate (Portuguese (Portugal))

Added translation using Weblate (Portuguese (Brazil))

Added translation using Weblate (Portuguese)

Added translation using Weblate (Polish)

Added translation using Weblate (Punjabi)

Added translation using Weblate (Odia)

Added translation using Weblate (Nepali)

Added translation using Weblate (Burmese)

Added translation using Weblate (Malay)

Added translation using Weblate (Marathi)

Added translation using Weblate (Mongolian)

Added translation using Weblate (Malayalam)

Added translation using Weblate (Macedonian)

Added translation using Weblate (Latvian)

Added translation using Weblate (Lithuanian)

Added translation using Weblate (Lao)

Added translation using Weblate (Kyrgyz)

Added translation using Weblate (Korean)

Added translation using Weblate (Kannada)

Added translation using Weblate (Central Khmer)

Added translation using Weblate (Kazakh)

Added translation using Weblate (Georgian)

Added translation using Weblate (Japanese)

Added translation using Weblate (Icelandic)

Added translation using Weblate (Indonesian)

Added translation using Weblate (Armenian)

Added translation using Weblate (Hungarian)

Added translation using Weblate (Croatian)

Added translation using Weblate (Galician)

Added translation using Weblate (French (Canada))

Added translation using Weblate (Finnish)

Added translation using Weblate (Persian)

Added translation using Weblate (Basque)

Added translation using Weblate (Estonian)

Added translation using Weblate (English (India))

Added translation using Weblate (English (United Kingdom))

Added translation using Weblate (English (Canada))

Added translation using Weblate (English (Australia))

Added translation using Weblate (Danish)

Added translation using Weblate (Czech)

Added translation using Weblate (Catalan)

Added translation using Weblate (Bosnian)

Added translation using Weblate (Bengali)

Added translation using Weblate (Bulgarian)

Added translation using Weblate (Belarusian)

Added translation using Weblate (Azerbaijani)

Added translation using Weblate (Assamese)

Added translation using Weblate (Amharic)

Added translation using Weblate (Afrikaans)

Added translation using Weblate (Spanish (American))

Added translation using Weblate (Spanish)

Added translation using Weblate (Arabic)

Added translation using Weblate (Italian)

Added translation using Weblate (Hebrew)

Added translation using Weblate (Norwegian Bokmål)

Added translation using Weblate (Hindi)

Added translation using Weblate (Russian)

Added translation using Weblate (German)

Added translation using Weblate (Gujarati)

Added translation using Weblate (French)

Translated using Weblate (Greek)

Currently translated at 29.6% (32 of 108 strings)

Added translation using Weblate (Greek)

Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Catherine Pierattini <catherine.pierattini@gmail.com>
Co-authored-by: CatieC <catie@calyxinstitute.org>
Co-authored-by: Chirayu Desai <chirayudesai1@gmail.com>
Co-authored-by: Daniel <dan.ef1999@gmail.com>
Co-authored-by: H <joaquinfc@protonmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Meili Huang <meilihuang1216@gmail.com>
Co-authored-by: Michael Bestas <mkbestas@gmail.com>
Co-authored-by: Mordur Aslaugarson <mordur@1984.is>
Co-authored-by: Nikita Epifanov <nikgreens@protonmail.com>
Co-authored-by: Robin Kunze <robinkunze@outlook.com>
Co-authored-by: Samuel Carvalho de Araújo <samuelnegro12345@gmail.com>
Co-authored-by: Santiago Cruz <scruz4@tuta.io>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/de/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/el/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/es/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/es_US/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/fr/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/is/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/it/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/ru/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/zh_Hans/
Translation: CalyxOS/Seedvault
2020-09-25 20:05:15 +05:30
Torsten Grote
e3406613a6 Always show Nextcloud as an option, offer to install or set up account
Outside of SetupWizard restore, we don't offer to set up an account,
because we don't know if one already exists and the app was locked with
a passcode.
2020-09-25 06:05:47 +05:30
Torsten Grote
c5aca6dd51 Fix status reporting of failed system app restore 2020-09-25 05:55:40 +05:30
Torsten Grote
d7ca8151fd User-initiated backups should also be incremental 2020-09-25 05:55:40 +05:30
Torsten Grote
8185b6af6e Bring the user to app system settings when long tapping apps 2020-09-25 05:55:40 +05:30
Torsten Grote
7f4761816e Show a different text for stopped apps in app backups status page 2020-09-25 05:55:40 +05:30
Torsten Grote
77550a9860 Treat stopped apps different from opt-out apps
Apps that have FLAG_STOPPED will not get backed up, just like apps
without flag ALLOW_BACKUP will not get backed up.
In the UI both cases are shown the same way: app does not allow backup
This can be confusing for the user as it is not true for stopped apps.
Therefore, this commit introduces a new stopped state for apps,
so we can differentiate between both cases.
2020-09-25 05:55:40 +05:30
Torsten Grote
3e176c8e1c Fix opt-out apps showing up as not yet backed up
This bug also caused APKs of opt-out apps not getting backed up.
2020-09-25 05:55:40 +05:30
Torsten Grote
9f2b56e4ce Fix bug where we could not do two subsequent restores
This probably never showed in practice, but it can be triggered easily
when testing with `adb shell bmgr restore`.
2020-09-18 00:22:45 +05:30
Torsten Grote
b594d30e2c Fix auto-service warning in instrumentation tests 2020-09-17 06:06:14 +05:30
Torsten Grote
9f49a39514 Don't use Kotlin reflection if not really necessary 2020-09-17 06:06:14 +05:30
Torsten Grote
42ab8ffba5 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-09-17 06:06:14 +05:30
Michael Bestas
239b83196f 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-09-11 19:04:38 +05:30
Michael Bestas
eb15fa93ed 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-09-11 19:04:38 +05:30
Michael Bestas
4283630e26 Drop dependency on kotlin-android-extensions
* Not available on AOSP.
2020-09-11 19:04:38 +05:30
Torsten Grote
5afcd0d6e6 Don't use BuildConfig, because it is only available for gradle builds
and not in AOSP builds which will break
2020-09-11 19:04:38 +05:30
Torsten Grote
1cdc2be930 Don't let the user start a new backup when one is already in progress 2020-09-11 19:04:38 +05:30
Torsten Grote
43b24b5c29 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-09-11 19:04:38 +05:30
Torsten Grote
a39f697a96 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-09-11 19:04:38 +05:30
Torsten Grote
79aaaf5908 When restoring, set token from RestoreSet as new token 2020-09-11 19:04:38 +05:30
Torsten Grote
1b9a4feddd 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-09-11 19:04:38 +05:30
Torsten Grote
80187c8c70 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-09-11 19:04:38 +05:30
Torsten Grote
983f917391 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-09-11 19:04:38 +05:30
Torsten Grote
7bda3eb12b Improve DocumentsProvider tests against Nextcloud 2020-09-11 19:04:38 +05:30
Torsten Grote
25962ed307 Explain better how we force initialization via the SettingsManager 2020-09-11 19:04:38 +05:30
Torsten Grote
3a717b109d Make app blacklist accessible by multiple threads
Might fix #83
2020-09-11 19:04:38 +05:30
Torsten Grote
73e969a0bd Only consider apps that really opt-out of backup for early APK backup 2020-09-11 19:04:38 +05:30
Torsten Grote
e7a13fdb5c Ensure streams get closed eventually 2020-09-11 19:04:38 +05:30
Torsten Grote
91daa8e051 Fix icon color of storage locations (Nextcloud icon got tinted) 2020-09-11 19:04:38 +05:30
Torsten Grote
e138e0a4e2 Make PluginTest work for Nextcloud as well
Only issue left was a different maximum file name length for Nextcloud
2020-09-11 19:04:38 +05:30
Torsten Grote
7fdefda85f Replace all instances of DocumentFile#findFile with #findFileBlocking
Also start sticking closer to the official Kotlin formatting style
2020-09-11 19:04:38 +05:30
Torsten Grote
f7df78d2f3 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-09-11 19:04:38 +05:30
Torsten Grote
b1b522807c 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-09-11 19:04:38 +05:30
Torsten Grote
b505425525 Add instrumentation tests for storage plugin (SAF) 2020-09-11 19:04:38 +05:30
Torsten Grote
f68095a463 Upgrade gradle 2020-09-11 19:04:38 +05:30
Michael Bestas
46cd13a55c String improvements
* Don't use camel case, following AOSP applications
* Set app name and Nextcloud as untranslatable
2020-09-11 19:04:38 +05:30
Robin Schneider
a51fcfc0b4 Remove wrongly inserted "g" char from AndroidManifest.xml
Introduced in: 78e217c7d8
2020-09-11 19:04:38 +05:30
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
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
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
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
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
Torsten Grote
43184f4d23
Add note to auto-restore setting in case removable storage is used
This warns the user that auto-restore will only work when their storage
is plugged in.
2020-01-14 10:17:37 -03:00
Torsten Grote
22be36e2a7
When an app could not be restored, show the likely reason for it 2020-01-14 10:11:17 -03:00
Torsten Grote
74183d40d6
Add system app flag to metadata and check before installing system apps
that they are present as an older system app on the restore system.

Also ignore system apps without data to backup.
2020-01-14 10:11:17 -03:00
Torsten Grote
2a4ff39531
Simplify PackageService and use standard PackageManager
@stevesoltys this removes your old way of retreiving installed packages
via getInstalledPackages(0, UserHandle.USER_SYSTEM) as I couldn't find a
difference to the official way.

Also IGNORED_PACKAGES isn't needed anymore since
filterAppsEligibleForBackupForUser() already filters those out.
2020-01-14 07:45:41 -03:00
Torsten Grote
fea53a759f
Also back-up APKs of apps that are not allowed to have their data backed up 2020-01-14 07:45:41 -03:00
Torsten Grote
3d296e1335
Also back up APKs of apps that have no data or are above quota
This should also affect apps that have other errors during the backup
process, but it does not affect apps that opt-out of backup completely.

First part of #65
2020-01-14 07:45:41 -03:00
Torsten Grote
3f73119b52
Show restore data progress bar and improve readability of log messages 2020-01-14 07:45:40 -03:00
Torsten Grote
1924db7779
Move date restore view state into ViewModel to survive configuration changes 2020-01-14 07:45:40 -03:00
Torsten Grote
5632f11878
Show when package restore failed 2020-01-14 07:45:40 -03:00
Torsten Grote
9f01d09962
Don't get or write to full backup output stream before we are not sure there will be data to write 2020-01-14 07:45:39 -03:00
Torsten Grote
7b27242625
Show apps that we could not restore data for 2020-01-14 07:45:39 -03:00
Torsten Grote
690017c050
Only back up APK and write metadata when app was actually backed up
Apps that have nothing to back up start a backup but then get a call to cancelFullBackup()
and never even call finishBackup().
Do not write metadata for such apps, the call got moved to finishBackup().
2020-01-14 07:45:39 -03:00
Torsten Grote
2f352fe828
Show list of packages that we could restore data for 2020-01-14 07:45:39 -03:00
Torsten Grote
96a4642f4f
Show list of re-installed apps and let the user review it before restoring data 2020-01-14 07:45:38 -03:00
Torsten Grote
debaca0e2c
Ignore RestoreSets with no last backup time 2020-01-14 07:45:38 -03:00
Torsten Grote
f562857514
Expose APK backup feature as a setting, so the user can disable it
The user might not want to have their apps copied to the storage,
because it is very slow or for other reasons.
2020-01-14 07:45:38 -03:00
Torsten Grote
7605762631
Re-install backed-up APKs before restoring from backup 2020-01-14 07:45:37 -03:00
Torsten Grote
569e3db385
Fix device initialization and generation of new backup tokens 2020-01-14 07:45:37 -03:00
Torsten Grote
81c2031ce7
Back up APKs to storage (when they changed) and save metadata about them 2020-01-14 07:45:37 -03:00
Torsten Grote
b9cac5ea87
Introduce MetadataManager to handle all metadata related to backups
This now updates the metadata on remote storage and internal cache
after each successful package backup.
2020-01-14 07:45:36 -03:00
Torsten Grote
e1d55c8a4e
Add information about packages to backup metadata
This will be needed when backing up APKs.

ATTENTION: This is a breaking change, we only do because the app hasn't
been released.
2020-01-14 07:45:36 -03:00
Steve Soltys
01098a4d97
Merge pull request #60 from grote/check-messages
Encrypt values of key/value backups with multiple segments if needed
2019-12-22 20:24:33 -05:00
Torsten Grote
58a8f29b51
Encrypt values of key/value backups with multiple segments if needed
This turned out to be necessary, because some values on production
devices are exceeding the maximum segment size.
2019-12-19 08:55:57 -03:00
Torsten Grote
177e714001
Add error messages for unexpected state to ease debugging 2019-12-18 15:50:34 -03:00
Torsten Grote
94c7663daf
Use dependency injection with Koin 2019-12-17 09:56:45 -03:00
Torsten Grote
137e8033a7
Update time of backup progress notifications 2019-12-16 09:11:53 -03:00
Torsten Grote
d30cb309ca
Be more forgiving when checking available restore sets 2019-12-16 09:11:53 -03:00
Torsten Grote
440491425a
Work around DocumentFile bug happening with cloud-based DocumentsProviders
These might return outdated or now content when queried,
then check their cloud storage and report back with up-to-date content.
We now detect this (when looking for backups on newly setup storage)
and wait until the content has been loaded before acting on the
response.

This is affecting and was tested with NextCloud.
2019-12-16 09:11:52 -03:00
Torsten Grote
bbc8bdfaa5
Allow the user to leave the recovery code input if called from setup wizard 2019-12-11 13:48:00 -03:00
Torsten Grote
791f68300d
Allow to setup NextCloud account during restore
This is especially useful when restore is only allowed during
SetupWizard and the backup was stored on a NextCloud account.
2019-12-11 13:48:00 -03:00
Steve Soltys
cf86c57760
Merge pull request #52 from grote/about-page
Add About page
2019-12-07 15:13:01 -05:00
Torsten Grote
88a250ff5c
Use separate dev config and document existing config
Attention: This also changes the action to launch restore activity
2019-12-06 12:33:50 -03:00
Torsten Grote
49ce4b393f
Add a configurable white-list for backup storage 2019-12-06 12:21:49 -03:00
Torsten Grote
3093e3a789
Add About DialogFragment reachable from main overflow menu 2019-12-06 09:31:48 -03:00
Steve Soltys
32f558faf1 Rebrand application as 'Seedvault' 2019-10-28 21:57:47 -04:00
Torsten Grote
c9a29810fc
Remove unused code and resources 2019-09-25 11:04:24 -03:00
Torsten Grote
d81c355799
Advance a step when returning to SetupWizard from restore 2019-09-25 11:04:23 -03:00
Torsten Grote
470b5a2ccf
Tolerate backup attempts when flash drive is not plugged in
Also remove hardcoding of PACKAGE_MANAGER_SENTINEL constant
2019-09-23 10:29:01 -03:00
Torsten Grote
08018fcc9b
Do not allow manual backup/restore operations when removable storage is not available 2019-09-23 10:10:28 -03:00
Torsten Grote
cc2bb4a651
When selecting USB storage, do a backup right away
This is because USB drives are rarely plugged in,
so we should use every chance we get to do a backup.
2019-09-23 10:10:27 -03:00
Torsten Grote
26f23e95fe
Disable automatic backups when a removable USB flash drive is used
as storage location.

The backup backoff time is not reliable for this as the system still
attempts to backup the magic @pm@ package without checking for the
backoff value.
2019-09-23 10:10:27 -03:00
Torsten Grote
2c4d44c5b9
Grant MANAGE_USB permission, so we can get USB serial numbers
This is needed to reliably identify USB mass storage devices.
If someone has several identical thumb drives,
this prevents a backup from being performed when non-backup drives get attached.
2019-09-23 10:10:27 -03:00
Torsten Grote
007dd7759d
Save the time of the last backup and only do automatic flash drive backups once a day
This commit also turns SettingsManager into a class, so we can mock
and later also inject it.
2019-09-23 10:10:27 -03:00
Torsten Grote
b0386c8b66
Start backup automatically when flash drive used for backup is plugged in 2019-09-23 10:10:26 -03:00
Torsten Grote
650642068e
Don't try to do backups if storage is not available 2019-09-23 10:10:26 -03:00
Torsten Grote
bf28bc3338
Truncate files when writing to them explicitly
For some reason this wasn't an issue on Pie,
but an instrumentation test caught the change in behavior on Q.
2019-09-20 09:42:59 -03:00
Torsten Grote
e659892278
Fix CI by running tests with newer Java version, but target JDK 8 2019-09-19 12:52:31 -03:00
Torsten Grote
37ffacbafe
Upgrade to Android 10 (Q)
If somebody wants the backup app to work on a lower Android version,
they need to maintain a branch for that which uses and targets the old API.
2019-09-19 09:17:42 -03:00
Torsten Grote
8adb94c6c9
Explicitly tint storage root icons for system dark theme 2019-09-19 07:54:28 -03:00
Torsten Grote
0e5f9cff0f
Remove the progress bar for restore operation as progress reporting is bugyy
This also adds an additional warning when the user is using ejectable storage
2019-09-18 09:26:32 -03:00
Torsten Grote
55d92aec39
Adapt UI and text to the different use-cases (backup vs. restore) 2019-09-17 15:48:59 -03:00
Torsten Grote
10ad6d6b2d
Improve error message when no backups could be found for restore 2019-09-17 12:14:53 -03:00
Torsten Grote
54ad762eb1
Save more information about current storage location
Show storage name in settings
2019-09-17 12:14:53 -03:00
Torsten Grote
c6f83647b2
Show recovery code from top to bottom instead of from left to right
This way it is easier to enter it.
2019-09-17 12:14:53 -03:00
Torsten Grote
4efaa08881
Show notification right away when requesting manual backup 2019-09-17 12:14:53 -03:00
Torsten Grote
6d8178f6b1
Use the MANAGE_DOCUMENTS permission to show possible storage locations
This also auto-grants the needed Uri permission,
so the user does not need to go through the OS folder selection activity.
2019-09-17 12:14:51 -03:00
Torsten Grote
7455f4afb9
Remove READ_PHONE_STATE permission 2019-09-17 12:14:41 -03:00
Torsten Grote
9cede639f3
When restoring, ask for location first and then restore code
This also checks if there's a backup at the chosen location
and requires the user to select another once,
if we can not find a backup.
2019-09-11 17:26:03 -03:00
Torsten Grote
af43c6154d
Get rid of device folders, use unix epoch as backup token and store it 2019-09-11 15:26:10 -03:00
Torsten Grote
8b6656a350
Read RestoreSets from encrypted backup metadata file 2019-09-10 16:46:26 -03:00
Torsten Grote
f9c8b657a0
Write an encrypted metadata file for each restore set 2019-09-10 16:46:25 -03:00
Torsten Grote
044ef01ba1
Do not generate new 12-word code when restoring
Also allow auto-completion when entering the 12-word code.
This makes testing and entering the code easier
and does not compromise security as the word list is public anyway.
2019-09-10 13:35:58 -03:00
Torsten Grote
1a7fdfa59a
Implement restoring of backup and show progress in UI
Note that the progress view is not exact as the progress reporting of
AOSP seems to be buggy.
2019-09-10 13:35:58 -03:00
Torsten Grote
491789e8e0
Add a RestoreActivity that lists available RestoreSets (backups)
and allows the user to select one to get restored.
2019-09-10 13:35:57 -03:00
Torsten Grote
aa3aad8fb3
Return actually available RestoreSets
Before, we were always returnign a dummy RestoreSet,
if one was actually available or not.

Now, we also include the device name.
Note that it is planned to store the actual device name
and other metadata in an encrypted file
so that the backup server will not learn it.
2019-09-10 13:35:57 -03:00
Torsten Grote
c714a4e7e1
Show error notification when backup fails
The implementation is rudimentary for now.
E.g. The notification is only shown when a device init fails
which seems to be triggered after the first failure.
2019-09-02 17:07:21 -03:00
Torsten Grote
683268a15f
Add a unit test for checking word list integrity
Also does minor clean-ups
2019-09-02 17:03:44 -03:00
Torsten Grote
74aa62a264
Add instrumentation test for testing AES/GCM nonces are really unique 2019-09-02 09:47:53 -03:00
Torsten Grote
e955e021fd
Add a simple instrumentation test for testing on real devices 2019-09-02 09:47:52 -03:00
Torsten Grote
2685f2b48a
Don't show rejected packages (usually 0 size) as failed
Also change notification ID to not collide with Nextcloud's ID.
2019-09-02 09:47:52 -03:00
Torsten Grote
e2a3e3d2b7
Raise importance of backup notifications to show them in status bar 2019-09-02 09:47:52 -03:00
Torsten Grote
bd968be0b1
Remove BackupJobService as the OS is scheduling its own backups 2019-09-02 09:47:52 -03:00
Torsten Grote
a6e971609c
Implement clearing full backup data from storage 2019-09-02 09:47:51 -03:00
Torsten Grote
1ee443a3d8
Add a unique ID to the device folder name to avoid collisions
when using several devices of the same model with the same account
2019-09-02 09:47:51 -03:00
Torsten Grote
2ce625ac87
Huge refactoring of backup transport
* to get rid of global state
* to have a testable architecture
* to allow for authenticated encryption
* to have a backup format version
* to potentially allow for other storage plugins
2019-09-02 09:47:49 -03:00
Chirayu Desai
6136f589c1 Android.mk: Download prebuilt apk instead of building it
* With the upcoming changes, and the increasing number of external
  libraries being used, plus the usage of Kotlin, it's getting harder
  and harder to build this with the AOSP build system.
* It's best to leverage the existing gradle build system instead,
  and use the apk that builds.
* Add a script which downloads the apk matching the tag if a tag is
  checked out, otherwise downloads the latest.
2019-07-31 23:22:35 +05:30
Torsten Grote
7b1e63a37f
Fix Travis CI and add build cache
Also remove relicts from Android.mk file
2019-07-26 11:41:45 +02:00
Torsten Grote
87b25aa4ec
Re-implement manual backup run and show notification during manual backups 2019-07-09 10:41:58 +02:00
Torsten Grote
4c79d41963
Show Backup Location screen before letting user choose backup folder
This screen can also be reached by tapping the previously inactive backup location setting.
2019-07-09 10:25:30 +02:00
Torsten Grote
3e64c3686f
Use Android's hardware-backed keystore to store backup key
This commit also disables the old UI as it does not work with the new key
2019-07-08 13:21:32 +02:00
Torsten Grote
66c0919eb5
Let user write down recovery code on first start 2019-07-08 13:21:32 +02:00
Torsten Grote
ee6cf38312
Migrate SettingsActivity and Fragment to Kotlin 2019-07-04 08:45:23 +02:00
Torsten Grote
c801502e81
Migrate SettingsManager to Kotlin 2019-07-04 08:25:37 +02:00
Torsten Grote
3d5911d41d
Add a SettingsViewModel in Kotlin including the Kotlin deps 2019-07-03 19:44:37 +02:00
Torsten Grote
b983414295
Add custom settings UI 2019-07-03 12:46:55 +02:00
Torsten Grote
3981d3d8cc
Use latest stable AndroidX libraries 2019-07-03 12:46:54 +02:00
Torsten Grote
7fd3810fbf
Add AndroidX dependencies 2019-06-17 10:34:49 -03:00
Torsten Grote
7b95256ba5
Fix detection of the end of backup
For the current transport it is important to know when the backup ends,
because it resets its state only then and closes the ZIP file.

The detection was broken,
because some packages didn't have data to back up (LOG_EVENT_ID_NO_DATA_TO_SEND),
so the transport's methods weren't called and the package counter not updated.

The hacky solution is to use the BackupObserver to call back into the
transport at the end of backup.
Ideally, future transports won't need to know when the backup finishes.
2019-06-14 16:33:05 -03:00
Torsten Grote
84d91290ac
Let the BackupManager know that we use client-side encryption 2019-06-14 16:33:04 -03:00
Torsten Grote
2f2fba8305
Pre-select all packages and give option to unselect all 2019-06-14 16:33:04 -03:00
Torsten Grote
ad89ea4187
Use new IBackupManager API to filter eligable packages
There's also a bit of refactoring for simplifying the PackageService
usage.

Fixes #26 by adding com.android.externalstorage to ignore list
2019-06-14 07:04:21 -03:00
Torsten Grote
3a9aec56b2
Upgrade android.jar to API 28 2019-06-14 07:04:19 -03:00
Torsten Grote
d678566967
Exclude key-value backup apps for now
We do this as a temporary fix, because our backup methods are not called
which are updating the package counter. So our mechanism to find out
about the end of the backup is broken. Excluding key-value backups fixes
it for now.
2019-06-12 11:01:56 -03:00
Torsten Grote
7fcd9aa091
Resolve review comments about backup compontent refactoring 2019-06-12 09:19:38 -03:00
Torsten Grote
92ce6c1a5c
Refactor transport components to eliminate need to initialize and reset transport 2019-06-11 20:53:44 -03:00
Torsten Grote
b17a55ac57
Target API 28 2019-06-11 11:57:10 -03:00
Torsten Grote
2037291f81
Don't start transport service in foreground
Start it on-deman instead.

This way, we don't need a foreground service and thus can target API 28
2019-06-11 10:18:20 -03:00
Torsten Grote
540147470d
Allow the user to schedule full background backups 2019-06-11 09:28:03 -03:00
Torsten Grote
8a0fe3c513
Store backup passphrase insecurely for now
This is being done to implement automatic background updates
and not supposed to be part of a release.

The backup key will later be generated and shown to the user instead of
allowing them to choose their own.
2019-06-05 16:45:04 -03:00
Torsten Grote
6da59c8192 Use Android's logging instead of printing stacktraces to STDERR 2019-06-04 16:54:46 -04:00
Torsten Grote
b8e9e60666 Add a button to change the backup storage location 2019-06-04 16:54:46 -04:00
Torsten Grote
b3c744b872 Store backup folder Uri in default shared preferences
and keep using it as long as it continues to be available.
2019-06-04 16:54:46 -04:00
Torsten Grote
f192e640fb Choose a backup folder instead of a file
Backup files will be created within this folder
2019-06-04 16:54:46 -04:00
Torsten Grote
1e00d2c0a3
Downgrade Android Gradle plugin
as new version require us to remove targetSdkVersion from Manifest
2019-06-04 12:36:53 -03:00
Torsten Grote
d1f5986e39
Add signing config for faster testing 2019-06-04 09:04:25 -03:00
Torsten Grote
2434fe30f4
Several small nitpicks and fixes 2019-06-04 09:04:25 -03:00
Steve Soltys
cdaf842866 Version bump - 0.3.0 2019-03-14 21:33:50 -04:00
Steve Soltys
04543a1014 Fix transport encryption
Prior to this commit, some of the application data was not included during encryption. This is a breaking change, any backups made prior to this commit can no longer be restored.

1. Encrypt 'full' backup data.
2. Increase number of key generation iterations to 32767.
3. Change cipher to 'AES/CBC/PKCS5Padding'.
2019-03-14 20:09:06 -04:00
Steve Soltys
b16fcf5d87 Clean up backup service 2019-03-14 17:07:23 -04:00
Steve Soltys
3e2e75a9b5 Ignore 'calendar' and 'contacts' Android provider packages 2019-03-14 17:06:53 -04:00
Steve Soltys
571cecfa2f Version bump - 0.2.0 2019-03-01 23:48:03 -05:00
Steve Soltys
828f257426 Clean up package and class structure significantly
1. Add service layer for backup / restore operations.
2. Reduce amount of duplicate code in activity classes.
2019-03-01 23:34:04 -05:00
Steve Soltys
0b5cc1a798 Fix logging in content provider restore component 2019-02-22 01:11:05 -05:00
Steve Soltys
03c92efc24 Add initialization message to loading popup window 2019-02-22 01:05:55 -05:00
Steve Soltys
bd0c41c2d3 Stop regenerating secret key for each package 2019-02-22 01:02:06 -05:00
Steve Soltys
1519580a36 Reduce number of key generation iterations to 25 2019-02-22 01:00:08 -05:00
Steve Soltys
b0465f7aae Add 'com.stevesoltys.backup' to ignored packages 2019-02-21 23:50:50 -05:00
Steve Soltys
0fd4c7833d Reduce number of key generation iterations to 100 2019-02-21 22:42:16 -05:00
Steve Soltys
023750be6e Add loading popup when fetching packages for backup or restore 2019-02-21 22:41:54 -05:00
Steve Soltys
9b979b3693 Move cipher logic out of backup and restore components 2019-02-21 21:51:46 -05:00
Steve Soltys
b182e743e8 Add support for encrypted backups
1. Add prompt for entering password during backup and restore.
2. Use PBKDF2 to generate a secret key that is used to encrypt backups.
3. Store salt in backup zip file.
4. Fetch salt from backup zip file during restore and use it to decrypt restoration data.
2019-02-15 02:46:24 -05:00
Steve Soltys
f21e687a6d Version bump - 0.1.2 2019-02-11 22:41:50 -05:00
Steve Soltys
31bc653cfb Version bump - 0.1.1 2019-02-11 22:25:01 -05:00
Steve Soltys
8fe694a2df Fix version code 2019-02-11 22:10:09 -05:00
Steve Soltys
656b7702e0 Allow user to select all packages during backup and restore 2019-02-11 22:07:57 -05:00
Steve Soltys
b714952b85 Ignore 'com.android.providers.downloads.ui' to resolve #14 2019-02-11 22:06:46 -05:00
Steve Soltys
df0b3d6287 Update SDK version to 28 2019-02-11 22:00:33 -05:00
Steve Soltys
09c8aad237 Update launcher icon 2018-12-15 03:41:50 -05:00
Steve Soltys
7c3bff31f0 Make transport service start in foreground to resolve #13 2018-12-15 03:34:34 -05:00
Steve Soltys
98297537df Pull commons-io from Maven repository for Gradle builds 2018-11-14 21:40:05 -05:00
Steve Soltys
22db4579e8 Add application version to Android manifest 2018-11-13 18:15:21 -05:00
Steve Soltys
ab4ae56def Add commons-io dependency to Android makefile 2018-11-13 17:58:27 -05:00
Steve Soltys
cc4b629a89 Automatically start transport service when application launches 2018-11-11 21:00:00 -05:00
Steve Soltys
2fa09be854 Merge branch 'master' into feature/standalone 2018-11-11 20:53:57 -05:00
Steve Soltys
e8720189f3 Add experimental support for standalone builds 2018-11-07 22:04:37 -05:00
Steve Soltys
072e9a1b02 Remove Gradle as build system
This application must be compiled with the operating system, so Gradle is unnecessary.
2017-11-08 23:56:49 -05:00
Steve Soltys
0bd1596056 Fix #2
The output file descriptor was not being closed after each chunk was written.
1. The output stream will no longer be stored in the restore state.
2. The output file descriptor will be closed after a chunk is transferred.
2017-11-08 23:21:27 -05:00
Steve Soltys
09ff3ba493 Clean up packaging of content provider backup/restore components 2017-10-23 20:02:40 -04:00
Steve Soltys
b9239143e0 Clean up ContentProviderBackupComponent 2017-10-23 20:00:25 -04:00
Steve Soltys
765b8b2540 Stop clearing the backup state after a package is rejected 2017-10-18 23:00:20 -04:00
Steve Soltys
312a13a913 Clean up logging in ContentProviderBackupComponent 2017-10-17 23:39:30 -04:00
Steve Soltys
f5e723b1a1 Clean up full transport logic in ContentProviderBackupComponent 2017-10-17 23:34:59 -04:00
Steve Soltys
93c91db524 Move full restore logic into separate function 2017-10-09 21:21:15 -04:00
Steve Soltys
f41d211ddc Add support for incremental and full backup directory configuration 2017-10-09 20:40:25 -04:00
Steve Soltys
677b950dea Switch selected package list data type to Set 2017-10-09 20:25:40 -04:00
Steve Soltys
facb7029b9 Add initialization functions to ConfigurableBackupTransport 2017-10-09 20:02:41 -04:00
Steve Soltys
0a978c37e8 Clean up transport logic in ContentProviderRestoreComponent 2017-10-04 21:11:02 -04:00
Steve Soltys
a1a8329299 Clean up logging in ContentProviderRestoreComponent 2017-10-03 22:38:09 -04:00
Steve Soltys
e0b106537a Add priv-app permissions configuration 2017-10-01 16:43:24 -04:00
Steve Soltys
3e973fa91f Rename backup transport whitelist configuration 2017-10-01 16:40:43 -04:00
Steve Soltys
7a9c510390 Remove target/source compatibility entries in build.gradle 2017-09-22 00:34:35 -04:00
Steve Soltys
e27a8b308f Switch to builder pattern for ContentProviderBackupConfiguration 2017-09-22 00:10:30 -04:00
Steve Soltys
2497a94e4c Initial commit 2017-09-21 00:30:28 -04:00