Compare commits

...

8 Commits

Author SHA1 Message Date
semantic-release-bot
3cec0b59c1 chore(release): 2.176.2-dev.2 [skip ci]
## [2.176.2-dev.2](https://github.com/revanced/revanced-patches/compare/v2.176.2-dev.1...v2.176.2-dev.2) (2023-06-12)

### Bug Fixes

* **syncforreddit/change-oauth-client-id:** trim whitespace from OAuth string ([#2402](https://github.com/revanced/revanced-patches/issues/2402)) ([228e8b7](228e8b7d48))
2023-06-12 04:53:24 +00:00
Palm
228e8b7d48 fix(syncforreddit/change-oauth-client-id): trim whitespace from OAuth string (#2402)
This solves patching errors, when the string includes whitespace
2023-06-12 06:49:33 +02:00
semantic-release-bot
70e893a5d3 chore(release): 2.176.2-dev.1 [skip ci]
## [2.176.2-dev.1](https://github.com/revanced/revanced-patches/compare/v2.176.1...v2.176.2-dev.1) (2023-06-12)

### Bug Fixes

* **syncforreddit/change-oauth-client-id:** use downloads directory ([28abefe](28abefeab0))
2023-06-12 02:40:50 +00:00
oSumAtrIX
28abefeab0 fix(syncforreddit/change-oauth-client-id): use downloads directory
This fixes permission errors on Android
2023-06-12 04:38:07 +02:00
semantic-release-bot
b2c7a6a54f chore(release): 2.176.1 [skip ci]
## [2.176.1](https://github.com/revanced/revanced-patches/compare/v2.176.0...v2.176.1) (2023-06-12)

### Bug Fixes

* **syncforreddit/change-oauth-client-id:** use correct signature for Android API ([3cd52cb](3cd52cbffa))
2023-06-12 02:00:51 +00:00
oSumAtrIX
4570b273a7 chore: merge branch dev to main (#2399) 2023-06-12 03:58:08 +02:00
semantic-release-bot
45d5f708af chore(release): 2.176.1-dev.1 [skip ci]
## [2.176.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.176.0...v2.176.1-dev.1) (2023-06-12)

### Bug Fixes

* **syncforreddit/change-oauth-client-id:** use correct signature for Android API ([3cd52cb](3cd52cbffa))
2023-06-12 01:57:20 +00:00
oSumAtrIX
3cd52cbffa fix(syncforreddit/change-oauth-client-id): use correct signature for Android API 2023-06-12 03:54:21 +02:00
4 changed files with 40 additions and 5 deletions

View File

@@ -1,3 +1,31 @@
## [2.176.2-dev.2](https://github.com/revanced/revanced-patches/compare/v2.176.2-dev.1...v2.176.2-dev.2) (2023-06-12)
### Bug Fixes
* **syncforreddit/change-oauth-client-id:** trim whitespace from OAuth string ([#2402](https://github.com/revanced/revanced-patches/issues/2402)) ([2afea71](https://github.com/revanced/revanced-patches/commit/2afea71557cfe4eb64d7c7ebf5a07dfd24a11824))
## [2.176.2-dev.1](https://github.com/revanced/revanced-patches/compare/v2.176.1...v2.176.2-dev.1) (2023-06-12)
### Bug Fixes
* **syncforreddit/change-oauth-client-id:** use downloads directory ([9b5af77](https://github.com/revanced/revanced-patches/commit/9b5af77a229a22466cfe8ed41a21d081beeae960))
## [2.176.1](https://github.com/revanced/revanced-patches/compare/v2.176.0...v2.176.1) (2023-06-12)
### Bug Fixes
* **syncforreddit/change-oauth-client-id:** use correct signature for Android API ([4db2eba](https://github.com/revanced/revanced-patches/commit/4db2eba6d66f094f1d2400bfa8b9c15a175f796e))
## [2.176.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.176.0...v2.176.1-dev.1) (2023-06-12)
### Bug Fixes
* **syncforreddit/change-oauth-client-id:** use correct signature for Android API ([4db2eba](https://github.com/revanced/revanced-patches/commit/4db2eba6d66f094f1d2400bfa8b9c15a175f796e))
# [2.176.0](https://github.com/revanced/revanced-patches/compare/v2.175.0...v2.176.0) (2023-06-12)

View File

@@ -1,7 +1,11 @@
package android.os;
import java.io.File;
public final class Environment {
public static String getExternalStorageDirectory() {
public static String DIRECTORY_DOWNLOADS = "Download";
public static File getExternalStoragePublicDirectory(final String type) {
throw new UnsupportedOperationException("Stub");
}
}

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 2.176.0
version = 2.176.2-dev.2

View File

@@ -34,7 +34,10 @@ class ChangeOAuthClientIdPatch : BytecodePatch(
return PatchResultError("No client ID provided")
}
File(Environment.getExternalStorageDirectory(), "reddit_client_id_revanced.txt").also {
File(
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),
"reddit_client_id_revanced.txt"
).also {
if (it.exists()) return@also
val error = """
@@ -47,7 +50,7 @@ class ChangeOAuthClientIdPatch : BytecodePatch(
""".trimIndent()
return PatchResultError(error)
}.let { clientId = it.readText() }
}.let { clientId = it.readText().trim() }
}
GetAuthorizationStringFingerprint.result?.also { result ->
@@ -93,4 +96,4 @@ class ChangeOAuthClientIdPatch : BytecodePatch(
)
)
}
}
}