Move watchdogd out of init
We're moving past a world where static executables are needed,
including watchdogd, so treat this like any other executable and place
it in /system/bin.
Bug: 73660730
Test: watchdogd still runs
Change-Id: I1f7508fd55dce6e9ee72a6ab7a085011a76c0053
diff --git a/init/subcontext.cpp b/init/subcontext.cpp
index ee72513..c2a21d4 100644
--- a/init/subcontext.cpp
+++ b/init/subcontext.cpp
@@ -30,6 +30,7 @@
#include "util.h"
#if defined(__ANDROID__)
+#include <android/api-level.h>
#include "property_service.h"
#include "selinux.h"
#else
@@ -355,7 +356,7 @@
static bool shutting_down;
std::vector<Subcontext>* InitializeSubcontexts() {
- if (SelinuxHasVendorInit()) {
+ if (SelinuxGetVendorAndroidVersion() >= __ANDROID_API_P__) {
for (const auto& [path_prefix, secontext] : paths_and_secontexts) {
subcontexts.emplace_back(path_prefix, secontext);
}