diff options
Diffstat (limited to 'src/androidselect.c')
| -rw-r--r-- | src/androidselect.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/androidselect.c b/src/androidselect.c index 3947ab99166..f54a6d6f52c 100644 --- a/src/androidselect.c +++ b/src/androidselect.c | |||
| @@ -110,6 +110,9 @@ determined. */) | |||
| 110 | { | 110 | { |
| 111 | jint rc; | 111 | jint rc; |
| 112 | 112 | ||
| 113 | if (!android_init_gui) | ||
| 114 | error ("Accessing clipboard without display connection"); | ||
| 115 | |||
| 113 | block_input (); | 116 | block_input (); |
| 114 | rc = (*android_java_env)->CallIntMethod (android_java_env, | 117 | rc = (*android_java_env)->CallIntMethod (android_java_env, |
| 115 | clipboard, | 118 | clipboard, |
| @@ -133,6 +136,9 @@ DEFUN ("android-set-clipboard", Fandroid_set_clipboard, | |||
| 133 | { | 136 | { |
| 134 | jarray bytes; | 137 | jarray bytes; |
| 135 | 138 | ||
| 139 | if (!android_init_gui) | ||
| 140 | error ("Accessing clipboard without display connection"); | ||
| 141 | |||
| 136 | CHECK_STRING (string); | 142 | CHECK_STRING (string); |
| 137 | string = ENCODE_UTF_8 (string); | 143 | string = ENCODE_UTF_8 (string); |
| 138 | 144 | ||
| @@ -167,6 +173,9 @@ Alternatively, return nil if the clipboard is empty. */) | |||
| 167 | size_t length; | 173 | size_t length; |
| 168 | jbyte *data; | 174 | jbyte *data; |
| 169 | 175 | ||
| 176 | if (!android_init_gui) | ||
| 177 | error ("No Android display connection!"); | ||
| 178 | |||
| 170 | method = clipboard_class.get_clipboard; | 179 | method = clipboard_class.get_clipboard; |
| 171 | bytes | 180 | bytes |
| 172 | = (*android_java_env)->CallObjectMethod (android_java_env, | 181 | = (*android_java_env)->CallObjectMethod (android_java_env, |
| @@ -217,6 +226,9 @@ URL with a scheme specified. Signal an error upon failure. */) | |||
| 217 | { | 226 | { |
| 218 | Lisp_Object value; | 227 | Lisp_Object value; |
| 219 | 228 | ||
| 229 | if (!android_init_gui) | ||
| 230 | error ("No Android display connection!"); | ||
| 231 | |||
| 220 | CHECK_STRING (url); | 232 | CHECK_STRING (url); |
| 221 | value = android_browse_url (url); | 233 | value = android_browse_url (url); |
| 222 | 234 | ||