Removed folder opening feature due to its unstability

This commit is contained in:
tom5079
2019-12-02 18:55:38 +09:00
parent f98f45dc54
commit 5052b6c074
2 changed files with 2 additions and 21 deletions

View File

@@ -14,7 +14,7 @@ android {
minSdkVersion 16
targetSdkVersion 29
versionCode 31
versionName "4.2"
versionName "4.2-beta1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true

View File

@@ -33,7 +33,6 @@ import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
import androidx.core.content.ContextCompat
import androidx.core.content.FileProvider
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceManager
@@ -372,25 +371,7 @@ class SettingsActivity : AppCompatActivity() {
)
Snackbar.make(this@SettingsFragment.listView, R.string.settings_backup_snackbar, Snackbar.LENGTH_LONG)
.setAction(R.string.settings_backup_checkout) {
//Open folder that contains copied favorite file
val intent = Intent(Intent.ACTION_VIEW).apply {
val uri = FileProvider.getUriForFile(context,
"xyz.quaver.pupil.fileprovider",
getDownloadDirectory(context)
)
context.grantUriPermission(context.packageName, uri,
Intent.FLAG_GRANT_READ_URI_PERMISSION)
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
setDataAndType(uri, "resource/folder")
}
startActivity(Intent.createChooser(intent , "Open folder"))
}.show()
.show()
true
}