{
/* The depth of the bitmap. This is not actually used, just defined
in order to be consistent with X. */
- public int depth, width, height;
+ public final int depth, width, height;
/* The bitmap itself. */
public Bitmap bitmap;
/* Whether or not GC should be explicitly triggered upon
release. */
- private boolean needCollect;
+ private final boolean needCollect;
/* ID used to determine whether or not the GC clip rects
changed. */
this.width = width;
this.height = height;
this.depth = depth;
+
+ /* The immutable bitmap constructor is only leveraged to create
+ small fringe bitmaps. */
+ this.needCollect = false;
}
public
display in DISPLAY (if any). */
if (create_frame && !tty && !display)
{
+#ifndef HAVE_ANDROID
/* Set these here so we use a default_display only when the user
didn't give us an explicit display. */
#if defined (NS_IMPL_COCOA)
alt_display = "w32";
#elif defined (HAVE_HAIKU)
alt_display = "be";
-#elif defined (HAVE_ANDROID)
- alt_display = "android";
-#endif
+#endif /* NS_IMPL_COCOA */
#ifdef HAVE_PGTK
display = egetenv ("WAYLAND_DISPLAY");
alt_display = egetenv ("DISPLAY");
-#else
+#else /* !HAVE_PGTK */
display = egetenv ("DISPLAY");
-#endif
+#endif /* HAVE_PGTK */
+#else /* HAVE_ANDROID */
+ /* Disregard the DISPLAY environment variable under Android.
+ Several terminal emulator programs furnish their own X
+ servers and set DISPLAY, but an Android build is incapable of
+ displaying X frames. */
+ alt_display = NULL;
+ display = "android";
+#endif /* !HAVE_ANDROID */
}
if (!display)
}
#endif
+ /* Setting DISPLAY under Android hinders attempts to display other
+ programs within X servers that are available for Android. */
+
+#ifndef HAVE_ANDROID
/* For DISPLAY try to get the values from the frame or the initial env. */
if (strcmp (var, "DISPLAY") == 0)
{
*valuelen = SBYTES (display);
return 1;
}
-#endif
+#endif /* !HAVE_PGTK */
/* If still not found, Look for DISPLAY in Vinitial_environment. */
if (getenv_internal_1 (var, varlen, value, valuelen,
Vinitial_environment))
return *value ? 1 : 0;
}
+#endif /* !HAVE_ANDROID */
return 0;
}
register char **new_env;
char **p, **q;
register int new_length;
+#ifndef HAVE_ANDROID
Lisp_Object display = Qnil;
+#endif /* !HAVE_ANDROID */
new_length = 0;
CONSP (tem) && STRINGP (XCAR (tem));
tem = XCDR (tem))
{
+#ifndef HAVE_ANDROID
if (strncmp (SSDATA (XCAR (tem)), "DISPLAY", 7) == 0
&& (SDATA (XCAR (tem)) [7] == '\0'
|| SDATA (XCAR (tem)) [7] == '='))
/* DISPLAY is specified in process-environment. */
display = Qt;
+#endif /* !HAVE_ANDROID */
new_length++;
}
+ /* Setting DISPLAY under Android hinders attempts to display other
+ programs within X servers that are available for Android. */
+
+#ifndef HAVE_ANDROID
/* If not provided yet, use the frame's DISPLAY. */
if (NILP (display))
{
&& strcmp (G_OBJECT_TYPE_NAME (FRAME_X_DISPLAY (SELECTED_FRAME ())),
"GdkX11Display"))
tmp = Qnil;
-#endif
+#endif /* HAVE_PGTK */
if (!STRINGP (tmp) && CONSP (Vinitial_environment))
/* If still not found, Look for DISPLAY in Vinitial_environment. */
new_length++;
}
}
+#endif /* !HAVE_ANDROID */
/* new_length + 2 to include PWD and terminating 0. */
env = new_env = xnmalloc (new_length + 2, sizeof *env);
if (egetenv ("PWD"))
*new_env++ = pwd_var;
+#ifndef HAVE_ANDROID
if (STRINGP (display))
{
char *vdata = xmalloc (sizeof "DISPLAY=" + SBYTES (display));
lispstpcpy (stpcpy (vdata, "DISPLAY="), display);
new_env = add_env (env, new_env, vdata);
}
+#endif /* !HAVE_ANDROID */
/* Overrides. */
for (tem = Vprocess_environment;