Skip to content

Commit 7511122

Browse files
committed
Merge branch 'compose-dev' into feat/haptic-compose
# Conflicts: # app/src/main/java/app/revanced/manager/domain/manager/base/BasePreferencesManager.kt # app/src/main/java/app/revanced/manager/ui/component/bundle/BaseBundleDialog.kt # app/src/main/java/app/revanced/manager/ui/screen/DashboardScreen.kt # app/src/main/java/app/revanced/manager/ui/screen/PatcherScreen.kt # app/src/main/java/app/revanced/manager/ui/screen/PatchesSelectorScreen.kt # app/src/main/java/app/revanced/manager/ui/screen/SelectedAppInfoScreen.kt # app/src/main/java/app/revanced/manager/ui/screen/settings/AdvancedSettingsScreen.kt # app/src/main/java/app/revanced/manager/ui/viewmodel/DashboardViewModel.kt
1 parent 968c665 commit 7511122

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1051
-391
lines changed

.github/workflows/pr-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
distribution: 'temurin'
2525

2626
- name: Set up Gradle
27-
uses: gradle/actions/setup-gradle@v3
27+
uses: gradle/actions/setup-gradle@v4
2828

2929
- name: Build with Gradle
3030
env:

.github/workflows/release-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
distribution: 'temurin'
2222

2323
- name: Set up Gradle
24-
uses: gradle/actions/setup-gradle@v3
24+
uses: gradle/actions/setup-gradle@v4
2525

2626
- name: Build with Gradle
2727
env:

app/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ dependencies {
191191
// Scrollbars
192192
implementation(libs.scrollbars)
193193

194+
// EnumUtil
195+
implementation(libs.enumutil)
196+
ksp(libs.enumutil.ksp)
197+
194198
// Reorderable lists
195199
implementation(libs.reorderable)
196200

app/schemas/app.revanced.manager.data.room.AppDatabase/1.json

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"formatVersion": 1,
33
"database": {
44
"version": 1,
5-
"identityHash": "c0c780e55e10c9b095c004733c846b67",
5+
"identityHash": "1dd9d5c0201fdf3cfef3ae669fd65e46",
66
"entities": [
77
{
88
"tableName": "patch_bundles",
@@ -51,17 +51,7 @@
5151
"uid"
5252
]
5353
},
54-
"indices": [
55-
{
56-
"name": "index_patch_bundles_name",
57-
"unique": true,
58-
"columnNames": [
59-
"name"
60-
],
61-
"orders": [],
62-
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_patch_bundles_name` ON `${TABLE_NAME}` (`name`)"
63-
}
64-
],
54+
"indices": [],
6555
"foreignKeys": []
6656
},
6757
{
@@ -407,7 +397,7 @@
407397
"views": [],
408398
"setupQueries": [
409399
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
410-
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c0c780e55e10c9b095c004733c846b67')"
400+
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '1dd9d5c0201fdf3cfef3ae669fd65e46')"
411401
]
412402
}
413403
}

app/src/main/java/app/revanced/manager/data/platform/Filesystem.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package app.revanced.manager.data.platform
22

3+
import android.Manifest
34
import android.app.Application
5+
import android.content.Context
6+
import android.content.pm.PackageManager
47
import android.os.Build
58
import android.os.Environment
6-
import android.Manifest
7-
import android.content.pm.PackageManager
89
import androidx.activity.result.contract.ActivityResultContract
910
import androidx.activity.result.contract.ActivityResultContracts
1011
import app.revanced.manager.util.RequestManageStorageContract
@@ -16,7 +17,7 @@ class Filesystem(private val app: Application) {
1617
* A directory that gets cleared when the app restarts.
1718
* Do not store paths to this directory in a parcel.
1819
*/
19-
val tempDir = app.cacheDir.resolve("ephemeral").apply {
20+
val tempDir = app.getDir("ephemeral", Context.MODE_PRIVATE).apply {
2021
deleteRecursively()
2122
mkdirs()
2223
}

app/src/main/java/app/revanced/manager/data/room/apps/installed/InstalledApp.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import kotlinx.parcelize.Parcelize
99

1010
enum class InstallType(val stringResource: Int) {
1111
DEFAULT(R.string.default_install),
12-
ROOT(R.string.root_install)
12+
MOUNT(R.string.mount_install)
1313
}
1414

1515
@Parcelize

app/src/main/java/app/revanced/manager/data/room/bundles/PatchBundleEntity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sealed class Source {
2121
}
2222

2323
companion object {
24-
fun from(value: String) = when(value) {
24+
fun from(value: String) = when (value) {
2525
Local.SENTINEL -> Local
2626
API.SENTINEL -> API
2727
else -> Remote(Url(value))
@@ -34,7 +34,7 @@ data class VersionInfo(
3434
@ColumnInfo(name = "integrations_version") val integrations: String? = null,
3535
)
3636

37-
@Entity(tableName = "patch_bundles", indices = [Index(value = ["name"], unique = true)])
37+
@Entity(tableName = "patch_bundles")
3838
data class PatchBundleEntity(
3939
@PrimaryKey val uid: Int,
4040
@ColumnInfo(name = "name") val name: String,

app/src/main/java/app/revanced/manager/domain/installer/RootInstaller.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class RootInstaller(
4343
}
4444
}
4545

46-
return withTimeoutOrNull(Duration.ofSeconds(120L)) {
46+
return withTimeoutOrNull(Duration.ofSeconds(20L)) {
4747
remoteFS.await()
4848
} ?: throw RootServiceException()
4949
}
@@ -58,6 +58,10 @@ class RootInstaller(
5858

5959
fun hasRootAccess() = Shell.isAppGrantedRoot() ?: false
6060

61+
fun isDeviceRooted() = System.getenv("PATH")?.split(":")?.any { path ->
62+
File(path, "su").canExecute()
63+
} ?: false
64+
6165
suspend fun isAppInstalled(packageName: String) =
6266
awaitRemoteFS().getFile("$modulesPath/$packageName-revanced").exists()
6367

app/src/main/java/app/revanced/manager/domain/manager/PreferencesManager.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class PreferencesManager(
2323

2424
val firstLaunch = booleanPreference("first_launch", true)
2525
val managerAutoUpdates = booleanPreference("manager_auto_updates", false)
26+
val showManagerUpdateDialogOnLaunch = booleanPreference("show_manager_update_dialog_on_launch", true)
2627

2728
val disablePatchVersionCompatCheck = booleanPreference("disable_patch_version_compatibility_check", false)
2829
val disableSelectionWarning = booleanPreference("disable_selection_warning", false)

app/src/main/java/app/revanced/manager/domain/manager/base/BasePreferencesManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class EditorContext(
7070

7171
abstract class Preference<T>(
7272
private val dataStore: DataStore<Preferences>,
73-
protected val default: T,
73+
val default: T,
7474
) {
7575
internal abstract fun Preferences.read(): T
7676

0 commit comments

Comments
 (0)