diff --git a/app/src/main/java/com/dumper/android/core/MainActivity.kt b/app/src/main/java/com/dumper/android/core/MainActivity.kt index 264132c..d0355ed 100644 --- a/app/src/main/java/com/dumper/android/core/MainActivity.kt +++ b/app/src/main/java/com/dumper/android/core/MainActivity.kt @@ -64,6 +64,8 @@ class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + checkShell() + setContent { PADumperTheme { MainScreen(memory, console) @@ -80,6 +82,15 @@ class MainActivity : ComponentActivity() { } } + private fun checkShell() { + if (Shell.getCachedShell() == null) { + Intent(this, SplashActivity::class.java).also { + startActivity(it) + finish() + } + } + } + fun sendRequestAllProcess() { if (intent.getBooleanExtra("IS_ROOT", false)) { val message = Message.obtain(null, MSG_GET_PROCESS_LIST)