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 lots of java APIs needed for Whatsapp
This commit is contained in:
@@ -101,6 +101,8 @@ public class Build {
|
||||
*/
|
||||
public static final String SERIAL = getString("ro.serialno");
|
||||
|
||||
public static final String[] SUPPORTED_ABIS = {CPU_ABI, CPU_ABI2};
|
||||
|
||||
/**
|
||||
* Various version strings.
|
||||
*/
|
||||
|
||||
@@ -7,4 +7,6 @@ public class ConditionVariable {
|
||||
public void open() {}
|
||||
|
||||
public void block() {}
|
||||
|
||||
public void close() {}
|
||||
}
|
||||
|
||||
4
src/api-impl/android/os/DeadObjectException.java
Normal file
4
src/api-impl/android/os/DeadObjectException.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package android.os;
|
||||
|
||||
public class DeadObjectException extends RemoteException {
|
||||
}
|
||||
@@ -11,4 +11,8 @@ public final class Debug {
|
||||
public InstructionCount() {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isDebuggerConnected() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ public class Environment {
|
||||
* Return the user data directory.
|
||||
*/
|
||||
public static File getDataDirectory() {
|
||||
return DATA_DIRECTORY;
|
||||
return getExternalStorageDirectory();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,4 +15,24 @@ public class Parcel {
|
||||
public void setDataPosition(int position) {}
|
||||
|
||||
public void recycle() {}
|
||||
|
||||
public void writeByte(byte b) {
|
||||
System.out.println("Parcel.writeByte(" + b + ")");
|
||||
}
|
||||
|
||||
public void writeString(String s) {
|
||||
System.out.println("Parcel.writeString(" + s + ")");
|
||||
}
|
||||
|
||||
public void writeLong(long l) {
|
||||
System.out.println("Parcel.writeLong(" + l + ")");
|
||||
}
|
||||
|
||||
public void writeInt(int i) {
|
||||
System.out.println("Parcel.writeInt(" + i + ")");
|
||||
}
|
||||
|
||||
public byte[] marshall() {
|
||||
return new byte[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ public final class PowerManager {
|
||||
public void release() {}
|
||||
|
||||
public boolean isHeld() { return false; }
|
||||
|
||||
public void acquire(long timeout) {}
|
||||
}
|
||||
|
||||
public WakeLock newWakeLock(int levelAndFlags, String tag) {
|
||||
@@ -18,4 +20,8 @@ public final class PowerManager {
|
||||
public void userActivity(long dummy, boolean dummy2) {}
|
||||
|
||||
public static final int FULL_WAKE_LOCK = 0x1a;
|
||||
|
||||
public boolean isPowerSaveMode() { return false; }
|
||||
|
||||
public boolean isScreenOn() { return true; }
|
||||
}
|
||||
|
||||
@@ -785,8 +785,11 @@ public class Process {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static final native boolean readProcFile(String file, int[] format,
|
||||
String[] outStrings, long[] outLongs, float[] outFloats);
|
||||
public static final /*native*/ boolean readProcFile(String file, int[] format,
|
||||
String[] outStrings, long[] outLongs, float[] outFloats) {
|
||||
System.out.println("readProcFile(" + file + ") called");
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
|
||||
@@ -3,6 +3,8 @@ package android.os;
|
||||
public final class StrictMode {
|
||||
public static void setThreadPolicy(final ThreadPolicy policy) {}
|
||||
public static void setVmPolicy(final VmPolicy policy) {}
|
||||
public static ThreadPolicy allowThreadDiskWrites() {return null;}
|
||||
public static ThreadPolicy allowThreadDiskReads() {return null;}
|
||||
|
||||
public static final class ThreadPolicy {
|
||||
public static final class Builder {
|
||||
|
||||
Reference in New Issue
Block a user