Skip to content

Commit

Permalink
Revert "fix: Change permission from CAMERA to WRITE EXTERNAL STORAGE"
Browse files Browse the repository at this point in the history
This reverts commit 3c24d9c
  • Loading branch information
Sparsh1212 committed Nov 28, 2020
1 parent d4eb381 commit 2d249a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class CustomerProfileActivity: MifosBaseActivity(),CustomerProfileContract.View

override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == R.id.menu_customer_profile_share) {
checkWriteExternalStoragePermission()
checkCameraPermission()
return true
}
else return super.onOptionsItemSelected(item)
Expand Down Expand Up @@ -79,7 +79,7 @@ class CustomerProfileActivity: MifosBaseActivity(),CustomerProfileContract.View
return returnedBitmap
}

override fun checkWriteExternalStoragePermission() {
override fun checkCameraPermission() {
if (CheckSelfPermissionAndRequest.checkSelfPermission(this,
android.Manifest.permission.WRITE_EXTERNAL_STORAGE)){
shareImage()
Expand Down Expand Up @@ -110,7 +110,7 @@ class CustomerProfileActivity: MifosBaseActivity(),CustomerProfileContract.View
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>,
grantResults: IntArray) {
when (requestCode) {
ConstantKeys.PERMISSION_REQUEST_WRITE_EXTERNAL_STORAGE -> {
ConstantKeys.PERMISSIONS_REQUEST_CAMERA -> {
if (grantResults.size > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
shareImage()
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.mifos.mobile.cn.ui.base.MvpView
interface CustomerProfileContract {

interface View: MvpView{
fun checkWriteExternalStoragePermission();
fun checkCameraPermission();

fun requestPermission();

Expand Down

0 comments on commit 2d249a3

Please sign in to comment.