api-impl: misc fixes and additions to make Telegram launch

This commit is contained in:
Julian Winkler
2025-06-18 17:20:49 +02:00
parent 3484c344c3
commit 6e6e9a3be8
19 changed files with 117 additions and 7 deletions

View File

@@ -179,4 +179,8 @@ public class Color {
}
return 0;
}
public static int HSVToColor(int alpha, float[] hsv) {
return (alpha << 24) | (HSVToColor(hsv) & 0xffffff);
}
}

View File

@@ -224,6 +224,10 @@ public class Path {
transform(matrix);
}
public void setLastPoint(float x, float y) {
Log.w("Path", "STUB: setLastPoint");
}
@SuppressWarnings("deprecation")
@Override
protected void finalize() throws Throwable {

View File

@@ -12,6 +12,7 @@ import android.content.res.Resources.Theme;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Shader;
@@ -61,4 +62,8 @@ public class BitmapDrawable extends Drawable {
}
public void setTileModeX(Shader.TileMode mode) {}
public Paint getPaint() {
return new Paint();
}
}

View File

@@ -7,4 +7,6 @@ public class Shape {
protected RectF rect() {
return new RectF();
}
public void resize(float width, float height) {}
}