27 lines
783 B
Kotlin
27 lines
783 B
Kotlin
package com.vanced.manager.ui
|
|
|
|
import android.content.Intent
|
|
import android.os.Bundle
|
|
import androidx.appcompat.app.AppCompatActivity
|
|
import androidx.preference.PreferenceManager.getDefaultSharedPreferences
|
|
import com.topjohnwu.superuser.Shell
|
|
|
|
class SplashScreenActivity : AppCompatActivity() {
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
super.onCreate(savedInstanceState)
|
|
|
|
//Preheat the shell
|
|
Shell.getShell {
|
|
if (getDefaultSharedPreferences(this).getBoolean("firstLaunch", true)) {
|
|
startActivity(Intent(this, WelcomeActivity::class.java))
|
|
finish()
|
|
} else {
|
|
startActivity(Intent(this, MainActivity::class.java))
|
|
finish()
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|