mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
Fix build
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
2e55cc5177
commit
f55f0b669e
1 changed files with 5 additions and 12 deletions
|
@ -24,27 +24,20 @@ import android.os.Build
|
|||
import android.os.Bundle
|
||||
import android.os.storage.StorageManager
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.nextcloud.client.di.Injectable
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
import com.owncloud.android.ui.dialog.ConfirmationDialogFragment.ConfirmationDialogFragmentListener
|
||||
import com.owncloud.android.ui.fragment.OCFileListFragment
|
||||
import com.owncloud.android.utils.DisplayUtils
|
||||
import com.owncloud.android.utils.theme.ViewThemeUtils
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* Dialog requiring confirmation when a file/folder is too "big" to be synchronized/downloaded on device.
|
||||
*/
|
||||
class SyncFileNotEnoughSpaceDialogFragment :
|
||||
ConfirmationDialogFragment(),
|
||||
ConfirmationDialogFragmentListener,
|
||||
Injectable {
|
||||
private var targetFile: OCFile? = null
|
||||
ConfirmationDialogFragmentListener {
|
||||
|
||||
@JvmField
|
||||
@Inject
|
||||
var viewThemeUtils: ViewThemeUtils? = null
|
||||
private var targetFile: OCFile? = null
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
targetFile = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
|
@ -62,7 +55,7 @@ class SyncFileNotEnoughSpaceDialogFragment :
|
|||
/**
|
||||
* (Only if file is a folder), will access the destination folder to allow user to choose what to synchronize
|
||||
*/
|
||||
override fun onConfirmation(callerTag: String) {
|
||||
override fun onConfirmation(callerTag: String?) {
|
||||
val frag = targetFragment as OCFileListFragment?
|
||||
|
||||
if (frag != null && targetFile != null) {
|
||||
|
@ -73,7 +66,7 @@ class SyncFileNotEnoughSpaceDialogFragment :
|
|||
/**
|
||||
* Will abort/cancel the process (is neutral to "hack" android button position ._.)
|
||||
*/
|
||||
override fun onNeutral(callerTag: String) {
|
||||
override fun onNeutral(callerTag: String?) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
|
@ -81,7 +74,7 @@ class SyncFileNotEnoughSpaceDialogFragment :
|
|||
* Will access to storage manager in order to empty useless files
|
||||
*/
|
||||
@RequiresApi(api = Build.VERSION_CODES.N_MR1)
|
||||
override fun onCancel(callerTag: String) {
|
||||
override fun onCancel(callerTag: String?) {
|
||||
val storageIntent = Intent(StorageManager.ACTION_MANAGE_STORAGE)
|
||||
startActivityForResult(storageIntent, REQUEST_CODE_STORAGE)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue