Removed folder opening feature due to its unstability
This commit is contained in:
@@ -14,7 +14,7 @@ android {
|
|||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 31
|
versionCode 31
|
||||||
versionName "4.2"
|
versionName "4.2-beta1"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import androidx.appcompat.app.AlertDialog
|
|||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.content.FileProvider
|
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
@@ -372,25 +371,7 @@ class SettingsActivity : AppCompatActivity() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
Snackbar.make(this@SettingsFragment.listView, R.string.settings_backup_snackbar, Snackbar.LENGTH_LONG)
|
Snackbar.make(this@SettingsFragment.listView, R.string.settings_backup_snackbar, Snackbar.LENGTH_LONG)
|
||||||
.setAction(R.string.settings_backup_checkout) {
|
.show()
|
||||||
|
|
||||||
//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()
|
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user