Merge "Add the SPA page enter/leave logging metrcis" into udc-dev
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.android.settingslib.spa.framework.common
|
package com.android.settingslib.spa.framework.common
|
||||||
|
|
||||||
|
import android.app.settings.SettingsEnums
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
|
||||||
// Defines the category of the log, for quick filter
|
// Defines the category of the log, for quick filter
|
||||||
@@ -31,20 +32,21 @@ enum class LogCategory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Defines the log events in Spa.
|
// Defines the log events in Spa.
|
||||||
enum class LogEvent {
|
enum class LogEvent(val action: Int) {
|
||||||
// Page related events.
|
// Page related events.
|
||||||
PAGE_ENTER,
|
PAGE_ENTER(SettingsEnums.PAGE_VISIBLE),
|
||||||
PAGE_LEAVE,
|
PAGE_LEAVE(SettingsEnums.PAGE_HIDE),
|
||||||
|
|
||||||
// Entry related events.
|
// Entry related events.
|
||||||
ENTRY_CLICK,
|
ENTRY_CLICK(SettingsEnums.ACTION_SETTINGS_TILE_CLICK),
|
||||||
ENTRY_SWITCH,
|
ENTRY_SWITCH(SettingsEnums.ACTION_SETTINGS_PREFERENCE_CHANGE),
|
||||||
}
|
}
|
||||||
|
|
||||||
internal const val LOG_DATA_DISPLAY_NAME = "name"
|
internal const val LOG_DATA_DISPLAY_NAME = "name"
|
||||||
internal const val LOG_DATA_SESSION_NAME = "session"
|
|
||||||
internal const val LOG_DATA_SWITCH_STATUS = "switch"
|
internal const val LOG_DATA_SWITCH_STATUS = "switch"
|
||||||
|
|
||||||
|
const val LOG_DATA_SESSION_NAME = "session"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The interface of logger in Spa
|
* The interface of logger in Spa
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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.SettingsPage
|
||||||
import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
|
import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
|
||||||
|
|
||||||
|
const val SESSION_UNKNOWN = "unknown"
|
||||||
const val SESSION_BROWSE = "browse"
|
const val SESSION_BROWSE = "browse"
|
||||||
const val SESSION_SEARCH = "search"
|
const val SESSION_SEARCH = "search"
|
||||||
const val SESSION_SLICE = "slice"
|
const val SESSION_SLICE = "slice"
|
||||||
|
const val SESSION_EXTERNAL = "external"
|
||||||
|
|
||||||
const val KEY_DESTINATION = "spaActivityDestination"
|
const val KEY_DESTINATION = "spaActivityDestination"
|
||||||
const val KEY_HIGHLIGHT_ENTRY = "highlightEntry"
|
const val KEY_HIGHLIGHT_ENTRY = "highlightEntry"
|
||||||
|
|||||||
Reference in New Issue
Block a user