From 2b956afd382d2ccc027a8e827b684beba855b1ca Mon Sep 17 00:00:00 2001 From: danthe1st Date: Mon, 1 Aug 2022 21:42:38 +0200 Subject: [PATCH 1/2] fix: exception trying to parcel PatchClass on activity save --- app/build.gradle.kts | 1 + .../manager/ui/screens/mainsubscreens/PatcherSubscreen.kt | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6ac5a983fd..8bc8fd0dbd 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -6,6 +6,7 @@ plugins { id("com.android.application") id("org.jetbrains.kotlin.android") id("com.google.devtools.ksp") + id("org.jetbrains.kotlin.android.extensions") kotlin("plugin.serialization") version "1.7.10" } diff --git a/app/src/main/java/app/revanced/manager/ui/screens/mainsubscreens/PatcherSubscreen.kt b/app/src/main/java/app/revanced/manager/ui/screens/mainsubscreens/PatcherSubscreen.kt index 73e1806960..22c67de7d0 100644 --- a/app/src/main/java/app/revanced/manager/ui/screens/mainsubscreens/PatcherSubscreen.kt +++ b/app/src/main/java/app/revanced/manager/ui/screens/mainsubscreens/PatcherSubscreen.kt @@ -2,6 +2,7 @@ package app.revanced.manager.ui.screens.mainsubscreens import android.app.Application import android.content.pm.PackageManager +import android.os.Parcelable import android.util.Log import androidx.activity.ComponentActivity import androidx.compose.foundation.layout.Column @@ -41,6 +42,7 @@ import app.revanced.patcher.util.patch.implementation.DexPatchBundle import com.ramcosta.composedestinations.annotation.Destination import com.ramcosta.composedestinations.annotation.RootNavGraph import dalvik.system.DexClassLoader +import kotlinx.android.parcel.Parcelize import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.map import kotlinx.coroutines.launch @@ -127,10 +129,11 @@ fun PatcherSubscreen( } } +@Parcelize data class PatchClass( val patch: Class>, val unsupported: Boolean, -) +) : Parcelable class PatcherViewModel(val app: Application) : AndroidViewModel(app) { private val bundleCacheDir = app.filesDir.resolve("bundle-cache").also { it.mkdirs() } From 7ae119184975a490089b5c6e37da22f238bfb79f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Aug 2022 19:43:28 +0000 Subject: [PATCH 2/2] chore(deps): bump lifecycle-runtime-ktx from 2.5.0 to 2.5.1 Bumps lifecycle-runtime-ktx from 2.5.0 to 2.5.1. --- updated-dependencies: - dependency-name: androidx.lifecycle:lifecycle-runtime-ktx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8bc8fd0dbd..65028f6da5 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -97,7 +97,7 @@ android { dependencies { // Core implementation("androidx.core:core-ktx:1.8.0") - implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.0") + implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1") implementation("androidx.activity:activity-compose:1.5.0") implementation("androidx.compose.ui:ui:$composeVersion") implementation("androidx.compose.ui:ui-tooling-preview:$composeVersion")