api-impl: misc stubs and fixes

This commit is contained in:
Mis012
2025-03-26 21:01:57 +01:00
parent fd2e9f43b6
commit f3332b7201
25 changed files with 234 additions and 37 deletions

View File

@@ -12,7 +12,12 @@ public class BaseBundle {
// Invariant - exactly one of mMap / mParcelledData will be null
// (except inside a call to unparcel)
/* package */ ArrayMap<String, Object> mMap = new ArrayMap<>();
/* package */ ArrayMap<String, Object> mMap;
public BaseBundle() {
mMap = new ArrayMap<String, Object>();
}
// Log a message if the value was non-null but not of the expected type
void typeWarning(String key, Object value, String className,

View File

@@ -57,7 +57,7 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
* Constructs a new, empty Bundle.
*/
public Bundle() {
mMap = new ArrayMap<String, Object>();
super();
mClassLoader = getClass().getClassLoader();
}

View File

@@ -2,12 +2,27 @@ package android.os;
public class SystemProperties {
public static String get(String prop) {
android.util.Log.i("SystemProperties", "Grabbing prop " + prop);
return null;
android.util.Log.i("SystemProperties", "Grabbing String prop " + prop);
return "";
}
public static String get(String prop, String def) {
android.util.Log.i("SystemProperties", "Grabbing String prop " + prop + ", default " + def);
return def;
}
public boolean getBoolean(String prop, boolean def) {
android.util.Log.i("SystemProperties", "Grabbing prop " + prop + ", default " + def);
android.util.Log.i("SystemProperties", "Grabbing boolean prop " + prop + ", default " + def);
return def;
}
public static int getInt(String prop, int def) {
android.util.Log.i("SystemProperties", "Grabbing int prop " + prop + ", default " + def);
return def;
}
public static long getLong(String prop, long def) {
android.util.Log.i("SystemProperties", "Grabbing long prop " + prop + ", default " + def);
return def;
}
}