mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-17 22:54:04 +08:00
@@ -22,8 +22,6 @@ import com.ryanheise.audioservice.AudioServiceActivity
|
|||||||
import io.flutter.embedding.engine.FlutterEngine
|
import io.flutter.embedding.engine.FlutterEngine
|
||||||
import io.flutter.plugin.common.MethodChannel
|
import io.flutter.plugin.common.MethodChannel
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
import kotlin.system.exitProcess
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
class MainActivity : AudioServiceActivity() {
|
class MainActivity : AudioServiceActivity() {
|
||||||
private lateinit var methodChannel: MethodChannel
|
private lateinit var methodChannel: MethodChannel
|
||||||
@@ -35,7 +33,7 @@ class MainActivity : AudioServiceActivity() {
|
|||||||
methodChannel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "PiliPlus")
|
methodChannel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "PiliPlus")
|
||||||
methodChannel.setMethodCallHandler { call, result ->
|
methodChannel.setMethodCallHandler { call, result ->
|
||||||
when (call.method) {
|
when (call.method) {
|
||||||
"back" -> back();
|
"back" -> back()
|
||||||
|
|
||||||
"biliSendCommAntifraud" -> {
|
"biliSendCommAntifraud" -> {
|
||||||
try {
|
try {
|
||||||
@@ -50,7 +48,7 @@ class MainActivity : AudioServiceActivity() {
|
|||||||
val pictures = call.argument<String?>("pictures")
|
val pictures = call.argument<String?>("pictures")
|
||||||
val sourceId = call.argument<String>("source_id") ?: ""
|
val sourceId = call.argument<String>("source_id") ?: ""
|
||||||
val uid = call.argument<Number>("uid") ?: 0L
|
val uid = call.argument<Number>("uid") ?: 0L
|
||||||
val cookies = call.argument<List<String>>("cookies") ?: emptyList<String>()
|
val cookies = call.argument<List<String>>("cookies") ?: emptyList()
|
||||||
|
|
||||||
val intent = Intent().apply {
|
val intent = Intent().apply {
|
||||||
component = ComponentName(
|
component = ComponentName(
|
||||||
@@ -170,7 +168,7 @@ class MainActivity : AudioServiceActivity() {
|
|||||||
pendingIntent.intentSender
|
pendingIntent.intentSender
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (_: Exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -219,7 +217,7 @@ class MainActivity : AudioServiceActivity() {
|
|||||||
"maxHeight" to (realSizePoint.y / density).roundToInt(),
|
"maxHeight" to (realSizePoint.y / density).roundToInt(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (_: Exception) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -243,7 +241,7 @@ class MainActivity : AudioServiceActivity() {
|
|||||||
try {
|
try {
|
||||||
isFoldable =
|
isFoldable =
|
||||||
packageManager.hasSystemFeature(PackageManager.FEATURE_SENSOR_HINGE_ANGLE)
|
packageManager.hasSystemFeature(PackageManager.FEATURE_SENSOR_HINGE_ANGLE)
|
||||||
} catch (e: Exception) {
|
} catch (_: Exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user