Skip to content
This repository was archived by the owner on Oct 20, 2023. It is now read-only.

Commit 6712071

Browse files
authored
3.3.1 (#71)
* new pastebin * remove silk4j * 允许卸载保留数据
1 parent 6772391 commit 6712071

File tree

12 files changed

+61
-8
lines changed

12 files changed

+61
-8
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ android {
2424
applicationId "io.github.mzdluo123.mirai.android"
2525
minSdkVersion 26
2626
targetSdkVersion 30
27-
versionCode 57
28-
versionName "3.3.0"
27+
versionCode 58
28+
versionName "3.3.1"
2929
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3030
buildConfigField("String", "COREVERSION", "\"$CORE_VERSION\"")
3131
buildConfigField("String", "CONSOLEVERSION", "\"$CONSOLE_VERSION\"")

app/libs/silk4j-1.0.jar

-3.01 MB
Binary file not shown.

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
android:supportsRtl="true"
3131
android:theme="@style/AppTheme"
3232
android:usesCleartextTraffic="true"
33-
tools:ignore="HardcodedDebugMode">
33+
android:hasFragileUserData="true"
34+
tools:ignore="HardcodedDebugMode"
35+
tools:targetApi="q">
3436
<activity
3537
android:name=".activity.CrashReportActivity"
3638
android:theme="@style/AppTheme"
Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,76 @@
11
package io.github.mzdluo123.mirai.android.utils
22

3+
import android.annotation.SuppressLint
34
import io.github.mzdluo123.mirai.android.BotApplication
45
import kotlinx.coroutines.Dispatchers
56
import kotlinx.coroutines.withContext
67
import okhttp3.FormBody
78
import okhttp3.Request
89

10+
@SuppressLint("SetJavaScriptEnabled")
911
@OptIn(ExperimentalUnsignedTypes::class)
12+
//
13+
//suspend fun paste(text: String): String {
14+
// val res = withContext(Dispatchers.IO) {
15+
// BotApplication.httpClient.value.newCall(
16+
// Request.Builder().url("https://paste.ubuntu.com/")
17+
// .post(
18+
// FormBody.Builder().add("poster", "MiraiAndroid")
19+
// .add("syntax", "text")
20+
// .add("expiration", "")
21+
// .add("content", text).build()
22+
// ).build()
23+
// ).execute()
24+
// }
25+
//
26+
// return res.request.url.toString()
27+
//}
1028

29+
//
1130
suspend fun paste(text: String): String {
1231
val res = withContext(Dispatchers.IO) {
1332
BotApplication.httpClient.value.newCall(
14-
Request.Builder().url("https://paste.ubuntu.com/")
33+
Request.Builder().url("https://paste.rs/web")
1534
.post(
16-
FormBody.Builder().add("poster", "MiraiAndroid")
17-
.add("syntax", "text")
18-
.add("expiration", "")
35+
FormBody.Builder()
36+
.add("extension", "txt")
1937
.add("content", text).build()
2038
).build()
2139
).execute()
2240
}
23-
2441
return res.request.url.toString()
2542
}
43+
44+
45+
//suspend fun paste(text: String): String {
46+
// return withContext(Dispatchers.Main) {
47+
// val webView = WebView(BotApplication.context)
48+
//
49+
// webView.settings.apply {
50+
// javaScriptEnabled = true
51+
// }
52+
// webView.webViewClient = object :WebViewClient(){
53+
// override fun onPageFinished(view: WebView?, url: String?) {
54+
// super.onPageFinished(view, url)
55+
//
56+
// webView.evaluateJavascript(
57+
// """
58+
// document.getElementById("id_expires").selectedIndex = 4
59+
// document.getElementById("id_lexer").selectedIndex = 0
60+
// document.getElementById("id_content").value = `$text`
61+
// document.getElementsByClassName("btn")[0].click()
62+
// """.trimIndent()
63+
// ) {}
64+
//
65+
// }
66+
//
67+
// }
68+
// webView.loadUrl("https://pastebin.mozilla.org/")
69+
// while (webView.url == "https://pastebin.mozilla.org/") {
70+
// delay(100)
71+
// }
72+
// val url = webView.url ?: "上传出错"
73+
// webView.destroy()
74+
// url
75+
// }
76+
//}
-341 KB
Binary file not shown.
-231 KB
Binary file not shown.
-408 KB
Binary file not shown.
-246 KB
Binary file not shown.

app/src/main/jniLibs/x86/liblame.so

-364 KB
Binary file not shown.

app/src/main/jniLibs/x86/libsilk.so

-248 KB
Binary file not shown.
-406 KB
Binary file not shown.
-272 KB
Binary file not shown.

0 commit comments

Comments
 (0)