add APIs needed for non legacy NewPipe version

This commit is contained in:
Julian Winkler
2023-09-12 23:18:47 +02:00
parent 399cf87254
commit f5fc993484
78 changed files with 2458 additions and 147 deletions

View File

@@ -7,5 +7,9 @@ public class AnimatorInflater {
public static Animator loadAnimator(Context context, int resId) {
return new ObjectAnimator();
}
public static StateListAnimator loadStateListAnimator(Context context, int resId) {
return new StateListAnimator();
}
}

View File

@@ -6,4 +6,10 @@ public class ObjectAnimator extends ValueAnimator {
return null;
}
public static ObjectAnimator ofFloat(Object target, String propertyName, float... values) {
return new ObjectAnimator();
}
public ObjectAnimator setDuration(long duration) {return this;}
}

View File

@@ -0,0 +1,6 @@
package android.animation;
public class StateListAnimator {
public void addState(int[] specs, Animator animator) {}
}

View File

@@ -31,6 +31,8 @@ public class ValueAnimator extends Animator {
public void setFloatValues(float[] values) {}
public boolean isRunning() {return false;}
public void setIntValues(int[] values) {}
public void setRepeatCount(int value) {}
public void setRepeatMode(int value) {}
/**
* Implementors of this interface can add themselves as update listeners

View File

@@ -1,5 +1,15 @@
package android.app;
import java.util.List;
public class ActivityManager {
public static class RunningAppProcessInfo{}
public List<RunningAppProcessInfo> getRunningAppProcesses() {
return null;
}
public boolean isLowRamDevice() {return false;}
}

View File

@@ -0,0 +1,4 @@
package android.app;
public class AppOpsManager {
}

View File

@@ -9,9 +9,9 @@ import com.reandroid.arsc.chunk.xml.AndroidManifestBlock;
import java.io.InputStream;
import java.io.IOException;
import android.content.Context;
import android.content.ContextWrapper;
public class Application extends Context {
public class Application extends ContextWrapper {
private String app_icon_path = null;
private String get_app_icon_path() {
@@ -43,6 +43,7 @@ public class Application extends Context {
}
public Application() {
super(null);
/* TODO: is this the right place to put this? */
InputStream inStream = ClassLoader.getSystemClassLoader().getResourceAsStream("AndroidManifest.xml");
try {

View File

@@ -0,0 +1,8 @@
package android.app;
import android.media.AudioAttributes;
public class Notification {
public static final AudioAttributes AUDIO_ATTRIBUTES_DEFAULT = new AudioAttributes();
}

View File

@@ -0,0 +1,4 @@
package android.app.job;
public class JobScheduler {
}

View File

@@ -0,0 +1,4 @@
package android.app.job;
public class JobService {
}

View File

@@ -0,0 +1,4 @@
package android.appwidget;
public class AppWidgetManager {
}

View File

@@ -0,0 +1,4 @@
package android.bluetooth;
public class BluetoothManager {
}

View File

@@ -13,6 +13,7 @@ import android.content.res.AssetManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.hardware.input.InputManager;
import android.hardware.SensorManager;
import android.hardware.display.DisplayManager;
@@ -374,6 +375,10 @@ public class Context extends Object {
return getResources().getText(resId);
}
public final Drawable getDrawable(int resId) {
return getResources().getDrawable(resId);
}
public boolean isRestricted() {return false;}
public File getDatabasePath(String dbName) {

View File

@@ -17,4 +17,6 @@ public interface DialogInterface {
}
public interface OnCancelListener {
}
public interface OnMultiChoiceClickListener {
}
}

View File

@@ -201,7 +201,8 @@ public class Intent {
}
public Intent setAction(String action) {
return this; // FIXME
this.action = action;
return this;
}
public String getAction() {

View File

@@ -0,0 +1,4 @@
package android.content;
public class RestrictionsManager {
}

View File

@@ -0,0 +1,8 @@
package android.content;
public class UriMatcher {
public UriMatcher(int code) {}
public void addURI(String authority, String path, int code) {}
}

View File

@@ -0,0 +1,4 @@
package android.content.pm;
public class LauncherApps {
}

View File

@@ -1,5 +1,6 @@
package android.graphics.drawable;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
@@ -76,4 +77,6 @@ public abstract class Drawable {
public int getIntrinsicWidth() {return 0;}
public int getIntrinsicHeight() {return 0;}
public void setTintList (ColorStateList tint) {}
}

View File

@@ -0,0 +1,16 @@
package android.graphics.drawable;
import android.content.res.ColorStateList;
import android.graphics.Canvas;
public class RippleDrawable extends Drawable {
public RippleDrawable(ColorStateList colorStateList, Drawable drawable, Drawable drawable2) {}
@Override
public void draw(Canvas canvas) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'draw'");
}
}

Some files were not shown because too many files have changed in this diff Show More