|
|
|
|
@ -1,10 +1,13 @@
|
|
|
|
|
package com.cyb3rko.techniklogger.fragments
|
|
|
|
|
|
|
|
|
|
import android.animation.Animator
|
|
|
|
|
import android.app.ActivityManager
|
|
|
|
|
import android.content.Context
|
|
|
|
|
import android.content.SharedPreferences
|
|
|
|
|
import android.os.Build
|
|
|
|
|
import android.os.Bundle
|
|
|
|
|
import android.os.Handler
|
|
|
|
|
import android.os.Looper
|
|
|
|
|
import android.util.Log
|
|
|
|
|
import android.view.*
|
|
|
|
|
import androidx.fragment.app.Fragment
|
|
|
|
|
@ -313,6 +316,20 @@ class ListingFragment : Fragment() {
|
|
|
|
|
.setMessage(info)
|
|
|
|
|
.show()
|
|
|
|
|
}
|
|
|
|
|
R.id.action_cache_clear -> {
|
|
|
|
|
MaterialAlertDialogBuilder(myContext)
|
|
|
|
|
.setTitle("Cache leeren?")
|
|
|
|
|
.setMessage("Der Cache wird geleert (inklusive des eingegebenen Namens).\n\n" +
|
|
|
|
|
"Anschließend musst du die App neustarten.")
|
|
|
|
|
.setPositiveButton(android.R.string.ok) { _, _ ->
|
|
|
|
|
Handler(Looper.getMainLooper()).postDelayed({
|
|
|
|
|
(myContext.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager)
|
|
|
|
|
.clearApplicationUserData()
|
|
|
|
|
}, 500)
|
|
|
|
|
}
|
|
|
|
|
.setNegativeButton("Abbrechen", null)
|
|
|
|
|
.show()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return super.onOptionsItemSelected(item)
|
|
|
|
|
|