Skip to content

Commit f81b417

Browse files
committed
The sdkCompileVersion has been updated to version 31, and some bugs have been fixed due to this update.
1 parent 48b2c55 commit f81b417

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
ext {
33
// SDK
4-
sdkCompileVersion = 29
4+
sdkCompileVersion = 31
55
sdkMinVersion = 21
66
sdkTargetVersion = 29
77

owncloudApp/src/main/java/com/owncloud/android/providers/DocumentsStorageProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class DocumentsStorageProvider : DocumentsProvider() {
123123

124124
if (!isWrite) return ParcelFileDescriptor.open(fileToOpen, accessMode)
125125

126-
val handler = Handler(context?.mainLooper)
126+
val handler = context?.mainLooper?.let { Handler(it) }
127127
// Attach a close listener if the document is opened in write mode.
128128
try {
129129
return ParcelFileDescriptor.open(fileToOpen, accessMode, handler) {

owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ class FileDisplayActivity : FileActivity(), FileFragment.ContainerActivity, OnEn
936936

937937
if (sameAccount && sameFile) {
938938
if (success) {
939-
file = storageManager.getFileByPath(uploadedRemotePath)
939+
file = uploadedRemotePath?.let { storageManager.getFileByPath(it) }
940940
}
941941
refreshSecondFragment(
942942
intent.action,
@@ -1007,11 +1007,13 @@ class FileDisplayActivity : FileActivity(), FileFragment.ContainerActivity, OnEn
10071007
if (linkedToRemotePath == null || isAscendant(linkedToRemotePath)) {
10081008
refreshListOfFilesFragment(true)
10091009
}
1010-
refreshSecondFragment(
1011-
intent.action,
1012-
downloadedRemotePath,
1013-
intent.getBooleanExtra(Extras.EXTRA_DOWNLOAD_RESULT, false)
1014-
)
1010+
downloadedRemotePath?.let {
1011+
refreshSecondFragment(
1012+
intent.action,
1013+
it,
1014+
intent.getBooleanExtra(Extras.EXTRA_DOWNLOAD_RESULT, false)
1015+
)
1016+
}
10151017
invalidateOptionsMenu()
10161018
}
10171019

0 commit comments

Comments
 (0)