add more stubs to make exoplayer not crash

This commit is contained in:
Julian Winkler
2023-09-21 22:49:36 +02:00
parent c830abc5f3
commit b88707592a
37 changed files with 482 additions and 47 deletions

View File

@@ -9,6 +9,10 @@ public class GestureDetector {
public GestureDetector(Context context, OnGestureListener listener) {}
public boolean onTouchEvent(MotionEvent event) {
return false;
}
public interface OnGestureListener {
}

View File

@@ -2,4 +2,8 @@ package android.view;
public class Surface {
public long widget;
public boolean isValid() {
return widget != 0;
}
}

View File

@@ -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);
}
};
}

View File

@@ -1455,4 +1455,6 @@ public class View extends Object {
public long getDrawingTime() {
return System.currentTimeMillis();
}
public void setKeepScreenOn(boolean screenOn) {}
}

View File

@@ -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() {}
}

View File

@@ -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) {}
}

View File

@@ -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;