api-impl: misc stubs and fixes for Spotify

This commit is contained in:
Daniel Panero
2024-11-01 14:21:15 +01:00
committed by Mis012
parent 6dfd0d1d4b
commit e541d87fc2
14 changed files with 229 additions and 95 deletions

View File

@@ -3,4 +3,6 @@ package android.graphics;
public class LinearGradient extends Shader {
public LinearGradient(float x0, float y0, float x1, float y1, int[] colors, float[] positions, TileMode mode) {}
public LinearGradient(float x0, float y0, float x1, float y1, long[] colors, float[] positions, TileMode tile) {}
public LinearGradient(float x0, float y0, float x1, float y1, int color0, int color1, TileMode tile) {}
}

View File

@@ -68,6 +68,10 @@ public class Paint {
}
public void getTextBounds(String text, int start, int end, Rect bounds) {}
public void getTextBounds(char[] text, int index, int count, Rect bounds) {}
public int getTextWidths(String text, int start, int end, float[] widths) {
// TODO fix it
return 0;
}
public void setFilterBitmap(boolean filter) {}
public void setFlags(int flags) {

View File

@@ -50,6 +50,10 @@ public class Typeface {
return typeface;
}
public static Typeface createFromFile(String path) {
return DEFAULT;
}
private static native long native_create(CharSequence family_name, int style);
public int getStyle() {