You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
api-impl: misc stubs for WhatsApp
This commit is contained in:
@@ -180,6 +180,10 @@ public final class Bitmap {
|
||||
buffer.position(buffer.position() + getAllocationByteCount());
|
||||
}
|
||||
|
||||
public int getByteCount() {
|
||||
return getAllocationByteCount();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
|
||||
@@ -6,7 +6,11 @@ public class Canvas {
|
||||
private Bitmap bitmap;
|
||||
private GskCanvas gsk_canvas;
|
||||
|
||||
public Canvas() {}
|
||||
public Canvas() {
|
||||
if (!(this instanceof GskCanvas)) {
|
||||
gsk_canvas = new GskCanvas(0);
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas(Bitmap bmp) {
|
||||
this.bitmap = bmp;
|
||||
@@ -462,4 +466,6 @@ public class Canvas {
|
||||
outRect.set(0, 0, 100, 100);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void drawPaint(Paint paint) {}
|
||||
}
|
||||
|
||||
@@ -92,6 +92,10 @@ public class Path {
|
||||
|
||||
public void arcTo(RectF oval, float startAngle, float sweepAngle, boolean forceMoveTo) {}
|
||||
|
||||
public void arcTo(RectF oval, float startAngle, float sweepAngle) {}
|
||||
|
||||
public void arcTo(float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean forceMoveTo) {}
|
||||
|
||||
public void rMoveTo(float x, float y) {
|
||||
native_rel_move_to(getBuilder(), x, y);
|
||||
}
|
||||
@@ -118,6 +122,10 @@ public class Path {
|
||||
addPath(path, matrix);
|
||||
}
|
||||
|
||||
public void addPath(Path path) {
|
||||
addPath(path, Matrix.IDENTITY_MATRIX);
|
||||
}
|
||||
|
||||
public void addRect(RectF rect, Direction direction) {
|
||||
native_add_rect(getBuilder(), rect.left, rect.top, rect.right, rect.bottom);
|
||||
}
|
||||
@@ -138,6 +146,8 @@ public class Path {
|
||||
|
||||
public void addOval(RectF rect, Direction direction) {}
|
||||
|
||||
public void addCircle(float x, float y, float radius, Direction direction) {}
|
||||
|
||||
public void transform(Matrix matrix) {
|
||||
builder = native_transform(getGskPath(), matrix.ni());
|
||||
path = 0;
|
||||
|
||||
Reference in New Issue
Block a user