mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 11:21:04 -08:00
Include more information in Android bug reports
* src/androidfns.c (Fx_server_vendor, Fx_server_version): New functions. (syms_of_androidfns): Define new functions. * src/androidterm.c (android_set_build_fingerprint) (syms_of_androidterm): Set new variable Vandroid_build_manufacturer. * src/xfns.c (Fx_server_vendor, Fx_server_version): Update doc strings.
This commit is contained in:
parent
6e83b72706
commit
9d1285883c
3 changed files with 72 additions and 2 deletions
|
|
@ -1234,6 +1234,32 @@ DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells,
|
||||||
return make_fixnum (1 << nr_planes);
|
return make_fixnum (1 << nr_planes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
|
||||||
|
doc: /* SKIP: real doc in xfns.c. */)
|
||||||
|
(Lisp_Object terminal)
|
||||||
|
{
|
||||||
|
#ifdef ANDROID_STUBIFY
|
||||||
|
error ("Android cross-compilation stub called!");
|
||||||
|
return Qnil;
|
||||||
|
#else
|
||||||
|
check_android_display_info (terminal);
|
||||||
|
return Vandroid_build_manufacturer;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0,
|
||||||
|
doc: /* SKIP: real doc in xfns.c. */)
|
||||||
|
(Lisp_Object terminal)
|
||||||
|
{
|
||||||
|
#ifdef ANDROID_STUBIFY
|
||||||
|
error ("Android cross-compilation stub called!");
|
||||||
|
return Qnil;
|
||||||
|
#else
|
||||||
|
check_android_display_info (terminal);
|
||||||
|
return list3i (android_get_current_api_level (), 0, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens,
|
DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens,
|
||||||
0, 1, 0, doc: /* SKIP: real doc in xfns.c. */)
|
0, 1, 0, doc: /* SKIP: real doc in xfns.c. */)
|
||||||
(Lisp_Object terminal)
|
(Lisp_Object terminal)
|
||||||
|
|
@ -3114,6 +3140,8 @@ using the volume down button. */);
|
||||||
defsubr (&Sx_hide_tip);
|
defsubr (&Sx_hide_tip);
|
||||||
defsubr (&Sandroid_detect_mouse);
|
defsubr (&Sandroid_detect_mouse);
|
||||||
defsubr (&Sandroid_toggle_on_screen_keyboard);
|
defsubr (&Sandroid_toggle_on_screen_keyboard);
|
||||||
|
defsubr (&Sx_server_vendor);
|
||||||
|
defsubr (&Sx_server_version);
|
||||||
#ifndef ANDROID_STUBIFY
|
#ifndef ANDROID_STUBIFY
|
||||||
defsubr (&Sandroid_query_battery);
|
defsubr (&Sandroid_query_battery);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5786,7 +5786,8 @@ android_term_init (void)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Set Vandroid_build_fingerprint to a reasonable value. */
|
/* Set Vandroid_build_fingerprint to a reasonable value, and also
|
||||||
|
Vandroid_build_manufacturer. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
android_set_build_fingerprint (void)
|
android_set_build_fingerprint (void)
|
||||||
|
|
@ -5847,6 +5848,39 @@ android_set_build_fingerprint (void)
|
||||||
Vandroid_build_fingerprint = build_string_from_utf8 (data);
|
Vandroid_build_fingerprint = build_string_from_utf8 (data);
|
||||||
(*android_java_env)->ReleaseStringUTFChars (android_java_env,
|
(*android_java_env)->ReleaseStringUTFChars (android_java_env,
|
||||||
string, data);
|
string, data);
|
||||||
|
|
||||||
|
/* Now obtain Build.MANUFACTURER. */
|
||||||
|
|
||||||
|
ANDROID_DELETE_LOCAL_REF (string);
|
||||||
|
string = NULL;
|
||||||
|
|
||||||
|
field = (*android_java_env)->GetStaticFieldID (android_java_env,
|
||||||
|
class,
|
||||||
|
"MANUFACTURER",
|
||||||
|
"Ljava/lang/String;");
|
||||||
|
(*android_java_env)->ExceptionClear (android_java_env);
|
||||||
|
|
||||||
|
if (!field)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
string
|
||||||
|
= (*android_java_env)->GetStaticObjectField (android_java_env,
|
||||||
|
class, field);
|
||||||
|
(*android_java_env)->ExceptionClear (android_java_env);
|
||||||
|
|
||||||
|
if (!string)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
data = (*android_java_env)->GetStringUTFChars (android_java_env,
|
||||||
|
string, NULL);
|
||||||
|
(*android_java_env)->ExceptionClear (android_java_env);
|
||||||
|
|
||||||
|
if (!data)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
Vandroid_build_manufacturer = build_string_from_utf8 (data);
|
||||||
|
(*android_java_env)->ReleaseStringUTFChars (android_java_env,
|
||||||
|
string, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string)
|
if (string)
|
||||||
|
|
@ -5861,6 +5895,7 @@ android_set_build_fingerprint (void)
|
||||||
ANDROID_DELETE_LOCAL_REF (class);
|
ANDROID_DELETE_LOCAL_REF (class);
|
||||||
|
|
||||||
Vandroid_build_fingerprint = Qnil;
|
Vandroid_build_fingerprint = Qnil;
|
||||||
|
Vandroid_build_manufacturer = Qnil;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5899,6 +5934,10 @@ This is a string that uniquely identifies the version of Android
|
||||||
Emacs is running on. */);
|
Emacs is running on. */);
|
||||||
Vandroid_build_fingerprint = Qnil;
|
Vandroid_build_fingerprint = Qnil;
|
||||||
|
|
||||||
|
DEFVAR_LISP ("android-build-manufacturer", Vandroid_build_manufacturer,
|
||||||
|
doc: /* Name of the developer of the running version of Android. */);
|
||||||
|
Vandroid_build_manufacturer = Qnil;
|
||||||
|
|
||||||
/* Only defined so loadup.el loads scroll-bar.el. */
|
/* Only defined so loadup.el loads scroll-bar.el. */
|
||||||
DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars,
|
DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars,
|
||||||
doc: /* SKIP: real doc in xterm.c. */);
|
doc: /* SKIP: real doc in xterm.c. */);
|
||||||
|
|
|
||||||
|
|
@ -5673,6 +5673,8 @@ that operating systems cannot be developed and distributed noncommercially.)
|
||||||
The optional argument TERMINAL specifies which display to ask about.
|
The optional argument TERMINAL specifies which display to ask about.
|
||||||
|
|
||||||
For GNU and Unix systems, this queries the X server software.
|
For GNU and Unix systems, this queries the X server software.
|
||||||
|
For Android systems, value is the manufacturer who developed the Android
|
||||||
|
system that is being used.
|
||||||
For MS Windows and Nextstep the result is hard-coded.
|
For MS Windows and Nextstep the result is hard-coded.
|
||||||
|
|
||||||
TERMINAL should be a terminal object, a frame or a display name (a string).
|
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
|
||||||
release number. For MS Windows, the 3 numbers report the OS major and
|
release number. For MS Windows, the 3 numbers report the OS major and
|
||||||
minor version and build number. For Nextstep, the first 2 numbers are
|
minor version and build number. For Nextstep, the first 2 numbers are
|
||||||
hard-coded and the 3rd represents the OS version. For Haiku, all 3
|
hard-coded and the 3rd represents the OS version. For Haiku, all 3
|
||||||
numbers are hard-coded.
|
numbers are hard-coded. For Android, the first number represents the
|
||||||
|
Android API level, and the next two numbers are all zero.
|
||||||
|
|
||||||
See also the function `x-server-vendor'.
|
See also the function `x-server-vendor'.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue