[AA+] Add WW logging for Slice actions.

Bug: 178562918
Test: Manual
Change-Id: I515ee3c0990dea2c30e68d5919568dc1773912ee
This commit is contained in:
thiruram
2021-02-17 19:37:25 -08:00
parent 97710ffbb2
commit d0ab1a0eed
3 changed files with 70 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
import android.content.Context;
import androidx.annotation.Nullable;
import androidx.slice.SliceItem;
import com.android.launcher3.R;
import com.android.launcher3.logger.LauncherAtom.ContainerInfo;
@@ -366,6 +367,31 @@ public class StatsLogManager implements ResourceBasedOverride {
@UiEvent(doc = "User switched to Work tab in AllApps screen.")
LAUNCHER_ALLAPPS_SWITCHED_TO_WORK_TAB(696),
@UiEvent(doc = "Default event when dedicated UI event is not available for the user action"
+ " on slice .")
LAUNCHER_SLICE_DEFAULT_ACTION(700),
@UiEvent(doc = "User toggled-on a Slice item.")
LAUNCHER_SLICE_TOGGLE_ON(701),
@UiEvent(doc = "User toggled-off a Slice item.")
LAUNCHER_SLICE_TOGGLE_OFF(702),
@UiEvent(doc = "User acted on a Slice item with a button.")
LAUNCHER_SLICE_BUTTON_ACTION(703),
@UiEvent(doc = "User acted on a Slice item with a slider.")
LAUNCHER_SLICE_SLIDER_ACTION(704),
@UiEvent(doc = "User tapped on the entire row of a Slice.")
LAUNCHER_SLICE_CONTENT_ACTION(705),
@UiEvent(doc = "User tapped on the see more button of a Slice.")
LAUNCHER_SLICE_SEE_MORE_ACTION(706),
@UiEvent(doc = "User selected from a selection row of Slice.")
LAUNCHER_SLICE_SELECTION_ACTION(707),
;
// ADD MORE
@@ -472,6 +498,13 @@ public class StatsLogManager implements ResourceBasedOverride {
return this;
}
/**
* Sets logging fields from provided {@link SliceItem}.
*/
default StatsLogger withSliceItem(SliceItem sliceItem) {
return this;
}
/**
* Builds the final message and logs it as {@link EventEnum}.
*/