Clean up Timber string format arguments
This commit is contained in:
parent
62df90d13b
commit
52f3007f3e
1 changed files with 7 additions and 7 deletions
|
@ -83,7 +83,7 @@ public class Throttle {
|
||||||
|
|
||||||
public void cancelScheduledCallback() {
|
public void cancelScheduledCallback() {
|
||||||
if (runningTimerTask != null) {
|
if (runningTimerTask != null) {
|
||||||
Timber.d("Throttle: [%s] %s", name, "Canceling scheduled callback");
|
Timber.d("Throttle: [%s] Canceling scheduled callback", name);
|
||||||
runningTimerTask.cancel();
|
runningTimerTask.cancel();
|
||||||
runningTimerTask = null;
|
runningTimerTask = null;
|
||||||
}
|
}
|
||||||
|
@ -96,24 +96,24 @@ public class Throttle {
|
||||||
if (currentTimeout >= maxTimeout) {
|
if (currentTimeout >= maxTimeout) {
|
||||||
currentTimeout = maxTimeout;
|
currentTimeout = maxTimeout;
|
||||||
}
|
}
|
||||||
Timber.d("Throttle: [%s] %s", name, "Timeout extended " + currentTimeout);
|
Timber.d("Throttle: [%s] Timeout extended %d", name, currentTimeout);
|
||||||
} else {
|
} else {
|
||||||
currentTimeout = minTimeout;
|
currentTimeout = minTimeout;
|
||||||
Timber.d("Throttle: [%s] %s", name, "Timeout reset to " + currentTimeout);
|
Timber.d("Throttle: [%s] Timeout reset to %d", name, currentTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
lastEventTime = now;
|
lastEventTime = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEvent() {
|
public void onEvent() {
|
||||||
Timber.d("Throttle: [%s] %s", name, "onEvent");
|
Timber.d("Throttle: [%s] onEvent", name);
|
||||||
|
|
||||||
updateTimeout();
|
updateTimeout();
|
||||||
|
|
||||||
if (isCallbackScheduled()) {
|
if (isCallbackScheduled()) {
|
||||||
Timber.d("Throttle: [%s] %s", name, " callback already scheduled");
|
Timber.d("Throttle: [%s] callback already scheduled", name);
|
||||||
} else {
|
} else {
|
||||||
Timber.d("Throttle: [%s] %s", name, " scheduling callback");
|
Timber.d("Throttle: [%s] scheduling callback", name);
|
||||||
runningTimerTask = new MyTimerTask();
|
runningTimerTask = new MyTimerTask();
|
||||||
timer.schedule(runningTimerTask, currentTimeout);
|
timer.schedule(runningTimerTask, currentTimeout);
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ public class Throttle {
|
||||||
public void run() {
|
public void run() {
|
||||||
runningTimerTask = null;
|
runningTimerTask = null;
|
||||||
if (!mCanceled) { // This check has to be done on the UI thread.
|
if (!mCanceled) { // This check has to be done on the UI thread.
|
||||||
Timber.d("Throttle: [%s] %s", name, "Kicking callback");
|
Timber.d("Throttle: [%s] Kicking callback", name);
|
||||||
callback.run();
|
callback.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue