Skip to content

Commit

Permalink
Fix: Prevent duplicate shell init
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanGIG committed Jan 9, 2024
1 parent 9c81f0f commit 78722ee
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/src/main/java/com/dumper/android/core/SplashActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import com.topjohnwu.superuser.Shell
class SplashActivity : Activity() {
companion object {
init {
// Set settings before the main shell can be created
Shell.enableVerboseLogging = BuildConfig.DEBUG;
Shell.setDefaultBuilder(
Shell.Builder.create()
.setFlags(Shell.FLAG_REDIRECT_STDERR)
.setTimeout(10)
);
if (Shell.getCachedShell() != null) {
Shell.enableVerboseLogging = BuildConfig.DEBUG;
Shell.setDefaultBuilder(
Shell.Builder.create()
.setFlags(Shell.FLAG_REDIRECT_STDERR)
.setTimeout(10)
)
}
}
}

Expand Down

0 comments on commit 78722ee

Please sign in to comment.