feat: auth screen with auto-redirect, sync favorites/history with backend

This commit is contained in:
nk
2026-06-02 19:12:07 +03:00
parent d4adb1e7be
commit a83672b455
2934 changed files with 97351 additions and 163 deletions

View File

@@ -0,0 +1,290 @@
package com.radiola.data.local;
import androidx.annotation.NonNull;
import androidx.room.DatabaseConfiguration;
import androidx.room.InvalidationTracker;
import androidx.room.RoomDatabase;
import androidx.room.RoomOpenHelper;
import androidx.room.migration.AutoMigrationSpec;
import androidx.room.migration.Migration;
import androidx.room.util.DBUtil;
import androidx.room.util.TableInfo;
import androidx.sqlite.db.SupportSQLiteDatabase;
import androidx.sqlite.db.SupportSQLiteOpenHelper;
import com.radiola.data.local.dao.RecordingDao;
import com.radiola.data.local.dao.RecordingDao_Impl;
import com.radiola.data.local.dao.StationDao;
import com.radiola.data.local.dao.StationDao_Impl;
import com.radiola.data.local.dao.TagDao;
import com.radiola.data.local.dao.TagDao_Impl;
import com.radiola.data.local.dao.TrackHistoryDao;
import com.radiola.data.local.dao.TrackHistoryDao_Impl;
import java.lang.Class;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.processing.Generated;
@Generated("androidx.room.RoomProcessor")
@SuppressWarnings({"unchecked", "deprecation"})
public final class AppDatabase_Impl extends AppDatabase {
private volatile StationDao _stationDao;
private volatile TrackHistoryDao _trackHistoryDao;
private volatile TagDao _tagDao;
private volatile RecordingDao _recordingDao;
@Override
@NonNull
protected SupportSQLiteOpenHelper createOpenHelper(@NonNull final DatabaseConfiguration config) {
final SupportSQLiteOpenHelper.Callback _openCallback = new RoomOpenHelper(config, new RoomOpenHelper.Delegate(4) {
@Override
public void createAllTables(@NonNull final SupportSQLiteDatabase db) {
db.execSQL("CREATE TABLE IF NOT EXISTS `stations` (`id` INTEGER NOT NULL, `name` TEXT NOT NULL, `prefix` TEXT NOT NULL, `streamUrl` TEXT NOT NULL, `coverUrl` TEXT NOT NULL, `genre` TEXT NOT NULL, `tags` TEXT NOT NULL, `sortOrder` INTEGER NOT NULL, `source` TEXT NOT NULL, `isFavorite` INTEGER NOT NULL, PRIMARY KEY(`id`))");
db.execSQL("CREATE TABLE IF NOT EXISTS `track_history` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `artist` TEXT NOT NULL, `song` TEXT NOT NULL, `stationName` TEXT NOT NULL, `coverUrl` TEXT, `timestamp` INTEGER NOT NULL)");
db.execSQL("CREATE TABLE IF NOT EXISTS `tags` (`name` TEXT NOT NULL, PRIMARY KEY(`name`))");
db.execSQL("CREATE TABLE IF NOT EXISTS `recordings` (`id` INTEGER NOT NULL, `stationName` TEXT NOT NULL, `stationId` INTEGER NOT NULL, `filePath` TEXT NOT NULL, `startTime` INTEGER NOT NULL, `endTime` INTEGER, `trackName` TEXT, `duration` INTEGER, PRIMARY KEY(`id`))");
db.execSQL("CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)");
db.execSQL("INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e66acf3ece4f92f5907a7e4e20146574')");
}
@Override
public void dropAllTables(@NonNull final SupportSQLiteDatabase db) {
db.execSQL("DROP TABLE IF EXISTS `stations`");
db.execSQL("DROP TABLE IF EXISTS `track_history`");
db.execSQL("DROP TABLE IF EXISTS `tags`");
db.execSQL("DROP TABLE IF EXISTS `recordings`");
final List<? extends RoomDatabase.Callback> _callbacks = mCallbacks;
if (_callbacks != null) {
for (RoomDatabase.Callback _callback : _callbacks) {
_callback.onDestructiveMigration(db);
}
}
}
@Override
public void onCreate(@NonNull final SupportSQLiteDatabase db) {
final List<? extends RoomDatabase.Callback> _callbacks = mCallbacks;
if (_callbacks != null) {
for (RoomDatabase.Callback _callback : _callbacks) {
_callback.onCreate(db);
}
}
}
@Override
public void onOpen(@NonNull final SupportSQLiteDatabase db) {
mDatabase = db;
internalInitInvalidationTracker(db);
final List<? extends RoomDatabase.Callback> _callbacks = mCallbacks;
if (_callbacks != null) {
for (RoomDatabase.Callback _callback : _callbacks) {
_callback.onOpen(db);
}
}
}
@Override
public void onPreMigrate(@NonNull final SupportSQLiteDatabase db) {
DBUtil.dropFtsSyncTriggers(db);
}
@Override
public void onPostMigrate(@NonNull final SupportSQLiteDatabase db) {
}
@Override
@NonNull
public RoomOpenHelper.ValidationResult onValidateSchema(
@NonNull final SupportSQLiteDatabase db) {
final HashMap<String, TableInfo.Column> _columnsStations = new HashMap<String, TableInfo.Column>(10);
_columnsStations.put("id", new TableInfo.Column("id", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY));
_columnsStations.put("name", new TableInfo.Column("name", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsStations.put("prefix", new TableInfo.Column("prefix", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsStations.put("streamUrl", new TableInfo.Column("streamUrl", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsStations.put("coverUrl", new TableInfo.Column("coverUrl", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsStations.put("genre", new TableInfo.Column("genre", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsStations.put("tags", new TableInfo.Column("tags", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsStations.put("sortOrder", new TableInfo.Column("sortOrder", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsStations.put("source", new TableInfo.Column("source", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsStations.put("isFavorite", new TableInfo.Column("isFavorite", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
final HashSet<TableInfo.ForeignKey> _foreignKeysStations = new HashSet<TableInfo.ForeignKey>(0);
final HashSet<TableInfo.Index> _indicesStations = new HashSet<TableInfo.Index>(0);
final TableInfo _infoStations = new TableInfo("stations", _columnsStations, _foreignKeysStations, _indicesStations);
final TableInfo _existingStations = TableInfo.read(db, "stations");
if (!_infoStations.equals(_existingStations)) {
return new RoomOpenHelper.ValidationResult(false, "stations(com.radiola.data.local.entity.StationEntity).\n"
+ " Expected:\n" + _infoStations + "\n"
+ " Found:\n" + _existingStations);
}
final HashMap<String, TableInfo.Column> _columnsTrackHistory = new HashMap<String, TableInfo.Column>(6);
_columnsTrackHistory.put("id", new TableInfo.Column("id", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY));
_columnsTrackHistory.put("artist", new TableInfo.Column("artist", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsTrackHistory.put("song", new TableInfo.Column("song", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsTrackHistory.put("stationName", new TableInfo.Column("stationName", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsTrackHistory.put("coverUrl", new TableInfo.Column("coverUrl", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsTrackHistory.put("timestamp", new TableInfo.Column("timestamp", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
final HashSet<TableInfo.ForeignKey> _foreignKeysTrackHistory = new HashSet<TableInfo.ForeignKey>(0);
final HashSet<TableInfo.Index> _indicesTrackHistory = new HashSet<TableInfo.Index>(0);
final TableInfo _infoTrackHistory = new TableInfo("track_history", _columnsTrackHistory, _foreignKeysTrackHistory, _indicesTrackHistory);
final TableInfo _existingTrackHistory = TableInfo.read(db, "track_history");
if (!_infoTrackHistory.equals(_existingTrackHistory)) {
return new RoomOpenHelper.ValidationResult(false, "track_history(com.radiola.data.local.entity.TrackHistoryEntity).\n"
+ " Expected:\n" + _infoTrackHistory + "\n"
+ " Found:\n" + _existingTrackHistory);
}
final HashMap<String, TableInfo.Column> _columnsTags = new HashMap<String, TableInfo.Column>(1);
_columnsTags.put("name", new TableInfo.Column("name", "TEXT", true, 1, null, TableInfo.CREATED_FROM_ENTITY));
final HashSet<TableInfo.ForeignKey> _foreignKeysTags = new HashSet<TableInfo.ForeignKey>(0);
final HashSet<TableInfo.Index> _indicesTags = new HashSet<TableInfo.Index>(0);
final TableInfo _infoTags = new TableInfo("tags", _columnsTags, _foreignKeysTags, _indicesTags);
final TableInfo _existingTags = TableInfo.read(db, "tags");
if (!_infoTags.equals(_existingTags)) {
return new RoomOpenHelper.ValidationResult(false, "tags(com.radiola.data.local.entity.TagEntity).\n"
+ " Expected:\n" + _infoTags + "\n"
+ " Found:\n" + _existingTags);
}
final HashMap<String, TableInfo.Column> _columnsRecordings = new HashMap<String, TableInfo.Column>(8);
_columnsRecordings.put("id", new TableInfo.Column("id", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY));
_columnsRecordings.put("stationName", new TableInfo.Column("stationName", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsRecordings.put("stationId", new TableInfo.Column("stationId", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsRecordings.put("filePath", new TableInfo.Column("filePath", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsRecordings.put("startTime", new TableInfo.Column("startTime", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsRecordings.put("endTime", new TableInfo.Column("endTime", "INTEGER", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsRecordings.put("trackName", new TableInfo.Column("trackName", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
_columnsRecordings.put("duration", new TableInfo.Column("duration", "INTEGER", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
final HashSet<TableInfo.ForeignKey> _foreignKeysRecordings = new HashSet<TableInfo.ForeignKey>(0);
final HashSet<TableInfo.Index> _indicesRecordings = new HashSet<TableInfo.Index>(0);
final TableInfo _infoRecordings = new TableInfo("recordings", _columnsRecordings, _foreignKeysRecordings, _indicesRecordings);
final TableInfo _existingRecordings = TableInfo.read(db, "recordings");
if (!_infoRecordings.equals(_existingRecordings)) {
return new RoomOpenHelper.ValidationResult(false, "recordings(com.radiola.data.local.entity.RecordingEntity).\n"
+ " Expected:\n" + _infoRecordings + "\n"
+ " Found:\n" + _existingRecordings);
}
return new RoomOpenHelper.ValidationResult(true, null);
}
}, "e66acf3ece4f92f5907a7e4e20146574", "cf0c06f8e8004ceadfe196a57366bf3d");
final SupportSQLiteOpenHelper.Configuration _sqliteConfig = SupportSQLiteOpenHelper.Configuration.builder(config.context).name(config.name).callback(_openCallback).build();
final SupportSQLiteOpenHelper _helper = config.sqliteOpenHelperFactory.create(_sqliteConfig);
return _helper;
}
@Override
@NonNull
protected InvalidationTracker createInvalidationTracker() {
final HashMap<String, String> _shadowTablesMap = new HashMap<String, String>(0);
final HashMap<String, Set<String>> _viewTables = new HashMap<String, Set<String>>(0);
return new InvalidationTracker(this, _shadowTablesMap, _viewTables, "stations","track_history","tags","recordings");
}
@Override
public void clearAllTables() {
super.assertNotMainThread();
final SupportSQLiteDatabase _db = super.getOpenHelper().getWritableDatabase();
try {
super.beginTransaction();
_db.execSQL("DELETE FROM `stations`");
_db.execSQL("DELETE FROM `track_history`");
_db.execSQL("DELETE FROM `tags`");
_db.execSQL("DELETE FROM `recordings`");
super.setTransactionSuccessful();
} finally {
super.endTransaction();
_db.query("PRAGMA wal_checkpoint(FULL)").close();
if (!_db.inTransaction()) {
_db.execSQL("VACUUM");
}
}
}
@Override
@NonNull
protected Map<Class<?>, List<Class<?>>> getRequiredTypeConverters() {
final HashMap<Class<?>, List<Class<?>>> _typeConvertersMap = new HashMap<Class<?>, List<Class<?>>>();
_typeConvertersMap.put(StationDao.class, StationDao_Impl.getRequiredConverters());
_typeConvertersMap.put(TrackHistoryDao.class, TrackHistoryDao_Impl.getRequiredConverters());
_typeConvertersMap.put(TagDao.class, TagDao_Impl.getRequiredConverters());
_typeConvertersMap.put(RecordingDao.class, RecordingDao_Impl.getRequiredConverters());
return _typeConvertersMap;
}
@Override
@NonNull
public Set<Class<? extends AutoMigrationSpec>> getRequiredAutoMigrationSpecs() {
final HashSet<Class<? extends AutoMigrationSpec>> _autoMigrationSpecsSet = new HashSet<Class<? extends AutoMigrationSpec>>();
return _autoMigrationSpecsSet;
}
@Override
@NonNull
public List<Migration> getAutoMigrations(
@NonNull final Map<Class<? extends AutoMigrationSpec>, AutoMigrationSpec> autoMigrationSpecs) {
final List<Migration> _autoMigrations = new ArrayList<Migration>();
return _autoMigrations;
}
@Override
public StationDao stationDao() {
if (_stationDao != null) {
return _stationDao;
} else {
synchronized(this) {
if(_stationDao == null) {
_stationDao = new StationDao_Impl(this);
}
return _stationDao;
}
}
}
@Override
public TrackHistoryDao trackHistoryDao() {
if (_trackHistoryDao != null) {
return _trackHistoryDao;
} else {
synchronized(this) {
if(_trackHistoryDao == null) {
_trackHistoryDao = new TrackHistoryDao_Impl(this);
}
return _trackHistoryDao;
}
}
}
@Override
public TagDao tagDao() {
if (_tagDao != null) {
return _tagDao;
} else {
synchronized(this) {
if(_tagDao == null) {
_tagDao = new TagDao_Impl(this);
}
return _tagDao;
}
}
}
@Override
public RecordingDao recordingDao() {
if (_recordingDao != null) {
return _recordingDao;
} else {
synchronized(this) {
if(_recordingDao == null) {
_recordingDao = new RecordingDao_Impl(this);
}
return _recordingDao;
}
}
}
}

View File

@@ -0,0 +1,50 @@
package com.radiola.data.local;
import android.content.Context;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
import kotlinx.serialization.json.Json;
@ScopeMetadata("javax.inject.Singleton")
@QualifierMetadata("dagger.hilt.android.qualifiers.ApplicationContext")
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class LocalStationDataSource_Factory implements Factory<LocalStationDataSource> {
private final Provider<Context> contextProvider;
private final Provider<Json> jsonProvider;
public LocalStationDataSource_Factory(Provider<Context> contextProvider,
Provider<Json> jsonProvider) {
this.contextProvider = contextProvider;
this.jsonProvider = jsonProvider;
}
@Override
public LocalStationDataSource get() {
return newInstance(contextProvider.get(), jsonProvider.get());
}
public static LocalStationDataSource_Factory create(Provider<Context> contextProvider,
Provider<Json> jsonProvider) {
return new LocalStationDataSource_Factory(contextProvider, jsonProvider);
}
public static LocalStationDataSource newInstance(Context context, Json json) {
return new LocalStationDataSource(context, json);
}
}

View File

@@ -0,0 +1,44 @@
package com.radiola.data.local;
import android.content.Context;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
@ScopeMetadata("javax.inject.Singleton")
@QualifierMetadata("dagger.hilt.android.qualifiers.ApplicationContext")
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class TokenDataStore_Factory implements Factory<TokenDataStore> {
private final Provider<Context> contextProvider;
public TokenDataStore_Factory(Provider<Context> contextProvider) {
this.contextProvider = contextProvider;
}
@Override
public TokenDataStore get() {
return newInstance(contextProvider.get());
}
public static TokenDataStore_Factory create(Provider<Context> contextProvider) {
return new TokenDataStore_Factory(contextProvider);
}
public static TokenDataStore newInstance(Context context) {
return new TokenDataStore(context);
}
}

View File

@@ -0,0 +1,302 @@
package com.radiola.data.local.dao;
import android.database.Cursor;
import android.os.CancellationSignal;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.room.CoroutinesRoom;
import androidx.room.EntityInsertionAdapter;
import androidx.room.RoomDatabase;
import androidx.room.RoomSQLiteQuery;
import androidx.room.SharedSQLiteStatement;
import androidx.room.util.CursorUtil;
import androidx.room.util.DBUtil;
import androidx.sqlite.db.SupportSQLiteStatement;
import com.radiola.data.local.entity.RecordingEntity;
import java.lang.Class;
import java.lang.Exception;
import java.lang.Long;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import javax.annotation.processing.Generated;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlinx.coroutines.flow.Flow;
@Generated("androidx.room.RoomProcessor")
@SuppressWarnings({"unchecked", "deprecation"})
public final class RecordingDao_Impl implements RecordingDao {
private final RoomDatabase __db;
private final EntityInsertionAdapter<RecordingEntity> __insertionAdapterOfRecordingEntity;
private final SharedSQLiteStatement __preparedStmtOfDeleteById;
private final SharedSQLiteStatement __preparedStmtOfUpdateEndTime;
public RecordingDao_Impl(@NonNull final RoomDatabase __db) {
this.__db = __db;
this.__insertionAdapterOfRecordingEntity = new EntityInsertionAdapter<RecordingEntity>(__db) {
@Override
@NonNull
protected String createQuery() {
return "INSERT OR ABORT INTO `recordings` (`id`,`stationName`,`stationId`,`filePath`,`startTime`,`endTime`,`trackName`,`duration`) VALUES (?,?,?,?,?,?,?,?)";
}
@Override
protected void bind(@NonNull final SupportSQLiteStatement statement,
@NonNull final RecordingEntity entity) {
statement.bindLong(1, entity.getId());
statement.bindString(2, entity.getStationName());
statement.bindLong(3, entity.getStationId());
statement.bindString(4, entity.getFilePath());
statement.bindLong(5, entity.getStartTime());
if (entity.getEndTime() == null) {
statement.bindNull(6);
} else {
statement.bindLong(6, entity.getEndTime());
}
if (entity.getTrackName() == null) {
statement.bindNull(7);
} else {
statement.bindString(7, entity.getTrackName());
}
if (entity.getDuration() == null) {
statement.bindNull(8);
} else {
statement.bindLong(8, entity.getDuration());
}
}
};
this.__preparedStmtOfDeleteById = new SharedSQLiteStatement(__db) {
@Override
@NonNull
public String createQuery() {
final String _query = "DELETE FROM recordings WHERE id = ?";
return _query;
}
};
this.__preparedStmtOfUpdateEndTime = new SharedSQLiteStatement(__db) {
@Override
@NonNull
public String createQuery() {
final String _query = "UPDATE recordings SET endTime = ?, duration = ? WHERE id = ?";
return _query;
}
};
}
@Override
public Object insert(final RecordingEntity recording,
final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
__db.beginTransaction();
try {
__insertionAdapterOfRecordingEntity.insert(recording);
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
}
}, $completion);
}
@Override
public Object deleteById(final long id, final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
final SupportSQLiteStatement _stmt = __preparedStmtOfDeleteById.acquire();
int _argIndex = 1;
_stmt.bindLong(_argIndex, id);
try {
__db.beginTransaction();
try {
_stmt.executeUpdateDelete();
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
} finally {
__preparedStmtOfDeleteById.release(_stmt);
}
}
}, $completion);
}
@Override
public Object updateEndTime(final long id, final long endTime, final long duration,
final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
final SupportSQLiteStatement _stmt = __preparedStmtOfUpdateEndTime.acquire();
int _argIndex = 1;
_stmt.bindLong(_argIndex, endTime);
_argIndex = 2;
_stmt.bindLong(_argIndex, duration);
_argIndex = 3;
_stmt.bindLong(_argIndex, id);
try {
__db.beginTransaction();
try {
_stmt.executeUpdateDelete();
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
} finally {
__preparedStmtOfUpdateEndTime.release(_stmt);
}
}
}, $completion);
}
@Override
public Flow<List<RecordingEntity>> getAll() {
final String _sql = "SELECT * FROM recordings ORDER BY startTime DESC";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
return CoroutinesRoom.createFlow(__db, false, new String[] {"recordings"}, new Callable<List<RecordingEntity>>() {
@Override
@NonNull
public List<RecordingEntity> call() throws Exception {
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
try {
final int _cursorIndexOfId = CursorUtil.getColumnIndexOrThrow(_cursor, "id");
final int _cursorIndexOfStationName = CursorUtil.getColumnIndexOrThrow(_cursor, "stationName");
final int _cursorIndexOfStationId = CursorUtil.getColumnIndexOrThrow(_cursor, "stationId");
final int _cursorIndexOfFilePath = CursorUtil.getColumnIndexOrThrow(_cursor, "filePath");
final int _cursorIndexOfStartTime = CursorUtil.getColumnIndexOrThrow(_cursor, "startTime");
final int _cursorIndexOfEndTime = CursorUtil.getColumnIndexOrThrow(_cursor, "endTime");
final int _cursorIndexOfTrackName = CursorUtil.getColumnIndexOrThrow(_cursor, "trackName");
final int _cursorIndexOfDuration = CursorUtil.getColumnIndexOrThrow(_cursor, "duration");
final List<RecordingEntity> _result = new ArrayList<RecordingEntity>(_cursor.getCount());
while (_cursor.moveToNext()) {
final RecordingEntity _item;
final long _tmpId;
_tmpId = _cursor.getLong(_cursorIndexOfId);
final String _tmpStationName;
_tmpStationName = _cursor.getString(_cursorIndexOfStationName);
final int _tmpStationId;
_tmpStationId = _cursor.getInt(_cursorIndexOfStationId);
final String _tmpFilePath;
_tmpFilePath = _cursor.getString(_cursorIndexOfFilePath);
final long _tmpStartTime;
_tmpStartTime = _cursor.getLong(_cursorIndexOfStartTime);
final Long _tmpEndTime;
if (_cursor.isNull(_cursorIndexOfEndTime)) {
_tmpEndTime = null;
} else {
_tmpEndTime = _cursor.getLong(_cursorIndexOfEndTime);
}
final String _tmpTrackName;
if (_cursor.isNull(_cursorIndexOfTrackName)) {
_tmpTrackName = null;
} else {
_tmpTrackName = _cursor.getString(_cursorIndexOfTrackName);
}
final Long _tmpDuration;
if (_cursor.isNull(_cursorIndexOfDuration)) {
_tmpDuration = null;
} else {
_tmpDuration = _cursor.getLong(_cursorIndexOfDuration);
}
_item = new RecordingEntity(_tmpId,_tmpStationName,_tmpStationId,_tmpFilePath,_tmpStartTime,_tmpEndTime,_tmpTrackName,_tmpDuration);
_result.add(_item);
}
return _result;
} finally {
_cursor.close();
}
}
@Override
protected void finalize() {
_statement.release();
}
});
}
@Override
public Object getById(final long id, final Continuation<? super RecordingEntity> $completion) {
final String _sql = "SELECT * FROM recordings WHERE id = ?";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 1);
int _argIndex = 1;
_statement.bindLong(_argIndex, id);
final CancellationSignal _cancellationSignal = DBUtil.createCancellationSignal();
return CoroutinesRoom.execute(__db, false, _cancellationSignal, new Callable<RecordingEntity>() {
@Override
@Nullable
public RecordingEntity call() throws Exception {
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
try {
final int _cursorIndexOfId = CursorUtil.getColumnIndexOrThrow(_cursor, "id");
final int _cursorIndexOfStationName = CursorUtil.getColumnIndexOrThrow(_cursor, "stationName");
final int _cursorIndexOfStationId = CursorUtil.getColumnIndexOrThrow(_cursor, "stationId");
final int _cursorIndexOfFilePath = CursorUtil.getColumnIndexOrThrow(_cursor, "filePath");
final int _cursorIndexOfStartTime = CursorUtil.getColumnIndexOrThrow(_cursor, "startTime");
final int _cursorIndexOfEndTime = CursorUtil.getColumnIndexOrThrow(_cursor, "endTime");
final int _cursorIndexOfTrackName = CursorUtil.getColumnIndexOrThrow(_cursor, "trackName");
final int _cursorIndexOfDuration = CursorUtil.getColumnIndexOrThrow(_cursor, "duration");
final RecordingEntity _result;
if (_cursor.moveToFirst()) {
final long _tmpId;
_tmpId = _cursor.getLong(_cursorIndexOfId);
final String _tmpStationName;
_tmpStationName = _cursor.getString(_cursorIndexOfStationName);
final int _tmpStationId;
_tmpStationId = _cursor.getInt(_cursorIndexOfStationId);
final String _tmpFilePath;
_tmpFilePath = _cursor.getString(_cursorIndexOfFilePath);
final long _tmpStartTime;
_tmpStartTime = _cursor.getLong(_cursorIndexOfStartTime);
final Long _tmpEndTime;
if (_cursor.isNull(_cursorIndexOfEndTime)) {
_tmpEndTime = null;
} else {
_tmpEndTime = _cursor.getLong(_cursorIndexOfEndTime);
}
final String _tmpTrackName;
if (_cursor.isNull(_cursorIndexOfTrackName)) {
_tmpTrackName = null;
} else {
_tmpTrackName = _cursor.getString(_cursorIndexOfTrackName);
}
final Long _tmpDuration;
if (_cursor.isNull(_cursorIndexOfDuration)) {
_tmpDuration = null;
} else {
_tmpDuration = _cursor.getLong(_cursorIndexOfDuration);
}
_result = new RecordingEntity(_tmpId,_tmpStationName,_tmpStationId,_tmpFilePath,_tmpStartTime,_tmpEndTime,_tmpTrackName,_tmpDuration);
} else {
_result = null;
}
return _result;
} finally {
_cursor.close();
_statement.release();
}
}
}, $completion);
}
@NonNull
public static List<Class<?>> getRequiredConverters() {
return Collections.emptyList();
}
}

View File

@@ -0,0 +1,420 @@
package com.radiola.data.local.dao;
import android.database.Cursor;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.room.CoroutinesRoom;
import androidx.room.EntityDeletionOrUpdateAdapter;
import androidx.room.EntityInsertionAdapter;
import androidx.room.RoomDatabase;
import androidx.room.RoomSQLiteQuery;
import androidx.room.SharedSQLiteStatement;
import androidx.room.util.CursorUtil;
import androidx.room.util.DBUtil;
import androidx.sqlite.db.SupportSQLiteStatement;
import com.radiola.data.local.entity.StationEntity;
import java.lang.Boolean;
import java.lang.Class;
import java.lang.Exception;
import java.lang.Integer;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import javax.annotation.processing.Generated;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlinx.coroutines.flow.Flow;
@Generated("androidx.room.RoomProcessor")
@SuppressWarnings({"unchecked", "deprecation"})
public final class StationDao_Impl implements StationDao {
private final RoomDatabase __db;
private final EntityInsertionAdapter<StationEntity> __insertionAdapterOfStationEntity;
private final EntityDeletionOrUpdateAdapter<StationEntity> __updateAdapterOfStationEntity;
private final SharedSQLiteStatement __preparedStmtOfSetFavorite;
public StationDao_Impl(@NonNull final RoomDatabase __db) {
this.__db = __db;
this.__insertionAdapterOfStationEntity = new EntityInsertionAdapter<StationEntity>(__db) {
@Override
@NonNull
protected String createQuery() {
return "INSERT OR REPLACE INTO `stations` (`id`,`name`,`prefix`,`streamUrl`,`coverUrl`,`genre`,`tags`,`sortOrder`,`source`,`isFavorite`) VALUES (?,?,?,?,?,?,?,?,?,?)";
}
@Override
protected void bind(@NonNull final SupportSQLiteStatement statement,
@NonNull final StationEntity entity) {
statement.bindLong(1, entity.getId());
statement.bindString(2, entity.getName());
statement.bindString(3, entity.getPrefix());
statement.bindString(4, entity.getStreamUrl());
statement.bindString(5, entity.getCoverUrl());
statement.bindString(6, entity.getGenre());
statement.bindString(7, entity.getTags());
statement.bindLong(8, entity.getSortOrder());
statement.bindString(9, entity.getSource());
final int _tmp = entity.isFavorite() ? 1 : 0;
statement.bindLong(10, _tmp);
}
};
this.__updateAdapterOfStationEntity = new EntityDeletionOrUpdateAdapter<StationEntity>(__db) {
@Override
@NonNull
protected String createQuery() {
return "UPDATE OR ABORT `stations` SET `id` = ?,`name` = ?,`prefix` = ?,`streamUrl` = ?,`coverUrl` = ?,`genre` = ?,`tags` = ?,`sortOrder` = ?,`source` = ?,`isFavorite` = ? WHERE `id` = ?";
}
@Override
protected void bind(@NonNull final SupportSQLiteStatement statement,
@NonNull final StationEntity entity) {
statement.bindLong(1, entity.getId());
statement.bindString(2, entity.getName());
statement.bindString(3, entity.getPrefix());
statement.bindString(4, entity.getStreamUrl());
statement.bindString(5, entity.getCoverUrl());
statement.bindString(6, entity.getGenre());
statement.bindString(7, entity.getTags());
statement.bindLong(8, entity.getSortOrder());
statement.bindString(9, entity.getSource());
final int _tmp = entity.isFavorite() ? 1 : 0;
statement.bindLong(10, _tmp);
statement.bindLong(11, entity.getId());
}
};
this.__preparedStmtOfSetFavorite = new SharedSQLiteStatement(__db) {
@Override
@NonNull
public String createQuery() {
final String _query = "UPDATE stations SET isFavorite = ? WHERE id = ?";
return _query;
}
};
}
@Override
public Object insertAll(final List<StationEntity> stations,
final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
__db.beginTransaction();
try {
__insertionAdapterOfStationEntity.insert(stations);
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
}
}, $completion);
}
@Override
public Object update(final StationEntity station, final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
__db.beginTransaction();
try {
__updateAdapterOfStationEntity.handle(station);
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
}
}, $completion);
}
@Override
public Object setFavorite(final int id, final boolean isFavorite,
final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
final SupportSQLiteStatement _stmt = __preparedStmtOfSetFavorite.acquire();
int _argIndex = 1;
final int _tmp = isFavorite ? 1 : 0;
_stmt.bindLong(_argIndex, _tmp);
_argIndex = 2;
_stmt.bindLong(_argIndex, id);
try {
__db.beginTransaction();
try {
_stmt.executeUpdateDelete();
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
} finally {
__preparedStmtOfSetFavorite.release(_stmt);
}
}
}, $completion);
}
@Override
public Flow<List<StationEntity>> getAll() {
final String _sql = "SELECT * FROM stations ORDER BY sortOrder ASC";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
return CoroutinesRoom.createFlow(__db, false, new String[] {"stations"}, new Callable<List<StationEntity>>() {
@Override
@NonNull
public List<StationEntity> call() throws Exception {
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
try {
final int _cursorIndexOfId = CursorUtil.getColumnIndexOrThrow(_cursor, "id");
final int _cursorIndexOfName = CursorUtil.getColumnIndexOrThrow(_cursor, "name");
final int _cursorIndexOfPrefix = CursorUtil.getColumnIndexOrThrow(_cursor, "prefix");
final int _cursorIndexOfStreamUrl = CursorUtil.getColumnIndexOrThrow(_cursor, "streamUrl");
final int _cursorIndexOfCoverUrl = CursorUtil.getColumnIndexOrThrow(_cursor, "coverUrl");
final int _cursorIndexOfGenre = CursorUtil.getColumnIndexOrThrow(_cursor, "genre");
final int _cursorIndexOfTags = CursorUtil.getColumnIndexOrThrow(_cursor, "tags");
final int _cursorIndexOfSortOrder = CursorUtil.getColumnIndexOrThrow(_cursor, "sortOrder");
final int _cursorIndexOfSource = CursorUtil.getColumnIndexOrThrow(_cursor, "source");
final int _cursorIndexOfIsFavorite = CursorUtil.getColumnIndexOrThrow(_cursor, "isFavorite");
final List<StationEntity> _result = new ArrayList<StationEntity>(_cursor.getCount());
while (_cursor.moveToNext()) {
final StationEntity _item;
final int _tmpId;
_tmpId = _cursor.getInt(_cursorIndexOfId);
final String _tmpName;
_tmpName = _cursor.getString(_cursorIndexOfName);
final String _tmpPrefix;
_tmpPrefix = _cursor.getString(_cursorIndexOfPrefix);
final String _tmpStreamUrl;
_tmpStreamUrl = _cursor.getString(_cursorIndexOfStreamUrl);
final String _tmpCoverUrl;
_tmpCoverUrl = _cursor.getString(_cursorIndexOfCoverUrl);
final String _tmpGenre;
_tmpGenre = _cursor.getString(_cursorIndexOfGenre);
final String _tmpTags;
_tmpTags = _cursor.getString(_cursorIndexOfTags);
final int _tmpSortOrder;
_tmpSortOrder = _cursor.getInt(_cursorIndexOfSortOrder);
final String _tmpSource;
_tmpSource = _cursor.getString(_cursorIndexOfSource);
final boolean _tmpIsFavorite;
final int _tmp;
_tmp = _cursor.getInt(_cursorIndexOfIsFavorite);
_tmpIsFavorite = _tmp != 0;
_item = new StationEntity(_tmpId,_tmpName,_tmpPrefix,_tmpStreamUrl,_tmpCoverUrl,_tmpGenre,_tmpTags,_tmpSortOrder,_tmpSource,_tmpIsFavorite);
_result.add(_item);
}
return _result;
} finally {
_cursor.close();
}
}
@Override
protected void finalize() {
_statement.release();
}
});
}
@Override
public Flow<List<StationEntity>> getFavorites() {
final String _sql = "SELECT * FROM stations WHERE isFavorite = 1 ORDER BY sortOrder ASC";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
return CoroutinesRoom.createFlow(__db, false, new String[] {"stations"}, new Callable<List<StationEntity>>() {
@Override
@NonNull
public List<StationEntity> call() throws Exception {
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
try {
final int _cursorIndexOfId = CursorUtil.getColumnIndexOrThrow(_cursor, "id");
final int _cursorIndexOfName = CursorUtil.getColumnIndexOrThrow(_cursor, "name");
final int _cursorIndexOfPrefix = CursorUtil.getColumnIndexOrThrow(_cursor, "prefix");
final int _cursorIndexOfStreamUrl = CursorUtil.getColumnIndexOrThrow(_cursor, "streamUrl");
final int _cursorIndexOfCoverUrl = CursorUtil.getColumnIndexOrThrow(_cursor, "coverUrl");
final int _cursorIndexOfGenre = CursorUtil.getColumnIndexOrThrow(_cursor, "genre");
final int _cursorIndexOfTags = CursorUtil.getColumnIndexOrThrow(_cursor, "tags");
final int _cursorIndexOfSortOrder = CursorUtil.getColumnIndexOrThrow(_cursor, "sortOrder");
final int _cursorIndexOfSource = CursorUtil.getColumnIndexOrThrow(_cursor, "source");
final int _cursorIndexOfIsFavorite = CursorUtil.getColumnIndexOrThrow(_cursor, "isFavorite");
final List<StationEntity> _result = new ArrayList<StationEntity>(_cursor.getCount());
while (_cursor.moveToNext()) {
final StationEntity _item;
final int _tmpId;
_tmpId = _cursor.getInt(_cursorIndexOfId);
final String _tmpName;
_tmpName = _cursor.getString(_cursorIndexOfName);
final String _tmpPrefix;
_tmpPrefix = _cursor.getString(_cursorIndexOfPrefix);
final String _tmpStreamUrl;
_tmpStreamUrl = _cursor.getString(_cursorIndexOfStreamUrl);
final String _tmpCoverUrl;
_tmpCoverUrl = _cursor.getString(_cursorIndexOfCoverUrl);
final String _tmpGenre;
_tmpGenre = _cursor.getString(_cursorIndexOfGenre);
final String _tmpTags;
_tmpTags = _cursor.getString(_cursorIndexOfTags);
final int _tmpSortOrder;
_tmpSortOrder = _cursor.getInt(_cursorIndexOfSortOrder);
final String _tmpSource;
_tmpSource = _cursor.getString(_cursorIndexOfSource);
final boolean _tmpIsFavorite;
final int _tmp;
_tmp = _cursor.getInt(_cursorIndexOfIsFavorite);
_tmpIsFavorite = _tmp != 0;
_item = new StationEntity(_tmpId,_tmpName,_tmpPrefix,_tmpStreamUrl,_tmpCoverUrl,_tmpGenre,_tmpTags,_tmpSortOrder,_tmpSource,_tmpIsFavorite);
_result.add(_item);
}
return _result;
} finally {
_cursor.close();
}
}
@Override
protected void finalize() {
_statement.release();
}
});
}
@Override
public Flow<StationEntity> getById(final int id) {
final String _sql = "SELECT * FROM stations WHERE id = ?";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 1);
int _argIndex = 1;
_statement.bindLong(_argIndex, id);
return CoroutinesRoom.createFlow(__db, false, new String[] {"stations"}, new Callable<StationEntity>() {
@Override
@Nullable
public StationEntity call() throws Exception {
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
try {
final int _cursorIndexOfId = CursorUtil.getColumnIndexOrThrow(_cursor, "id");
final int _cursorIndexOfName = CursorUtil.getColumnIndexOrThrow(_cursor, "name");
final int _cursorIndexOfPrefix = CursorUtil.getColumnIndexOrThrow(_cursor, "prefix");
final int _cursorIndexOfStreamUrl = CursorUtil.getColumnIndexOrThrow(_cursor, "streamUrl");
final int _cursorIndexOfCoverUrl = CursorUtil.getColumnIndexOrThrow(_cursor, "coverUrl");
final int _cursorIndexOfGenre = CursorUtil.getColumnIndexOrThrow(_cursor, "genre");
final int _cursorIndexOfTags = CursorUtil.getColumnIndexOrThrow(_cursor, "tags");
final int _cursorIndexOfSortOrder = CursorUtil.getColumnIndexOrThrow(_cursor, "sortOrder");
final int _cursorIndexOfSource = CursorUtil.getColumnIndexOrThrow(_cursor, "source");
final int _cursorIndexOfIsFavorite = CursorUtil.getColumnIndexOrThrow(_cursor, "isFavorite");
final StationEntity _result;
if (_cursor.moveToFirst()) {
final int _tmpId;
_tmpId = _cursor.getInt(_cursorIndexOfId);
final String _tmpName;
_tmpName = _cursor.getString(_cursorIndexOfName);
final String _tmpPrefix;
_tmpPrefix = _cursor.getString(_cursorIndexOfPrefix);
final String _tmpStreamUrl;
_tmpStreamUrl = _cursor.getString(_cursorIndexOfStreamUrl);
final String _tmpCoverUrl;
_tmpCoverUrl = _cursor.getString(_cursorIndexOfCoverUrl);
final String _tmpGenre;
_tmpGenre = _cursor.getString(_cursorIndexOfGenre);
final String _tmpTags;
_tmpTags = _cursor.getString(_cursorIndexOfTags);
final int _tmpSortOrder;
_tmpSortOrder = _cursor.getInt(_cursorIndexOfSortOrder);
final String _tmpSource;
_tmpSource = _cursor.getString(_cursorIndexOfSource);
final boolean _tmpIsFavorite;
final int _tmp;
_tmp = _cursor.getInt(_cursorIndexOfIsFavorite);
_tmpIsFavorite = _tmp != 0;
_result = new StationEntity(_tmpId,_tmpName,_tmpPrefix,_tmpStreamUrl,_tmpCoverUrl,_tmpGenre,_tmpTags,_tmpSortOrder,_tmpSource,_tmpIsFavorite);
} else {
_result = null;
}
return _result;
} finally {
_cursor.close();
}
}
@Override
protected void finalize() {
_statement.release();
}
});
}
@Override
public Flow<Boolean> isFavorite(final int id) {
final String _sql = "SELECT isFavorite FROM stations WHERE id = ?";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 1);
int _argIndex = 1;
_statement.bindLong(_argIndex, id);
return CoroutinesRoom.createFlow(__db, false, new String[] {"stations"}, new Callable<Boolean>() {
@Override
@NonNull
public Boolean call() throws Exception {
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
try {
final Boolean _result;
if (_cursor.moveToFirst()) {
final int _tmp;
_tmp = _cursor.getInt(0);
_result = _tmp != 0;
} else {
_result = false;
}
return _result;
} finally {
_cursor.close();
}
}
@Override
protected void finalize() {
_statement.release();
}
});
}
@Override
public Flow<List<Integer>> getFavoriteIds() {
final String _sql = "SELECT id FROM stations WHERE isFavorite = 1";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
return CoroutinesRoom.createFlow(__db, false, new String[] {"stations"}, new Callable<List<Integer>>() {
@Override
@NonNull
public List<Integer> call() throws Exception {
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
try {
final List<Integer> _result = new ArrayList<Integer>(_cursor.getCount());
while (_cursor.moveToNext()) {
final Integer _item;
_item = _cursor.getInt(0);
_result.add(_item);
}
return _result;
} finally {
_cursor.close();
}
}
@Override
protected void finalize() {
_statement.release();
}
});
}
@NonNull
public static List<Class<?>> getRequiredConverters() {
return Collections.emptyList();
}
}

View File

@@ -0,0 +1,141 @@
package com.radiola.data.local.dao;
import android.database.Cursor;
import androidx.annotation.NonNull;
import androidx.room.CoroutinesRoom;
import androidx.room.EntityInsertionAdapter;
import androidx.room.RoomDatabase;
import androidx.room.RoomSQLiteQuery;
import androidx.room.SharedSQLiteStatement;
import androidx.room.util.CursorUtil;
import androidx.room.util.DBUtil;
import androidx.sqlite.db.SupportSQLiteStatement;
import com.radiola.data.local.entity.TagEntity;
import java.lang.Class;
import java.lang.Exception;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import javax.annotation.processing.Generated;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlinx.coroutines.flow.Flow;
@Generated("androidx.room.RoomProcessor")
@SuppressWarnings({"unchecked", "deprecation"})
public final class TagDao_Impl implements TagDao {
private final RoomDatabase __db;
private final EntityInsertionAdapter<TagEntity> __insertionAdapterOfTagEntity;
private final SharedSQLiteStatement __preparedStmtOfClearAll;
public TagDao_Impl(@NonNull final RoomDatabase __db) {
this.__db = __db;
this.__insertionAdapterOfTagEntity = new EntityInsertionAdapter<TagEntity>(__db) {
@Override
@NonNull
protected String createQuery() {
return "INSERT OR REPLACE INTO `tags` (`name`) VALUES (?)";
}
@Override
protected void bind(@NonNull final SupportSQLiteStatement statement,
@NonNull final TagEntity entity) {
statement.bindString(1, entity.getName());
}
};
this.__preparedStmtOfClearAll = new SharedSQLiteStatement(__db) {
@Override
@NonNull
public String createQuery() {
final String _query = "DELETE FROM tags";
return _query;
}
};
}
@Override
public Object insertAll(final List<TagEntity> tags,
final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
__db.beginTransaction();
try {
__insertionAdapterOfTagEntity.insert(tags);
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
}
}, $completion);
}
@Override
public Object clearAll(final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
final SupportSQLiteStatement _stmt = __preparedStmtOfClearAll.acquire();
try {
__db.beginTransaction();
try {
_stmt.executeUpdateDelete();
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
} finally {
__preparedStmtOfClearAll.release(_stmt);
}
}
}, $completion);
}
@Override
public Flow<List<TagEntity>> getAll() {
final String _sql = "SELECT * FROM tags ORDER BY name";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
return CoroutinesRoom.createFlow(__db, false, new String[] {"tags"}, new Callable<List<TagEntity>>() {
@Override
@NonNull
public List<TagEntity> call() throws Exception {
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
try {
final int _cursorIndexOfName = CursorUtil.getColumnIndexOrThrow(_cursor, "name");
final List<TagEntity> _result = new ArrayList<TagEntity>(_cursor.getCount());
while (_cursor.moveToNext()) {
final TagEntity _item;
final String _tmpName;
_tmpName = _cursor.getString(_cursorIndexOfName);
_item = new TagEntity(_tmpName);
_result.add(_item);
}
return _result;
} finally {
_cursor.close();
}
}
@Override
protected void finalize() {
_statement.release();
}
});
}
@NonNull
public static List<Class<?>> getRequiredConverters() {
return Collections.emptyList();
}
}

View File

@@ -0,0 +1,258 @@
package com.radiola.data.local.dao;
import android.database.Cursor;
import android.os.CancellationSignal;
import androidx.annotation.NonNull;
import androidx.room.CoroutinesRoom;
import androidx.room.EntityInsertionAdapter;
import androidx.room.RoomDatabase;
import androidx.room.RoomSQLiteQuery;
import androidx.room.SharedSQLiteStatement;
import androidx.room.util.CursorUtil;
import androidx.room.util.DBUtil;
import androidx.sqlite.db.SupportSQLiteStatement;
import com.radiola.data.local.entity.TrackHistoryEntity;
import java.lang.Class;
import java.lang.Exception;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import javax.annotation.processing.Generated;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlinx.coroutines.flow.Flow;
@Generated("androidx.room.RoomProcessor")
@SuppressWarnings({"unchecked", "deprecation"})
public final class TrackHistoryDao_Impl implements TrackHistoryDao {
private final RoomDatabase __db;
private final EntityInsertionAdapter<TrackHistoryEntity> __insertionAdapterOfTrackHistoryEntity;
private final SharedSQLiteStatement __preparedStmtOfDeleteById;
private final SharedSQLiteStatement __preparedStmtOfCleanupOld;
public TrackHistoryDao_Impl(@NonNull final RoomDatabase __db) {
this.__db = __db;
this.__insertionAdapterOfTrackHistoryEntity = new EntityInsertionAdapter<TrackHistoryEntity>(__db) {
@Override
@NonNull
protected String createQuery() {
return "INSERT OR ABORT INTO `track_history` (`id`,`artist`,`song`,`stationName`,`coverUrl`,`timestamp`) VALUES (nullif(?, 0),?,?,?,?,?)";
}
@Override
protected void bind(@NonNull final SupportSQLiteStatement statement,
@NonNull final TrackHistoryEntity entity) {
statement.bindLong(1, entity.getId());
statement.bindString(2, entity.getArtist());
statement.bindString(3, entity.getSong());
statement.bindString(4, entity.getStationName());
if (entity.getCoverUrl() == null) {
statement.bindNull(5);
} else {
statement.bindString(5, entity.getCoverUrl());
}
statement.bindLong(6, entity.getTimestamp());
}
};
this.__preparedStmtOfDeleteById = new SharedSQLiteStatement(__db) {
@Override
@NonNull
public String createQuery() {
final String _query = "DELETE FROM track_history WHERE id = ?";
return _query;
}
};
this.__preparedStmtOfCleanupOld = new SharedSQLiteStatement(__db) {
@Override
@NonNull
public String createQuery() {
final String _query = "DELETE FROM track_history WHERE id NOT IN (SELECT id FROM track_history ORDER BY timestamp DESC LIMIT 200)";
return _query;
}
};
}
@Override
public Object insert(final TrackHistoryEntity track,
final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
__db.beginTransaction();
try {
__insertionAdapterOfTrackHistoryEntity.insert(track);
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
}
}, $completion);
}
@Override
public Object deleteById(final int id, final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
final SupportSQLiteStatement _stmt = __preparedStmtOfDeleteById.acquire();
int _argIndex = 1;
_stmt.bindLong(_argIndex, id);
try {
__db.beginTransaction();
try {
_stmt.executeUpdateDelete();
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
} finally {
__preparedStmtOfDeleteById.release(_stmt);
}
}
}, $completion);
}
@Override
public Object cleanupOld(final Continuation<? super Unit> $completion) {
return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
@Override
@NonNull
public Unit call() throws Exception {
final SupportSQLiteStatement _stmt = __preparedStmtOfCleanupOld.acquire();
try {
__db.beginTransaction();
try {
_stmt.executeUpdateDelete();
__db.setTransactionSuccessful();
return Unit.INSTANCE;
} finally {
__db.endTransaction();
}
} finally {
__preparedStmtOfCleanupOld.release(_stmt);
}
}
}, $completion);
}
@Override
public Flow<List<TrackHistoryEntity>> getAll() {
final String _sql = "SELECT * FROM track_history ORDER BY timestamp DESC LIMIT 200";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
return CoroutinesRoom.createFlow(__db, false, new String[] {"track_history"}, new Callable<List<TrackHistoryEntity>>() {
@Override
@NonNull
public List<TrackHistoryEntity> call() throws Exception {
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
try {
final int _cursorIndexOfId = CursorUtil.getColumnIndexOrThrow(_cursor, "id");
final int _cursorIndexOfArtist = CursorUtil.getColumnIndexOrThrow(_cursor, "artist");
final int _cursorIndexOfSong = CursorUtil.getColumnIndexOrThrow(_cursor, "song");
final int _cursorIndexOfStationName = CursorUtil.getColumnIndexOrThrow(_cursor, "stationName");
final int _cursorIndexOfCoverUrl = CursorUtil.getColumnIndexOrThrow(_cursor, "coverUrl");
final int _cursorIndexOfTimestamp = CursorUtil.getColumnIndexOrThrow(_cursor, "timestamp");
final List<TrackHistoryEntity> _result = new ArrayList<TrackHistoryEntity>(_cursor.getCount());
while (_cursor.moveToNext()) {
final TrackHistoryEntity _item;
final int _tmpId;
_tmpId = _cursor.getInt(_cursorIndexOfId);
final String _tmpArtist;
_tmpArtist = _cursor.getString(_cursorIndexOfArtist);
final String _tmpSong;
_tmpSong = _cursor.getString(_cursorIndexOfSong);
final String _tmpStationName;
_tmpStationName = _cursor.getString(_cursorIndexOfStationName);
final String _tmpCoverUrl;
if (_cursor.isNull(_cursorIndexOfCoverUrl)) {
_tmpCoverUrl = null;
} else {
_tmpCoverUrl = _cursor.getString(_cursorIndexOfCoverUrl);
}
final long _tmpTimestamp;
_tmpTimestamp = _cursor.getLong(_cursorIndexOfTimestamp);
_item = new TrackHistoryEntity(_tmpId,_tmpArtist,_tmpSong,_tmpStationName,_tmpCoverUrl,_tmpTimestamp);
_result.add(_item);
}
return _result;
} finally {
_cursor.close();
}
}
@Override
protected void finalize() {
_statement.release();
}
});
}
@Override
public Object search(final String query,
final Continuation<? super List<TrackHistoryEntity>> $completion) {
final String _sql = "SELECT * FROM track_history WHERE artist LIKE '%' || ? || '%' OR song LIKE '%' || ? || '%' ORDER BY timestamp DESC";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 2);
int _argIndex = 1;
_statement.bindString(_argIndex, query);
_argIndex = 2;
_statement.bindString(_argIndex, query);
final CancellationSignal _cancellationSignal = DBUtil.createCancellationSignal();
return CoroutinesRoom.execute(__db, false, _cancellationSignal, new Callable<List<TrackHistoryEntity>>() {
@Override
@NonNull
public List<TrackHistoryEntity> call() throws Exception {
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
try {
final int _cursorIndexOfId = CursorUtil.getColumnIndexOrThrow(_cursor, "id");
final int _cursorIndexOfArtist = CursorUtil.getColumnIndexOrThrow(_cursor, "artist");
final int _cursorIndexOfSong = CursorUtil.getColumnIndexOrThrow(_cursor, "song");
final int _cursorIndexOfStationName = CursorUtil.getColumnIndexOrThrow(_cursor, "stationName");
final int _cursorIndexOfCoverUrl = CursorUtil.getColumnIndexOrThrow(_cursor, "coverUrl");
final int _cursorIndexOfTimestamp = CursorUtil.getColumnIndexOrThrow(_cursor, "timestamp");
final List<TrackHistoryEntity> _result = new ArrayList<TrackHistoryEntity>(_cursor.getCount());
while (_cursor.moveToNext()) {
final TrackHistoryEntity _item;
final int _tmpId;
_tmpId = _cursor.getInt(_cursorIndexOfId);
final String _tmpArtist;
_tmpArtist = _cursor.getString(_cursorIndexOfArtist);
final String _tmpSong;
_tmpSong = _cursor.getString(_cursorIndexOfSong);
final String _tmpStationName;
_tmpStationName = _cursor.getString(_cursorIndexOfStationName);
final String _tmpCoverUrl;
if (_cursor.isNull(_cursorIndexOfCoverUrl)) {
_tmpCoverUrl = null;
} else {
_tmpCoverUrl = _cursor.getString(_cursorIndexOfCoverUrl);
}
final long _tmpTimestamp;
_tmpTimestamp = _cursor.getLong(_cursorIndexOfTimestamp);
_item = new TrackHistoryEntity(_tmpId,_tmpArtist,_tmpSong,_tmpStationName,_tmpCoverUrl,_tmpTimestamp);
_result.add(_item);
}
return _result;
} finally {
_cursor.close();
_statement.release();
}
}
}, $completion);
}
@NonNull
public static List<Class<?>> getRequiredConverters() {
return Collections.emptyList();
}
}

View File

@@ -0,0 +1,44 @@
package com.radiola.data.remote;
import com.radiola.data.local.TokenDataStore;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
@ScopeMetadata
@QualifierMetadata
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class AuthInterceptor_Factory implements Factory<AuthInterceptor> {
private final Provider<TokenDataStore> tokenDataStoreProvider;
public AuthInterceptor_Factory(Provider<TokenDataStore> tokenDataStoreProvider) {
this.tokenDataStoreProvider = tokenDataStoreProvider;
}
@Override
public AuthInterceptor get() {
return newInstance(tokenDataStoreProvider.get());
}
public static AuthInterceptor_Factory create(Provider<TokenDataStore> tokenDataStoreProvider) {
return new AuthInterceptor_Factory(tokenDataStoreProvider);
}
public static AuthInterceptor newInstance(TokenDataStore tokenDataStore) {
return new AuthInterceptor(tokenDataStore);
}
}

View File

@@ -0,0 +1,50 @@
package com.radiola.data.repository;
import com.radiola.data.local.TokenDataStore;
import com.radiola.data.remote.RadiolaApi;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
@ScopeMetadata("javax.inject.Singleton")
@QualifierMetadata
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class AuthRepositoryImpl_Factory implements Factory<AuthRepositoryImpl> {
private final Provider<RadiolaApi> apiProvider;
private final Provider<TokenDataStore> tokenDataStoreProvider;
public AuthRepositoryImpl_Factory(Provider<RadiolaApi> apiProvider,
Provider<TokenDataStore> tokenDataStoreProvider) {
this.apiProvider = apiProvider;
this.tokenDataStoreProvider = tokenDataStoreProvider;
}
@Override
public AuthRepositoryImpl get() {
return newInstance(apiProvider.get(), tokenDataStoreProvider.get());
}
public static AuthRepositoryImpl_Factory create(Provider<RadiolaApi> apiProvider,
Provider<TokenDataStore> tokenDataStoreProvider) {
return new AuthRepositoryImpl_Factory(apiProvider, tokenDataStoreProvider);
}
public static AuthRepositoryImpl newInstance(RadiolaApi api, TokenDataStore tokenDataStore) {
return new AuthRepositoryImpl(api, tokenDataStore);
}
}

View File

@@ -0,0 +1,44 @@
package com.radiola.data.repository;
import com.radiola.data.local.AppDatabase;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
@ScopeMetadata
@QualifierMetadata
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class FavoritesRepositoryImpl_Factory implements Factory<FavoritesRepositoryImpl> {
private final Provider<AppDatabase> dbProvider;
public FavoritesRepositoryImpl_Factory(Provider<AppDatabase> dbProvider) {
this.dbProvider = dbProvider;
}
@Override
public FavoritesRepositoryImpl get() {
return newInstance(dbProvider.get());
}
public static FavoritesRepositoryImpl_Factory create(Provider<AppDatabase> dbProvider) {
return new FavoritesRepositoryImpl_Factory(dbProvider);
}
public static FavoritesRepositoryImpl newInstance(AppDatabase db) {
return new FavoritesRepositoryImpl(db);
}
}

View File

@@ -0,0 +1,44 @@
package com.radiola.data.repository;
import com.radiola.data.remote.RecordApi;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
@ScopeMetadata
@QualifierMetadata
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class NowPlayingRepositoryImpl_Factory implements Factory<NowPlayingRepositoryImpl> {
private final Provider<RecordApi> apiProvider;
public NowPlayingRepositoryImpl_Factory(Provider<RecordApi> apiProvider) {
this.apiProvider = apiProvider;
}
@Override
public NowPlayingRepositoryImpl get() {
return newInstance(apiProvider.get());
}
public static NowPlayingRepositoryImpl_Factory create(Provider<RecordApi> apiProvider) {
return new NowPlayingRepositoryImpl_Factory(apiProvider);
}
public static NowPlayingRepositoryImpl newInstance(RecordApi api) {
return new NowPlayingRepositoryImpl(api);
}
}

View File

@@ -0,0 +1,55 @@
package com.radiola.data.repository;
import android.content.Context;
import com.radiola.data.local.AppDatabase;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
import okhttp3.OkHttpClient;
@ScopeMetadata
@QualifierMetadata("dagger.hilt.android.qualifiers.ApplicationContext")
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class RecordingRepositoryImpl_Factory implements Factory<RecordingRepositoryImpl> {
private final Provider<AppDatabase> dbProvider;
private final Provider<OkHttpClient> okHttpClientProvider;
private final Provider<Context> contextProvider;
public RecordingRepositoryImpl_Factory(Provider<AppDatabase> dbProvider,
Provider<OkHttpClient> okHttpClientProvider, Provider<Context> contextProvider) {
this.dbProvider = dbProvider;
this.okHttpClientProvider = okHttpClientProvider;
this.contextProvider = contextProvider;
}
@Override
public RecordingRepositoryImpl get() {
return newInstance(dbProvider.get(), okHttpClientProvider.get(), contextProvider.get());
}
public static RecordingRepositoryImpl_Factory create(Provider<AppDatabase> dbProvider,
Provider<OkHttpClient> okHttpClientProvider, Provider<Context> contextProvider) {
return new RecordingRepositoryImpl_Factory(dbProvider, okHttpClientProvider, contextProvider);
}
public static RecordingRepositoryImpl newInstance(AppDatabase db, OkHttpClient okHttpClient,
Context context) {
return new RecordingRepositoryImpl(db, okHttpClient, context);
}
}

View File

@@ -0,0 +1,44 @@
package com.radiola.data.repository;
import android.content.Context;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
@ScopeMetadata
@QualifierMetadata("dagger.hilt.android.qualifiers.ApplicationContext")
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class SettingsRepositoryImpl_Factory implements Factory<SettingsRepositoryImpl> {
private final Provider<Context> contextProvider;
public SettingsRepositoryImpl_Factory(Provider<Context> contextProvider) {
this.contextProvider = contextProvider;
}
@Override
public SettingsRepositoryImpl get() {
return newInstance(contextProvider.get());
}
public static SettingsRepositoryImpl_Factory create(Provider<Context> contextProvider) {
return new SettingsRepositoryImpl_Factory(contextProvider);
}
public static SettingsRepositoryImpl newInstance(Context context) {
return new SettingsRepositoryImpl(context);
}
}

View File

@@ -0,0 +1,55 @@
package com.radiola.data.repository;
import com.radiola.data.local.AppDatabase;
import com.radiola.data.local.LocalStationDataSource;
import com.radiola.data.remote.RecordApi;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
@ScopeMetadata
@QualifierMetadata
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class StationRepositoryImpl_Factory implements Factory<StationRepositoryImpl> {
private final Provider<RecordApi> apiProvider;
private final Provider<AppDatabase> dbProvider;
private final Provider<LocalStationDataSource> localDataSourceProvider;
public StationRepositoryImpl_Factory(Provider<RecordApi> apiProvider,
Provider<AppDatabase> dbProvider, Provider<LocalStationDataSource> localDataSourceProvider) {
this.apiProvider = apiProvider;
this.dbProvider = dbProvider;
this.localDataSourceProvider = localDataSourceProvider;
}
@Override
public StationRepositoryImpl get() {
return newInstance(apiProvider.get(), dbProvider.get(), localDataSourceProvider.get());
}
public static StationRepositoryImpl_Factory create(Provider<RecordApi> apiProvider,
Provider<AppDatabase> dbProvider, Provider<LocalStationDataSource> localDataSourceProvider) {
return new StationRepositoryImpl_Factory(apiProvider, dbProvider, localDataSourceProvider);
}
public static StationRepositoryImpl newInstance(RecordApi api, AppDatabase db,
LocalStationDataSource localDataSource) {
return new StationRepositoryImpl(api, db, localDataSource);
}
}

View File

@@ -0,0 +1,44 @@
package com.radiola.data.repository;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
import okhttp3.OkHttpClient;
@ScopeMetadata("javax.inject.Singleton")
@QualifierMetadata
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class StationTester_Factory implements Factory<StationTester> {
private final Provider<OkHttpClient> okHttpClientProvider;
public StationTester_Factory(Provider<OkHttpClient> okHttpClientProvider) {
this.okHttpClientProvider = okHttpClientProvider;
}
@Override
public StationTester get() {
return newInstance(okHttpClientProvider.get());
}
public static StationTester_Factory create(Provider<OkHttpClient> okHttpClientProvider) {
return new StationTester_Factory(okHttpClientProvider);
}
public static StationTester newInstance(OkHttpClient okHttpClient) {
return new StationTester(okHttpClient);
}
}

View File

@@ -0,0 +1,50 @@
package com.radiola.data.repository;
import com.radiola.data.local.TokenDataStore;
import com.radiola.data.remote.RadiolaApi;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
@ScopeMetadata("javax.inject.Singleton")
@QualifierMetadata
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class SyncRepositoryImpl_Factory implements Factory<SyncRepositoryImpl> {
private final Provider<RadiolaApi> apiProvider;
private final Provider<TokenDataStore> tokenDataStoreProvider;
public SyncRepositoryImpl_Factory(Provider<RadiolaApi> apiProvider,
Provider<TokenDataStore> tokenDataStoreProvider) {
this.apiProvider = apiProvider;
this.tokenDataStoreProvider = tokenDataStoreProvider;
}
@Override
public SyncRepositoryImpl get() {
return newInstance(apiProvider.get(), tokenDataStoreProvider.get());
}
public static SyncRepositoryImpl_Factory create(Provider<RadiolaApi> apiProvider,
Provider<TokenDataStore> tokenDataStoreProvider) {
return new SyncRepositoryImpl_Factory(apiProvider, tokenDataStoreProvider);
}
public static SyncRepositoryImpl newInstance(RadiolaApi api, TokenDataStore tokenDataStore) {
return new SyncRepositoryImpl(api, tokenDataStore);
}
}

View File

@@ -0,0 +1,44 @@
package com.radiola.data.repository;
import com.radiola.data.local.AppDatabase;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
@ScopeMetadata
@QualifierMetadata
@DaggerGenerated
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://dagger.dev"
)
@SuppressWarnings({
"unchecked",
"rawtypes",
"KotlinInternal",
"KotlinInternalInJava",
"cast"
})
public final class TrackHistoryRepositoryImpl_Factory implements Factory<TrackHistoryRepositoryImpl> {
private final Provider<AppDatabase> dbProvider;
public TrackHistoryRepositoryImpl_Factory(Provider<AppDatabase> dbProvider) {
this.dbProvider = dbProvider;
}
@Override
public TrackHistoryRepositoryImpl get() {
return newInstance(dbProvider.get());
}
public static TrackHistoryRepositoryImpl_Factory create(Provider<AppDatabase> dbProvider) {
return new TrackHistoryRepositoryImpl_Factory(dbProvider);
}
public static TrackHistoryRepositoryImpl newInstance(AppDatabase db) {
return new TrackHistoryRepositoryImpl(db);
}
}