Add files via upload
This commit is contained in:
parent
e90c20bfc5
commit
469cdfb95e
3 changed files with 14 additions and 23 deletions
|
|
@ -3,7 +3,9 @@ package GoonXposed.xposed.modules.LogBox
|
|||
import GoonXposed.xposed.Module
|
||||
import GoonXposed.xposed.Utils.Log
|
||||
import GoonXposed.xposed.Utils.Companion.reloadApp
|
||||
import GoonXposed.xposed.hook
|
||||
import android.content.Context
|
||||
import de.robv.android.xposed.XC_MethodHook.MethodHookParam
|
||||
import de.robv.android.xposed.XC_MethodReplacement
|
||||
import de.robv.android.xposed.XposedBridge
|
||||
import de.robv.android.xposed.XposedHelpers
|
||||
|
|
|
|||
|
|
@ -19,40 +19,29 @@ object OptionsMenu {
|
|||
container.addView(LogBoxComponents.createM3Button(context, injectionText, colors) {
|
||||
dialog.dismiss()
|
||||
LogBoxActions.toggleBundleInjection(context)
|
||||
GoonXposed.xposed.Utils.Companion.reloadApp()
|
||||
})
|
||||
|
||||
container.addView(LogBoxComponents.createM3Button(context, "Refetch Bundle", colors) {
|
||||
dialog.dismiss()
|
||||
RecoveryMenu::class.java.getDeclaredMethod(
|
||||
"showConfirmAction",
|
||||
Context::class.java,
|
||||
String::class.java,
|
||||
String::class.java,
|
||||
Runnable::class.java
|
||||
).apply { isAccessible = true }.invoke(
|
||||
null,
|
||||
RecoveryMenu.showConfirmAction(
|
||||
context,
|
||||
"Refetch Bundle",
|
||||
"This will download the latest bundle from Github.",
|
||||
Runnable { LogBoxActions.refetchBundle(context) }
|
||||
)
|
||||
"This will download the latest bundle from Github."
|
||||
) {
|
||||
LogBoxActions.refetchBundle(context)
|
||||
}
|
||||
})
|
||||
|
||||
container.addView(LogBoxComponents.createM3Button(context, "Clear Cache & Reset", colors) {
|
||||
dialog.dismiss()
|
||||
RecoveryMenu::class.java.getDeclaredMethod(
|
||||
"showConfirmAction",
|
||||
Context::class.java,
|
||||
String::class.java,
|
||||
String::class.java,
|
||||
Runnable::class.java
|
||||
).apply { isAccessible = true }.invoke(
|
||||
null,
|
||||
RecoveryMenu.showConfirmAction(
|
||||
context,
|
||||
"Clear Cache & Reset",
|
||||
"This will clear all cached bundles and reset to default settings.",
|
||||
Runnable { LogBoxActions.clearCacheAndReset(context) }
|
||||
)
|
||||
"This will clear all cached bundles and reset to default settings."
|
||||
) {
|
||||
LogBoxActions.clearCacheAndReset(context)
|
||||
}
|
||||
})
|
||||
|
||||
container.addView(LogBoxComponents.createM3Button(context, "Back", colors) {
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ object RecoveryMenu {
|
|||
}
|
||||
}
|
||||
|
||||
private fun showConfirmAction(context: Context, title: String, message: String, action: () -> Unit) {
|
||||
fun showConfirmAction(context: Context, title: String, message: String, action: () -> Unit) {
|
||||
val colors = LogBoxTheme.getM3Colors(context)
|
||||
val container = LogBoxComponents.createMenuContainer(context, colors)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue