Add logs for taskbar and overview split action

Log:
- Taskbar app launch (also from foldeR)
- Taskbar app drag (also from folder)
- Taskbar folder open
- Long press to hide taskbar
- Long press to show taskbar
- Overview Split screen action

Also add support for ActivityContext to overwrite/add to LauncherAtom.ItemInfo, which TaskbarActivityContext does to change HotseatContainer and PredictedHotseatContainer to TaskBarContainer

Test: enable logcat locally
Bug: 193009817
Change-Id: Ia82c846a727fecb8cbfd0a069c8af1276083bf83
This commit is contained in:
Tony Wickham
2021-08-30 14:15:56 -07:00
parent be8b2ad03d
commit 2a10e62e92
11 changed files with 157 additions and 17 deletions

View File

@@ -34,6 +34,8 @@ import android.view.View;
import androidx.annotation.Nullable;
import com.android.internal.logging.InstanceId;
import com.android.internal.logging.InstanceIdSequence;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.DragSource;
@@ -48,6 +50,7 @@ import com.android.launcher3.dragndrop.DragView;
import com.android.launcher3.dragndrop.DraggableView;
import com.android.launcher3.graphics.DragPreviewProvider;
import com.android.launcher3.icons.FastBitmapDrawable;
import com.android.launcher3.logging.StatsLogManager;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.systemui.shared.recents.model.Task;
@@ -284,10 +287,22 @@ public class TaskbarDragController extends DragController<TaskbarActivityContext
}
if (clipDescription != null && intent != null) {
// Need to share the same InstanceId between launcher3 and WM Shell (internal).
InstanceId internalInstanceId = new InstanceIdSequence(
com.android.launcher3.logging.InstanceId.INSTANCE_ID_MAX).newInstanceId();
com.android.launcher3.logging.InstanceId launcherInstanceId =
new com.android.launcher3.logging.InstanceId(internalInstanceId.getId());
intent.putExtra(ClipDescription.EXTRA_LOGGING_INSTANCE_ID, internalInstanceId);
ClipData clipData = new ClipData(clipDescription, new ClipData.Item(intent));
if (btv.startDragAndDrop(clipData, shadowBuilder, null /* localState */,
View.DRAG_FLAG_GLOBAL | View.DRAG_FLAG_OPAQUE)) {
onSystemDragStarted();
mActivity.getStatsLogManager().logger().withItemInfo(mDragObject.dragInfo)
.withInstanceId(launcherInstanceId)
.log(StatsLogManager.LauncherEvent.LAUNCHER_ITEM_DRAG_STARTED);
}
}
}