mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Merge "Tracing for another "Launcher didn't initialize" failure" into ub-launcher3-master
This commit is contained in:
committed by
Android (Google) Code Review
commit
89321dde65
@@ -77,6 +77,7 @@ import com.android.launcher3.qsb.QsbContainerView;
|
||||
import com.android.launcher3.shortcuts.ShortcutKey;
|
||||
import com.android.launcher3.shortcuts.ShortcutRequest;
|
||||
import com.android.launcher3.shortcuts.ShortcutRequest.QueryResult;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.launcher3.util.ComponentKey;
|
||||
import com.android.launcher3.util.IOUtils;
|
||||
import com.android.launcher3.util.LooperIdleLock;
|
||||
@@ -169,15 +170,32 @@ public class LoaderTask implements Runnable {
|
||||
}
|
||||
|
||||
public void run() {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.LAUNCHER_DIDNT_INITIALIZE,
|
||||
"LoaderTask1 " + this);
|
||||
}
|
||||
synchronized (this) {
|
||||
// Skip fast if we are already stopped.
|
||||
if (mStopped) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.LAUNCHER_DIDNT_INITIALIZE,
|
||||
"LoaderTask2 " + this);
|
||||
}
|
||||
|
||||
Object traceToken = TraceHelper.INSTANCE.beginSection(TAG);
|
||||
TimingLogger logger = new TimingLogger(TAG, "run");
|
||||
TimingLogger logger = TestProtocol.sDebugTracing ?
|
||||
new TimingLogger(TAG, "run") {
|
||||
@Override
|
||||
public void addSplit(String splitLabel) {
|
||||
super.addSplit(splitLabel);
|
||||
Log.d(TestProtocol.LAUNCHER_DIDNT_INITIALIZE,
|
||||
"LoaderTask.addSplit " + splitLabel);
|
||||
}
|
||||
}
|
||||
: new TimingLogger(TAG, "run");
|
||||
try (LauncherModel.LoaderTransaction transaction = mApp.getModel().beginLoader(this)) {
|
||||
List<ShortcutInfo> allShortcuts = new ArrayList<>();
|
||||
loadWorkspace(allShortcuts);
|
||||
@@ -266,6 +284,10 @@ public class LoaderTask implements Runnable {
|
||||
updateHandler.finish();
|
||||
logger.addSplit("finish icon update");
|
||||
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.LAUNCHER_DIDNT_INITIALIZE,
|
||||
"LoaderTask3 " + this);
|
||||
}
|
||||
transaction.commit();
|
||||
} catch (CancellationException e) {
|
||||
// Loader stopped, ignore
|
||||
|
||||
Reference in New Issue
Block a user