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: stubs and fixes for Compose Stopwatch and LibreSudoku
This commit is contained in:
@@ -489,7 +489,11 @@ public final class Bitmap {
|
||||
* This configuration is very flexible and offers the best
|
||||
* quality. It should be used whenever possible.
|
||||
*/
|
||||
ARGB_8888(5);
|
||||
ARGB_8888(5),
|
||||
|
||||
RGBA_F16(6),
|
||||
|
||||
HARDWARE(7);
|
||||
|
||||
final int nativeInt;
|
||||
|
||||
@@ -602,9 +606,9 @@ public final class Bitmap {
|
||||
*/
|
||||
public Bitmap copy(Config config, boolean isMutable) {
|
||||
checkRecycled("Can't copy a recycled bitmap");
|
||||
Bitmap b = nativeCopy(mNativeBitmap, config.nativeInt, isMutable);
|
||||
Bitmap b = new Bitmap(native_copy(pixbuf));
|
||||
if (b != null) {
|
||||
b.setAlphaAndPremultiplied(hasAlpha(), mIsPremultiplied);
|
||||
// b.setAlphaAndPremultiplied(hasAlpha(), mIsPremultiplied);
|
||||
b.mDensity = mDensity;
|
||||
}
|
||||
return b;
|
||||
@@ -979,6 +983,10 @@ public final class Bitmap {
|
||||
return createBitmap(display, colors, 0, width, width, height, config);
|
||||
}
|
||||
|
||||
public static Bitmap createBitmap(DisplayMetrics display, int width, int height, Config config, boolean hasAlpha, ColorSpace colorSpace) {
|
||||
return createBitmap(display, width, height, config, hasAlpha);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an optional array of private data, used by the UI system for
|
||||
* some bitmaps. Not intended to be called by applications.
|
||||
|
||||
13
src/api-impl/android/graphics/ColorSpace.java
Normal file
13
src/api-impl/android/graphics/ColorSpace.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package android.graphics;
|
||||
|
||||
public class ColorSpace {
|
||||
|
||||
public static enum Named {
|
||||
SRGB,
|
||||
}
|
||||
|
||||
public static ColorSpace get(Named named) {
|
||||
return new ColorSpace();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,4 +7,6 @@ public class Outline {
|
||||
public void setEmpty() {}
|
||||
|
||||
public void setRoundRect(int left, int top, int right, int bottom, float r) {}
|
||||
|
||||
public void setRect(int left, int top, int right, int bottom) {}
|
||||
}
|
||||
|
||||
@@ -670,6 +670,10 @@ public class Path {
|
||||
final long ni() {
|
||||
return mNativePath;
|
||||
}
|
||||
|
||||
public boolean isConvex() {
|
||||
return false;
|
||||
}
|
||||
private static native long init1();
|
||||
private static native long init2(long nPath);
|
||||
private static native void native_reset(long nPath);
|
||||
|
||||
@@ -3,4 +3,14 @@ package android.graphics;
|
||||
public class PathMeasure {
|
||||
public PathMeasure(Path path, boolean dummy) {
|
||||
}
|
||||
|
||||
public void setPath(Path path, boolean forceClosed) {}
|
||||
|
||||
public float getLength() {
|
||||
return 100;
|
||||
}
|
||||
|
||||
public boolean getSegment(float start, float end, Path dst, boolean forceClosed) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
8
src/api-impl/android/graphics/drawable/Icon.java
Normal file
8
src/api-impl/android/graphics/drawable/Icon.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package android.graphics.drawable;
|
||||
|
||||
public class Icon {
|
||||
|
||||
public static Icon createWithResource(String packageName, int resourceId) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -10,4 +10,6 @@ public class RippleDrawable extends LayerDrawable {
|
||||
|
||||
public void setColor(ColorStateList colorStateList) {}
|
||||
|
||||
public void setRadius(int radius) {}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user