[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android a17380e80d1 1/2: Update Android port
From: |
Po Lu |
Subject: |
feature/android a17380e80d1 1/2: Update Android port |
Date: |
Sun, 12 Mar 2023 03:44:18 -0400 (EDT) |
branch: feature/android
commit a17380e80d162dbc15110ce84ff2e12e11e0623b
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
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.
---
java/org/gnu/emacs/EmacsOpenActivity.java | 11 ++++++++++-
src/sfntfont.c | 9 ++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
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;