diff options
Diffstat (limited to 'src/androidfns.c')
-rw-r--r-- | src/androidfns.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/androidfns.c b/src/androidfns.c index 7595e176618..af2247ad962 100644 --- a/src/androidfns.c +++ b/src/androidfns.c @@ -1374,6 +1374,7 @@ DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, error ("Android cross-compilation stub called!"); return Qnil; #else + check_android_display_info (terminal); return make_fixnum (android_get_mm_width ()); #endif } @@ -1386,6 +1387,7 @@ DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, error ("Android cross-compilation stub called!"); return Qnil; #else + check_android_display_info (terminal); return make_fixnum (android_get_mm_height ()); #endif } @@ -1469,6 +1471,7 @@ Internal use only, use `display-monitor-attributes-list' instead. */) #else struct MonitorInfo monitor; + check_android_display_info (terminal); memset (&monitor, 0, sizeof monitor); monitor.geom.width = android_get_screen_width (); monitor.geom.height = android_get_screen_height (); @@ -3270,6 +3273,11 @@ External storage on Android encompasses the `/sdcard' and absent these permissions. */) (void) { + /* Implement a rather undependable fallback when no GUI is + available. */ + if (!android_init_gui) + return Ffile_accessible_directory_p (build_string ("/sdcard")); + return android_external_storage_available_p () ? Qt : Qnil; } @@ -3284,6 +3292,9 @@ Use `android-external-storage-available-p' (which see) to verify whether Emacs has actually received such access permissions. */) (void) { + if (!android_init_gui) + return Qnil; + android_request_storage_access (); return Qnil; } |