Now that we have a reasonably well working SurfaceView implementation,
it is actually cleaner to just implement GLSurfaceView the way AOSP
does. In fact, their code doesn't have any weird dependencies, and
can mostly be used as-is.
The AOSP code is pure Java, which means we had to implement some
EGL wrappers.
This change fixes issues with Wayland (it only ever worked because
the pbuffers were allocated using an XWayland EGLDisplay), and
with resizing (which we simply didn't support), all while getting
rid of quite some (arguably not very readable) LoC.
Unity can't comprehend that a directory name could end in .apk, and will not handle
obb files properly if the path to the obb file includes such a folder.
To convert your existing app data dirs to the new scheme, simply `cd` into
the app_data_dir (`~/.local/share/android_translation_layer` by default)
and run `find . -maxdepth 1 -exec mv {} {}_ \;`
Adds a special treatment for the main Looper to not block in java code,
but instead return to glib managed thread loop. Timeouts in the mainloop
are now handled using g_timeout_add_full().
Also defer Activity construction, so that every thing is set up properly
when the constructor runs.
currently, our "not-actually-a-queue" implementation is quite ugly,
hopefully it might be possible to make it look somewhat sane while
not needing to make it as much of a queue as it is on android