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 Open Sudoku
This commit is contained in:
@@ -217,7 +217,7 @@ public class Context extends Object {
|
|||||||
case "accessibility":
|
case "accessibility":
|
||||||
return new AccessibilityManager();
|
return new AccessibilityManager();
|
||||||
case "layout_inflater":
|
case "layout_inflater":
|
||||||
return new LayoutInflater(getApplicationContext());
|
return new LayoutInflater(this);
|
||||||
case "wifi":
|
case "wifi":
|
||||||
return new WifiManager();
|
return new WifiManager();
|
||||||
case "bluetooth":
|
case "bluetooth":
|
||||||
|
|||||||
@@ -282,6 +282,8 @@ public class Paint {
|
|||||||
return new FontMetricsInt();
|
return new FontMetricsInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void set(Paint paint) {}
|
||||||
|
|
||||||
private native long native_constructor();
|
private native long native_constructor();
|
||||||
private native void native_set_antialias(long skia_paint, boolean aa);
|
private native void native_set_antialias(long skia_paint, boolean aa);
|
||||||
private native void native_set_color(long skia_paint, int color);
|
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;
|
package android.graphics.drawable;
|
||||||
|
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
|
import android.graphics.drawable.DrawableWrapper;
|
||||||
|
|
||||||
public class InsetDrawable extends Drawable {
|
public class InsetDrawable extends DrawableWrapper {
|
||||||
|
|
||||||
private Drawable drawable;
|
|
||||||
|
|
||||||
public InsetDrawable(Drawable drawable, int insetLeft, int insetTop, int insetRight, int insetBottom) {
|
public InsetDrawable(Drawable drawable, int insetLeft, int insetTop, int insetRight, int insetBottom) {
|
||||||
super();
|
super(drawable);
|
||||||
this.drawable = drawable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public InsetDrawable(Drawable drawable, int inset) {
|
public InsetDrawable(Drawable drawable, int inset) {
|
||||||
super();
|
super(drawable);
|
||||||
this.drawable = drawable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getPadding(Rect padding) { return false; }
|
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) {
|
public void setStreamVolume(int streamType, int index, int flags) {
|
||||||
System.out.println("AudioManager.setStreamVolume: >" + streamType + "< >" + index + "< >" + 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 int getImportantForAutofill() {return 0;}
|
||||||
|
|
||||||
public void setImportantForAutofill(int flag) {}
|
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/ColorDrawable.java',
|
||||||
'android/graphics/drawable/Drawable.java',
|
'android/graphics/drawable/Drawable.java',
|
||||||
'android/graphics/drawable/DrawableContainer.java',
|
'android/graphics/drawable/DrawableContainer.java',
|
||||||
|
'android/graphics/drawable/DrawableWrapper.java',
|
||||||
'android/graphics/drawable/GradientDrawable.java',
|
'android/graphics/drawable/GradientDrawable.java',
|
||||||
'android/graphics/drawable/InsetDrawable.java',
|
'android/graphics/drawable/InsetDrawable.java',
|
||||||
'android/graphics/drawable/LayerDrawable.java',
|
'android/graphics/drawable/LayerDrawable.java',
|
||||||
|
|||||||
Reference in New Issue
Block a user