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: add some methods to make the WhatsApp video player functional
This commit is contained in:
@@ -5,6 +5,8 @@ import android.util.AttributeSet;
|
||||
|
||||
public class TextureView extends View {
|
||||
|
||||
private SurfaceTextureListener surfaceTextureListener;
|
||||
|
||||
public TextureView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
@@ -15,8 +17,18 @@ public class TextureView extends View {
|
||||
|
||||
public interface SurfaceTextureListener {}
|
||||
|
||||
public void setSurfaceTextureListener(SurfaceTextureListener surfaceTextureListener) {}
|
||||
public void setSurfaceTextureListener(SurfaceTextureListener surfaceTextureListener) {
|
||||
this.surfaceTextureListener = surfaceTextureListener;
|
||||
}
|
||||
|
||||
public void setOpaque(boolean opaque) {}
|
||||
|
||||
public SurfaceTextureListener getSurfaceTextureListener() {
|
||||
return surfaceTextureListener;
|
||||
}
|
||||
|
||||
public boolean isAvailable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ import android.R;
|
||||
import android.animation.StateListAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.GskCanvas;
|
||||
import android.graphics.Matrix;
|
||||
@@ -1765,6 +1767,8 @@ public class View implements Drawable.Callback {
|
||||
protected void onAnimationEnd() {}
|
||||
|
||||
public void startAnimation(Animation animation) {
|
||||
if (animation == null)
|
||||
return;
|
||||
onAnimationStart();
|
||||
animation.start();
|
||||
onAnimationEnd();
|
||||
@@ -2211,4 +2215,16 @@ public class View implements Drawable.Callback {
|
||||
public void setNextFocusDownId(int id) {}
|
||||
|
||||
public void setNextFocusUpId(int id) {}
|
||||
|
||||
public void setHasTransientState(boolean hasTransientState) {}
|
||||
|
||||
protected void onConfigurationChanged(Configuration newConfig) {}
|
||||
|
||||
public boolean isDrawingCacheEnabled() { return false; }
|
||||
|
||||
public void setDrawingCacheEnabled(boolean enabled) {}
|
||||
|
||||
public void buildDrawingCache(boolean autoScale) {}
|
||||
|
||||
public Bitmap getDrawingCache() { return null; }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
package android.view.accessibility;
|
||||
|
||||
public class CaptioningManager {
|
||||
|
||||
public boolean isEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public float getFontScale() {
|
||||
return 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user