stub some APIs for Flappy Bird, mostly webview related

This commit is contained in:
Julian Winkler
2023-06-18 11:03:43 +02:00
parent c21d8532bc
commit 0454dcbfd5
16 changed files with 150 additions and 6 deletions

View File

@@ -1621,7 +1621,9 @@ public final class MotionEvent extends InputEvent {
}
MotionEvent ev = obtain();
ev.mNativePtr = nativeCopy(ev.mNativePtr, other.mNativePtr, true /*keepHistory*/);
ev.action = other.action;
ev.coord_x = other.coord_x;
ev.coord_y = other.coord_y;
return ev;
}

View File

@@ -872,4 +872,7 @@ public class View extends Object {
public Context getContext() {
return this.context;
}
public void refreshDrawableState() {
}
}

View File

@@ -66,6 +66,16 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
// TODO: actually implement this (might make sense to implement it in the subclasses instead), when applicable
}
/**
* Returns the number of children in the group.
*
* @return a positive integer representing the number of children in
* the group
*/
public int getChildCount() {
return children.size();
}
public static class LayoutParams {
public static final int FILL_PARENT = -1;
public static final int MATCH_PARENT = -1;
@@ -98,4 +108,19 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
*/
// public LayoutAnimationController.AnimationParameters layoutAnimationParameters;
}
public static class MarginLayoutParams extends ViewGroup.LayoutParams{
public MarginLayoutParams() {
super();
}
public MarginLayoutParams(int width, int height) {
super(width, height);
}
public MarginLayoutParams(int width, int height, float weight) {
super(width, height, weight);
}
}
}

View File

@@ -39,4 +39,8 @@ public class Window {
public void takeInputQueue(InputQueue.Callback callback) {
take_input_queue(native_window, callback, new InputQueue());
}
public boolean requestFeature(int featureId) {
return false;
}
}