We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8c08cf commit 23bb8deCopy full SHA for 23bb8de
app/src/main/java/com/appcontrolx/service/PermissionBridge.kt
@@ -64,10 +64,10 @@ class PermissionBridge(private val context: Context? = null) {
64
*/
65
fun checkRootNow(): Boolean {
66
return try {
67
- // Initialize shell if needed
68
- if (!Shell.isAppGrantedRoot()!!) {
69
- Shell.getShell() // This will trigger root request
70
- }
+ // Get shell instance - this will trigger root request if needed
+ val shell = Shell.getShell()
+
+ // Check if root was granted
71
Shell.isAppGrantedRoot() == true
72
} catch (e: Exception) {
73
false
0 commit comments