mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-19 01:10:57 -08:00
Don't forcibly display dialogs on Android if a keyboard is present
* java/org/gnu/emacs/EmacsService.java (detectKeyboard): New function. * lisp/subr.el (use-dialog-box-p): Don't always return t if a keyboard is present on Android. * src/android.c (android_init_emacs_service): Link to new function. (android_detect_keyboard): New function. * src/android.h: Update prototypes. * src/androidfns.c (Fandroid_detect_keyboard) (syms_of_androidfns): New function.
This commit is contained in:
parent
cebd26b2e1
commit
0d2b712078
5 changed files with 53 additions and 1 deletions
|
|
@ -60,6 +60,7 @@ import android.content.UriPermission;
|
|||
import android.content.pm.PackageManager;
|
||||
|
||||
import android.content.res.AssetManager;
|
||||
import android.content.res.Configuration;
|
||||
|
||||
import android.hardware.input.InputManager;
|
||||
|
||||
|
|
@ -581,6 +582,15 @@ public final class EmacsService extends Service
|
|||
return false;
|
||||
}
|
||||
|
||||
public boolean
|
||||
detectKeyboard ()
|
||||
{
|
||||
Configuration configuration;
|
||||
|
||||
configuration = getResources ().getConfiguration ();
|
||||
return configuration.keyboard != Configuration.KEYBOARD_NOKEYS;
|
||||
}
|
||||
|
||||
public String
|
||||
nameKeysym (int keysym)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue