Skip to content
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bb8d014
introduce protocol handlers for opening source streams
mostafaNazari702 Jul 12, 2026
81bef8b
redesign stream access around callbacks and complete the file protoco…
mostafaNazari702 Jul 15, 2026
a9e8048
move UI requests into a generic communication layer
mostafaNazari702 Jul 15, 2026
3c664f3
specialize the request layer to file picking
mostafaNazari702 Jul 16, 2026
783c703
parse sources as URIs and route remote transport through protocol han…
mostafaNazari702 Jul 16, 2026
caa7808
turn the default source into a plain URL
mostafaNazari702 Jul 16, 2026
844dce7
route local imports through the protocol handlers
mostafaNazari702 Jul 16, 2026
85ef81b
merge local and remote sources into one
mostafaNazari702 Jul 16, 2026
9ea6088
provide the content resolver through the koin graph
mostafaNazari702 Jul 16, 2026
9d5de81
remove the local and remote distinction outside the handlers
mostafaNazari702 Jul 17, 2026
602a23c
store sources as plain URLs and migrate old rows on boot
mostafaNazari702 Jul 17, 2026
1168d70
remove the remaining remote references outside the handlers
mostafaNazari702 Jul 19, 2026
ece3dbc
enable auto update for the default source
mostafaNazari702 Jul 19, 2026
fdfa64c
rebuild the import dialog around a method dropdown
mostafaNazari702 Jul 23, 2026
f521703
offer the file picker from the auto method
mostafaNazari702 Jul 27, 2026
7238979
check for updates through the version resource
mostafaNazari702 Jul 27, 2026
2d81ce2
fill the input with the picked file
mostafaNazari702 Jul 27, 2026
5b2e425
stored sources as urls and renamed the column
mostafaNazari702 Aug 2, 2026
9019fc3
name the patches and downloader url errors
mostafaNazari702 Aug 2, 2026
897ff3f
fix the add button never enabling for http
mostafaNazari702 Aug 2, 2026
c4d27a5
read the changelog from the source url
mostafaNazari702 Aug 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/src/main/java/app/revanced/manager/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import app.revanced.manager.util.SupportedLocales
import app.revanced.manager.util.deepLinkedComposable
import app.revanced.manager.util.navigateSafe
import app.revanced.manager.util.popBackStackSafe
import app.revanced.manager.ui.component.FilePickerRequestHost
import app.revanced.manager.util.resetListItemColorsCached
import kotlinx.coroutines.launch
import org.koin.androidx.compose.koinViewModel
Expand Down Expand Up @@ -103,6 +104,7 @@ class MainActivity : AppCompatActivity() {
dynamicColor = dynamicColor,
pureBlackTheme = pureBlackTheme
) {
FilePickerRequestHost()
ReVancedManager(vm)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package app.revanced.manager.data.room

import android.net.Uri
import androidx.room.TypeConverter
import app.revanced.manager.data.room.options.Option.SerializedValue
import app.revanced.manager.data.room.sources.Source
import java.io.File

class Converters {
@TypeConverter
fun sourceFromString(value: String) = Source.from(value)
fun uriFromString(value: String): Uri = Uri.parse(value)

@TypeConverter
fun sourceToString(value: Source) = value.toString()
fun uriToString(value: Uri) = value.toString()

@TypeConverter
fun fileFromString(value: String) = File(value)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package app.revanced.manager.data.room.bundles

import android.net.Uri
import androidx.room.*
import app.revanced.manager.data.room.sources.Source
import app.revanced.manager.domain.manager.SourceManager

@Entity(tableName = "patch_bundles")
data class PatchBundleEntity(
@PrimaryKey override val uid: Int,
@ColumnInfo(name = "name") val name: String,
@ColumnInfo(name = "version") val versionHash: String? = null,
@ColumnInfo(name = "source") val source: Source,
@ColumnInfo(name = "source") val source: Uri,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be renamed to url and be of type URL not Uri, migration needs to be added for it

@ColumnInfo(name = "auto_update") val autoUpdate: Boolean,
@ColumnInfo(name = "released_at") val releasedAt: Long? = null,
) : SourceManager.DatabaseEntity
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package app.revanced.manager.data.room.downloader

import android.net.Uri
import androidx.room.*
import app.revanced.manager.data.room.sources.Source
import app.revanced.manager.domain.manager.SourceManager

@Entity(tableName = "downloaders")
data class DownloaderEntity(
@PrimaryKey override val uid: Int,
@ColumnInfo(name = "name") val name: String,
@ColumnInfo(name = "version") val versionHash: String? = null,
@ColumnInfo(name = "source") val source: Source,
@ColumnInfo(name = "source") val source: Uri,
@ColumnInfo(name = "auto_update") val autoUpdate: Boolean,
@ColumnInfo(name = "released_at") val releasedAt: Long? = null
) : SourceManager.DatabaseEntity
39 changes: 0 additions & 39 deletions app/src/main/java/app/revanced/manager/data/room/sources/Source.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package app.revanced.manager.data.room.sources

import android.net.Uri
import androidx.room.ColumnInfo

data class SourceProperties(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this used

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its the partial type returned by dbGetProps(uid), used by updateDb to update only the mutable fields without loading the full entity. Both DAOs return it from getProps.

@oSumAtrIX oSumAtrIX Aug 3, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the full scheme, and where is source properties used, the question is still unanswered properly

@mostafaNazari702 mostafaNazari702 Aug 5, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full schema is the entity. PatchBundleEntity has uid, name, version, url, auto_update, released_at. DownloaderEntity is the same.

SourceProperties is a projection of the columns that can change after a row is created. It is the return type of getProps in both DAOs.

It is used by updateDb in SourceManager: read the props, copy with the changes then rebuild the entity with entityFromProps. createEntity uses the same path. uid is not in it because it is the primary key, not a mutable field.

@ColumnInfo(name = "name") val name: String,
@ColumnInfo(name = "version") val versionHash: String? = null,
@ColumnInfo(name = "source") val source: Uri,
@ColumnInfo(name = "auto_update") val autoUpdate: Boolean,
@ColumnInfo(name = "released_at") val releasedAt: Long? = null,
)
14 changes: 13 additions & 1 deletion app/src/main/java/app/revanced/manager/di/ServiceModule.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
package app.revanced.manager.di

import app.revanced.manager.domain.protocol.ContentProtocolHandler
import app.revanced.manager.domain.protocol.FileProtocolHandler
import app.revanced.manager.domain.protocol.HttpProtocolHandler
import app.revanced.manager.network.service.HttpService
import app.revanced.manager.util.FilePicker
import app.revanced.manager.util.UiFilePicker
import org.koin.android.ext.koin.androidContext
import org.koin.core.module.dsl.bind
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module

val serviceModule = module {
singleOf(::HttpService)
}
singleOf(::UiFilePicker) { bind<FilePicker>() }
Comment thread
mostafaNazari702 marked this conversation as resolved.
single { androidContext().contentResolver }
singleOf(::HttpProtocolHandler)
singleOf(::ContentProtocolHandler)
singleOf(::FileProtocolHandler)
}
Loading
Loading