From fc215b372c19457e3c029a1e8023a96929d6fa9f Mon Sep 17 00:00:00 2001 From: kimyujin-com <80165026+kimyujin-com@users.noreply.github.com> Date: Tue, 20 Feb 2024 21:11:36 +0900 Subject: [PATCH] =?UTF-8?q?Remove:=20=EC=BB=A4=EB=A6=AC=EC=96=B4=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C=20=EB=B6=88=ED=95=84=EC=9A=94=20?= =?UTF-8?q?=EA=B6=8C=ED=95=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/ui/career/UploadBottomFragment.kt | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/app/src/main/java/umc/com/mobile/project/ui/career/UploadBottomFragment.kt b/app/src/main/java/umc/com/mobile/project/ui/career/UploadBottomFragment.kt index 008b941..eb35faf 100644 --- a/app/src/main/java/umc/com/mobile/project/ui/career/UploadBottomFragment.kt +++ b/app/src/main/java/umc/com/mobile/project/ui/career/UploadBottomFragment.kt @@ -1,10 +1,8 @@ package umc.com.mobile.project.ui.career -import android.Manifest import android.app.Activity import android.content.Context import android.content.Intent -import android.content.pm.PackageManager import android.graphics.Bitmap import android.graphics.BitmapFactory import android.net.Uri @@ -14,8 +12,6 @@ import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.Toast -import androidx.core.content.ContextCompat import androidx.fragment.app.activityViewModels import com.google.android.material.bottomsheet.BottomSheetDialogFragment import umc.com.mobile.project.databinding.FragmentUploadBottomBinding @@ -32,9 +28,6 @@ class UploadBottomFragment(context: Context, private val viewModelType: Int) : private val editViewModel: CareerEditActivityViewModel by activityViewModels() private val binding get() = _binding!! - private val REQUEST_CODE_PERMISSIONS = 10 - private val REQUIRED_PERMISSIONS = arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE) - override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, @@ -54,27 +47,9 @@ class UploadBottomFragment(context: Context, private val viewModelType: Int) : dialog!!.dismiss() } - if (!allPermissionsGranted()) { - requestPermissions(REQUIRED_PERMISSIONS, REQUEST_CODE_PERMISSIONS) - } return binding.root } - private fun allPermissionsGranted() = REQUIRED_PERMISSIONS.all { - ContextCompat.checkSelfPermission(requireContext(), it) == PackageManager.PERMISSION_GRANTED - } - - override fun onRequestPermissionsResult(requestCode: Int, permissions: Array, grantResults: IntArray) { - if (requestCode == REQUEST_CODE_PERMISSIONS) { - if (allPermissionsGranted()) { - // 권한이 모두 부여되었을 때 실행할 코드를 여기에 작성합니다. - } else { - Toast.makeText(requireContext(), "Permissions not granted by the user.", Toast.LENGTH_SHORT).show() - activity?.finish() - } - } - } - private val PICK_IMAGE_MULTIPLE = 2 private fun openGallery() {