diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/androidfns.c | 28 | ||||
| -rw-r--r-- | src/androidterm.c | 41 | ||||
| -rw-r--r-- | src/xfns.c | 5 |
3 files changed, 72 insertions, 2 deletions
diff --git a/src/androidfns.c b/src/androidfns.c index e1d423ab3eb..3367ebdf755 100644 --- a/src/androidfns.c +++ b/src/androidfns.c | |||
| @@ -1234,6 +1234,32 @@ DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, | |||
| 1234 | return make_fixnum (1 << nr_planes); | 1234 | return make_fixnum (1 << nr_planes); |
| 1235 | } | 1235 | } |
| 1236 | 1236 | ||
| 1237 | DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, | ||
| 1238 | doc: /* SKIP: real doc in xfns.c. */) | ||
| 1239 | (Lisp_Object terminal) | ||
| 1240 | { | ||
| 1241 | #ifdef ANDROID_STUBIFY | ||
| 1242 | error ("Android cross-compilation stub called!"); | ||
| 1243 | return Qnil; | ||
| 1244 | #else | ||
| 1245 | check_android_display_info (terminal); | ||
| 1246 | return Vandroid_build_manufacturer; | ||
| 1247 | #endif | ||
| 1248 | } | ||
| 1249 | |||
| 1250 | DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, | ||
| 1251 | doc: /* SKIP: real doc in xfns.c. */) | ||
| 1252 | (Lisp_Object terminal) | ||
| 1253 | { | ||
| 1254 | #ifdef ANDROID_STUBIFY | ||
| 1255 | error ("Android cross-compilation stub called!"); | ||
| 1256 | return Qnil; | ||
| 1257 | #else | ||
| 1258 | check_android_display_info (terminal); | ||
| 1259 | return list3i (android_get_current_api_level (), 0, 0); | ||
| 1260 | #endif | ||
| 1261 | } | ||
| 1262 | |||
| 1237 | DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, | 1263 | DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, |
| 1238 | 0, 1, 0, doc: /* SKIP: real doc in xfns.c. */) | 1264 | 0, 1, 0, doc: /* SKIP: real doc in xfns.c. */) |
| 1239 | (Lisp_Object terminal) | 1265 | (Lisp_Object terminal) |
| @@ -3114,6 +3140,8 @@ using the volume down button. */); | |||
| 3114 | defsubr (&Sx_hide_tip); | 3140 | defsubr (&Sx_hide_tip); |
| 3115 | defsubr (&Sandroid_detect_mouse); | 3141 | defsubr (&Sandroid_detect_mouse); |
| 3116 | defsubr (&Sandroid_toggle_on_screen_keyboard); | 3142 | defsubr (&Sandroid_toggle_on_screen_keyboard); |
| 3143 | defsubr (&Sx_server_vendor); | ||
| 3144 | defsubr (&Sx_server_version); | ||
| 3117 | #ifndef ANDROID_STUBIFY | 3145 | #ifndef ANDROID_STUBIFY |
| 3118 | defsubr (&Sandroid_query_battery); | 3146 | defsubr (&Sandroid_query_battery); |
| 3119 | 3147 | ||
diff --git a/src/androidterm.c b/src/androidterm.c index 0110c4b6dd8..1cf9bc4afde 100644 --- a/src/androidterm.c +++ b/src/androidterm.c | |||
| @@ -5786,7 +5786,8 @@ android_term_init (void) | |||
| 5786 | 5786 | ||
| 5787 | 5787 | ||
| 5788 | 5788 | ||
| 5789 | /* Set Vandroid_build_fingerprint to a reasonable value. */ | 5789 | /* Set Vandroid_build_fingerprint to a reasonable value, and also |
| 5790 | Vandroid_build_manufacturer. */ | ||
| 5790 | 5791 | ||
| 5791 | static void | 5792 | static void |
| 5792 | android_set_build_fingerprint (void) | 5793 | android_set_build_fingerprint (void) |
| @@ -5847,6 +5848,39 @@ android_set_build_fingerprint (void) | |||
| 5847 | Vandroid_build_fingerprint = build_string_from_utf8 (data); | 5848 | Vandroid_build_fingerprint = build_string_from_utf8 (data); |
| 5848 | (*android_java_env)->ReleaseStringUTFChars (android_java_env, | 5849 | (*android_java_env)->ReleaseStringUTFChars (android_java_env, |
| 5849 | string, data); | 5850 | string, data); |
| 5851 | |||
| 5852 | /* Now obtain Build.MANUFACTURER. */ | ||
| 5853 | |||
| 5854 | ANDROID_DELETE_LOCAL_REF (string); | ||
| 5855 | string = NULL; | ||
| 5856 | |||
| 5857 | field = (*android_java_env)->GetStaticFieldID (android_java_env, | ||
| 5858 | class, | ||
| 5859 | "MANUFACTURER", | ||
| 5860 | "Ljava/lang/String;"); | ||
| 5861 | (*android_java_env)->ExceptionClear (android_java_env); | ||
| 5862 | |||
| 5863 | if (!field) | ||
| 5864 | goto fail; | ||
| 5865 | |||
| 5866 | string | ||
| 5867 | = (*android_java_env)->GetStaticObjectField (android_java_env, | ||
| 5868 | class, field); | ||
| 5869 | (*android_java_env)->ExceptionClear (android_java_env); | ||
| 5870 | |||
| 5871 | if (!string) | ||
| 5872 | goto fail; | ||
| 5873 | |||
| 5874 | data = (*android_java_env)->GetStringUTFChars (android_java_env, | ||
| 5875 | string, NULL); | ||
| 5876 | (*android_java_env)->ExceptionClear (android_java_env); | ||
| 5877 | |||
| 5878 | if (!data) | ||
| 5879 | goto fail; | ||
| 5880 | |||
| 5881 | Vandroid_build_manufacturer = build_string_from_utf8 (data); | ||
| 5882 | (*android_java_env)->ReleaseStringUTFChars (android_java_env, | ||
| 5883 | string, data); | ||
| 5850 | } | 5884 | } |
| 5851 | 5885 | ||
| 5852 | if (string) | 5886 | if (string) |
| @@ -5861,6 +5895,7 @@ android_set_build_fingerprint (void) | |||
| 5861 | ANDROID_DELETE_LOCAL_REF (class); | 5895 | ANDROID_DELETE_LOCAL_REF (class); |
| 5862 | 5896 | ||
| 5863 | Vandroid_build_fingerprint = Qnil; | 5897 | Vandroid_build_fingerprint = Qnil; |
| 5898 | Vandroid_build_manufacturer = Qnil; | ||
| 5864 | #endif | 5899 | #endif |
| 5865 | } | 5900 | } |
| 5866 | 5901 | ||
| @@ -5899,6 +5934,10 @@ This is a string that uniquely identifies the version of Android | |||
| 5899 | Emacs is running on. */); | 5934 | Emacs is running on. */); |
| 5900 | Vandroid_build_fingerprint = Qnil; | 5935 | Vandroid_build_fingerprint = Qnil; |
| 5901 | 5936 | ||
| 5937 | DEFVAR_LISP ("android-build-manufacturer", Vandroid_build_manufacturer, | ||
| 5938 | doc: /* Name of the developer of the running version of Android. */); | ||
| 5939 | Vandroid_build_manufacturer = Qnil; | ||
| 5940 | |||
| 5902 | /* Only defined so loadup.el loads scroll-bar.el. */ | 5941 | /* Only defined so loadup.el loads scroll-bar.el. */ |
| 5903 | DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, | 5942 | DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, |
| 5904 | doc: /* SKIP: real doc in xterm.c. */); | 5943 | doc: /* SKIP: real doc in xterm.c. */); |
diff --git a/src/xfns.c b/src/xfns.c index 0e4a25de04a..b7000462e84 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -5673,6 +5673,8 @@ that operating systems cannot be developed and distributed noncommercially.) | |||
| 5673 | The optional argument TERMINAL specifies which display to ask about. | 5673 | The optional argument TERMINAL specifies which display to ask about. |
| 5674 | 5674 | ||
| 5675 | For GNU and Unix systems, this queries the X server software. | 5675 | For GNU and Unix systems, this queries the X server software. |
| 5676 | For Android systems, value is the manufacturer who developed the Android | ||
| 5677 | system that is being used. | ||
| 5676 | For MS Windows and Nextstep the result is hard-coded. | 5678 | For MS Windows and Nextstep the result is hard-coded. |
| 5677 | 5679 | ||
| 5678 | TERMINAL should be a terminal object, a frame or a display name (a string). | 5680 | TERMINAL should be a terminal object, a frame or a display name (a string). |
| @@ -5696,7 +5698,8 @@ Protocol used on TERMINAL and the 3rd number is the distributor-specific | |||
| 5696 | release number. For MS Windows, the 3 numbers report the OS major and | 5698 | release number. For MS Windows, the 3 numbers report the OS major and |
| 5697 | minor version and build number. For Nextstep, the first 2 numbers are | 5699 | minor version and build number. For Nextstep, the first 2 numbers are |
| 5698 | hard-coded and the 3rd represents the OS version. For Haiku, all 3 | 5700 | hard-coded and the 3rd represents the OS version. For Haiku, all 3 |
| 5699 | numbers are hard-coded. | 5701 | numbers are hard-coded. For Android, the first number represents the |
| 5702 | Android API level, and the next two numbers are all zero. | ||
| 5700 | 5703 | ||
| 5701 | See also the function `x-server-vendor'. | 5704 | See also the function `x-server-vendor'. |
| 5702 | 5705 | ||