• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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;
17 
18 import android.content.Context;
19 
20 import androidx.annotation.IntDef;
21 
22 /**
23  * Checks what component is responsible for presenting the rotating wallpaper image under the
24  * device's launcher or keyguard for current and future rotations.
25  */
26 public interface RotatingWallpaperComponentChecker {
27 
28     int ROTATING_WALLPAPER_COMPONENT_LIVE = 1;
29     int ROTATING_WALLPAPER_COMPONENT_STATIC = 2;
30 
31     int ROTATING_WALLPAPER_SUPPORT_NOT_SUPPORTED = 0;
32     int ROTATING_WALLPAPER_SUPPORT_SUPPORTED = 1;
33 
34     /**
35      * Returns the rotating wallpaper component for the current wallpaper rotation.
36      */
37     @RotatingWallpaperComponent
getCurrentRotatingWallpaperComponent(Context context)38     int getCurrentRotatingWallpaperComponent(Context context);
39 
40     /**
41      * Returns the rotating wallpaper component for future wallpaper rotations.
42      */
43     @RotatingWallpaperComponent
getNextRotatingWallpaperComponent(Context context)44     int getNextRotatingWallpaperComponent(Context context);
45 
46     /**
47      * Returns the support level for rotating wallpaper.
48      */
49     @RotatingWallpaperSupport
getRotatingWallpaperSupport(Context context)50     int getRotatingWallpaperSupport(Context context);
51 
52     /**
53      * Possible components for presenting the rotating wallpaper image.
54      */
55     @IntDef({
56             ROTATING_WALLPAPER_COMPONENT_LIVE,
57             ROTATING_WALLPAPER_COMPONENT_STATIC})
58     @interface RotatingWallpaperComponent {
59     }
60 
61     /**
62      * Possible support levels for rotating wallpaper.
63      */
64     @IntDef({
65             ROTATING_WALLPAPER_SUPPORT_NOT_SUPPORTED,
66             ROTATING_WALLPAPER_SUPPORT_SUPPORTED})
67     @interface RotatingWallpaperSupport {
68     }
69 }
70