移除无用代码
This commit is contained in:
parent
a351355b49
commit
ee9f79051b
|
@ -24,14 +24,12 @@ class MainActivity : AppCompatActivity() {
|
|||
private val viewModel by viewModels<MainViewModel>()
|
||||
private lateinit var viewBinding: ActivityMainBinding
|
||||
private lateinit var permissionHandler: NotificationPermissionHandler
|
||||
private lateinit var socketServer: SocketServer
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
enableEdgeToEdge()
|
||||
init()
|
||||
viewBinding = ActivityMainBinding.inflate(layoutInflater)
|
||||
setContentView(viewBinding.root)
|
||||
socketServer = SocketServer(8888)
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
||||
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
|
@ -44,19 +42,6 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
viewBinding.stop.setOnClickListener {
|
||||
killRecordProcess(this, packageName)
|
||||
// val deviceInfo = DeviceDataAccessor.getDeviceInfo(this, DeviceInfoHelper.getDeviceId())
|
||||
// FileUtils.writeDevice("com.headway.books", deviceInfo?:"")
|
||||
// socketServer.start { client, message ->
|
||||
// Log.d("Server", "收到消息: $message")
|
||||
//
|
||||
// // 处理消息并回复
|
||||
// val response = "服务器已收到: $message"
|
||||
// runOnUiThread {
|
||||
// findViewById<TextView>(R.id.text).append("$message\n")
|
||||
// }
|
||||
// socketServer.sendToClient(client, deviceInfo?:"没有设备信息")
|
||||
// }
|
||||
// FileUtils.runPlugin("com.headway.books")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,7 +53,6 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
// socketServer.stop()
|
||||
ClashUtil.unregisterReceiver(this)
|
||||
ScriptUtil.unregisterScriptResultReceiver()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue