From 93c2e540b1087140ea42f6b2bafa061f71ce35db Mon Sep 17 00:00:00 2001 From: JaesungMoon Date: Thu, 7 Jul 2022 01:48:15 +0900 Subject: [PATCH] typo: Camera2Basic --- .../android/camera2/basic/fragments/PermissionsFragment.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Camera2Basic/app/src/main/java/com/example/android/camera2/basic/fragments/PermissionsFragment.kt b/Camera2Basic/app/src/main/java/com/example/android/camera2/basic/fragments/PermissionsFragment.kt index 1d6ceb53..1483ac46 100644 --- a/Camera2Basic/app/src/main/java/com/example/android/camera2/basic/fragments/PermissionsFragment.kt +++ b/Camera2Basic/app/src/main/java/com/example/android/camera2/basic/fragments/PermissionsFragment.kt @@ -40,7 +40,7 @@ class PermissionsFragment : Fragment() { if (hasPermissions(requireContext())) { // If permissions have already been granted, proceed - nativateToCamera(); + navigateToCamera(); } else { // Request camera-related permissions requestPermissions(PERMISSIONS_REQUIRED, PERMISSIONS_REQUEST_CODE) @@ -53,14 +53,14 @@ class PermissionsFragment : Fragment() { if (requestCode == PERMISSIONS_REQUEST_CODE) { if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { // Takes the user to the success fragment when permission is granted - nativateToCamera(); + navigateToCamera(); } else { Toast.makeText(context, "Permission request denied", Toast.LENGTH_LONG).show() } } } - private fun nativateToCamera() + private fun navigateToCamera() { lifecycleScope.launchWhenStarted { Navigation.findNavController(requireActivity(), R.id.fragment_container).navigate(