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: misc APIs for WhatsApp media chooser Activities
This commit is contained in:
@@ -626,9 +626,9 @@ public class BitmapFactory {
|
||||
|
||||
Trace.traceBegin(Trace.TRACE_TAG_GRAPHICS, "decodeFileDescriptor");
|
||||
try {
|
||||
if (nativeIsSeekable(fd)) {
|
||||
bm = nativeDecodeFileDescriptor(fd, outPadding, opts);
|
||||
} else {
|
||||
//if (nativeIsSeekable(fd)) {
|
||||
// bm = nativeDecodeFileDescriptor(fd, outPadding, opts);
|
||||
//} else {
|
||||
FileInputStream fis = new FileInputStream(fd);
|
||||
try {
|
||||
bm = decodeStreamInternal(fis, outPadding, opts);
|
||||
@@ -638,7 +638,7 @@ public class BitmapFactory {
|
||||
} catch (Throwable t) { /* ignore */
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
if (bm == null && opts != null && opts.inBitmap != null) {
|
||||
throw new IllegalArgumentException("Problem decoding into existing bitmap");
|
||||
|
||||
@@ -474,6 +474,10 @@ public class Canvas {
|
||||
return save();
|
||||
}
|
||||
|
||||
public int saveLayer(RectF bounds, Paint paint) {
|
||||
return save();
|
||||
}
|
||||
|
||||
public void drawOval(RectF oval, Paint paint) {
|
||||
Log.w("Canvas", "STUB: drawOval");
|
||||
}
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
package android.graphics.drawable;
|
||||
|
||||
public class TransitionDrawable extends Drawable {
|
||||
import android.graphics.Canvas;
|
||||
|
||||
public TransitionDrawable(Drawable[] layers) {}
|
||||
public class TransitionDrawable extends LayerDrawable {
|
||||
|
||||
public TransitionDrawable(Drawable[] layers) {
|
||||
super(layers);
|
||||
}
|
||||
|
||||
public void setCrossFadeEnabled(boolean enabled) {}
|
||||
|
||||
public void startTransition(int duration) {}
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
// always draw the target drawable
|
||||
mLayerState.mChildren[1].mDrawable.draw(canvas);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user