perf(logging): gate debug-level logs behind isDebugBuild
debug() was hitting Log.d() unconditionally in release builds — every intercepted binder transaction triggered string formatting and logcat syscalls. verbose() already had the guard; debug() was just missing it. Also remove dead SERVICE_SLEEP_MS constant.
This commit is contained in:
@@ -23,8 +23,6 @@ import org.matrix.TEESimulator.util.AndroidDeviceUtils
|
|||||||
object App {
|
object App {
|
||||||
// The delay in milliseconds before retrying to initialize the interceptor.
|
// The delay in milliseconds before retrying to initialize the interceptor.
|
||||||
private const val RETRY_DELAY_MS = 1000L
|
private const val RETRY_DELAY_MS = 1000L
|
||||||
// The sleep duration in milliseconds for the main service loop to keep the process alive.
|
|
||||||
private const val SERVICE_SLEEP_MS = 1000000L
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main entry point of the TEESimulator application.
|
* The main entry point of the TEESimulator application.
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ object SystemLogger {
|
|||||||
* @param message The message to log.
|
* @param message The message to log.
|
||||||
*/
|
*/
|
||||||
fun debug(message: String) {
|
fun debug(message: String) {
|
||||||
|
if (!isDebugBuild) return
|
||||||
Log.d(TAG, message)
|
Log.d(TAG, message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user