Adding temporary logging to diagnose testPendingWidget_autoRestored

This test fails

Bug: 117332845
Test: running Launcher
Change-Id: I300c856992b3d1f559c4c31525a45e2c4a960f11
This commit is contained in:
Vadim Tryshev
2018-10-05 15:17:42 -07:00
parent f76ea29772
commit c052e4e68a
5 changed files with 44 additions and 0 deletions

View File

@@ -109,6 +109,11 @@ public class ModelWriter {
}
private void checkItemInfoLocked(long itemId, ItemInfo item, StackTraceElement[] stackTrace) {
if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
&& com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
android.util.Log.d("b/117332845",
"Checking item: " + android.util.Log.getStackTraceString(new Throwable()));
}
ItemInfo modelItem = mBgDataModel.itemsIdMap.get(itemId);
if (modelItem != null && item != modelItem) {
// check all the data is consistent
@@ -358,6 +363,11 @@ public class ModelWriter {
private final long mItemId;
UpdateItemRunnable(ItemInfo item, ContentWriter writer) {
if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
&& com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
android.util.Log.d("b/117332845",
android.util.Log.getStackTraceString(new Throwable()));
}
mItem = item;
mWriter = writer;
mItemId = item.id;