From 7cc589b52c1e2e4b2f9c04dbad5bd5977d29e69b Mon Sep 17 00:00:00 2001 From: Fox2Code Date: Mon, 25 Jul 2022 18:02:54 +0200 Subject: [PATCH] Update FoxCompat --- app/build.gradle | 2 +- .../java/android/os/SystemProperties.java | 30 ------------------- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 app/src/main/java/android/os/SystemProperties.java diff --git a/app/build.gradle b/app/build.gradle index d99dcb6..46032b8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' diff --git a/app/src/main/java/android/os/SystemProperties.java b/app/src/main/java/android/os/SystemProperties.java deleted file mode 100644 index 87d9705..0000000 --- a/app/src/main/java/android/os/SystemProperties.java +++ /dev/null @@ -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; - } - } -}