Skip to content

Commit 1628316

Browse files
committed
Make use of enabled argument of Log method
1 parent 17bfefc commit 1628316

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/src/main/java/com/jmstudios/redmoon/service/ScreenFilterService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ class ScreenFilterService : Service(), ServiceLifeCycleController {
9090
}
9191

9292
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
93-
if (DEBUG) Log(String.format("onStartCommand(%s, %d, %d", intent, flags, startId))
93+
Log(String.format("onStartCommand(%s, %d, %d", intent, flags, startId), DEBUG)
9494
val flag = intent.getIntExtra(ScreenFilterService.BUNDLE_KEY_COMMAND, COMMAND_MISSING)
95-
if (DEBUG) Log("Recieved flag: $flag")
95+
Log("Recieved flag: $flag", DEBUG)
9696
if (flag != COMMAND_MISSING) mPresenter.onScreenFilterCommand(Command.values()[flag])
9797

9898
// Do not attempt to restart if the hosting process is killed by Android

app/src/main/java/com/jmstudios/redmoon/thread/CurrentAppMonitoringThread.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CurrentAppMonitoringThread(private val mContext: Context) : Thread() {
4040
}
4141

4242
override fun run() {
43-
if (DEBUG) Log("CurrentAppMonitoringThread running")
43+
Log("CurrentAppMonitoringThread running", DEBUG)
4444

4545
try {
4646
while (!Thread.interrupted()) {
@@ -56,7 +56,7 @@ class CurrentAppMonitoringThread(private val mContext: Context) : Thread() {
5656
} catch (e: InterruptedException) {
5757
}
5858

59-
if (DEBUG) Log("Shutting down CurrentAppMonitoringThread")
59+
Log("Shutting down CurrentAppMonitoringThread", DEBUG)
6060
}
6161

6262
private fun isAppSecured(app: String): Boolean {

0 commit comments

Comments
 (0)