api-impl: stubs and fixes for latest WhatsApp version

This commit is contained in:
Pierre-Hugues Husson
2024-10-28 19:06:17 +01:00
committed by Julian Winkler
parent 09a38f9a28
commit c81442321e
35 changed files with 261 additions and 1 deletions

View File

@@ -795,4 +795,8 @@ public class Environment {
// Unable to translate to internal path; use original
return path;
}
public static boolean isExternalStorageLegacy() {
return true;
}
}

View File

@@ -230,6 +230,10 @@ public class Handler {
mAsynchronous = async;
}
public static Handler createAsync(Looper looper) {
return new Handler(looper, null, true);
}
/**
* Returns a string representing the name of the specified message.
* The default implementation will either return the class name of the

View File

@@ -830,4 +830,6 @@ public class Process {
*/
public boolean usingWrapper;
}
public static final native boolean is64Bit();
}

View File

@@ -76,6 +76,9 @@ public final class StrictMode {
public ThreadPolicy build() {
return new ThreadPolicy(mask, listener, executor);
}
public Builder detectUnbufferedIo() {
return this;
}
}
}
public static final class VmPolicy {

View File

@@ -0,0 +1,13 @@
package android.os;
public class SystemProperties {
public static String get(String prop) {
android.util.Log.i("SystemProperties", "Grabbing prop " + prop);
return null;
}
public boolean getBoolean(String prop, boolean def) {
android.util.Log.i("SystemProperties", "Grabbing prop " + prop + ", default " + def);
return def;
}
}

View File

@@ -4,4 +4,7 @@ public class UserManager {
public boolean isUserUnlocked() {
return true;
}
public static boolean supportsMultipleUsers() {
return false;
}
}

View File

@@ -0,0 +1,7 @@
package android.os.ext;
public class SdkExtensions {
public static int getExtensionVersion(int extension) {
return 0;
}
}