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