867 lines
37 KiB
Plaintext
867 lines
37 KiB
Plaintext
package com.radiola;
|
|
|
|
import android.app.Activity;
|
|
import android.app.Service;
|
|
import android.view.View;
|
|
import androidx.fragment.app.Fragment;
|
|
import androidx.lifecycle.SavedStateHandle;
|
|
import androidx.lifecycle.ViewModel;
|
|
import com.google.common.collect.ImmutableMap;
|
|
import com.google.common.collect.ImmutableSet;
|
|
import com.radiola.data.local.AppDatabase;
|
|
import com.radiola.data.local.LocalStationDataSource;
|
|
import com.radiola.data.remote.RecordApi;
|
|
import com.radiola.data.repository.FavoritesRepositoryImpl;
|
|
import com.radiola.data.repository.NowPlayingRepositoryImpl;
|
|
import com.radiola.data.repository.RecordingRepositoryImpl;
|
|
import com.radiola.data.repository.SettingsRepositoryImpl;
|
|
import com.radiola.data.repository.StationRepositoryImpl;
|
|
import com.radiola.data.repository.StationTester;
|
|
import com.radiola.data.repository.TrackHistoryRepositoryImpl;
|
|
import com.radiola.di.AppModule_ProvideDatabaseFactory;
|
|
import com.radiola.di.AppModule_ProvideFavoritesRepositoryFactory;
|
|
import com.radiola.di.AppModule_ProvideJsonFactory;
|
|
import com.radiola.di.AppModule_ProvideLocalStationDataSourceFactory;
|
|
import com.radiola.di.AppModule_ProvideNowPlayingRepositoryFactory;
|
|
import com.radiola.di.AppModule_ProvideOkHttpClientFactory;
|
|
import com.radiola.di.AppModule_ProvideRecordApiFactory;
|
|
import com.radiola.di.AppModule_ProvideRecordingRepositoryFactory;
|
|
import com.radiola.di.AppModule_ProvideRetrofitFactory;
|
|
import com.radiola.di.AppModule_ProvideSettingsRepositoryFactory;
|
|
import com.radiola.di.AppModule_ProvideStationRepositoryFactory;
|
|
import com.radiola.di.AppModule_ProvideTrackHistoryRepositoryFactory;
|
|
import com.radiola.domain.repository.FavoritesRepository;
|
|
import com.radiola.domain.repository.NowPlayingRepository;
|
|
import com.radiola.domain.repository.RecordingRepository;
|
|
import com.radiola.domain.repository.SettingsRepository;
|
|
import com.radiola.domain.repository.StationRepository;
|
|
import com.radiola.domain.repository.TrackHistoryRepository;
|
|
import com.radiola.domain.usecase.GetNowPlayingUseCase;
|
|
import com.radiola.domain.usecase.GetStationsUseCase;
|
|
import com.radiola.domain.usecase.PlayStationUseCase;
|
|
import com.radiola.domain.usecase.RefreshStationsUseCase;
|
|
import com.radiola.domain.usecase.SearchTrackInServiceUseCase;
|
|
import com.radiola.domain.usecase.TestStationsUseCase;
|
|
import com.radiola.domain.usecase.ToggleFavoriteUseCase;
|
|
import com.radiola.service.PlayerController;
|
|
import com.radiola.service.PlayerService;
|
|
import com.radiola.service.PlayerService_MembersInjector;
|
|
import com.radiola.ui.favorites.FavoritesViewModel;
|
|
import com.radiola.ui.favorites.FavoritesViewModel_HiltModules;
|
|
import com.radiola.ui.history.HistoryViewModel;
|
|
import com.radiola.ui.history.HistoryViewModel_HiltModules;
|
|
import com.radiola.ui.player.PlayerViewModel;
|
|
import com.radiola.ui.player.PlayerViewModel_HiltModules;
|
|
import com.radiola.ui.recordings.RecordingsViewModel;
|
|
import com.radiola.ui.recordings.RecordingsViewModel_HiltModules;
|
|
import com.radiola.ui.settings.SettingsViewModel;
|
|
import com.radiola.ui.settings.SettingsViewModel_HiltModules;
|
|
import com.radiola.ui.stations.StationsViewModel;
|
|
import com.radiola.ui.stations.StationsViewModel_HiltModules;
|
|
import dagger.hilt.android.ActivityRetainedLifecycle;
|
|
import dagger.hilt.android.ViewModelLifecycle;
|
|
import dagger.hilt.android.internal.builders.ActivityComponentBuilder;
|
|
import dagger.hilt.android.internal.builders.ActivityRetainedComponentBuilder;
|
|
import dagger.hilt.android.internal.builders.FragmentComponentBuilder;
|
|
import dagger.hilt.android.internal.builders.ServiceComponentBuilder;
|
|
import dagger.hilt.android.internal.builders.ViewComponentBuilder;
|
|
import dagger.hilt.android.internal.builders.ViewModelComponentBuilder;
|
|
import dagger.hilt.android.internal.builders.ViewWithFragmentComponentBuilder;
|
|
import dagger.hilt.android.internal.lifecycle.DefaultViewModelFactories;
|
|
import dagger.hilt.android.internal.lifecycle.DefaultViewModelFactories_InternalFactoryFactory_Factory;
|
|
import dagger.hilt.android.internal.managers.ActivityRetainedComponentManager_LifecycleModule_ProvideActivityRetainedLifecycleFactory;
|
|
import dagger.hilt.android.internal.managers.SavedStateHandleHolder;
|
|
import dagger.hilt.android.internal.modules.ApplicationContextModule;
|
|
import dagger.hilt.android.internal.modules.ApplicationContextModule_ProvideContextFactory;
|
|
import dagger.internal.DaggerGenerated;
|
|
import dagger.internal.DoubleCheck;
|
|
import dagger.internal.IdentifierNameString;
|
|
import dagger.internal.KeepFieldType;
|
|
import dagger.internal.LazyClassKeyMap;
|
|
import dagger.internal.Preconditions;
|
|
import dagger.internal.Provider;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
import javax.annotation.processing.Generated;
|
|
import kotlinx.serialization.json.Json;
|
|
import okhttp3.OkHttpClient;
|
|
import retrofit2.Retrofit;
|
|
|
|
@DaggerGenerated
|
|
@Generated(
|
|
value = "dagger.internal.codegen.ComponentProcessor",
|
|
comments = "https://dagger.dev"
|
|
)
|
|
@SuppressWarnings({
|
|
"unchecked",
|
|
"rawtypes",
|
|
"KotlinInternal",
|
|
"KotlinInternalInJava",
|
|
"cast"
|
|
})
|
|
public final class DaggerRadiolaApplication_HiltComponents_SingletonC {
|
|
private DaggerRadiolaApplication_HiltComponents_SingletonC() {
|
|
}
|
|
|
|
public static Builder builder() {
|
|
return new Builder();
|
|
}
|
|
|
|
public static final class Builder {
|
|
private ApplicationContextModule applicationContextModule;
|
|
|
|
private Builder() {
|
|
}
|
|
|
|
public Builder applicationContextModule(ApplicationContextModule applicationContextModule) {
|
|
this.applicationContextModule = Preconditions.checkNotNull(applicationContextModule);
|
|
return this;
|
|
}
|
|
|
|
public RadiolaApplication_HiltComponents.SingletonC build() {
|
|
Preconditions.checkBuilderRequirement(applicationContextModule, ApplicationContextModule.class);
|
|
return new SingletonCImpl(applicationContextModule);
|
|
}
|
|
}
|
|
|
|
private static final class ActivityRetainedCBuilder implements RadiolaApplication_HiltComponents.ActivityRetainedC.Builder {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private SavedStateHandleHolder savedStateHandleHolder;
|
|
|
|
private ActivityRetainedCBuilder(SingletonCImpl singletonCImpl) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
}
|
|
|
|
@Override
|
|
public ActivityRetainedCBuilder savedStateHandleHolder(
|
|
SavedStateHandleHolder savedStateHandleHolder) {
|
|
this.savedStateHandleHolder = Preconditions.checkNotNull(savedStateHandleHolder);
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public RadiolaApplication_HiltComponents.ActivityRetainedC build() {
|
|
Preconditions.checkBuilderRequirement(savedStateHandleHolder, SavedStateHandleHolder.class);
|
|
return new ActivityRetainedCImpl(singletonCImpl, savedStateHandleHolder);
|
|
}
|
|
}
|
|
|
|
private static final class ActivityCBuilder implements RadiolaApplication_HiltComponents.ActivityC.Builder {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private Activity activity;
|
|
|
|
private ActivityCBuilder(SingletonCImpl singletonCImpl,
|
|
ActivityRetainedCImpl activityRetainedCImpl) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
}
|
|
|
|
@Override
|
|
public ActivityCBuilder activity(Activity activity) {
|
|
this.activity = Preconditions.checkNotNull(activity);
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public RadiolaApplication_HiltComponents.ActivityC build() {
|
|
Preconditions.checkBuilderRequirement(activity, Activity.class);
|
|
return new ActivityCImpl(singletonCImpl, activityRetainedCImpl, activity);
|
|
}
|
|
}
|
|
|
|
private static final class FragmentCBuilder implements RadiolaApplication_HiltComponents.FragmentC.Builder {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private final ActivityCImpl activityCImpl;
|
|
|
|
private Fragment fragment;
|
|
|
|
private FragmentCBuilder(SingletonCImpl singletonCImpl,
|
|
ActivityRetainedCImpl activityRetainedCImpl, ActivityCImpl activityCImpl) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
this.activityCImpl = activityCImpl;
|
|
}
|
|
|
|
@Override
|
|
public FragmentCBuilder fragment(Fragment fragment) {
|
|
this.fragment = Preconditions.checkNotNull(fragment);
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public RadiolaApplication_HiltComponents.FragmentC build() {
|
|
Preconditions.checkBuilderRequirement(fragment, Fragment.class);
|
|
return new FragmentCImpl(singletonCImpl, activityRetainedCImpl, activityCImpl, fragment);
|
|
}
|
|
}
|
|
|
|
private static final class ViewWithFragmentCBuilder implements RadiolaApplication_HiltComponents.ViewWithFragmentC.Builder {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private final ActivityCImpl activityCImpl;
|
|
|
|
private final FragmentCImpl fragmentCImpl;
|
|
|
|
private View view;
|
|
|
|
private ViewWithFragmentCBuilder(SingletonCImpl singletonCImpl,
|
|
ActivityRetainedCImpl activityRetainedCImpl, ActivityCImpl activityCImpl,
|
|
FragmentCImpl fragmentCImpl) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
this.activityCImpl = activityCImpl;
|
|
this.fragmentCImpl = fragmentCImpl;
|
|
}
|
|
|
|
@Override
|
|
public ViewWithFragmentCBuilder view(View view) {
|
|
this.view = Preconditions.checkNotNull(view);
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public RadiolaApplication_HiltComponents.ViewWithFragmentC build() {
|
|
Preconditions.checkBuilderRequirement(view, View.class);
|
|
return new ViewWithFragmentCImpl(singletonCImpl, activityRetainedCImpl, activityCImpl, fragmentCImpl, view);
|
|
}
|
|
}
|
|
|
|
private static final class ViewCBuilder implements RadiolaApplication_HiltComponents.ViewC.Builder {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private final ActivityCImpl activityCImpl;
|
|
|
|
private View view;
|
|
|
|
private ViewCBuilder(SingletonCImpl singletonCImpl, ActivityRetainedCImpl activityRetainedCImpl,
|
|
ActivityCImpl activityCImpl) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
this.activityCImpl = activityCImpl;
|
|
}
|
|
|
|
@Override
|
|
public ViewCBuilder view(View view) {
|
|
this.view = Preconditions.checkNotNull(view);
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public RadiolaApplication_HiltComponents.ViewC build() {
|
|
Preconditions.checkBuilderRequirement(view, View.class);
|
|
return new ViewCImpl(singletonCImpl, activityRetainedCImpl, activityCImpl, view);
|
|
}
|
|
}
|
|
|
|
private static final class ViewModelCBuilder implements RadiolaApplication_HiltComponents.ViewModelC.Builder {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private SavedStateHandle savedStateHandle;
|
|
|
|
private ViewModelLifecycle viewModelLifecycle;
|
|
|
|
private ViewModelCBuilder(SingletonCImpl singletonCImpl,
|
|
ActivityRetainedCImpl activityRetainedCImpl) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
}
|
|
|
|
@Override
|
|
public ViewModelCBuilder savedStateHandle(SavedStateHandle handle) {
|
|
this.savedStateHandle = Preconditions.checkNotNull(handle);
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public ViewModelCBuilder viewModelLifecycle(ViewModelLifecycle viewModelLifecycle) {
|
|
this.viewModelLifecycle = Preconditions.checkNotNull(viewModelLifecycle);
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public RadiolaApplication_HiltComponents.ViewModelC build() {
|
|
Preconditions.checkBuilderRequirement(savedStateHandle, SavedStateHandle.class);
|
|
Preconditions.checkBuilderRequirement(viewModelLifecycle, ViewModelLifecycle.class);
|
|
return new ViewModelCImpl(singletonCImpl, activityRetainedCImpl, savedStateHandle, viewModelLifecycle);
|
|
}
|
|
}
|
|
|
|
private static final class ServiceCBuilder implements RadiolaApplication_HiltComponents.ServiceC.Builder {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private Service service;
|
|
|
|
private ServiceCBuilder(SingletonCImpl singletonCImpl) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
}
|
|
|
|
@Override
|
|
public ServiceCBuilder service(Service service) {
|
|
this.service = Preconditions.checkNotNull(service);
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public RadiolaApplication_HiltComponents.ServiceC build() {
|
|
Preconditions.checkBuilderRequirement(service, Service.class);
|
|
return new ServiceCImpl(singletonCImpl, service);
|
|
}
|
|
}
|
|
|
|
private static final class ViewWithFragmentCImpl extends RadiolaApplication_HiltComponents.ViewWithFragmentC {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private final ActivityCImpl activityCImpl;
|
|
|
|
private final FragmentCImpl fragmentCImpl;
|
|
|
|
private final ViewWithFragmentCImpl viewWithFragmentCImpl = this;
|
|
|
|
private ViewWithFragmentCImpl(SingletonCImpl singletonCImpl,
|
|
ActivityRetainedCImpl activityRetainedCImpl, ActivityCImpl activityCImpl,
|
|
FragmentCImpl fragmentCImpl, View viewParam) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
this.activityCImpl = activityCImpl;
|
|
this.fragmentCImpl = fragmentCImpl;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
private static final class FragmentCImpl extends RadiolaApplication_HiltComponents.FragmentC {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private final ActivityCImpl activityCImpl;
|
|
|
|
private final FragmentCImpl fragmentCImpl = this;
|
|
|
|
private FragmentCImpl(SingletonCImpl singletonCImpl,
|
|
ActivityRetainedCImpl activityRetainedCImpl, ActivityCImpl activityCImpl,
|
|
Fragment fragmentParam) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
this.activityCImpl = activityCImpl;
|
|
|
|
|
|
}
|
|
|
|
@Override
|
|
public DefaultViewModelFactories.InternalFactoryFactory getHiltInternalFactoryFactory() {
|
|
return activityCImpl.getHiltInternalFactoryFactory();
|
|
}
|
|
|
|
@Override
|
|
public ViewWithFragmentComponentBuilder viewWithFragmentComponentBuilder() {
|
|
return new ViewWithFragmentCBuilder(singletonCImpl, activityRetainedCImpl, activityCImpl, fragmentCImpl);
|
|
}
|
|
}
|
|
|
|
private static final class ViewCImpl extends RadiolaApplication_HiltComponents.ViewC {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private final ActivityCImpl activityCImpl;
|
|
|
|
private final ViewCImpl viewCImpl = this;
|
|
|
|
private ViewCImpl(SingletonCImpl singletonCImpl, ActivityRetainedCImpl activityRetainedCImpl,
|
|
ActivityCImpl activityCImpl, View viewParam) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
this.activityCImpl = activityCImpl;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
private static final class ActivityCImpl extends RadiolaApplication_HiltComponents.ActivityC {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private final ActivityCImpl activityCImpl = this;
|
|
|
|
private ActivityCImpl(SingletonCImpl singletonCImpl,
|
|
ActivityRetainedCImpl activityRetainedCImpl, Activity activityParam) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
|
|
|
|
}
|
|
|
|
@Override
|
|
public void injectMainActivity(MainActivity mainActivity) {
|
|
}
|
|
|
|
@Override
|
|
public DefaultViewModelFactories.InternalFactoryFactory getHiltInternalFactoryFactory() {
|
|
return DefaultViewModelFactories_InternalFactoryFactory_Factory.newInstance(getViewModelKeys(), new ViewModelCBuilder(singletonCImpl, activityRetainedCImpl));
|
|
}
|
|
|
|
@Override
|
|
public Map<Class<?>, Boolean> getViewModelKeys() {
|
|
return LazyClassKeyMap.<Boolean>of(ImmutableMap.<String, Boolean>builderWithExpectedSize(6).put(LazyClassKeyProvider.com_radiola_ui_favorites_FavoritesViewModel, FavoritesViewModel_HiltModules.KeyModule.provide()).put(LazyClassKeyProvider.com_radiola_ui_history_HistoryViewModel, HistoryViewModel_HiltModules.KeyModule.provide()).put(LazyClassKeyProvider.com_radiola_ui_player_PlayerViewModel, PlayerViewModel_HiltModules.KeyModule.provide()).put(LazyClassKeyProvider.com_radiola_ui_recordings_RecordingsViewModel, RecordingsViewModel_HiltModules.KeyModule.provide()).put(LazyClassKeyProvider.com_radiola_ui_settings_SettingsViewModel, SettingsViewModel_HiltModules.KeyModule.provide()).put(LazyClassKeyProvider.com_radiola_ui_stations_StationsViewModel, StationsViewModel_HiltModules.KeyModule.provide()).build());
|
|
}
|
|
|
|
@Override
|
|
public ViewModelComponentBuilder getViewModelComponentBuilder() {
|
|
return new ViewModelCBuilder(singletonCImpl, activityRetainedCImpl);
|
|
}
|
|
|
|
@Override
|
|
public FragmentComponentBuilder fragmentComponentBuilder() {
|
|
return new FragmentCBuilder(singletonCImpl, activityRetainedCImpl, activityCImpl);
|
|
}
|
|
|
|
@Override
|
|
public ViewComponentBuilder viewComponentBuilder() {
|
|
return new ViewCBuilder(singletonCImpl, activityRetainedCImpl, activityCImpl);
|
|
}
|
|
|
|
@IdentifierNameString
|
|
private static final class LazyClassKeyProvider {
|
|
static String com_radiola_ui_history_HistoryViewModel = "com.radiola.ui.history.HistoryViewModel";
|
|
|
|
static String com_radiola_ui_favorites_FavoritesViewModel = "com.radiola.ui.favorites.FavoritesViewModel";
|
|
|
|
static String com_radiola_ui_recordings_RecordingsViewModel = "com.radiola.ui.recordings.RecordingsViewModel";
|
|
|
|
static String com_radiola_ui_settings_SettingsViewModel = "com.radiola.ui.settings.SettingsViewModel";
|
|
|
|
static String com_radiola_ui_stations_StationsViewModel = "com.radiola.ui.stations.StationsViewModel";
|
|
|
|
static String com_radiola_ui_player_PlayerViewModel = "com.radiola.ui.player.PlayerViewModel";
|
|
|
|
@KeepFieldType
|
|
HistoryViewModel com_radiola_ui_history_HistoryViewModel2;
|
|
|
|
@KeepFieldType
|
|
FavoritesViewModel com_radiola_ui_favorites_FavoritesViewModel2;
|
|
|
|
@KeepFieldType
|
|
RecordingsViewModel com_radiola_ui_recordings_RecordingsViewModel2;
|
|
|
|
@KeepFieldType
|
|
SettingsViewModel com_radiola_ui_settings_SettingsViewModel2;
|
|
|
|
@KeepFieldType
|
|
StationsViewModel com_radiola_ui_stations_StationsViewModel2;
|
|
|
|
@KeepFieldType
|
|
PlayerViewModel com_radiola_ui_player_PlayerViewModel2;
|
|
}
|
|
}
|
|
|
|
private static final class ViewModelCImpl extends RadiolaApplication_HiltComponents.ViewModelC {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private final ViewModelCImpl viewModelCImpl = this;
|
|
|
|
private Provider<FavoritesViewModel> favoritesViewModelProvider;
|
|
|
|
private Provider<HistoryViewModel> historyViewModelProvider;
|
|
|
|
private Provider<PlayerViewModel> playerViewModelProvider;
|
|
|
|
private Provider<RecordingsViewModel> recordingsViewModelProvider;
|
|
|
|
private Provider<SettingsViewModel> settingsViewModelProvider;
|
|
|
|
private Provider<StationsViewModel> stationsViewModelProvider;
|
|
|
|
private ViewModelCImpl(SingletonCImpl singletonCImpl,
|
|
ActivityRetainedCImpl activityRetainedCImpl, SavedStateHandle savedStateHandleParam,
|
|
ViewModelLifecycle viewModelLifecycleParam) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
|
|
initialize(savedStateHandleParam, viewModelLifecycleParam);
|
|
|
|
}
|
|
|
|
private ToggleFavoriteUseCase toggleFavoriteUseCase() {
|
|
return new ToggleFavoriteUseCase(singletonCImpl.provideFavoritesRepositoryProvider.get());
|
|
}
|
|
|
|
private GetStationsUseCase getStationsUseCase() {
|
|
return new GetStationsUseCase(singletonCImpl.provideStationRepositoryProvider.get());
|
|
}
|
|
|
|
private GetNowPlayingUseCase getNowPlayingUseCase() {
|
|
return new GetNowPlayingUseCase(singletonCImpl.provideNowPlayingRepositoryProvider.get());
|
|
}
|
|
|
|
private TestStationsUseCase testStationsUseCase() {
|
|
return new TestStationsUseCase(singletonCImpl.provideStationRepositoryProvider.get(), singletonCImpl.provideNowPlayingRepositoryProvider.get(), singletonCImpl.stationTesterProvider.get());
|
|
}
|
|
|
|
private RefreshStationsUseCase refreshStationsUseCase() {
|
|
return new RefreshStationsUseCase(singletonCImpl.provideStationRepositoryProvider.get());
|
|
}
|
|
|
|
private PlayStationUseCase playStationUseCase() {
|
|
return new PlayStationUseCase(singletonCImpl.provideSettingsRepositoryProvider.get());
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
private void initialize(final SavedStateHandle savedStateHandleParam,
|
|
final ViewModelLifecycle viewModelLifecycleParam) {
|
|
this.favoritesViewModelProvider = new SwitchingProvider<>(singletonCImpl, activityRetainedCImpl, viewModelCImpl, 0);
|
|
this.historyViewModelProvider = new SwitchingProvider<>(singletonCImpl, activityRetainedCImpl, viewModelCImpl, 1);
|
|
this.playerViewModelProvider = new SwitchingProvider<>(singletonCImpl, activityRetainedCImpl, viewModelCImpl, 2);
|
|
this.recordingsViewModelProvider = new SwitchingProvider<>(singletonCImpl, activityRetainedCImpl, viewModelCImpl, 3);
|
|
this.settingsViewModelProvider = new SwitchingProvider<>(singletonCImpl, activityRetainedCImpl, viewModelCImpl, 4);
|
|
this.stationsViewModelProvider = new SwitchingProvider<>(singletonCImpl, activityRetainedCImpl, viewModelCImpl, 5);
|
|
}
|
|
|
|
@Override
|
|
public Map<Class<?>, javax.inject.Provider<ViewModel>> getHiltViewModelMap() {
|
|
return LazyClassKeyMap.<javax.inject.Provider<ViewModel>>of(ImmutableMap.<String, javax.inject.Provider<ViewModel>>builderWithExpectedSize(6).put(LazyClassKeyProvider.com_radiola_ui_favorites_FavoritesViewModel, ((Provider) favoritesViewModelProvider)).put(LazyClassKeyProvider.com_radiola_ui_history_HistoryViewModel, ((Provider) historyViewModelProvider)).put(LazyClassKeyProvider.com_radiola_ui_player_PlayerViewModel, ((Provider) playerViewModelProvider)).put(LazyClassKeyProvider.com_radiola_ui_recordings_RecordingsViewModel, ((Provider) recordingsViewModelProvider)).put(LazyClassKeyProvider.com_radiola_ui_settings_SettingsViewModel, ((Provider) settingsViewModelProvider)).put(LazyClassKeyProvider.com_radiola_ui_stations_StationsViewModel, ((Provider) stationsViewModelProvider)).build());
|
|
}
|
|
|
|
@Override
|
|
public Map<Class<?>, Object> getHiltViewModelAssistedMap() {
|
|
return ImmutableMap.<Class<?>, Object>of();
|
|
}
|
|
|
|
@IdentifierNameString
|
|
private static final class LazyClassKeyProvider {
|
|
static String com_radiola_ui_stations_StationsViewModel = "com.radiola.ui.stations.StationsViewModel";
|
|
|
|
static String com_radiola_ui_favorites_FavoritesViewModel = "com.radiola.ui.favorites.FavoritesViewModel";
|
|
|
|
static String com_radiola_ui_recordings_RecordingsViewModel = "com.radiola.ui.recordings.RecordingsViewModel";
|
|
|
|
static String com_radiola_ui_settings_SettingsViewModel = "com.radiola.ui.settings.SettingsViewModel";
|
|
|
|
static String com_radiola_ui_history_HistoryViewModel = "com.radiola.ui.history.HistoryViewModel";
|
|
|
|
static String com_radiola_ui_player_PlayerViewModel = "com.radiola.ui.player.PlayerViewModel";
|
|
|
|
@KeepFieldType
|
|
StationsViewModel com_radiola_ui_stations_StationsViewModel2;
|
|
|
|
@KeepFieldType
|
|
FavoritesViewModel com_radiola_ui_favorites_FavoritesViewModel2;
|
|
|
|
@KeepFieldType
|
|
RecordingsViewModel com_radiola_ui_recordings_RecordingsViewModel2;
|
|
|
|
@KeepFieldType
|
|
SettingsViewModel com_radiola_ui_settings_SettingsViewModel2;
|
|
|
|
@KeepFieldType
|
|
HistoryViewModel com_radiola_ui_history_HistoryViewModel2;
|
|
|
|
@KeepFieldType
|
|
PlayerViewModel com_radiola_ui_player_PlayerViewModel2;
|
|
}
|
|
|
|
private static final class SwitchingProvider<T> implements Provider<T> {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private final ViewModelCImpl viewModelCImpl;
|
|
|
|
private final int id;
|
|
|
|
SwitchingProvider(SingletonCImpl singletonCImpl, ActivityRetainedCImpl activityRetainedCImpl,
|
|
ViewModelCImpl viewModelCImpl, int id) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
this.viewModelCImpl = viewModelCImpl;
|
|
this.id = id;
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
@Override
|
|
public T get() {
|
|
switch (id) {
|
|
case 0: // com.radiola.ui.favorites.FavoritesViewModel
|
|
return (T) new FavoritesViewModel(singletonCImpl.provideFavoritesRepositoryProvider.get(), viewModelCImpl.toggleFavoriteUseCase());
|
|
|
|
case 1: // com.radiola.ui.history.HistoryViewModel
|
|
return (T) new HistoryViewModel(singletonCImpl.provideTrackHistoryRepositoryProvider.get());
|
|
|
|
case 2: // com.radiola.ui.player.PlayerViewModel
|
|
return (T) new PlayerViewModel(singletonCImpl.playerControllerProvider.get(), singletonCImpl.provideStationRepositoryProvider.get(), singletonCImpl.provideNowPlayingRepositoryProvider.get(), viewModelCImpl.getStationsUseCase(), viewModelCImpl.getNowPlayingUseCase(), new SearchTrackInServiceUseCase(), viewModelCImpl.toggleFavoriteUseCase(), singletonCImpl.provideTrackHistoryRepositoryProvider.get(), singletonCImpl.provideSettingsRepositoryProvider.get(), singletonCImpl.provideRecordingRepositoryProvider.get());
|
|
|
|
case 3: // com.radiola.ui.recordings.RecordingsViewModel
|
|
return (T) new RecordingsViewModel(singletonCImpl.provideRecordingRepositoryProvider.get());
|
|
|
|
case 4: // com.radiola.ui.settings.SettingsViewModel
|
|
return (T) new SettingsViewModel(singletonCImpl.provideSettingsRepositoryProvider.get(), viewModelCImpl.testStationsUseCase());
|
|
|
|
case 5: // com.radiola.ui.stations.StationsViewModel
|
|
return (T) new StationsViewModel(viewModelCImpl.getStationsUseCase(), viewModelCImpl.refreshStationsUseCase(), viewModelCImpl.playStationUseCase(), viewModelCImpl.toggleFavoriteUseCase(), singletonCImpl.provideFavoritesRepositoryProvider.get(), singletonCImpl.provideStationRepositoryProvider.get());
|
|
|
|
default: throw new AssertionError(id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private static final class ActivityRetainedCImpl extends RadiolaApplication_HiltComponents.ActivityRetainedC {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl = this;
|
|
|
|
private Provider<ActivityRetainedLifecycle> provideActivityRetainedLifecycleProvider;
|
|
|
|
private ActivityRetainedCImpl(SingletonCImpl singletonCImpl,
|
|
SavedStateHandleHolder savedStateHandleHolderParam) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
|
|
initialize(savedStateHandleHolderParam);
|
|
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
private void initialize(final SavedStateHandleHolder savedStateHandleHolderParam) {
|
|
this.provideActivityRetainedLifecycleProvider = DoubleCheck.provider(new SwitchingProvider<ActivityRetainedLifecycle>(singletonCImpl, activityRetainedCImpl, 0));
|
|
}
|
|
|
|
@Override
|
|
public ActivityComponentBuilder activityComponentBuilder() {
|
|
return new ActivityCBuilder(singletonCImpl, activityRetainedCImpl);
|
|
}
|
|
|
|
@Override
|
|
public ActivityRetainedLifecycle getActivityRetainedLifecycle() {
|
|
return provideActivityRetainedLifecycleProvider.get();
|
|
}
|
|
|
|
private static final class SwitchingProvider<T> implements Provider<T> {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ActivityRetainedCImpl activityRetainedCImpl;
|
|
|
|
private final int id;
|
|
|
|
SwitchingProvider(SingletonCImpl singletonCImpl, ActivityRetainedCImpl activityRetainedCImpl,
|
|
int id) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.activityRetainedCImpl = activityRetainedCImpl;
|
|
this.id = id;
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
@Override
|
|
public T get() {
|
|
switch (id) {
|
|
case 0: // dagger.hilt.android.ActivityRetainedLifecycle
|
|
return (T) ActivityRetainedComponentManager_LifecycleModule_ProvideActivityRetainedLifecycleFactory.provideActivityRetainedLifecycle();
|
|
|
|
default: throw new AssertionError(id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private static final class ServiceCImpl extends RadiolaApplication_HiltComponents.ServiceC {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final ServiceCImpl serviceCImpl = this;
|
|
|
|
private ServiceCImpl(SingletonCImpl singletonCImpl, Service serviceParam) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
|
|
|
|
}
|
|
|
|
@Override
|
|
public void injectPlayerService(PlayerService playerService) {
|
|
injectPlayerService2(playerService);
|
|
}
|
|
|
|
private PlayerService injectPlayerService2(PlayerService instance) {
|
|
PlayerService_MembersInjector.injectPlayerController(instance, singletonCImpl.playerControllerProvider.get());
|
|
return instance;
|
|
}
|
|
}
|
|
|
|
private static final class SingletonCImpl extends RadiolaApplication_HiltComponents.SingletonC {
|
|
private final ApplicationContextModule applicationContextModule;
|
|
|
|
private final SingletonCImpl singletonCImpl = this;
|
|
|
|
private Provider<AppDatabase> provideDatabaseProvider;
|
|
|
|
private Provider<FavoritesRepository> provideFavoritesRepositoryProvider;
|
|
|
|
private Provider<TrackHistoryRepository> provideTrackHistoryRepositoryProvider;
|
|
|
|
private Provider<PlayerController> playerControllerProvider;
|
|
|
|
private Provider<OkHttpClient> provideOkHttpClientProvider;
|
|
|
|
private Provider<Json> provideJsonProvider;
|
|
|
|
private Provider<Retrofit> provideRetrofitProvider;
|
|
|
|
private Provider<RecordApi> provideRecordApiProvider;
|
|
|
|
private Provider<LocalStationDataSource> provideLocalStationDataSourceProvider;
|
|
|
|
private Provider<StationRepository> provideStationRepositoryProvider;
|
|
|
|
private Provider<NowPlayingRepository> provideNowPlayingRepositoryProvider;
|
|
|
|
private Provider<SettingsRepository> provideSettingsRepositoryProvider;
|
|
|
|
private Provider<RecordingRepository> provideRecordingRepositoryProvider;
|
|
|
|
private Provider<StationTester> stationTesterProvider;
|
|
|
|
private SingletonCImpl(ApplicationContextModule applicationContextModuleParam) {
|
|
this.applicationContextModule = applicationContextModuleParam;
|
|
initialize(applicationContextModuleParam);
|
|
|
|
}
|
|
|
|
private FavoritesRepositoryImpl favoritesRepositoryImpl() {
|
|
return new FavoritesRepositoryImpl(provideDatabaseProvider.get());
|
|
}
|
|
|
|
private TrackHistoryRepositoryImpl trackHistoryRepositoryImpl() {
|
|
return new TrackHistoryRepositoryImpl(provideDatabaseProvider.get());
|
|
}
|
|
|
|
private StationRepositoryImpl stationRepositoryImpl() {
|
|
return new StationRepositoryImpl(provideRecordApiProvider.get(), provideDatabaseProvider.get(), provideLocalStationDataSourceProvider.get());
|
|
}
|
|
|
|
private NowPlayingRepositoryImpl nowPlayingRepositoryImpl() {
|
|
return new NowPlayingRepositoryImpl(provideRecordApiProvider.get());
|
|
}
|
|
|
|
private SettingsRepositoryImpl settingsRepositoryImpl() {
|
|
return new SettingsRepositoryImpl(ApplicationContextModule_ProvideContextFactory.provideContext(applicationContextModule));
|
|
}
|
|
|
|
private RecordingRepositoryImpl recordingRepositoryImpl() {
|
|
return new RecordingRepositoryImpl(provideDatabaseProvider.get(), provideOkHttpClientProvider.get(), ApplicationContextModule_ProvideContextFactory.provideContext(applicationContextModule));
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
private void initialize(final ApplicationContextModule applicationContextModuleParam) {
|
|
this.provideDatabaseProvider = DoubleCheck.provider(new SwitchingProvider<AppDatabase>(singletonCImpl, 1));
|
|
this.provideFavoritesRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<FavoritesRepository>(singletonCImpl, 0));
|
|
this.provideTrackHistoryRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<TrackHistoryRepository>(singletonCImpl, 2));
|
|
this.playerControllerProvider = DoubleCheck.provider(new SwitchingProvider<PlayerController>(singletonCImpl, 3));
|
|
this.provideOkHttpClientProvider = DoubleCheck.provider(new SwitchingProvider<OkHttpClient>(singletonCImpl, 7));
|
|
this.provideJsonProvider = DoubleCheck.provider(new SwitchingProvider<Json>(singletonCImpl, 8));
|
|
this.provideRetrofitProvider = DoubleCheck.provider(new SwitchingProvider<Retrofit>(singletonCImpl, 6));
|
|
this.provideRecordApiProvider = DoubleCheck.provider(new SwitchingProvider<RecordApi>(singletonCImpl, 5));
|
|
this.provideLocalStationDataSourceProvider = DoubleCheck.provider(new SwitchingProvider<LocalStationDataSource>(singletonCImpl, 9));
|
|
this.provideStationRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<StationRepository>(singletonCImpl, 4));
|
|
this.provideNowPlayingRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<NowPlayingRepository>(singletonCImpl, 10));
|
|
this.provideSettingsRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<SettingsRepository>(singletonCImpl, 11));
|
|
this.provideRecordingRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<RecordingRepository>(singletonCImpl, 12));
|
|
this.stationTesterProvider = DoubleCheck.provider(new SwitchingProvider<StationTester>(singletonCImpl, 13));
|
|
}
|
|
|
|
@Override
|
|
public void injectRadiolaApplication(RadiolaApplication radiolaApplication) {
|
|
}
|
|
|
|
@Override
|
|
public Set<Boolean> getDisableFragmentGetContextFix() {
|
|
return ImmutableSet.<Boolean>of();
|
|
}
|
|
|
|
@Override
|
|
public ActivityRetainedComponentBuilder retainedComponentBuilder() {
|
|
return new ActivityRetainedCBuilder(singletonCImpl);
|
|
}
|
|
|
|
@Override
|
|
public ServiceComponentBuilder serviceComponentBuilder() {
|
|
return new ServiceCBuilder(singletonCImpl);
|
|
}
|
|
|
|
private static final class SwitchingProvider<T> implements Provider<T> {
|
|
private final SingletonCImpl singletonCImpl;
|
|
|
|
private final int id;
|
|
|
|
SwitchingProvider(SingletonCImpl singletonCImpl, int id) {
|
|
this.singletonCImpl = singletonCImpl;
|
|
this.id = id;
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
@Override
|
|
public T get() {
|
|
switch (id) {
|
|
case 0: // com.radiola.domain.repository.FavoritesRepository
|
|
return (T) AppModule_ProvideFavoritesRepositoryFactory.provideFavoritesRepository(singletonCImpl.favoritesRepositoryImpl());
|
|
|
|
case 1: // com.radiola.data.local.AppDatabase
|
|
return (T) AppModule_ProvideDatabaseFactory.provideDatabase(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule));
|
|
|
|
case 2: // com.radiola.domain.repository.TrackHistoryRepository
|
|
return (T) AppModule_ProvideTrackHistoryRepositoryFactory.provideTrackHistoryRepository(singletonCImpl.trackHistoryRepositoryImpl());
|
|
|
|
case 3: // com.radiola.service.PlayerController
|
|
return (T) new PlayerController(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule));
|
|
|
|
case 4: // com.radiola.domain.repository.StationRepository
|
|
return (T) AppModule_ProvideStationRepositoryFactory.provideStationRepository(singletonCImpl.stationRepositoryImpl());
|
|
|
|
case 5: // com.radiola.data.remote.RecordApi
|
|
return (T) AppModule_ProvideRecordApiFactory.provideRecordApi(singletonCImpl.provideRetrofitProvider.get());
|
|
|
|
case 6: // retrofit2.Retrofit
|
|
return (T) AppModule_ProvideRetrofitFactory.provideRetrofit(singletonCImpl.provideOkHttpClientProvider.get(), singletonCImpl.provideJsonProvider.get());
|
|
|
|
case 7: // okhttp3.OkHttpClient
|
|
return (T) AppModule_ProvideOkHttpClientFactory.provideOkHttpClient();
|
|
|
|
case 8: // kotlinx.serialization.json.Json
|
|
return (T) AppModule_ProvideJsonFactory.provideJson();
|
|
|
|
case 9: // com.radiola.data.local.LocalStationDataSource
|
|
return (T) AppModule_ProvideLocalStationDataSourceFactory.provideLocalStationDataSource(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule), singletonCImpl.provideJsonProvider.get());
|
|
|
|
case 10: // com.radiola.domain.repository.NowPlayingRepository
|
|
return (T) AppModule_ProvideNowPlayingRepositoryFactory.provideNowPlayingRepository(singletonCImpl.nowPlayingRepositoryImpl());
|
|
|
|
case 11: // com.radiola.domain.repository.SettingsRepository
|
|
return (T) AppModule_ProvideSettingsRepositoryFactory.provideSettingsRepository(singletonCImpl.settingsRepositoryImpl());
|
|
|
|
case 12: // com.radiola.domain.repository.RecordingRepository
|
|
return (T) AppModule_ProvideRecordingRepositoryFactory.provideRecordingRepository(singletonCImpl.recordingRepositoryImpl());
|
|
|
|
case 13: // com.radiola.data.repository.StationTester
|
|
return (T) new StationTester(singletonCImpl.provideOkHttpClientProvider.get());
|
|
|
|
default: throw new AssertionError(id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|