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 APIs needed for non legacy NewPipe version
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;}
|
||||
|
||||
}
|
||||
|
||||
6
src/api-impl/android/animation/StateListAnimator.java
Normal file
6
src/api-impl/android/animation/StateListAnimator.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package android.animation;
|
||||
|
||||
public class StateListAnimator {
|
||||
|
||||
public void addState(int[] specs, Animator animator) {}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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;}
|
||||
|
||||
}
|
||||
|
||||
4
src/api-impl/android/app/AppOpsManager.java
Normal file
4
src/api-impl/android/app/AppOpsManager.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package android.app;
|
||||
|
||||
public class AppOpsManager {
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
8
src/api-impl/android/app/Notification.java
Normal file
8
src/api-impl/android/app/Notification.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package android.app;
|
||||
|
||||
import android.media.AudioAttributes;
|
||||
|
||||
public class Notification {
|
||||
|
||||
public static final AudioAttributes AUDIO_ATTRIBUTES_DEFAULT = new AudioAttributes();
|
||||
}
|
||||
4
src/api-impl/android/app/job/JobScheduler.java
Normal file
4
src/api-impl/android/app/job/JobScheduler.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package android.app.job;
|
||||
|
||||
public class JobScheduler {
|
||||
}
|
||||
4
src/api-impl/android/app/job/JobService.java
Normal file
4
src/api-impl/android/app/job/JobService.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package android.app.job;
|
||||
|
||||
public class JobService {
|
||||
}
|
||||
4
src/api-impl/android/appwidget/AppWidgetManager.java
Normal file
4
src/api-impl/android/appwidget/AppWidgetManager.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package android.appwidget;
|
||||
|
||||
public class AppWidgetManager {
|
||||
}
|
||||
4
src/api-impl/android/bluetooth/BluetoothManager.java
Normal file
4
src/api-impl/android/bluetooth/BluetoothManager.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package android.bluetooth;
|
||||
|
||||
public class BluetoothManager {
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
@@ -17,4 +17,6 @@ public interface DialogInterface {
|
||||
}
|
||||
public interface OnCancelListener {
|
||||
}
|
||||
public interface OnMultiChoiceClickListener {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +201,8 @@ public class Intent {
|
||||
}
|
||||
|
||||
public Intent setAction(String action) {
|
||||
return this; // FIXME
|
||||
this.action = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
|
||||
4
src/api-impl/android/content/RestrictionsManager.java
Normal file
4
src/api-impl/android/content/RestrictionsManager.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package android.content;
|
||||
|
||||
public class RestrictionsManager {
|
||||
}
|
||||
8
src/api-impl/android/content/UriMatcher.java
Normal file
8
src/api-impl/android/content/UriMatcher.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package android.content;
|
||||
|
||||
public class UriMatcher {
|
||||
|
||||
public UriMatcher(int code) {}
|
||||
|
||||
public void addURI(String authority, String path, int code) {}
|
||||
}
|
||||
4
src/api-impl/android/content/pm/LauncherApps.java
Normal file
4
src/api-impl/android/content/pm/LauncherApps.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package android.content.pm;
|
||||
|
||||
public class LauncherApps {
|
||||
}
|
||||
@@ -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) {}
|
||||
}
|
||||
|
||||
16
src/api-impl/android/graphics/drawable/RippleDrawable.java
Normal file
16
src/api-impl/android/graphics/drawable/RippleDrawable.java
Normal 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
Reference in New Issue
Block a user