Skip to content

Commit

Permalink
Revert "add new root check"
Browse files Browse the repository at this point in the history
This reverts commit 5afddf2.
  • Loading branch information
Tokito-Kun authored and Tokito-Kun committed Jun 30, 2023
1 parent a589861 commit 94c83a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/mattecarra/accapp/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.app.Application
import androidx.multidex.MultiDexApplication
import androidx.preference.PreferenceManager.getDefaultSharedPreferences
import com.topjohnwu.superuser.Shell
import com.topjohnwu.superuser.Shell.Config
import mattecarra.accapp.utils.LogExt

class MainApplication: MultiDexApplication()
Expand Down
10 changes: 3 additions & 7 deletions app/src/main/java/mattecarra/accapp/activities/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -501,12 +501,9 @@ class MainActivity : ScopedAppActivity(), BottomNavigationView.OnNavigationItemS
// Set theme
setTheme()

fun executeCommandWithRoot() {
val command = "su -c"
Shell.su(command).exec()
if (Shell.isAppGrantedRoot() != true)
{
MaterialDialog(this).show {
if (!Shell.rootAccess())
{
MaterialDialog(this).show {
title(R.string.tile_acc_no_root)
message(R.string.no_root_message)
positiveButton(android.R.string.ok) { finish() }
Expand All @@ -524,7 +521,6 @@ class MainActivity : ScopedAppActivity(), BottomNavigationView.OnNavigationItemS
initUi()
}
}
}

fun checkWritePermission(context: Context)
{
Expand Down

0 comments on commit 94c83a2

Please sign in to comment.