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
add more stubs to make exoplayer not crash
This commit is contained in:
@@ -9,6 +9,10 @@ public class GestureDetector {
|
||||
|
||||
public GestureDetector(Context context, OnGestureListener listener) {}
|
||||
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public interface OnGestureListener {
|
||||
}
|
||||
|
||||
|
||||
@@ -2,4 +2,8 @@ package android.view;
|
||||
|
||||
public class Surface {
|
||||
public long widget;
|
||||
|
||||
public boolean isValid() {
|
||||
return widget != 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,12 @@ public class SurfaceView extends View {
|
||||
mSurface.widget = this.widget;
|
||||
}
|
||||
|
||||
public SurfaceView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
mSurface.widget = this.widget;
|
||||
}
|
||||
|
||||
private void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
|
||||
for (SurfaceHolder.Callback c : mCallbacks) {
|
||||
c.surfaceChanged(mSurfaceHolder, format, width, height);
|
||||
@@ -197,7 +203,7 @@ public class SurfaceView extends View {
|
||||
@Override
|
||||
public Rect getSurfaceFrame() {
|
||||
// return mSurfaceFrame;
|
||||
return null;
|
||||
return new Rect(0, 0, 400, 400);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1455,4 +1455,6 @@ public class View extends Object {
|
||||
public long getDrawingTime() {
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public void setKeepScreenOn(boolean screenOn) {}
|
||||
}
|
||||
|
||||
@@ -41,5 +41,13 @@ public class ViewPropertyAnimator {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ViewPropertyAnimator scaleX(float scaleX) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ViewPropertyAnimator scaleY(float scaleY) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public void start() {}
|
||||
}
|
||||
|
||||
@@ -78,4 +78,8 @@ public class Window {
|
||||
public void setAttributes(WindowManager.LayoutParams params) {}
|
||||
|
||||
public void takeSurface(SurfaceHolder.Callback2 callback) {}
|
||||
|
||||
public void setStatusBarColor(int color) {}
|
||||
|
||||
public void setNavigationBarColor(int color) {}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package android.view;
|
||||
public interface WindowManager {
|
||||
public android.view.Display getDefaultDisplay();
|
||||
|
||||
public class LayoutParams {
|
||||
public class LayoutParams extends ViewGroup.LayoutParams {
|
||||
public static final int FLAG_KEEP_SCREEN_ON = 0;
|
||||
|
||||
public float screenBrightness;
|
||||
|
||||
Reference in New Issue
Block a user