diff options
-rw-r--r-- | app/src/main/java/com/javispedro/vndroid/ServerService.java | 1 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/xml/controlservice.xml | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/app/src/main/java/com/javispedro/vndroid/ServerService.java b/app/src/main/java/com/javispedro/vndroid/ServerService.java index 96420df..b39f175 100644 --- a/app/src/main/java/com/javispedro/vndroid/ServerService.java +++ b/app/src/main/java/com/javispedro/vndroid/ServerService.java @@ -218,6 +218,7 @@ public class ServerService extends Service { private class ScreenGrabberCallback implements ScreenGrabber.Callback { @Override public void onImage(Image image) { + if (image == null) return; if (rfbServer != null) { rfbServer.putImage(image); } else { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bf12595..51d394a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,6 +1,10 @@ <resources> <string name="app_name">Vndroid</string> + <string name="control_service_summary">Vndroid control service</string> + <string name="control_service_description">Vndroid requires this accessibility service in order to allow VNC clients control of the device (touchscreen, keyboard). + If the service is disabled, clients will be able to see the screen, but will not be able to interact with it. </string> + <string name="server_running_notification_channel">Server status</string> <string name="server_running_notification_title">Server active</string> diff --git a/app/src/main/res/xml/controlservice.xml b/app/src/main/res/xml/controlservice.xml index 29a16b7..85078a7 100644 --- a/app/src/main/res/xml/controlservice.xml +++ b/app/src/main/res/xml/controlservice.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" android:canRetrieveWindowContent="true" - android:canPerformGestures="true"> - -</accessibility-service>
\ No newline at end of file + android:canPerformGestures="true" + android:summary="@string/control_service_summary" + android:description="@string/control_service_description"/>
\ No newline at end of file |