chore(syncforreddit/change-oauth-client-id): revert using downloads directory

This commit is contained in:
oSumAtrIX 2023-06-12 23:21:20 +02:00
parent 8f673da7c9
commit 18ec8f46dd
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 2 additions and 7 deletions

View File

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

View File

@ -39,10 +39,7 @@ class ChangeOAuthClientIdPatch : BytecodePatch(
return PatchResultError("No client ID provided")
}
File(
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),
"reddit_client_id_revanced.txt"
).also {
File(Environment.getExternalStorageDirectory(), "reddit_client_id_revanced.txt").also {
if (it.exists()) return@also
val error = """