• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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.model.clock.custom;
17 
18 import com.android.customization.model.CustomizationManager;
19 
20 import com.google.common.collect.Lists;
21 
22 /**
23  * {@link CustomizationManager} for clock faces.
24  */
25 public class ClockCustomManager implements CustomizationManager<ClockOption> {
26     @Override
isAvailable()27     public boolean isAvailable() {
28         return true;
29     }
30 
31     @Override
apply(ClockOption option, Callback callback)32     public void apply(ClockOption option, Callback callback) {
33         // TODO(/b241966062) execute applying the clock when user selects a clock
34     }
35 
36     @Override
fetchOptions(OptionsFetchedListener<ClockOption> callback, boolean reload)37     public void fetchOptions(OptionsFetchedListener<ClockOption> callback, boolean reload) {
38         // TODO(/b241966062) fetch the real clock metadata from the ClockRegistry
39         callback.onOptionsLoaded(
40                 Lists.newArrayList(new ClockOption(), new ClockOption(), new ClockOption(),
41                         new ClockOption(), new ClockOption()));
42     }
43 }
44