mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-25 23:47:24 +00:00
Cleanups
This commit is contained in:
parent
ca156befbd
commit
4a3f5dc619
@ -7,7 +7,6 @@ import com.topjohnwu.magisk.model.entity.MagiskLog
|
|||||||
import com.topjohnwu.magisk.model.entity.WrappedMagiskLog
|
import com.topjohnwu.magisk.model.entity.WrappedMagiskLog
|
||||||
import com.topjohnwu.magisk.utils.toSingle
|
import com.topjohnwu.magisk.utils.toSingle
|
||||||
import com.topjohnwu.superuser.Shell
|
import com.topjohnwu.superuser.Shell
|
||||||
import timber.log.Timber
|
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
|
||||||
@ -21,7 +20,6 @@ class LogRepository(
|
|||||||
|
|
||||||
fun fetchMagiskLogs() = "tail -n 5000 ${Const.MAGISK_LOG}".suRaw()
|
fun fetchMagiskLogs() = "tail -n 5000 ${Const.MAGISK_LOG}".suRaw()
|
||||||
.filter { it.isNotEmpty() }
|
.filter { it.isNotEmpty() }
|
||||||
.map { Timber.i(it.toString()); it }
|
|
||||||
|
|
||||||
fun clearLogs() = logDao.deleteAll()
|
fun clearLogs() = logDao.deleteAll()
|
||||||
fun clearOutdated() = logDao.deleteOutdated()
|
fun clearOutdated() = logDao.deleteOutdated()
|
||||||
|
@ -5,14 +5,11 @@ import android.os.Bundle
|
|||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.skoumal.teanity.extensions.subscribeK
|
|
||||||
import com.topjohnwu.magisk.*
|
import com.topjohnwu.magisk.*
|
||||||
import com.topjohnwu.magisk.data.database.SettingsDao
|
import com.topjohnwu.magisk.data.database.SettingsDao
|
||||||
import com.topjohnwu.magisk.tasks.UpdateRepos
|
|
||||||
import com.topjohnwu.magisk.utils.Utils
|
import com.topjohnwu.magisk.utils.Utils
|
||||||
import com.topjohnwu.magisk.view.Notifications
|
import com.topjohnwu.magisk.view.Notifications
|
||||||
import com.topjohnwu.magisk.view.Shortcuts
|
import com.topjohnwu.magisk.view.Shortcuts
|
||||||
import com.topjohnwu.net.Networking
|
|
||||||
import com.topjohnwu.superuser.Shell
|
import com.topjohnwu.superuser.Shell
|
||||||
import org.koin.android.ext.android.get
|
import org.koin.android.ext.android.get
|
||||||
|
|
||||||
@ -61,14 +58,6 @@ open class SplashActivity : AppCompatActivity() {
|
|||||||
// Setup shortcuts
|
// Setup shortcuts
|
||||||
Shortcuts.setup(this)
|
Shortcuts.setup(this)
|
||||||
|
|
||||||
// Magisk working as expected
|
|
||||||
if (Shell.rootAccess() && Info.magiskVersionCode > 0) {
|
|
||||||
// Load repos
|
|
||||||
if (Networking.checkNetworkStatus(this)) {
|
|
||||||
get<UpdateRepos>().exec().subscribeK()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val intent = Intent(this, ClassMap[MainActivity::class.java])
|
val intent = Intent(this, ClassMap[MainActivity::class.java])
|
||||||
intent.putExtra(Const.Key.OPEN_SECTION, getIntent().getStringExtra(Const.Key.OPEN_SECTION))
|
intent.putExtra(Const.Key.OPEN_SECTION, getIntent().getStringExtra(Const.Key.OPEN_SECTION))
|
||||||
DONE = true
|
DONE = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user