update UI ; fix android InputService @Keep

This commit is contained in:
csf 2022-04-13 13:46:22 +08:00
parent 21e64cce09
commit bb21435faa
3 changed files with 7 additions and 9 deletions

View File

@ -7,6 +7,7 @@ import android.graphics.Path
import android.os.Build
import android.util.Log
import android.view.accessibility.AccessibilityEvent
import androidx.annotation.Keep
import androidx.annotation.RequiresApi
class InputService : AccessibilityService() {
@ -30,6 +31,7 @@ class InputService : AccessibilityService() {
private var mouseX = 0
private var mouseY = 0
@Keep
@RequiresApi(Build.VERSION_CODES.N)
fun rustMouseInput(mask: Int, _x: Int, _y: Int) {
val x = if (_x < 0) {
@ -107,11 +109,7 @@ class InputService : AccessibilityService() {
init(this)
}
override fun onAccessibilityEvent(event: AccessibilityEvent?) {
// TODO("Not yet implemented")
}
override fun onAccessibilityEvent(event: AccessibilityEvent?) {}
override fun onInterrupt() {
// TODO("Not yet implemented")
}
override fun onInterrupt() {}
}

View File

@ -132,7 +132,8 @@ class CustomAlertDialog extends StatelessWidget {
onWillPop: onWillPop ?? () async => false,
child: AlertDialog(
title: title,
contentPadding: EdgeInsets.all(contentPadding ?? 20),
contentPadding: EdgeInsets.symmetric(
horizontal: contentPadding ?? 25, vertical: 10),
content: content,
actions: actions,
));

View File

@ -296,9 +296,8 @@ class ServerModel with ChangeNotifier {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(translate("Do you accept?")),
SizedBox(height: 20),
clientInfo(client),
Text(translate("android_new_connection_tip")),
Text(translate("android_new_connection_tip"),style: TextStyle(color: Colors.black54),),
],
),
actions: [