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

@@ -52,7 +52,7 @@ public class Drawable {
return null;
}
public abstract class ConstantState {
public static abstract class ConstantState {
public abstract Drawable newDrawable(Resources res);
@@ -88,6 +88,10 @@ public class Drawable {
this.callback = callback;
}
public Callback getCallback() {
return this.callback;
}
public void invalidateSelf() {
native_invalidate(paintable);
@@ -172,10 +176,16 @@ public class Drawable {
VectorDrawable drawable = new VectorDrawable();
drawable.inflate(resources, parser, parser, null);
return drawable;
} else if ("layer-list".equals(parser.getName())) {
return new LayerDrawable();
}
return null;
}
public static Drawable createFromXmlInner(Resources resources, XmlPullParser parser, AttributeSet attrs) {
return createFromXmlInner(resources, parser, attrs, null);
}
public static Drawable createFromXmlInner(Resources resources, XmlPullParser parser, AttributeSet attrs, Theme theme) {
return null;
}
@@ -211,6 +221,13 @@ public class Drawable {
bounds.set(mBounds);
}
public int getMinimumWidth() {
return 10; // FIXME
}
public int getMinimumHeight() {
return 10; // FIXME
}
protected void onBoundsChange(Rect bounds) {}
protected static native long native_paintable_from_path(String path);

File diff suppressed because it is too large Load Diff