mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-20 09:33:57 +00:00
Compare commits
6 Commits
v2.201.2-d
...
v2.202.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51aeb0b24d | ||
|
|
c63cc2c3bf | ||
|
|
81d12c21b2 | ||
|
|
b1307cf09b | ||
|
|
18481c66c4 | ||
|
|
8c5487c467 |
21
CHANGELOG.md
21
CHANGELOG.md
@@ -1,3 +1,24 @@
|
|||||||
|
# [2.202.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.202.0-dev.2...v2.202.0-dev.3) (2023-12-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Enable tablet layout:** Respect the original device layout ([cdbbe8f](https://github.com/ReVanced/revanced-patches/commit/cdbbe8f78d26f24e58362c7ef1da83bf689d52bb))
|
||||||
|
|
||||||
|
# [2.202.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.202.0-dev.1...v2.202.0-dev.2) (2023-12-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Spotify - Custom Theme:** Clarify patch option description ([#3338](https://github.com/ReVanced/revanced-patches/issues/3338)) ([1b9a90f](https://github.com/ReVanced/revanced-patches/commit/1b9a90f9753e40cb07e270e7f5144cd57c3c3ce3))
|
||||||
|
|
||||||
|
# [2.202.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.201.2-dev.1...v2.202.0-dev.1) (2023-11-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Modernize restart app logic ([#3343](https://github.com/ReVanced/revanced-patches/issues/3343)) ([3897647](https://github.com/ReVanced/revanced-patches/commit/3897647321b6c1860dc9804cac6c6985da8bb675))
|
||||||
|
|
||||||
## [2.201.2-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.201.1...v2.201.2-dev.1) (2023-11-29)
|
## [2.201.2-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.201.1...v2.201.2-dev.1) (2023-11-29)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.201.2-dev.1
|
version = 2.202.0-dev.3
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -25,18 +25,6 @@ abstract class AbstractSettingsResourcePatch(
|
|||||||
private val sourceDirectory: String,
|
private val sourceDirectory: String,
|
||||||
) : ResourcePatch(), Closeable {
|
) : ResourcePatch(), Closeable {
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
/*
|
|
||||||
* used for self-restart
|
|
||||||
* TODO: do this only, when necessary
|
|
||||||
*/
|
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
|
||||||
editor.file.getElementsByTagName("manifest").item(0).also {
|
|
||||||
it.appendChild(it.ownerDocument.createElement("uses-permission").also { element ->
|
|
||||||
element.setAttribute("android:name", "android.permission.SCHEDULE_EXACT_ALARM")
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* copy preference template from source dir */
|
/* copy preference template from source dir */
|
||||||
context.copyResources(
|
context.copyResources(
|
||||||
sourceDirectory,
|
sourceDirectory,
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ object CustomThemePatch : ResourcePatch() {
|
|||||||
key = "backgroundColorSecondary",
|
key = "backgroundColorSecondary",
|
||||||
default = "#ff282828",
|
default = "#ff282828",
|
||||||
title = "Secondary background color",
|
title = "Secondary background color",
|
||||||
description = "The secondary background color. Can be a hex color or a resource reference.",
|
description = "The secondary background color. (e.g. search box, artist & podcast). Can be a hex color or a resource reference.",
|
||||||
required = true
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,6 @@ object SettingsPatch : BytecodePatch(
|
|||||||
addString("revanced_settings", "ReVanced Settings", false)
|
addString("revanced_settings", "ReVanced Settings", false)
|
||||||
addString("revanced_reboot_message", "Twitch needs to restart to apply your changes. Restart now?", false)
|
addString("revanced_reboot_message", "Twitch needs to restart to apply your changes. Restart now?", false)
|
||||||
addString("revanced_reboot", "Restart", false)
|
addString("revanced_reboot", "Restart", false)
|
||||||
addString("revanced_cancel", "Cancel", false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun addString(identifier: String, value: String, formatted: Boolean = true) =
|
fun addString(identifier: String, value: String, formatted: Boolean = true) =
|
||||||
|
|||||||
@@ -2,11 +2,9 @@ package app.revanced.patches.youtube.layout.tablet
|
|||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
@@ -16,8 +14,6 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
|||||||
import app.revanced.patches.youtube.layout.tablet.fingerprints.GetFormFactorFingerprint
|
import app.revanced.patches.youtube.layout.tablet.fingerprints.GetFormFactorFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction10x
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Enable tablet layout",
|
name = "Enable tablet layout",
|
||||||
@@ -42,20 +38,11 @@ object EnableTabletLayoutPatch : BytecodePatch(
|
|||||||
|
|
||||||
GetFormFactorFingerprint.result?.let {
|
GetFormFactorFingerprint.result?.let {
|
||||||
it.mutableMethod.apply {
|
it.mutableMethod.apply {
|
||||||
val returnCurrentFormFactorIndex = getInstructions().lastIndex - 2
|
val returnIsLargeFormFactorIndex = getInstructions().lastIndex - 4
|
||||||
|
val returnIsLargeFormFactorLabel = getInstruction(returnIsLargeFormFactorIndex)
|
||||||
|
|
||||||
val returnIsLargeFormFactorLabel = getInstruction(returnCurrentFormFactorIndex - 2)
|
|
||||||
val returnFormFactorIndex = getInstruction(returnCurrentFormFactorIndex)
|
|
||||||
|
|
||||||
val insertIndex = returnCurrentFormFactorIndex + 1
|
|
||||||
|
|
||||||
// Replace the labeled instruction with a nop and add the preserved instructions back
|
|
||||||
replaceInstruction(returnCurrentFormFactorIndex, BuilderInstruction10x(Opcode.NOP))
|
|
||||||
addInstruction(insertIndex, returnFormFactorIndex)
|
|
||||||
|
|
||||||
// Because the labeled instruction is now a nop, we can add our own instructions right after it
|
|
||||||
addInstructionsWithLabels(
|
addInstructionsWithLabels(
|
||||||
insertIndex,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static { }, Lapp/revanced/integrations/patches/EnableTabletLayoutPatch;->enableTabletLayout()Z
|
invoke-static { }, Lapp/revanced/integrations/patches/EnableTabletLayoutPatch;->enableTabletLayout()Z
|
||||||
move-result v0 # Free register
|
move-result v0 # Free register
|
||||||
|
|||||||
Reference in New Issue
Block a user