Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58e2c219 authored by George Lin's avatar George Lin Committed by Android (Google) Code Review
Browse files

Merge "Log feature applied" into main

parents b3a18602 40bba71e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@ public class GridOptionsManager implements CustomizationManager<GridOption> {
    public void apply(GridOption option, Callback callback) {
        int updated = mProvider.applyGrid(option.name);
        if (updated == 1) {
            mEventLogger.logGridApplied(option);
            callback.onSuccess();
        } else {
            callback.onError(null);
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ package com.android.customization.module.logging

import android.stats.style.StyleEnums
import androidx.annotation.IntDef
import com.android.customization.model.grid.GridOption
import com.android.customization.model.grid.GridOptionModel
import com.android.wallpaper.module.logging.UserEventLogger

/** Extension of [UserEventLogger] that adds ThemePicker specific events. */
@@ -25,7 +25,7 @@ interface ThemesUserEventLogger : UserEventLogger {

    fun logThemeColorApplied(@ColorSource source: Int, style: Int, seedColor: Int)

    fun logGridApplied(grid: GridOption)
    fun logGridApplied(grid: GridOptionModel)

    fun logClockApplied(clockId: String)

+3 −3
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ import android.stats.style.StyleEnums.WALLPAPER_EFFECT_PROBE
import android.stats.style.StyleEnums.WALLPAPER_EXPLORE
import android.text.TextUtils
import com.android.customization.model.color.ColorCustomizationManager
import com.android.customization.model.grid.GridOption
import com.android.customization.model.grid.GridOptionModel
import com.android.customization.module.logging.ThemesUserEventLogger.ClockSize
import com.android.customization.module.logging.ThemesUserEventLogger.ColorSource
import com.android.wallpaper.customization.ui.util.ThemePickerCustomizationOptionUtil.ThemePickerHomeCustomizationOption.APP_ICONS
@@ -197,7 +197,7 @@ constructor(
            .log()
    }

    override fun logGridApplied(grid: GridOption) {
    override fun logGridApplied(grid: GridOptionModel) {
        sysUiStatsLoggerFactory
            .get(GRID_APPLIED)
            .setAppSessionId(appSessionId.getId())
@@ -296,7 +296,7 @@ constructor(
     * The grid integer depends on the column and row numbers. For example: 4x5 is 405 13x37 is 1337
     * The upper limit for the column / row count is 99.
     */
    private fun GridOption.getLauncherGridInt(): Int {
    private fun GridOptionModel.getLauncherGridInt(): Int {
        return cols * 100 + rows
    }

+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ interface ClockPickerRepository {
    /**
     * Set clock color to the settings.
     *
     * @param selectedColor selected color in the color option list.
     * @param selectedColorId selected color in the color option list.
     * @param colorToneProgress color tone from 0 to 100 to apply to the selected color
     * @param seedColor the actual clock color after blending the selected color and color tone
     */
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ object GridFloatingSheetBinder {
        lifecycleOwner.lifecycleScope.launch {
            lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
                launch {
                    viewModel.gridOptions.collect { options ->
                    viewModel.gridOptionListItems.collect { options ->
                        gridOptionListAdapter.setItems(options) {
                            val indexToFocus =
                                options.indexOfFirst { it.isSelected.value }.coerceAtLeast(0)
Loading