1 /* 2 * Copyright (C) 2025 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 17 package com.android.wallpaper.testing 18 19 import android.app.WallpaperInfo 20 import android.app.wallpaper.WallpaperDescription 21 import android.content.Context 22 import android.net.Uri 23 import com.android.wallpaper.module.CreativeHelper 24 import com.android.wallpaper.picker.customization.shared.model.WallpaperDestination 25 import javax.inject.Inject 26 27 class FakeCreativeHelper @Inject constructor() : CreativeHelper { 28 val creativeDescription = mutableMapOf<WallpaperDestination, WallpaperDescription?>() 29 getCreativePreviewUrinull30 override fun getCreativePreviewUri( 31 context: Context, 32 info: WallpaperInfo, 33 destination: WallpaperDestination, 34 ): Uri? { 35 TODO("Not yet implemented") 36 } 37 setCreativeDescriptionnull38 fun setCreativeDescription( 39 destination: WallpaperDestination, 40 description: WallpaperDescription?, 41 ) { 42 creativeDescription[destination] = description 43 } 44 getCreativeDescriptionnull45 override fun getCreativeDescription( 46 context: Context, 47 info: WallpaperInfo, 48 destination: WallpaperDestination, 49 ): WallpaperDescription? { 50 return creativeDescription[destination] 51 } 52 } 53