Commit 7c52aacb authored by Martin Storsjö's avatar Martin Storsjö

androidsurface: Only use ANativeWindow if the private symbols aren't found

Even if ANativeWindow is a public API, the release call seems to
crash on a Nexus One (running 2.3) and on a Galaxy Tab (running 3.2).
The exact reason is not known or understood yet, but it might be
due to accessing and dealing with the Surface from both Java (via the
SurfaceHolder class) and via the ANativeWindow API.

Therefore, only use the ANativeWindow if the old methods aren't
found (that is, on 4.3).

The ANativeWindow output works fine on firmwares as early as 4.0
though.
Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent 82e8851c
......@@ -219,9 +219,9 @@ static int Open(vlc_object_t *p_this)
}
/* */
sys->p_library = InitLibrary2(sys);
sys->p_library = InitLibrary(sys);
if (!sys->p_library)
sys->p_library = InitLibrary(sys);
sys->p_library = InitLibrary2(sys);
if (!sys->p_library) {
free(sys);
msg_Err(vd, "Could not initialize libandroid.so/libui.so/libgui.so/libsurfaceflinger_client.so!");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment