Skip to content

Commit

Permalink
Move resetprop under core
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed May 19, 2023
1 parent 1d2145b commit f8d62a4
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 22 deletions.
8 changes: 4 additions & 4 deletions native/src/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ LOCAL_SRC_FILES := \
core/restorecon.cpp \
core/module.cpp \
core/thread.cpp \
resetprop/persist.cpp \
resetprop/resetprop.cpp \
core/resetprop/persist.cpp \
core/resetprop/resetprop.cpp \
su/su.cpp \
su/connect.cpp \
su/pts.cpp \
Expand Down Expand Up @@ -149,8 +149,8 @@ LOCAL_STATIC_LIBRARIES := \

LOCAL_SRC_FILES := \
core/applet_stub.cpp \
resetprop/resetprop.cpp \
resetprop/persist.cpp \
core/resetprop/resetprop.cpp \
core/resetprop/persist.cpp

LOCAL_CFLAGS := -DAPPLET_STUB_MAIN=resetprop_main
include $(BUILD_EXECUTABLE)
Expand Down
1 change: 0 additions & 1 deletion native/src/core/bootstages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <db.hpp>
#include <base.hpp>
#include <daemon.hpp>
#include <resetprop.hpp>
#include <selinux.hpp>

#include "core.hpp"
Expand Down
6 changes: 6 additions & 0 deletions native/src/core/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ void install_apk(const char *apk);
void uninstall_pkg(const char *pkg);
void clear_pkg(const char *pkg, int user_id);
[[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);
1 change: 0 additions & 1 deletion native/src/core/daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <daemon.hpp>
#include <selinux.hpp>
#include <db.hpp>
#include <resetprop.hpp>
#include <flags.h>

#include <core-rs.cpp>
Expand Down
1 change: 0 additions & 1 deletion native/src/core/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <magisk.hpp>
#include <daemon.hpp>
#include <selinux.hpp>
#include <resetprop.hpp>

#include "core.hpp"
#include "node.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <base.hpp>

#include "prop.hpp"
#include "resetprop.hpp"

using namespace std;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#include <vector>
#include <map>

#include <resetprop.hpp>
#include <base.hpp>

#include "prop.hpp"
#include "../core.hpp"
#include "resetprop.hpp"

using namespace std;

Expand Down Expand Up @@ -333,9 +333,9 @@ int resetprop_main(int argc, char *argv[]) {
}
}

/*******************
* High-level APIs
********************/
/***************
* Public APIs
****************/

string get_prop(const char *name, bool persist) {
InitOnce();
Expand Down
File renamed without changes.
9 changes: 0 additions & 9 deletions native/src/include/resetprop.hpp

This file was deleted.

0 comments on commit f8d62a4

Please sign in to comment.