1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.android.customization.module.logging
17 
18 import android.stats.style.StyleEnums
19 import androidx.annotation.IntDef
20 import com.android.customization.model.grid.GridOption
21 import com.android.wallpaper.module.logging.UserEventLogger
22 
23 /** Extension of [UserEventLogger] that adds ThemePicker specific events. */
24 interface ThemesUserEventLogger : UserEventLogger {
25 
logThemeColorAppliednull26     fun logThemeColorApplied(@ColorSource source: Int, style: Int, seedColor: Int)
27 
28     fun logGridApplied(grid: GridOption)
29 
30     fun logClockApplied(clockId: String)
31 
32     fun logClockColorApplied(seedColor: Int)
33 
34     fun logClockSizeApplied(@ClockSize clockSize: Int)
35 
36     fun logThemedIconApplied(useThemeIcon: Boolean)
37 
38     fun logLockScreenNotificationApplied(showLockScreenNotifications: Boolean)
39 
40     fun logShortcutApplied(shortcut: String, shortcutSlotId: String)
41 
42     fun logDarkThemeApplied(useDarkTheme: Boolean)
43 
44     @IntDef(
45         StyleEnums.COLOR_SOURCE_UNSPECIFIED,
46         StyleEnums.COLOR_SOURCE_HOME_SCREEN_WALLPAPER,
47         StyleEnums.COLOR_SOURCE_LOCK_SCREEN_WALLPAPER,
48         StyleEnums.COLOR_SOURCE_PRESET_COLOR,
49     )
50     @Retention(AnnotationRetention.SOURCE)
51     annotation class ColorSource
52 
53     @IntDef(
54         StyleEnums.CLOCK_SIZE_UNSPECIFIED,
55         StyleEnums.CLOCK_SIZE_DYNAMIC,
56         StyleEnums.CLOCK_SIZE_SMALL,
57     )
58     @Retention(AnnotationRetention.SOURCE)
59     annotation class ClockSize
60 
61     companion object {
62         const val NULL_SEED_COLOR = 0
63     }
64 }
65