api-impl: more stubs to make OsmAnd launch

with latest bionic_translation, OsmAnd doesn't crash in native code
This commit is contained in:
Mis012
2024-04-14 15:15:37 +02:00
parent 62f91e8d3e
commit e1abceee85
3 changed files with 4 additions and 12 deletions

View File

@@ -195,14 +195,6 @@ JNIEXPORT jobject JNICALL Java_android_graphics_Bitmap_nativeExtractAlpha
JNIEXPORT void JNICALL Java_android_graphics_Bitmap_nativePrepareToDraw
(JNIEnv *, jclass, jint);
/*
* Class: android_graphics_Bitmap
* Method: nativeHasAlpha
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL Java_android_graphics_Bitmap_nativeHasAlpha
(JNIEnv *, jclass, jint);
/*
* Class: android_graphics_Bitmap
* Method: nativeSetAlphaAndPremultiplied

View File

@@ -1261,7 +1261,7 @@ public final class Bitmap {
* it will return true by default.
*/
public final boolean hasAlpha() {
return nativeHasAlpha(mNativeBitmap);
return true; // we only support ARGB_8888
}
/**
@@ -1637,7 +1637,6 @@ public final class Bitmap {
int[] offsetXY);
private static native void nativePrepareToDraw(int nativeBitmap);
private static native boolean nativeHasAlpha(int nativeBitmap);
private static native void nativeSetAlphaAndPremultiplied(int nBitmap, boolean hasAlpha,
boolean isPremul);
private static native boolean nativeHasMipMap(int nativeBitmap);

View File

@@ -23,7 +23,6 @@ public class Window {
public boolean onMenuOpened(int featureId, Menu menu);
}
// FIXME private
public long native_window;
public View contentView;
@@ -99,5 +98,7 @@ public class Window {
public void setNavigationBarColor(int color) {}
public void setFormat (int format) {}
public void setFormat(int format) {}
public void setLayout(int dummy, int dummy2) {}
}