Compare commits

...

7 Commits

Author SHA1 Message Date
Sven
8632ba85ee fix: storage permission request for non-conforming devices (#726)
* fix: storage permission request for non-conforming devices

* fix: catch more specific exception

* chore: add toast message to indicate missing persistent permissions

* chore: correct newly introduced translaction string

* Change error toast message

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-06-02 01:25:58 +06:00
renovate[bot]
116579d38c chore(deps): update dependency gradle to v8.8 (#856)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-02 01:23:39 +06:00
renovate[bot]
098f925519 fix(deps): update dependency androidx.test.ext:junit-ktx to v1.2.0-rc01 (#855)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-02 01:23:31 +06:00
renovate[bot]
9f5db70572 fix(deps): update aboutlib.version to v11.2.1 (#846)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-01 22:03:20 +06:00
renovate[bot]
1f286f1a35 fix(deps): update dependency com.google.firebase:firebase-analytics to v22.0.1 (#848)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-01 22:03:10 +06:00
renovate[bot]
7ab7f5ac37 fix(deps): update dependency com.google.gms:google-services to v4.4.2 (#849)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-01 22:03:03 +06:00
renovate[bot]
e567250b17 fix(deps): update dependency androidx.test.espresso:espresso-core to v3.6.0-rc01 (#851)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-01 22:02:54 +06:00
6 changed files with 19 additions and 8 deletions

View File

@@ -111,7 +111,17 @@ object SettingsDataScreen : SearchableSettings {
val flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or
Intent.FLAG_GRANT_WRITE_URI_PERMISSION
context.contentResolver.takePersistableUriPermission(uri, flags)
// For some reason InkBook devices do not implement the SAF properly. Persistable URI grants do not
// work. However, simply retrieving the URI and using it works fine for these devices. Access is not
// revoked after the app is closed or the device is restarted.
// This also holds for some Samsung devices. Thus, we simply execute inside of a try-catch block and
// ignore the exception if it is thrown.
try {
context.contentResolver.takePersistableUriPermission(uri, flags)
} catch (e: SecurityException) {
logcat(LogPriority.ERROR, e)
context.toast(MR.strings.file_picker_uri_permission_unsupported)
}
UniFile.fromUri(context, uri)?.let {
storageDirPref.set(it.uri.toString())

View File

@@ -26,8 +26,8 @@ paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "pag
paging-compose = { module = "androidx.paging:paging-compose", version.ref = "paging_version" }
benchmark-macro = "androidx.benchmark:benchmark-macro-junit4:1.2.4"
test-ext = "androidx.test.ext:junit-ktx:1.2.0-beta01"
test-espresso-core = "androidx.test.espresso:espresso-core:3.6.0-beta01"
test-ext = "androidx.test.ext:junit-ktx:1.2.0-rc01"
test-espresso-core = "androidx.test.espresso:espresso-core:3.6.0-rc01"
test-uiautomator = "androidx.test.uiautomator:uiautomator:2.3.0"
[bundles]

View File

@@ -1,5 +1,5 @@
[versions]
aboutlib_version = "11.2.0"
aboutlib_version = "11.2.1"
leakcanary = "2.14"
moko = "0.23.0"
okhttp_version = "5.0.0-alpha.12"
@@ -14,7 +14,7 @@ detektCompose = "0.3.12"
[libraries]
desugar = "com.android.tools:desugar_jdk_libs:2.0.4"
android-shortcut-gradle = "com.github.zellius:android-shortcut-gradle-plugin:0.1.2"
google-services-gradle = "com.google.gms:google-services:4.4.1"
google-services-gradle = "com.google.gms:google-services:4.4.2"
rxjava = "io.reactivex:rxjava:1.3.8"
@@ -73,7 +73,7 @@ moko-gradle = { module = "dev.icerock.moko:resources-generator", version.ref = "
logcat = "com.squareup.logcat:logcat:0.1"
firebase-analytics = "com.google.firebase:firebase-analytics:22.0.0"
firebase-analytics = "com.google.firebase:firebase-analytics:22.0.1"
aboutLibraries-gradle = { module = "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin", version.ref = "aboutlib_version" }
aboutLibraries-compose = { module = "com.mikepenz:aboutlibraries-compose-m3", version.ref = "aboutlib_version" }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

2
gradlew vendored
View File

@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.

View File

@@ -869,6 +869,7 @@
<string name="file_select_cover">Select cover image</string>
<string name="file_select_backup">Select backup file</string>
<string name="file_picker_error">No file picker app found</string>
<string name="file_picker_uri_permission_unsupported">Failed to acquire persistent folder access. The app may behave unexpectedly.</string>
<string name="file_null_uri_error">No file selected</string>
<!--UpdateCheck-->