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
fix some Drawable related crashes in NewPipe
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
package android.graphics.drawable;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
|
||||
public class ColorDrawable extends Drawable {
|
||||
|
||||
private int color;
|
||||
|
||||
public ColorDrawable(int color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'draw'");
|
||||
public int getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -121,6 +121,8 @@ public class Drawable {
|
||||
StateListDrawable drawable = new StateListDrawable();
|
||||
drawable.inflate(resources, parser, parser, null);
|
||||
return drawable;
|
||||
} else if ("shape".equals(parser.getName())) {
|
||||
return new GradientDrawable();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -146,5 +148,11 @@ public class Drawable {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setAlpha(int alpha) {}
|
||||
|
||||
public boolean getPadding(Rect padding) {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected static native long native_paintable_from_path(String path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user