Skip to content

Commit

Permalink
- Fixed JP Censored for Shizuku
Browse files Browse the repository at this point in the history
  • Loading branch information
Altterisk committed Mar 28, 2024
1 parent 23acb84 commit aeec303
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
minSdkVersion 24
//noinspection ExpiredTargetSdkVersion
targetSdkVersion 30
versionCode 10102
versionName "1.1.2"
versionCode 10103
versionName "1.1.3"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/altter/lomodinstaller/Cleaner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ fun runPatcherShizuku(
} else if (mode == 2) {
logFunction(String.format(context.getString(R.string.DELETE_START), target))
shell.removeFolder("$path/files/UnityCache/Shared/${target}")
?.let { logFunction(it) }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class MainActivity : AppCompatActivity() {
isEnabled = false
}
}
if (mShizukuShell.checkDirExist("/storage/emulated/0/Android/data/com.com.pig.laojp.aos")) {
if (mShizukuShell.checkDirExist("/storage/emulated/0/Android/data/com.pig.laojp.aos")) {
switches[playstoreJPSwitch] = "/storage/emulated/0/Android/data/com.pig.laojp.aos"
playstoreJPSwitch.apply {
isChecked = true
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/com/altter/lomodinstaller/ShizukuShell.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.ComponentName
import android.content.ServiceConnection
import android.content.pm.PackageManager
import android.os.IBinder
import android.util.Log
import rikka.shizuku.Shizuku
import kotlin.reflect.KFunction0

Expand Down Expand Up @@ -70,8 +71,8 @@ class ShizukuShell(serviceCallback: KFunction0<Unit>? = null) {
runShizukuCommand(arrayOf("cp", fromPath, toPath))
}

fun removeFolder(path: String) {
fun removeFolder(path: String): String? {
val path2 = path.replace(" ", Regex.escapeReplacement("\\ "))
runShizukuCommand(arrayOf("rm", "-r", path))
return runShizukuCommand(arrayOf("rm", "-rv", path))
}
}

0 comments on commit aeec303

Please sign in to comment.