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.Module
|
||||||
import GoonXposed.xposed.Utils.Log
|
import GoonXposed.xposed.Utils.Log
|
||||||
import GoonXposed.xposed.Utils.Companion.reloadApp
|
import GoonXposed.xposed.Utils.Companion.reloadApp
|
||||||
|
import GoonXposed.xposed.hook
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import de.robv.android.xposed.XC_MethodHook.MethodHookParam
|
||||||
import de.robv.android.xposed.XC_MethodReplacement
|
import de.robv.android.xposed.XC_MethodReplacement
|
||||||
import de.robv.android.xposed.XposedBridge
|
import de.robv.android.xposed.XposedBridge
|
||||||
import de.robv.android.xposed.XposedHelpers
|
import de.robv.android.xposed.XposedHelpers
|
||||||
|
|
|
||||||
|
|
@ -19,40 +19,29 @@ object OptionsMenu {
|
||||||
container.addView(LogBoxComponents.createM3Button(context, injectionText, colors) {
|
container.addView(LogBoxComponents.createM3Button(context, injectionText, colors) {
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
LogBoxActions.toggleBundleInjection(context)
|
LogBoxActions.toggleBundleInjection(context)
|
||||||
|
GoonXposed.xposed.Utils.Companion.reloadApp()
|
||||||
})
|
})
|
||||||
|
|
||||||
container.addView(LogBoxComponents.createM3Button(context, "Refetch Bundle", colors) {
|
container.addView(LogBoxComponents.createM3Button(context, "Refetch Bundle", colors) {
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
RecoveryMenu::class.java.getDeclaredMethod(
|
RecoveryMenu.showConfirmAction(
|
||||||
"showConfirmAction",
|
|
||||||
Context::class.java,
|
|
||||||
String::class.java,
|
|
||||||
String::class.java,
|
|
||||||
Runnable::class.java
|
|
||||||
).apply { isAccessible = true }.invoke(
|
|
||||||
null,
|
|
||||||
context,
|
context,
|
||||||
"Refetch Bundle",
|
"Refetch Bundle",
|
||||||
"This will download the latest bundle from Github.",
|
"This will download the latest bundle from Github."
|
||||||
Runnable { LogBoxActions.refetchBundle(context) }
|
) {
|
||||||
)
|
LogBoxActions.refetchBundle(context)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
container.addView(LogBoxComponents.createM3Button(context, "Clear Cache & Reset", colors) {
|
container.addView(LogBoxComponents.createM3Button(context, "Clear Cache & Reset", colors) {
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
RecoveryMenu::class.java.getDeclaredMethod(
|
RecoveryMenu.showConfirmAction(
|
||||||
"showConfirmAction",
|
|
||||||
Context::class.java,
|
|
||||||
String::class.java,
|
|
||||||
String::class.java,
|
|
||||||
Runnable::class.java
|
|
||||||
).apply { isAccessible = true }.invoke(
|
|
||||||
null,
|
|
||||||
context,
|
context,
|
||||||
"Clear Cache & Reset",
|
"Clear Cache & Reset",
|
||||||
"This will clear all cached bundles and reset to default settings.",
|
"This will clear all cached bundles and reset to default settings."
|
||||||
Runnable { LogBoxActions.clearCacheAndReset(context) }
|
) {
|
||||||
)
|
LogBoxActions.clearCacheAndReset(context)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
container.addView(LogBoxComponents.createM3Button(context, "Back", colors) {
|
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 colors = LogBoxTheme.getM3Colors(context)
|
||||||
val container = LogBoxComponents.createMenuContainer(context, colors)
|
val container = LogBoxComponents.createMenuContainer(context, colors)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue