Merge "Add the SPA page enter/leave logging metrcis" into udc-dev am: f2de79ebee

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21793711

Change-Id: I490195e663b906db4d299af0df154cde99500aed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Sunny Shao
2023-03-07 10:23:23 +00:00
committed by Automerger Merge Worker
2 changed files with 10 additions and 6 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settingslib.spa.framework.common
import android.app.settings.SettingsEnums
import android.os.Bundle
// Defines the category of the log, for quick filter
@@ -31,20 +32,21 @@ enum class LogCategory {
}
// Defines the log events in Spa.
enum class LogEvent {
enum class LogEvent(val action: Int) {
// Page related events.
PAGE_ENTER,
PAGE_LEAVE,
PAGE_ENTER(SettingsEnums.PAGE_VISIBLE),
PAGE_LEAVE(SettingsEnums.PAGE_HIDE),
// Entry related events.
ENTRY_CLICK,
ENTRY_SWITCH,
ENTRY_CLICK(SettingsEnums.ACTION_SETTINGS_TILE_CLICK),
ENTRY_SWITCH(SettingsEnums.ACTION_SETTINGS_PREFERENCE_CHANGE),
}
internal const val LOG_DATA_DISPLAY_NAME = "name"
internal const val LOG_DATA_SESSION_NAME = "session"
internal const val LOG_DATA_SWITCH_STATUS = "switch"
const val LOG_DATA_SESSION_NAME = "session"
/**
* The interface of logger in Spa
*/

View File

@@ -22,9 +22,11 @@ import com.android.settingslib.spa.framework.common.SettingsEntry
import com.android.settingslib.spa.framework.common.SettingsPage
import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
const val SESSION_UNKNOWN = "unknown"
const val SESSION_BROWSE = "browse"
const val SESSION_SEARCH = "search"
const val SESSION_SLICE = "slice"
const val SESSION_EXTERNAL = "external"
const val KEY_DESTINATION = "spaActivityDestination"
const val KEY_HIGHLIGHT_ENTRY = "highlightEntry"