Skip to content

Commit 385a89e

Browse files
committed
Make EXTRA_FOLDER key constant and guaranteed non-null
Minimal possible change to streamline the handling of this intent key. Alternatively, the class.java.simpleName or the !! operator could've been used at time of field definition. And the same would apply to several other places as well. Signed-off-by: Philipp Hasper <[email protected]>
1 parent f269f11 commit 385a89e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ open class FolderPickerActivity :
276276
super.onResume()
277277
Log_OC.e(TAG, "onResume() start")
278278

279-
val extraFolder = intent.getParcelableArgument(EXTRA_FOLDER.toString(), OCFile::class.java)
279+
val extraFolder = intent.getParcelableArgument(EXTRA_FOLDER, OCFile::class.java)
280280
if (extraFolder != null) {
281281
file = extraFolder
282282
} else {
@@ -658,8 +658,7 @@ open class FolderPickerActivity :
658658
}
659659

660660
companion object {
661-
@JvmField
662-
val EXTRA_FOLDER = FolderPickerActivity::class.java.canonicalName?.plus(".EXTRA_FOLDER")
661+
const val EXTRA_FOLDER = "com.owncloud.android.ui.activity.FolderPickerActivity".plus(".EXTRA_FOLDER")
663662

664663
@JvmField
665664
@Deprecated(

0 commit comments

Comments
 (0)