mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Remove unused debug logs
Removing debug logs for bugs that have already been closed. These logs are filling up the logcat buffer and impeding in other test investigations. Flag: not needed Test: Tapl tests Bug: 260260325 Change-Id: I4d69b904f2ea79d758cf6bef7d90d172f2eb2a91
This commit is contained in:
@@ -16,13 +16,11 @@
|
||||
|
||||
package com.android.launcher3.util;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.View.OnAttachStateChangeListener;
|
||||
import android.view.ViewTreeObserver.OnDrawListener;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.testing.shared.TestProtocol;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@@ -44,9 +42,6 @@ public class ViewOnDrawExecutor implements OnDrawListener, Runnable,
|
||||
private boolean mCancelled;
|
||||
|
||||
public ViewOnDrawExecutor(RunnableList tasks) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING, "Initialize ViewOnDrawExecutor");
|
||||
}
|
||||
mTasks = tasks;
|
||||
}
|
||||
|
||||
@@ -54,11 +49,6 @@ public class ViewOnDrawExecutor implements OnDrawListener, Runnable,
|
||||
mOnClearCallback = launcher::clearPendingExecutor;
|
||||
mAttachedView = launcher.getWorkspace();
|
||||
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING, "ViewOnDrawExecutor.attachTo: launcher=" + launcher
|
||||
+ ", isAttachedToWindow=" + mAttachedView.isAttachedToWindow());
|
||||
}
|
||||
|
||||
mAttachedView.addOnAttachStateChangeListener(this);
|
||||
|
||||
if (mAttachedView.isAttachedToWindow()) {
|
||||
@@ -67,10 +57,6 @@ public class ViewOnDrawExecutor implements OnDrawListener, Runnable,
|
||||
}
|
||||
|
||||
private void attachObserver() {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING,
|
||||
"ViewOnDrawExecutor.attachObserver: mCompleted=" + mCompleted);
|
||||
}
|
||||
if (!mCompleted) {
|
||||
mAttachedView.getViewTreeObserver().addOnDrawListener(this);
|
||||
}
|
||||
@@ -78,9 +64,6 @@ public class ViewOnDrawExecutor implements OnDrawListener, Runnable,
|
||||
|
||||
@Override
|
||||
public void onViewAttachedToWindow(View v) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING, "ViewOnDrawExecutor.onViewAttachedToWindow");
|
||||
}
|
||||
attachObserver();
|
||||
}
|
||||
|
||||
@@ -89,19 +72,11 @@ public class ViewOnDrawExecutor implements OnDrawListener, Runnable,
|
||||
|
||||
@Override
|
||||
public void onDraw() {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING, "ViewOnDrawExecutor.onDraw");
|
||||
}
|
||||
mFirstDrawCompleted = true;
|
||||
mAttachedView.post(this);
|
||||
}
|
||||
|
||||
public void onLoadAnimationCompleted() {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING,
|
||||
"ViewOnDrawExecutor.onLoadAnimationCompleted: mAttachedView != null="
|
||||
+ (mAttachedView != null));
|
||||
}
|
||||
mLoadAnimationCompleted = true;
|
||||
if (mAttachedView != null) {
|
||||
mAttachedView.post(this);
|
||||
@@ -110,12 +85,6 @@ public class ViewOnDrawExecutor implements OnDrawListener, Runnable,
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING,
|
||||
"ViewOnDrawExecutor.run: mLoadAnimationCompleted=" + mLoadAnimationCompleted
|
||||
+ ", mFirstDrawCompleted=" + mFirstDrawCompleted
|
||||
+ ", mCompleted=" + mCompleted);
|
||||
}
|
||||
// Post the pending tasks after both onDraw and onLoadAnimationCompleted have been called.
|
||||
if (mLoadAnimationCompleted && mFirstDrawCompleted && !mCompleted) {
|
||||
markCompleted();
|
||||
@@ -126,12 +95,6 @@ public class ViewOnDrawExecutor implements OnDrawListener, Runnable,
|
||||
* Executes all tasks immediately
|
||||
*/
|
||||
public void markCompleted() {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING,
|
||||
"ViewOnDrawExecutor.markCompleted: mCancelled=" + mCancelled
|
||||
+ ", mOnClearCallback != null=" + (mOnClearCallback != null)
|
||||
+ ", mAttachedView != null=" + (mAttachedView != null));
|
||||
}
|
||||
if (!mCancelled) {
|
||||
mTasks.executeAllAndDestroy();
|
||||
}
|
||||
@@ -146,9 +109,6 @@ public class ViewOnDrawExecutor implements OnDrawListener, Runnable,
|
||||
}
|
||||
|
||||
public void cancel() {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING, "ViewOnDrawExecutor.cancel");
|
||||
}
|
||||
mCancelled = true;
|
||||
markCompleted();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user