mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-02 18:21:51 +00:00
Cache Magisk app ID for performance
This commit is contained in:
@@ -25,6 +25,7 @@ void revert_daemon(int pid, int client);
|
||||
void revert_unmount(int pid = -1);
|
||||
|
||||
extern std::atomic<bool> denylist_enabled;
|
||||
extern int cached_manager_app_id;
|
||||
|
||||
enum : int {
|
||||
ENFORCE_DENY,
|
||||
|
||||
@@ -276,6 +276,7 @@ static void inotify_handler(pollfd *pfd) {
|
||||
} u{};
|
||||
read(pfd->fd, u.buf, sizeof(u.buf));
|
||||
if (u.event.name == "packages.xml"sv) {
|
||||
cached_manager_app_id = -1;
|
||||
exec_task([] {
|
||||
mutex_guard lock(data_lock);
|
||||
rebuild_map();
|
||||
|
||||
Reference in New Issue
Block a user