Skip to content

Commit

Permalink
chore: Rename service correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Jan 15, 2024
1 parent ff4d8bf commit 64b1808
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package app.revanced.library.installation.command;

interface ILocalShellCommandRunnerRootService {
IBinder getFileSystemService();
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.content.Context
import android.content.Intent
import android.content.ServiceConnection
import android.os.IBinder
import app.revanced.library.IRootService
import com.topjohnwu.superuser.Shell
import com.topjohnwu.superuser.internal.BuilderImpl
import com.topjohnwu.superuser.ipc.RootService
Expand Down Expand Up @@ -65,10 +64,8 @@ class LocalShellCommandRunner(
}

override fun onServiceConnected(name: ComponentName?, service: IBinder?) {
val ipc = IRootService.Stub.asInterface(service)
val binder = ipc.fileSystemService

fileSystemManager = FileSystemManager.getRemote(binder)
val ipc = ILocalShellCommandRunnerRootService.Stub.asInterface(service)
fileSystemManager = FileSystemManager.getRemote(ipc.fileSystemService)

logger.info("LocalShellCommandRunner service is ready")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package app.revanced.library.installation.command

import android.content.Intent
import app.revanced.library.IRootService
import com.topjohnwu.superuser.ipc.RootService
import com.topjohnwu.superuser.nio.FileSystemManager

/**
* The [RootService] for the [LocalShellCommandRunner].
*/
internal class LocalShellCommandRunnerRootService : RootService() {
override fun onBind(intent: Intent) = object : IRootService.Stub() {
override fun onBind(intent: Intent) = object : ILocalShellCommandRunnerRootService.Stub() {
override fun getFileSystemService() =
FileSystemManager.getService()
}
Expand Down

0 comments on commit 64b1808

Please sign in to comment.