api-impl{-jni}: make view.onTouchEvent work, misc stuff to make input work for Unity games

onTouchEvent was previously incorrectly handled in GLSurfaceView; move it
to View so that it works properly with any of it's descendants.

This is done by reusing the existing setOnTouchListener implementation
and changing it to use GtkEventControllerLegacy which provides motion
events.

Technically some of the code is in WrapperWidget.c since every widget
calls wrapper_widget_set_jobject and we already have related code
there.
This commit is contained in:
Mis012
2023-10-17 21:33:59 +02:00
parent 58fa4b5590
commit 4a0755c6e0
14 changed files with 154 additions and 127 deletions

View File

@@ -32,6 +32,7 @@ import android.os.Environment;
import android.os.UserHandle;
import android.util.AndroidException;
import android.util.DisplayMetrics;
import android.util.Slog;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
@@ -57,6 +58,8 @@ class Drawable {}
*/
public class PackageManager {
private final static String TAG = "PackageManager";
/**
* This exception is thrown when a given package, application, or component
* name cannot be found.
@@ -2131,6 +2134,7 @@ public class PackageManager {
* false.
*/
public boolean hasSystemFeature(String name) {
Slog.e(TAG, "!!!!!!! hasSystemFeature: case >" + name + "< is not implemented yet");
return false; // FIXME
}