Update FoxCompat

pull/186/head
Fox2Code 2 years ago
parent 535e9bf20c
commit 7cc589b52c

@ -94,7 +94,7 @@ dependencies {
implementation "dev.rikka.rikkax.insets:insets:1.3.0"
implementation 'com.github.Dimezis:BlurView:version-1.6.6'
implementation 'com.github.KieronQuinn:MonetCompat:0.4.1'
implementation 'com.github.Fox2Code:FoxCompat:0.0.2'
implementation 'com.github.Fox2Code:FoxCompat:0.0.3'
// Utils
implementation 'androidx.work:work-runtime:2.7.1'

@ -1,30 +0,0 @@
package android.os;
import androidx.annotation.Keep;
import com.topjohnwu.superuser.ShellUtils;
/**
* I will probably outsource this to a separate library later
*/
@Keep
public class SystemProperties {
@Keep
public static String get(String key) {
String prop = ShellUtils.fastCmd("getprop " + key).trim();
if (prop.endsWith("\n"))
prop = prop.substring(0, prop.length() - 1).trim();
return prop;
}
@Keep
public static int getInt(String key, int def) {
try {
String value = get(key);
if (value.isEmpty()) return def;
return Integer.parseInt(value);
} catch (Exception e) {
return def;
}
}
}
Loading…
Cancel
Save