mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-04-28 12:17:57 +03:00
api-impl: stubs and fixes for Open Sudoku
This commit is contained in:
parent
eba9c7037c
commit
44d922baea
7 changed files with 29 additions and 13 deletions
|
@ -217,7 +217,7 @@ public class Context extends Object {
|
|||
case "accessibility":
|
||||
return new AccessibilityManager();
|
||||
case "layout_inflater":
|
||||
return new LayoutInflater(getApplicationContext());
|
||||
return new LayoutInflater(this);
|
||||
case "wifi":
|
||||
return new WifiManager();
|
||||
case "bluetooth":
|
||||
|
|
|
@ -282,6 +282,8 @@ public class Paint {
|
|||
return new FontMetricsInt();
|
||||
}
|
||||
|
||||
public void set(Paint paint) {}
|
||||
|
||||
private native long native_constructor();
|
||||
private native void native_set_antialias(long skia_paint, boolean aa);
|
||||
private native void native_set_color(long skia_paint, int color);
|
||||
|
|
15
src/api-impl/android/graphics/drawable/DrawableWrapper.java
Normal file
15
src/api-impl/android/graphics/drawable/DrawableWrapper.java
Normal file
|
@ -0,0 +1,15 @@
|
|||
package android.graphics.drawable;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
public class DrawableWrapper extends Drawable {
|
||||
private Drawable drawable;
|
||||
|
||||
public DrawableWrapper(Drawable drawable) {
|
||||
this.drawable = drawable;
|
||||
}
|
||||
|
||||
public Drawable getDrawable() {
|
||||
return drawable;
|
||||
}
|
||||
}
|
|
@ -1,25 +1,17 @@
|
|||
package android.graphics.drawable;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.DrawableWrapper;
|
||||
|
||||
public class InsetDrawable extends Drawable {
|
||||
|
||||
private Drawable drawable;
|
||||
public class InsetDrawable extends DrawableWrapper {
|
||||
|
||||
public InsetDrawable(Drawable drawable, int insetLeft, int insetTop, int insetRight, int insetBottom) {
|
||||
super();
|
||||
this.drawable = drawable;
|
||||
super(drawable);
|
||||
}
|
||||
|
||||
public InsetDrawable(Drawable drawable, int inset) {
|
||||
super();
|
||||
this.drawable = drawable;
|
||||
super(drawable);
|
||||
}
|
||||
|
||||
public boolean getPadding(Rect padding) { return false; }
|
||||
|
||||
public Drawable getDrawable() {
|
||||
return drawable;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -52,4 +52,8 @@ public class AudioManager {
|
|||
public void setStreamVolume(int streamType, int index, int flags) {
|
||||
System.out.println("AudioManager.setStreamVolume: >" + streamType + "< >" + index + "< >" + flags + "<");
|
||||
}
|
||||
|
||||
public boolean isStreamMute(int streamType) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1947,4 +1947,6 @@ public class View implements Drawable.Callback {
|
|||
public int getImportantForAutofill() {return 0;}
|
||||
|
||||
public void setImportantForAutofill(int flag) {}
|
||||
|
||||
public void setDefaultFocusHighlightEnabled(boolean enabled) {}
|
||||
}
|
||||
|
|
|
@ -206,6 +206,7 @@ hax_jar = jar('hax', [
|
|||
'android/graphics/drawable/ColorDrawable.java',
|
||||
'android/graphics/drawable/Drawable.java',
|
||||
'android/graphics/drawable/DrawableContainer.java',
|
||||
'android/graphics/drawable/DrawableWrapper.java',
|
||||
'android/graphics/drawable/GradientDrawable.java',
|
||||
'android/graphics/drawable/InsetDrawable.java',
|
||||
'android/graphics/drawable/LayerDrawable.java',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue