Move resetprop under core

This commit is contained in:
topjohnwu 2023-05-18 22:15:49 -07:00
parent 1d2145b1b7
commit f8d62a4b6c
9 changed files with 16 additions and 22 deletions

View File

@ -30,8 +30,8 @@ LOCAL_SRC_FILES := \
core/restorecon.cpp \ core/restorecon.cpp \
core/module.cpp \ core/module.cpp \
core/thread.cpp \ core/thread.cpp \
resetprop/persist.cpp \ core/resetprop/persist.cpp \
resetprop/resetprop.cpp \ core/resetprop/resetprop.cpp \
su/su.cpp \ su/su.cpp \
su/connect.cpp \ su/connect.cpp \
su/pts.cpp \ su/pts.cpp \
@ -149,8 +149,8 @@ LOCAL_STATIC_LIBRARIES := \
LOCAL_SRC_FILES := \ LOCAL_SRC_FILES := \
core/applet_stub.cpp \ core/applet_stub.cpp \
resetprop/resetprop.cpp \ core/resetprop/resetprop.cpp \
resetprop/persist.cpp \ core/resetprop/persist.cpp
LOCAL_CFLAGS := -DAPPLET_STUB_MAIN=resetprop_main LOCAL_CFLAGS := -DAPPLET_STUB_MAIN=resetprop_main
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)

View File

@ -10,7 +10,6 @@
#include <db.hpp> #include <db.hpp>
#include <base.hpp> #include <base.hpp>
#include <daemon.hpp> #include <daemon.hpp>
#include <resetprop.hpp>
#include <selinux.hpp> #include <selinux.hpp>
#include "core.hpp" #include "core.hpp"

View File

@ -26,3 +26,9 @@ void install_apk(const char *apk);
void uninstall_pkg(const char *pkg); void uninstall_pkg(const char *pkg);
void clear_pkg(const char *pkg, int user_id); void clear_pkg(const char *pkg, int user_id);
[[noreturn]] void install_module(const char *file); [[noreturn]] void install_module(const char *file);
// System properties
std::string get_prop(const char *name, bool persist = false);
int delete_prop(const char *name, bool persist = false);
int set_prop(const char *name, const char *value, bool skip_svc = false);
void load_prop_file(const char *filename, bool skip_svc = false);

View File

@ -8,7 +8,6 @@
#include <daemon.hpp> #include <daemon.hpp>
#include <selinux.hpp> #include <selinux.hpp>
#include <db.hpp> #include <db.hpp>
#include <resetprop.hpp>
#include <flags.h> #include <flags.h>
#include <core-rs.cpp> #include <core-rs.cpp>

View File

@ -6,7 +6,6 @@
#include <magisk.hpp> #include <magisk.hpp>
#include <daemon.hpp> #include <daemon.hpp>
#include <selinux.hpp> #include <selinux.hpp>
#include <resetprop.hpp>
#include "core.hpp" #include "core.hpp"
#include "node.hpp" #include "node.hpp"

View File

@ -4,7 +4,7 @@
#include <base.hpp> #include <base.hpp>
#include "prop.hpp" #include "resetprop.hpp"
using namespace std; using namespace std;

View File

@ -3,10 +3,10 @@
#include <vector> #include <vector>
#include <map> #include <map>
#include <resetprop.hpp>
#include <base.hpp> #include <base.hpp>
#include "prop.hpp" #include "../core.hpp"
#include "resetprop.hpp"
using namespace std; using namespace std;
@ -333,9 +333,9 @@ int resetprop_main(int argc, char *argv[]) {
} }
} }
/******************* /***************
* High-level APIs * Public APIs
********************/ ****************/
string get_prop(const char *name, bool persist) { string get_prop(const char *name, bool persist) {
InitOnce(); InitOnce();

View File

@ -1,9 +0,0 @@
#pragma once
#include <string>
#include <functional>
std::string get_prop(const char *name, bool persist = false);
int delete_prop(const char *name, bool persist = false);
int set_prop(const char *name, const char *value, bool skip_svc = false);
void load_prop_file(const char *filename, bool skip_svc = false);