Skip to content

Commit c28fa4c

Browse files
lingqiqi5211Sevtinge
authored andcommitted
adj: remove mmkv
1 parent 1737bef commit c28fa4c

7 files changed

Lines changed: 221 additions & 137 deletions

File tree

app/src/main/java/com/sevtinge/hyperceiler/Application.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
import com.sevtinge.hyperceiler.hook.utils.prefs.PrefsUtils;
3030
import com.sevtinge.hyperceiler.model.data.AppInfoCache;
3131
import com.sevtinge.hyperceiler.safemode.ExceptionCrashActivity;
32-
import com.tencent.mmkv.MMKV;
3332

34-
import java.io.File;
3533
import java.io.PrintWriter;
3634
import java.io.StringWriter;
3735

@@ -47,7 +45,6 @@ protected void attachBaseContext(Context base) {
4745
@Override
4846
public void onCreate() {
4947
super.onCreate();
50-
MMKV.initialize(this, new File(getFilesDir(), "mmkv").getAbsolutePath());
5148
LogAppProxy.onCreate(this);
5249

5350
new Thread(() -> AppInfoCache.getInstance(this).initAllAppInfos()).start();

app/src/main/java/com/sevtinge/hyperceiler/main/page/settings/SettingsFragment.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
import com.sevtinge.hyperceiler.common.utils.LanguageHelper;
3434
import com.sevtinge.hyperceiler.core.R;
3535
import com.sevtinge.hyperceiler.hook.utils.BackupUtils;
36+
import com.sevtinge.hyperceiler.hook.utils.log.LogManager;
3637
import com.sevtinge.hyperceiler.hook.utils.prefs.PrefsUtils;
3738
import com.sevtinge.hyperceiler.main.fragment.PagePreferenceFragment;
3839
import com.sevtinge.hyperceiler.ui.LauncherActivity;
39-
import com.tencent.mmkv.MMKV;
4040

4141
import fan.appcompat.app.AppCompatActivity;
4242
import fan.navigator.NavigatorFragmentListener;
@@ -142,11 +142,7 @@ public boolean onPreferenceChange(@NonNull Preference preference, Object o) {
142142
}
143143

144144
private void setLogLevel(int level) {
145-
// ShellInit.getShell().run("setprop persist.hyperceiler.log.level " + level);
146-
MMKV mmkv = MMKV.defaultMMKV();
147-
mmkv.putInt("persist.hyperceiler.log.level", level);
148-
149-
145+
LogManager.setLogLevel(level, requireContext().getApplicationInfo().dataDir);
150146
}
151147

152148
private void setIconMode(int mode) {

gradle/libs.versions.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ expansions = "1.0.0"
2727
gson = "2.13.2"
2828
hyperfocusapi = "2.0"
2929
lunarcalendar = "latest.release"
30-
mmkv = "2.3.0"
3130
superLyricApi = "2.4"
3231

3332
[libraries]
@@ -81,7 +80,6 @@ expansion = { module = "com.sevtinge.hyperceiler:hyperceiler-expansion", version
8180
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
8281
hyperfocusapi = { module = "com.github.ghhccghk:HyperFocusApi", version.ref = "hyperfocusapi" }
8382
lunarcalendar = { module = "com.xhinliang:LunarCalendar", version.ref = "lunarcalendar" }
84-
mmkv = { module = "com.tencent:mmkv", version.ref = "mmkv" }
8583
superlyricapi = { module = "com.github.HChenX:SuperLyricApi", version.ref = "superLyricApi" }
8684

8785
[plugins]

library/hook/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ dependencies {
7171
compileOnlyApi(libs.xposed.api)
7272

7373
api(libs.dexkit)
74-
api(libs.mmkv)
7574
api(libs.bundles.ezxhelper)
7675
api(libs.hiddenapibypass)
7776
api(libs.gson)

0 commit comments

Comments
 (0)