Merge "Add debug logs to debug flaky workspace binding" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cd17310656
@@ -1860,6 +1860,9 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
}
|
||||
|
||||
private void setWorkspaceLoading(boolean value) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING, "running: setWorkspaceLoading=" + value);
|
||||
}
|
||||
mWorkspaceLoading = value;
|
||||
}
|
||||
|
||||
@@ -2306,6 +2309,9 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
*/
|
||||
public void startBinding() {
|
||||
Object traceToken = TraceHelper.INSTANCE.beginSection("startBinding");
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING, "running: startBinding");
|
||||
}
|
||||
// Floating panels (except the full widget sheet) are associated with individual icons. If
|
||||
// we are starting a fresh bind, close all such panels as all the icons are about
|
||||
// to go away.
|
||||
@@ -2778,6 +2784,9 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
*/
|
||||
public void finishBindingItems(IntSet pagesBoundFirst) {
|
||||
Object traceToken = TraceHelper.INSTANCE.beginSection("finishBindingItems");
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING, "running: finishBindingItems");
|
||||
}
|
||||
mWorkspace.restoreInstanceStateForRemainingPages();
|
||||
|
||||
setWorkspaceLoading(false);
|
||||
|
||||
@@ -246,6 +246,9 @@ public abstract class BaseLauncherBinder {
|
||||
sortWorkspaceItemsSpatially(idp, otherWorkspaceItems);
|
||||
|
||||
// Tell the workspace that we're about to start binding items
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING, "scheduling: startBinding");
|
||||
}
|
||||
executeCallbacksTask(c -> {
|
||||
c.clearPendingBinds();
|
||||
c.startBinding();
|
||||
@@ -264,6 +267,9 @@ public abstract class BaseLauncherBinder {
|
||||
Executor pendingExecutor = pendingTasks::add;
|
||||
bindWorkspaceItems(otherWorkspaceItems, pendingExecutor);
|
||||
bindAppWidgets(otherAppWidgets, pendingExecutor);
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.FLAKY_BINDING, "scheduling: finishBindingItems");
|
||||
}
|
||||
executeCallbacksTask(c -> c.finishBindingItems(currentScreenIds), pendingExecutor);
|
||||
pendingExecutor.execute(
|
||||
() -> {
|
||||
|
||||
Reference in New Issue
Block a user