mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 07:57:39 +00:00
Disable debug only features
This commit is contained in:
parent
efa49567fa
commit
4670f762d3
@ -1,11 +1,10 @@
|
||||
#include <base.hpp>
|
||||
|
||||
#include "flags.h"
|
||||
#include "policy.hpp"
|
||||
|
||||
using Str = rust::Str;
|
||||
|
||||
#if MAGISK_DEBUG
|
||||
#if 0
|
||||
template<typename Arg>
|
||||
std::string as_str(const Arg &arg) {
|
||||
if constexpr (std::is_same_v<Arg, const char *> || std::is_same_v<Arg, char *>) {
|
||||
|
@ -80,6 +80,7 @@ mod ffi {
|
||||
fn type_change(self: Pin<&mut sepolicy>, s: &str, t: &str, c: &str, d: &str);
|
||||
fn type_member(self: Pin<&mut sepolicy>, s: &str, t: &str, c: &str, d: &str);
|
||||
fn genfscon(self: Pin<&mut sepolicy>, s: &str, t: &str, c: &str);
|
||||
#[allow(dead_code)]
|
||||
fn strip_dontaudit(self: Pin<&mut sepolicy>);
|
||||
}
|
||||
|
||||
|
@ -132,8 +132,8 @@ impl SepolicyMagisk for sepolicy {
|
||||
deny(["init"], ["adb_data_file"], ["dir"], ["search"]);
|
||||
deny(["vendor_init"], ["adb_data_file"], ["dir"], ["search"]);
|
||||
}
|
||||
// Remove all dontaudit in debug mode
|
||||
#[cfg(debug_assertions)]
|
||||
|
||||
#[cfg(any())]
|
||||
self.as_mut().strip_dontaudit();
|
||||
|
||||
set_log_level_state(LogLevel::Warn, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user