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 import android.content.Intent;
20 import android.net.Uri;
21 
22 import androidx.fragment.app.Fragment;
23 
24 import com.android.wallpaper.compat.WallpaperManagerCompat;
25 import com.android.wallpaper.model.CategoryProvider;
26 import com.android.wallpaper.model.WallpaperInfo;
27 import com.android.wallpaper.monitor.PerformanceMonitor;
28 import com.android.wallpaper.network.Requester;
29 import com.android.wallpaper.picker.PreviewFragment.PreviewMode;
30 import com.android.wallpaper.picker.individual.IndividualPickerFragment;
31 import com.android.wallpaper.util.DisplayUtils;
32 
33 /**
34  * Interface for a provider of "injected dependencies." (NOTE: The term "injector" is somewhat of a
35  * misnomer; this is more aptly a service registry as part of a service locator design pattern.)
36  */
37 public interface Injector {
getAlarmManagerWrapper(Context context)38     AlarmManagerWrapper getAlarmManagerWrapper(Context context);
39 
getBitmapCropper()40     BitmapCropper getBitmapCropper();
41 
getCategoryProvider(Context context)42     CategoryProvider getCategoryProvider(Context context);
43 
getCurrentWallpaperFactory(Context context)44     CurrentWallpaperInfoFactory getCurrentWallpaperFactory(Context context);
45 
getExploreIntentChecker(Context context)46     ExploreIntentChecker getExploreIntentChecker(Context context);
47 
getFormFactorChecker(Context context)48     FormFactorChecker getFormFactorChecker(Context context);
49 
getLoggingOptInStatusProvider(Context context)50     LoggingOptInStatusProvider getLoggingOptInStatusProvider(Context context);
51 
getNetworkStatusNotifier(Context context)52     NetworkStatusNotifier getNetworkStatusNotifier(Context context);
53 
getPartnerProvider(Context context)54     PartnerProvider getPartnerProvider(Context context);
55 
getPerformanceMonitor()56     PerformanceMonitor getPerformanceMonitor();
57 
getRequester(Context context)58     Requester getRequester(Context context);
59 
getSystemFeatureChecker()60     SystemFeatureChecker getSystemFeatureChecker();
61 
getUserEventLogger(Context context)62     UserEventLogger getUserEventLogger(Context context);
63 
getWallpaperManagerCompat(Context context)64     WallpaperManagerCompat getWallpaperManagerCompat(Context context);
65 
getWallpaperStatusChecker()66     WallpaperStatusChecker getWallpaperStatusChecker();
67 
getWallpaperPersister(Context context)68     WallpaperPersister getWallpaperPersister(Context context);
69 
getPreferences(Context context)70     WallpaperPreferences getPreferences(Context context);
71 
getWallpaperRefresher(Context context)72     WallpaperRefresher getWallpaperRefresher(Context context);
73 
getWallpaperRotationRefresher()74     WallpaperRotationRefresher getWallpaperRotationRefresher();
75 
getPreviewFragment( Context context, WallpaperInfo wallpaperInfo, @PreviewMode int mode, boolean viewAsHome, boolean viewFullScreen, boolean testingModeEnabled)76     Fragment getPreviewFragment(
77             Context context,
78             WallpaperInfo wallpaperInfo,
79             @PreviewMode int mode,
80             boolean viewAsHome,
81             boolean viewFullScreen,
82             boolean testingModeEnabled);
83 
getPackageStatusNotifier(Context context)84     PackageStatusNotifier getPackageStatusNotifier(Context context);
85 
getIndividualPickerFragment(String collectionId)86     IndividualPickerFragment getIndividualPickerFragment(String collectionId);
87 
getLiveWallpaperInfoFactory(Context context)88     LiveWallpaperInfoFactory getLiveWallpaperInfoFactory(Context context);
89 
getDrawableLayerResolver()90     DrawableLayerResolver getDrawableLayerResolver();
91 
getDeepLinkRedirectIntent(Context context, Uri uri)92     Intent getDeepLinkRedirectIntent(Context context, Uri uri);
93 
getDownloadableIntentAction()94     String getDownloadableIntentAction();
95 
getCustomizationSections()96     CustomizationSections getCustomizationSections();
97 
98     /**
99      * @return the singleton instance of {@link DisplayUtils}
100      */
getDisplayUtils(Context context)101     DisplayUtils getDisplayUtils(Context context);
102 }
103