mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-08 04:30:45 -08:00
Port Emacs to Android 34
* configure.ac: Detect and require Android 34 headers. * doc/emacs/android.texi (Android Environment): Mention new permissions mandated by Android 34. * java/AndroidManifest.xml.in: Introduce new permissions and foreground service types prerequisite for background execution under Android 34. * java/INSTALL: Update installation documentation. * java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7FontEntity) (Sdk7FontObject): * java/org/gnu/emacs/EmacsService.java (onCreate): Silence deprecation warnings. * src/android.c: Update documentation.
This commit is contained in:
parent
511acc2ed8
commit
253f1aff1a
7 changed files with 42 additions and 14 deletions
|
|
@ -99,6 +99,7 @@ public class EmacsSdk7FontDriver extends EmacsFontDriver
|
|||
/* The typeface. */
|
||||
public Sdk7Typeface typeface;
|
||||
|
||||
@SuppressWarnings ("deprecation")
|
||||
public
|
||||
Sdk7FontEntity (Sdk7Typeface typeface)
|
||||
{
|
||||
|
|
@ -120,6 +121,7 @@ public class EmacsSdk7FontDriver extends EmacsFontDriver
|
|||
/* The typeface. */
|
||||
public Sdk7Typeface typeface;
|
||||
|
||||
@SuppressWarnings ("deprecation")
|
||||
public
|
||||
Sdk7FontObject (Sdk7Typeface typeface, int pixelSize)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -223,6 +223,21 @@ public final class EmacsService extends Service
|
|||
}
|
||||
}
|
||||
|
||||
/* Return the display density, adjusted in accord with the user's
|
||||
text scaling preferences. */
|
||||
|
||||
@SuppressWarnings ("deprecation")
|
||||
private static float
|
||||
getScaledDensity (DisplayMetrics metrics)
|
||||
{
|
||||
/* The scaled density has been made obsolete by the introduction
|
||||
of non-linear text scaling in Android 34, where there is no
|
||||
longer a fixed relation between point and pixel sizes, but
|
||||
remains useful, considering that Emacs does not support
|
||||
non-linear text scaling. */
|
||||
return metrics.scaledDensity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void
|
||||
onCreate ()
|
||||
|
|
@ -242,7 +257,7 @@ public final class EmacsService extends Service
|
|||
metrics = getResources ().getDisplayMetrics ();
|
||||
pixelDensityX = metrics.xdpi;
|
||||
pixelDensityY = metrics.ydpi;
|
||||
tempScaledDensity = ((metrics.scaledDensity
|
||||
tempScaledDensity = ((getScaledDensity (metrics)
|
||||
/ metrics.density)
|
||||
* pixelDensityX);
|
||||
resolver = getContentResolver ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue