api-impl: add stubs / simple stuff for OsmAnd

without native libs present, launches and renders white square
in map view; with native libs present, segfaults in bundled skia
This commit is contained in:
Mis012
2024-04-12 18:32:30 +02:00
parent fefd2f108b
commit 2802aaa28d
42 changed files with 2171 additions and 77 deletions

View File

@@ -93,6 +93,10 @@ public class Environment {
}
}
public static boolean isExternalStorageRemovable(File file) {
return true;
}
/**
* {@hide}
*/

View File

@@ -0,0 +1,60 @@
package android.os;
public final class StrictMode {
public static void setThreadPolicy(final ThreadPolicy policy) {}
public static void setVmPolicy(final VmPolicy policy) {}
public static final class ThreadPolicy {
public static final class Builder {
public Builder detectAll() {
return this;
}
public Builder permitDiskReads() {
return this;
}
public Builder permitDiskWrites() {
return this;
}
public Builder penaltyLog() {
return this;
}
public ThreadPolicy build() {
return new ThreadPolicy();
}
}
}
public static final class VmPolicy {
public static final class Builder {
public Builder detectActivityLeaks() {
return this;
}
public Builder detectAll() {
return this;
}
public Builder detectLeakedSqlLiteObjects() {
return this;
}
public Builder detectLeakedClosableObjects() {
return this;
}
public Builder detectLeakedRegistrationObjects() {
return this;
}
public Builder detectFileUriExposure() {
return this;
}
public Builder penaltyDeath() {
return this;
}
public Builder penaltyLog() {
return this;
}
public Builder penaltyDropBox() {
return this;
}
public VmPolicy build() {
return new VmPolicy();
}
}
}
}