1 /*
2  * Copyright (C) 2024 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.picker.customization.ui.util
18 
19 import android.view.LayoutInflater
20 import android.view.View
21 import android.view.ViewGroup
22 import android.widget.FrameLayout
23 import android.widget.LinearLayout
24 import com.android.wallpaper.R
25 import com.android.wallpaper.model.Screen
26 import com.android.wallpaper.model.Screen.HOME_SCREEN
27 import com.android.wallpaper.model.Screen.LOCK_SCREEN
28 import com.android.wallpaper.picker.customization.ui.util.CustomizationOptionUtil.CustomizationOption
29 import dagger.hilt.android.scopes.ActivityScoped
30 import javax.inject.Inject
31 
32 @ActivityScoped
33 class DefaultCustomizationOptionUtil @Inject constructor() : CustomizationOptionUtil {
34 
35     enum class DefaultLockCustomizationOption : CustomizationOption {
36         WALLPAPER
37     }
38 
39     enum class DefaultHomeCustomizationOption : CustomizationOption {
40         WALLPAPER
41     }
42 
getOptionEntriesnull43     override fun getOptionEntries(
44         screen: Screen,
45         optionContainer: LinearLayout,
46         layoutInflater: LayoutInflater,
47     ): List<Pair<CustomizationOption, View>> =
48         when (screen) {
49             LOCK_SCREEN ->
50                 listOf(
51                     DefaultLockCustomizationOption.WALLPAPER to
52                         layoutInflater.inflate(
53                             R.layout.customization_option_entry_wallpaper,
54                             optionContainer,
55                             false,
56                         )
57                 )
58             HOME_SCREEN ->
59                 listOf(
60                     DefaultHomeCustomizationOption.WALLPAPER to
61                         layoutInflater.inflate(
62                             R.layout.customization_option_entry_wallpaper,
63                             optionContainer,
64                             false,
65                         )
66                 )
67         }
68 
initFloatingSheetnull69     override fun initFloatingSheet(
70         bottomSheetContainer: FrameLayout,
71         layoutInflater: LayoutInflater,
72     ): Map<CustomizationOption, View> = mapOf()
73 
74     override fun createClockPreviewAndAddToParent(
75         parentView: ViewGroup,
76         layoutInflater: LayoutInflater,
77     ): View? {
78         return null
79     }
80 }
81