From 579919d5e7fd1dd051976fd720b36039ea8edc8a Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 7 Oct 2021 17:54:35 -0300 Subject: [PATCH] Code style and lint after Android 12 version bumps --- .idea/codeStyles/Project.xml | 3 ++- .../com/stevesoltys/seedvault/PluginTest.kt | 3 ++- app/src/main/AndroidManifest.xml | 10 ++++++---- .../main/java/com/stevesoltys/seedvault/App.kt | 2 +- .../stevesoltys/seedvault/SecretCodeReceiver.kt | 4 ++-- .../com/stevesoltys/seedvault/crypto/Crypto.kt | 17 ++++++++++------- .../stevesoltys/seedvault/crypto/KeyManager.kt | 2 +- .../com/stevesoltys/seedvault/header/Header.kt | 4 ++-- .../seedvault/header/HeaderReader.kt | 8 ++++++-- .../stevesoltys/seedvault/metadata/Metadata.kt | 6 +++--- .../seedvault/metadata/MetadataManager.kt | 8 ++++---- .../seedvault/metadata/MetadataReader.kt | 5 +++-- .../seedvault/plugins/LegacyStoragePlugin.kt | 2 +- .../saf/DocumentsProviderLegacyPlugin.kt | 8 ++++---- .../saf/DocumentsProviderStoragePlugin.kt | 2 +- .../seedvault/plugins/saf/DocumentsStorage.kt | 6 ++++-- .../seedvault/restore/RestoreActivity.kt | 3 +-- .../restore/RestoreErrorBroadcastReceiver.kt | 4 +--- .../seedvault/restore/RestoreFilesFragment.kt | 4 ++-- .../seedvault/restore/RestoreProgressAdapter.kt | 4 ++-- .../restore/RestoreProgressFragment.kt | 9 ++++----- .../seedvault/restore/RestoreSetAdapter.kt | 2 +- .../seedvault/restore/RestoreSetFragment.kt | 5 ++--- .../seedvault/restore/RestoreViewModel.kt | 6 +++--- .../seedvault/restore/install/ApkInstaller.kt | 13 +++++++++---- .../seedvault/restore/install/ApkRestore.kt | 10 +++++----- .../install/ApkSplitCompatibilityChecker.kt | 2 +- .../restore/install/InstallIntentCreator.kt | 2 +- .../restore/install/InstallProgressAdapter.kt | 4 ++-- .../restore/install/InstallProgressFragment.kt | 11 +++++------ .../seedvault/restore/install/InstallResult.kt | 4 ++-- .../seedvault/settings/AboutDialogFragment.kt | 4 ++-- .../seedvault/settings/AppListRetriever.kt | 4 ++-- .../seedvault/settings/AppStatusAdapter.kt | 4 ++-- .../seedvault/settings/AppStatusFragment.kt | 7 +++---- .../seedvault/settings/SettingsActivity.kt | 2 +- .../seedvault/settings/SettingsFragment.kt | 7 +++---- .../seedvault/settings/SettingsManager.kt | 6 +++--- .../seedvault/settings/SettingsViewModel.kt | 4 ++-- .../seedvault/storage/SeedvaultStoragePlugin.kt | 2 +- .../transport/ConfigurableBackupTransport.kt | 10 +++++----- .../seedvault/transport/backup/ApkBackup.kt | 10 +++++----- .../transport/backup/BackupCoordinator.kt | 12 ++++++------ .../seedvault/transport/backup/FullBackup.kt | 6 +++--- .../seedvault/transport/backup/KVBackup.kt | 10 +++++----- .../transport/backup/PackageService.kt | 4 ++-- .../seedvault/transport/restore/FullRestore.kt | 4 ++-- .../seedvault/transport/restore/KVRestore.kt | 8 ++++---- .../transport/restore/RestoreCoordinator.kt | 6 +++--- .../seedvault/ui/RequireProvisioningActivity.kt | 2 +- .../ui/RequireProvisioningViewModel.kt | 2 +- .../seedvault/ui/files/FileSelectionFragment.kt | 4 ++-- .../ui/files/FileSelectionViewModel.kt | 2 +- .../notification/BackupNotificationManager.kt | 6 +++--- .../notification/NotificationBackupObserver.kt | 2 +- .../ui/recoverycode/RecoveryCodeActivity.kt | 5 ++--- .../recoverycode/RecoveryCodeInputFragment.kt | 9 ++++----- .../recoverycode/RecoveryCodeOutputFragment.kt | 2 +- .../ui/recoverycode/RecoveryCodeViewModel.kt | 2 +- .../ui/storage/BackupStorageViewModel.kt | 2 +- .../ui/storage/RestoreStorageViewModel.kt | 4 ++-- .../seedvault/ui/storage/StorageActivity.kt | 5 ++--- .../ui/storage/StorageCheckFragment.kt | 2 +- .../seedvault/ui/storage/StorageRootAdapter.kt | 2 +- .../seedvault/ui/storage/StorageRootFetcher.kt | 2 +- .../ui/storage/StorageRootsFragment.kt | 7 +++---- .../seedvault/ui/storage/StorageViewModel.kt | 4 ++-- app/src/main/res/values/colors.xml | 3 ++- .../java/com/stevesoltys/seedvault/TestUtils.kt | 8 -------- .../seedvault/metadata/MetadataReadWriteTest.kt | 2 +- .../seedvault/metadata/MetadataReaderTest.kt | 2 +- .../seedvault/metadata/MetadataV0ReadTest.kt | 2 +- .../metadata/MetadataWriterDecoderTest.kt | 2 +- .../restore/install/ApkBackupRestoreTest.kt | 1 + .../transport/restore/RestoreCoordinatorTest.kt | 4 ++-- .../restore/RestoreV0IntegrationTest.kt | 2 +- contactsbackup/src/main/AndroidManifest.xml | 2 +- .../backup/contacts/ContactsBackupAgent.java | 8 ++++---- .../grobox/storagebackuptester/LogFragment.kt | 2 +- .../storagebackuptester/backup/BackupStats.kt | 4 ++-- .../restore/DemoSnapshotFragment.kt | 2 +- .../restore/RestoreFragment.kt | 2 +- .../scanner/DocumentScanner.kt | 2 +- .../scanner/MediaScanFragment.kt | 2 +- .../storagebackuptester/scanner/MediaScanner.kt | 4 ++-- .../settings/SettingsFragment.kt | 2 +- storage/demo/src/main/res/drawable/ic_info.xml | 6 +++--- .../demo/src/main/res/drawable/ic_settings.xml | 6 +++--- .../demo/src/main/res/menu/fragment_scan.xml | 4 ++-- storage/demo/src/main/res/values/themes.xml | 1 + .../backup/storage/api/BackupContentType.kt | 2 +- .../org/calyxos/backup/storage/backup/Backup.kt | 4 ++-- .../backup/storage/backup/ChunkWriter.kt | 6 +++--- .../calyxos/backup/storage/backup/Chunker.kt | 2 +- .../storage/backup/ChunksCacheRepopulater.kt | 4 ++-- .../calyxos/backup/storage/backup/FileBackup.kt | 4 ++-- .../backup/NotificationBackupObserver.kt | 4 ++-- .../backup/storage/backup/SmallFileBackup.kt | 6 +++--- .../backup/storage/content/ContentFile.kt | 2 +- .../backup/storage/crypto/ChunkCrypto.kt | 2 +- .../backup/storage/crypto/StreamCrypto.kt | 6 +++--- .../org/calyxos/backup/storage/db/FilesCache.kt | 2 +- .../storage/plugin/saf/DocumentFileExt.kt | 4 ++-- .../storage/plugin/saf/SafStoragePlugin.kt | 6 +++--- .../org/calyxos/backup/storage/prune/Pruner.kt | 2 +- .../backup/storage/restore/FileSplitter.kt | 2 +- .../backup/storage/restore/MultiChunkRestore.kt | 2 +- .../storage/restore/SingleChunkRestore.kt | 4 ++-- .../backup/storage/restore/ZipChunkRestore.kt | 6 +++--- .../backup/storage/scanner/DocumentScanner.kt | 2 +- .../calyxos/backup/storage/ui/Notifications.kt | 2 +- .../storage/ui/backup/BackupContentFragment.kt | 4 ++-- .../storage/ui/backup/BackupContentItem.kt | 2 +- .../storage/ui/restore/SnapshotAdapter.kt | 2 +- .../storage/ui/restore/SnapshotFragment.kt | 2 +- .../storage/backup/SmallFileBackupTest.kt | 2 +- 116 files changed, 254 insertions(+), 252 deletions(-) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index f653d484..5edad4fd 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -6,6 +6,7 @@