From 509888dfb7de3a5243664e0599777301c5f05670 Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Thu, 24 Mar 2022 15:55:58 +0800 Subject: [PATCH] add admin debug mode --- app/src/main/java/xyz/fycz/myreader/application/App.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/xyz/fycz/myreader/application/App.java b/app/src/main/java/xyz/fycz/myreader/application/App.java index 26778db..1708223 100644 --- a/app/src/main/java/xyz/fycz/myreader/application/App.java +++ b/app/src/main/java/xyz/fycz/myreader/application/App.java @@ -49,6 +49,8 @@ import xyz.fycz.myreader.common.URLCONST; import xyz.fycz.myreader.entity.Setting; import xyz.fycz.myreader.entity.lanzou.LanZouFile; import xyz.fycz.myreader.model.sourceAnalyzer.BookSourceManager; +import xyz.fycz.myreader.model.user.User; +import xyz.fycz.myreader.model.user.UserService; import xyz.fycz.myreader.ui.dialog.DialogCreator; import xyz.fycz.myreader.ui.dialog.UpdateDialog; import xyz.fycz.myreader.util.SharedPreUtils; @@ -370,6 +372,9 @@ public class App extends Application { * 判断当前应用是否是debug状态 */ public static boolean isApkInDebug(Context context) { + User user = UserService.INSTANCE.readConfig(); + if (user != null && "fengyue".equals(user.getUserName())) + return true; try { ApplicationInfo info = context.getApplicationInfo(); return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;