Skip to content

Commit

Permalink
fix: fixed crash in OnboardingFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
timschneeb committed Mar 23, 2023
1 parent 065ffae commit 0d08023
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ class OnboardingFragment : Fragment() {
override fun onShellAttached(isRoot: Boolean) {
Timber.d("onShellAttached: isRoot=$isRoot")
if(!isRoot) {
requireContext().showAlert(
context?.showAlert(
R.string.onboarding_root_shell_fail_title,
R.string.onboarding_root_shell_fail
)
return
}
val success = RootShellImpl.cmd("pm grant ${BuildConfig.APPLICATION_ID} android.permission.DUMP\n")
if(!success && !requireContext().hasDumpPermission()) {
requireContext().showAlert(
if(!success && context?.hasDumpPermission() != true) {
context?.showAlert(
R.string.onboarding_root_shell_fail_title,
R.string.onboarding_root_shell_fail_unknown
)
Expand Down

0 comments on commit 0d08023

Please sign in to comment.