From: Po Lu Date: Sun, 12 Mar 2023 07:43:14 +0000 (+0800) Subject: Update Android port X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a17380e80d162dbc15110ce84ff2e12e11e0623b;p=emacs.git Update Android port * java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity) (onCancel): New function. (displayFailureDialog): Handle dialog cancellation. * src/sfntfont.c (sfnt_parse_languages): Look for SLNG tag if DLNG is not present. --- diff --git a/java/org/gnu/emacs/EmacsOpenActivity.java b/java/org/gnu/emacs/EmacsOpenActivity.java index 51335ddb2dd..e8fb24d53d8 100644 --- a/java/org/gnu/emacs/EmacsOpenActivity.java +++ b/java/org/gnu/emacs/EmacsOpenActivity.java @@ -68,7 +68,8 @@ import java.io.InputStream; import java.io.UnsupportedEncodingException; public final class EmacsOpenActivity extends Activity - implements DialogInterface.OnClickListener + implements DialogInterface.OnClickListener, + DialogInterface.OnCancelListener { private static final String TAG = "EmacsOpenActivity"; @@ -121,6 +122,13 @@ public final class EmacsOpenActivity extends Activity finish (); } + @Override + public void + onCancel (DialogInterface dialog) + { + finish (); + } + public String readEmacsClientLog () { @@ -178,6 +186,7 @@ public final class EmacsOpenActivity extends Activity dialog.setMessage (text); dialog.setButton (DialogInterface.BUTTON_POSITIVE, "OK", this); + dialog.setOnCancelListener (this); dialog.show (); } diff --git a/src/sfntfont.c b/src/sfntfont.c index e8e437072d9..ab92def0aff 100644 --- a/src/sfntfont.c +++ b/src/sfntfont.c @@ -482,7 +482,14 @@ sfnt_parse_languages (struct sfnt_meta_table *meta, &map); if (!data) - return; + { + /* Fall back to the supported languages metadata. */ + data = sfnt_find_metadata (meta, SFNT_META_DATA_TAG_SLNG, + &map); + + if (!data) + return; + } USE_SAFE_ALLOCA;