#include #include #include #include #include #include "jni.h" using vendor::eureka::security::selinux::V1_0::ISELinux; using vendor::eureka::security::selinux::V1_0::Enable; using android::sp; extern "C" JNIEXPORT jint JNICALL Java_com_eurekateam_samsungextras_interfaces_SELinux_getSELinux(JNIEnv *env, jclass clazz) { android::sp service = ISELinux::getService(); int ret = service->readSELinuxstats(); return ret; } extern "C" JNIEXPORT void JNICALL Java_com_eurekateam_samsungextras_interfaces_SELinux_setSELinux(JNIEnv *env, jclass clazz, jint enable) { android::sp service = ISELinux::getService(); if (enable == 1){ service->setSELinuxWritable(Enable::ENABLE); }else{ service->setSELinuxWritable(Enable::DISABLE); } }