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.wallpaper.module.logging
17 
18 import android.content.Intent
19 import com.android.wallpaper.module.logging.UserEventLogger.EffectStatus
20 import com.android.wallpaper.module.logging.UserEventLogger.SetWallpaperEntryPoint
21 import com.android.wallpaper.module.logging.UserEventLogger.WallpaperDestination
22 import javax.inject.Inject
23 import javax.inject.Singleton
24 
25 /** Test implementation of [UserEventLogger]. */
26 @Singleton
27 open class TestUserEventLogger @Inject constructor() : UserEventLogger {
28 
29     val numWallpaperSetEvents = 0
30     var numWallpaperSetResultEvents = 0
31         private set
32 
logSnapshotnull33     override fun logSnapshot() {}
34 
logAppLaunchednull35     override fun logAppLaunched(launchSource: Intent) {}
36 
logWallpaperAppliednull37     override fun logWallpaperApplied(
38         collectionId: String?,
39         wallpaperId: String?,
40         effects: String?,
41         @SetWallpaperEntryPoint setWallpaperEntryPoint: Int,
42         @WallpaperDestination destination: Int,
43     ) {}
44 
logEffectApplynull45     override fun logEffectApply(
46         effect: String,
47         status: Int,
48         timeElapsedMillis: Long,
49         resultCode: Int
50     ) {}
51 
logEffectProbenull52     override fun logEffectProbe(effect: String, @EffectStatus status: Int) {}
53 
logEffectForegroundDownloadnull54     override fun logEffectForegroundDownload(
55         effect: String,
56         status: Int,
57         timeElapsedMillis: Long,
58     ) {}
59 
logResetAppliednull60     override fun logResetApplied() {}
61 
logWallpaperExploreButtonClickednull62     override fun logWallpaperExploreButtonClicked() {}
63 }
64