Skip to content

Commit

Permalink
stub: add android.os.SystemProperties class
Browse files Browse the repository at this point in the history
Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com>
  • Loading branch information
salvogiangri committed Jan 23, 2024
1 parent 745c556 commit 7b3a63b
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stub/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
}

dependencies {
implementation 'androidx.annotation:annotation:1.6.0'
}
78 changes: 78 additions & 0 deletions stub/src/main/java/android/os/SystemProperties.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
package android.os;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class SystemProperties {
@NonNull
public static String get(@NonNull String key) {
throw new RuntimeException("Stub!");
}

@NonNull
public static String get(@NonNull String key, @Nullable String def) {
throw new RuntimeException("Stub!");
}

public static int getInt(@NonNull String key, int def) {
throw new RuntimeException("Stub!");
}

public static long getLong(@NonNull String key, long def) {
throw new RuntimeException("Stub!");
}

public static boolean getBoolean(@NonNull String key, boolean def) {
throw new RuntimeException("Stub!");
}

public static void set(@NonNull String key, @Nullable String val) {
throw new RuntimeException("Stub!");
}

public static void addChangeCallback(@NonNull Runnable callback) {
throw new RuntimeException("Stub!");
}

public static void removeChangeCallback(@NonNull Runnable callback) {
throw new RuntimeException("Stub!");
}

public static void reportSyspropChanged() {
throw new RuntimeException("Stub!");
}

public static @NonNull String digestOf(@NonNull String... keys) {
throw new RuntimeException("Stub!");
}

private SystemProperties() {
throw new RuntimeException("Stub!");
}

@Nullable public static Handle find(@NonNull String name) {
throw new RuntimeException("Stub!");
}

public static final class Handle {
@NonNull public String get() {
throw new RuntimeException("Stub!");
}

public int getInt(int def) {
throw new RuntimeException("Stub!");
}

public long getLong(long def) {
throw new RuntimeException("Stub!");
}

public boolean getBoolean(boolean def) {
throw new RuntimeException("Stub!");
}

private Handle(long nativeHandle) {
throw new RuntimeException("Stub!");
}
}
}

0 comments on commit 7b3a63b

Please sign in to comment.