api-impl: add stubs / simple stuff for OsmAnd

without native libs present, launches and renders white square
in map view; with native libs present, segfaults in bundled skia
This commit is contained in:
Mis012
2024-04-12 18:32:30 +02:00
parent fefd2f108b
commit 2802aaa28d
42 changed files with 2171 additions and 77 deletions

View File

@@ -867,16 +867,18 @@ public class View implements Drawable.Callback {
TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.View, defStyle, 0);
this.id = a.getResourceId(com.android.internal.R.styleable.View_id, View.NO_ID);
if (a.hasValue(com.android.internal.R.styleable.View_background)) {
Drawable background = a.getDrawable(com.android.internal.R.styleable.View_background);
try {
Drawable background = a.getDrawable(com.android.internal.R.styleable.View_background);
if(background != null) {
if(background instanceof ColorDrawable) {
System.out.printf("__background__: >%x<\n", ((ColorDrawable)background).getColor());
setBackgroundColor(((ColorDrawable)background).getColor());
} else {
setBackgroundDrawable(background);
if(background != null) {
if(background instanceof ColorDrawable) {
System.out.printf("__background__: >%x<\n", ((ColorDrawable)background).getColor());
setBackgroundColor(((ColorDrawable)background).getColor());
} else {
setBackgroundDrawable(background);
}
}
}
} catch (Exception e) { e.printStackTrace(); }
}
if (a.hasValue(com.android.internal.R.styleable.View_visibility)) {
setVisibility(VISIBILITY_FLAGS[a.getInt(com.android.internal.R.styleable.View_visibility, 0)]);
@@ -1714,4 +1716,10 @@ public class View implements Drawable.Callback {
public void requestFitSystemWindows() {}
public boolean isPressed() {return false;}
public void getWindowVisibleDisplayFrame(Rect rect) {}
public void setRotationX(float deg) {}
public void setRotationY(float deg) {}
}

View File

@@ -1,6 +1,6 @@
package android.view;
public class ViewOutlineProvider {
public static final ViewOutlineProvider BACKGROUND = new ViewOutlineProvider();
public static final ViewOutlineProvider BOUNDS = new ViewOutlineProvider();
}

View File

@@ -10,6 +10,7 @@ public interface WindowManager {
public int softInputMode;
public int x;
public int y;
public int windowAnimations;
public LayoutParams(int w, int h, int type, int flags, int format) {
super(w, h);

View File

@@ -1,12 +1,17 @@
package android.view.accessibility;
public class AccessibilityNodeInfo {
public static final class AccessibilityAction {
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SHOW_ON_SCREEN = new AccessibilityAction(0, null);
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_TO_POSITION = new AccessibilityAction(0, null);
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_UP = new AccessibilityAction(0, null);
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_LEFT = new AccessibilityAction(0, null);
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_RIGHT = new AccessibilityAction(0, null);
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_DOWN = new AccessibilityAction(0, null);
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_CONTEXT_CLICK = new AccessibilityAction(0, null);
public AccessibilityAction(int actionId, CharSequence label) {}
public int getId() {return 0;}
}
}

View File

@@ -1,7 +1,13 @@
package android.view.animation;
import android.graphics.Path;
public class PathInterpolator extends BaseInterpolator {
public PathInterpolator(Path path) {
super();
}
public PathInterpolator(float f1, float f2, float f3, float f4) {
super();
}