diff --git a/build.gradle b/build.gradle index 5bcbb626b41..db59c026371 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ buildscript { androidxLegacy = "1.0.0" // Kotlin - orgJetbrainsKotlin = "1.7.20" + orgJetbrainsKotlin = "1.8.10" orgJetbrainsKotlinx = "1.6.4" // Koin @@ -37,7 +37,7 @@ buildscript { } dependencies { - classpath "com.android.tools.build:gradle:7.3.1" + classpath "com.android.tools.build:gradle:7.4.1" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$orgJetbrainsKotlin" classpath "org.jlleitschuh.gradle:ktlint-gradle:11.1.0" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 41dfb87909a..8049c684f04 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/owncloud-android-library b/owncloud-android-library index 7ee2c5eb15d..4200ed324c5 160000 --- a/owncloud-android-library +++ b/owncloud-android-library @@ -1 +1 @@ -Subproject commit 7ee2c5eb15d421276104fefc525820a5255c1139 +Subproject commit 4200ed324c5b0ac5c73a2541110d9311cb2c34ac diff --git a/owncloudApp/build.gradle b/owncloudApp/build.gradle index d68b4576bb7..5e1062e31c9 100644 --- a/owncloudApp/build.gradle +++ b/owncloudApp/build.gradle @@ -12,7 +12,7 @@ dependencies { implementation project(':owncloudData') // Kotlin - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$orgJetbrainsKotlin" + implementation "org.jetbrains.kotlin:kotlin-stdlib:$orgJetbrainsKotlin" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$orgJetbrainsKotlinx" // Android X diff --git a/owncloudApp/src/androidTest/java/com/owncloud/android/authentication/LoginActivityTest.kt b/owncloudApp/src/androidTest/java/com/owncloud/android/authentication/LoginActivityTest.kt index 55b023da0c8..cf165981f15 100644 --- a/owncloudApp/src/androidTest/java/com/owncloud/android/authentication/LoginActivityTest.kt +++ b/owncloudApp/src/androidTest/java/com/owncloud/android/authentication/LoginActivityTest.kt @@ -68,6 +68,7 @@ import com.owncloud.android.testutil.OC_BASIC_USERNAME import com.owncloud.android.testutil.OC_SERVER_INFO import com.owncloud.android.utils.CONFIGURATION_SERVER_URL import com.owncloud.android.utils.CONFIGURATION_SERVER_URL_INPUT_VISIBILITY +import com.owncloud.android.utils.NO_MDM_RESTRICTION_YET import com.owncloud.android.utils.matchers.assertVisibility import com.owncloud.android.utils.matchers.isDisplayed import com.owncloud.android.utils.matchers.isEnabled @@ -172,7 +173,7 @@ class LoginActivityTest { ) { every { mdmProvider.getBrandingBoolean(CONFIGURATION_SERVER_URL_INPUT_VISIBILITY, R.bool.show_server_url_input) } returns showServerUrlInput every { mdmProvider.getBrandingString(CONFIGURATION_SERVER_URL, R.string.server_url) } returns serverUrl - every { mdmProvider.getBrandingString(MdmProvider.NO_MDM_RESTRICTION_YET, R.string.webfinger_lookup_server) } returns webfingerLookupServer + every { mdmProvider.getBrandingString(NO_MDM_RESTRICTION_YET, R.string.webfinger_lookup_server) } returns webfingerLookupServer every { ocContextProvider.getBoolean(R.bool.use_login_background_image) } returns showLoginBackGroundImage every { ocContextProvider.getBoolean(R.bool.show_welcome_link) } returns showWelcomeLink every { ocContextProvider.getString(R.string.account_type) } returns accountType diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/LoginActivity.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/LoginActivity.kt index c46d71610aa..92837ff080a 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/LoginActivity.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/LoginActivity.kt @@ -74,11 +74,11 @@ import com.owncloud.android.presentation.security.SecurityEnforced import com.owncloud.android.presentation.settings.SettingsActivity import com.owncloud.android.providers.ContextProvider import com.owncloud.android.providers.MdmProvider -import com.owncloud.android.providers.MdmProvider.Companion.NO_MDM_RESTRICTION_YET import com.owncloud.android.ui.dialog.SslUntrustedCertDialog import com.owncloud.android.utils.CONFIGURATION_OAUTH2_OPEN_ID_SCOPE import com.owncloud.android.utils.CONFIGURATION_SERVER_URL import com.owncloud.android.utils.CONFIGURATION_SERVER_URL_INPUT_VISIBILITY +import com.owncloud.android.utils.NO_MDM_RESTRICTION_YET import com.owncloud.android.utils.PreferenceUtils import org.koin.android.ext.android.inject import org.koin.androidx.viewmodel.ext.android.viewModel diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsFragment.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsFragment.kt index 7f91a00b589..8fb1246a59b 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsFragment.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsFragment.kt @@ -374,13 +374,13 @@ class FileDetailsFragment : FileFragment() { } private fun updateLayoutForRunningTransfer(workInfo: WorkInfo) { - val safeFile = fileDetailsViewModel.getCurrentFile() ?: return + fileDetailsViewModel.getCurrentFile() ?: return showProgressView(isTransferGoingOn = true) binding.fdProgressText.text = if (workInfo.isDownload()) { - getString(R.string.downloader_download_in_progress_ticker, safeFile.fileName) + getString(R.string.downloader_download_in_progress_ticker) } else { // Transfer is upload (?) - getString(R.string.uploader_upload_in_progress_ticker, safeFile.fileName) + getString(R.string.uploader_upload_in_progress_ticker) } binding.fdProgressBar.apply { isIndeterminate = false diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/settings/security/SettingsSecurityViewModel.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/settings/security/SettingsSecurityViewModel.kt index fb5ac7a375a..77bd6345219 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/settings/security/SettingsSecurityViewModel.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/settings/security/SettingsSecurityViewModel.kt @@ -30,8 +30,8 @@ import com.owncloud.android.presentation.security.biometric.BiometricActivity import com.owncloud.android.presentation.security.passcode.PassCodeActivity import com.owncloud.android.presentation.security.pattern.PatternActivity import com.owncloud.android.providers.MdmProvider -import com.owncloud.android.providers.MdmProvider.Companion.NO_MDM_RESTRICTION_YET import com.owncloud.android.utils.CONFIGURATION_LOCK_DELAY_TIME +import com.owncloud.android.utils.NO_MDM_RESTRICTION_YET class SettingsSecurityViewModel( private val preferencesProvider: SharedPreferencesProvider, diff --git a/owncloudApp/src/main/java/com/owncloud/android/providers/MdmProvider.kt b/owncloudApp/src/main/java/com/owncloud/android/providers/MdmProvider.kt index 05f80d2b7f5..36d951db398 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/providers/MdmProvider.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/providers/MdmProvider.kt @@ -153,9 +153,4 @@ class MdmProvider( } private fun isMdmFlavor() = BuildConfig.FLAVOR == MDM_FLAVOR - - companion object { - // Use this key if only interested in setup value. When all keys added to MDM, remove this - const val NO_MDM_RESTRICTION_YET = "NO_MDM_RESTRICTION_YET" - } } diff --git a/owncloudApp/src/main/java/com/owncloud/android/providers/WorkManagerProvider.kt b/owncloudApp/src/main/java/com/owncloud/android/providers/WorkManagerProvider.kt index d6826c3428b..9ce25eae179 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/providers/WorkManagerProvider.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/providers/WorkManagerProvider.kt @@ -61,7 +61,7 @@ class WorkManagerProvider( .build() WorkManager.getInstance(context) - .enqueueUniquePeriodicWork(OldLogsCollectorWorker.OLD_LOGS_COLLECTOR_WORKER, ExistingPeriodicWorkPolicy.REPLACE, oldLogsCollectorWorker) + .enqueueUniquePeriodicWork(OldLogsCollectorWorker.OLD_LOGS_COLLECTOR_WORKER, ExistingPeriodicWorkPolicy.UPDATE, oldLogsCollectorWorker) } fun enqueueAvailableOfflinePeriodicWorker() { diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java index 4aae6b8bcd3..b81aacfd632 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java +++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java @@ -135,7 +135,7 @@ public class ReceiveExternalFilesActivity extends FileActivity private SortOptionsView mSortOptionsView; private SearchView mSearchView; - private ConstraintLayout mEmptyListView; + private View mEmptyListView; private ImageView mEmptyListImage; private TextView mEmptyListTitle; diff --git a/owncloudApp/src/main/java/com/owncloud/android/utils/MdmConfigurations.kt b/owncloudApp/src/main/java/com/owncloud/android/utils/MdmConfigurations.kt index 5aecad52909..26db2185903 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/utils/MdmConfigurations.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/utils/MdmConfigurations.kt @@ -22,6 +22,9 @@ package com.owncloud.android.utils import androidx.annotation.StringDef +// Use this key if only interested in setup value. When all keys added to MDM, remove this +const val NO_MDM_RESTRICTION_YET = "NO_MDM_RESTRICTION_YET" + const val CONFIGURATION_LOCK_DELAY_TIME = "lock_delay_time_configuration" const val CONFIGURATION_SERVER_URL = "server_url_configuration" const val CONFIGURATION_SERVER_URL_INPUT_VISIBILITY = "server_url_input_visibility_configuration" @@ -29,6 +32,7 @@ const val CONFIGURATION_ALLOW_SCREENSHOTS = "allow_screenshots_configuration" const val CONFIGURATION_OAUTH2_OPEN_ID_SCOPE = "oauth2_open_id_scope" @StringDef( + NO_MDM_RESTRICTION_YET, CONFIGURATION_LOCK_DELAY_TIME, CONFIGURATION_SERVER_URL, CONFIGURATION_SERVER_URL_INPUT_VISIBILITY, diff --git a/owncloudData/build.gradle b/owncloudData/build.gradle index 847b4e0781e..978c468f886 100644 --- a/owncloudData/build.gradle +++ b/owncloudData/build.gradle @@ -56,7 +56,7 @@ dependencies { api project(":owncloud-android-library:owncloudComLibrary") // Kotlin - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$orgJetbrainsKotlin" + implementation "org.jetbrains.kotlin:kotlin-stdlib:$orgJetbrainsKotlin" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$orgJetbrainsKotlinx" // Room diff --git a/owncloudDomain/build.gradle b/owncloudDomain/build.gradle index 60236c115d8..1f2576b6c9b 100644 --- a/owncloudDomain/build.gradle +++ b/owncloudDomain/build.gradle @@ -37,7 +37,7 @@ dependencies { implementation "androidx.appcompat:appcompat:$androidxAppcompat" // Kotlin - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$orgJetbrainsKotlin" + implementation "org.jetbrains.kotlin:kotlin-stdlib:$orgJetbrainsKotlin" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$orgJetbrainsKotlinx" // Dependencies for unit tests diff --git a/owncloudTestUtil/build.gradle b/owncloudTestUtil/build.gradle index f59907f0709..9f3b6b02630 100644 --- a/owncloudTestUtil/build.gradle +++ b/owncloudTestUtil/build.gradle @@ -22,6 +22,6 @@ dependencies { implementation project(':owncloudDomain') implementation project(':owncloud-android-library:owncloudComLibrary') - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$orgJetbrainsKotlin" + implementation "org.jetbrains.kotlin:kotlin-stdlib:$orgJetbrainsKotlin" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$androidxLifecycle" }