mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-23 19:55:11 +00:00
trying to delete cache directory
This commit is contained in:
parent
600ce16a03
commit
933682a558
3 changed files with 3 additions and 7 deletions
|
@ -45,9 +45,7 @@ open class Main: BaseActivity() {
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
try {
|
try {
|
||||||
val cacheDir: File = cacheDir
|
cacheDir.deleteRecursively()
|
||||||
if (cacheDir.isDirectory)
|
|
||||||
cacheDir.delete()
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.d("VMCache", "Unable to delete cacheDir")
|
Log.d("VMCache", "Unable to delete cacheDir")
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,7 @@ open class Home : BaseFragment() {
|
||||||
|
|
||||||
vancedinstallbtn.setOnClickListener {
|
vancedinstallbtn.setOnClickListener {
|
||||||
try {
|
try {
|
||||||
val cacheDir: File? = activity?.cacheDir
|
activity?.cacheDir?.deleteRecursively()
|
||||||
if (cacheDir?.isDirectory!!)
|
|
||||||
cacheDir.delete()
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.d("VMCache", "Unable to delete cacheDir")
|
Log.d("VMCache", "Unable to delete cacheDir")
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ class HomeFragment : Home() {
|
||||||
microginstallbtn?.text = getString(R.string.update)
|
microginstallbtn?.text = getString(R.string.update)
|
||||||
}
|
}
|
||||||
microgRemoteVer == microgVer -> {
|
microgRemoteVer == microgVer -> {
|
||||||
microginstallbtn?.text = getString(R.string.update)
|
microginstallbtn?.text = getString(R.string.button_installed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue