From abd48cbccd87f835da10a1c00075b6bcf3966b88 Mon Sep 17 00:00:00 2001 From: prajwal27 Date: Thu, 5 Mar 2020 13:03:41 +0530 Subject: [PATCH] fix: Change permission from CAMERA to WRITE EXTERANL STORAGE --- .../customers/customerprofile/CustomerProfileActivity.java | 6 +++--- .../customers/customerprofile/CustomerProfileContract.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/CustomerProfileActivity.java b/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/CustomerProfileActivity.java index b31078cb..5925e291 100644 --- a/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/CustomerProfileActivity.java +++ b/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/CustomerProfileActivity.java @@ -85,7 +85,7 @@ public boolean onOptionsItemSelected(MenuItem item) { getString(R.string.customer_image)); return true; case R.id.menu_customer_profile_share: - checkCameraPermission(); + checkWriteExternalStoragePermission(); return true; default: return super.onOptionsItemSelected(item); @@ -124,7 +124,7 @@ public Uri getImageUri(Context inContext, Bitmap inImage) { } @Override - public void checkCameraPermission() { + public void checkWriteExternalStoragePermission() { if (CheckSelfPermissionAndRequest.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) { shareImage(); @@ -156,7 +156,7 @@ public void loadCustomerPortrait() { public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { switch (requestCode) { - case ConstantKeys.PERMISSIONS_REQUEST_CAMERA: { + case ConstantKeys.PERMISSION_REQUEST_WRITE_EXTERNAL_STORAGE: { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { shareImage(); diff --git a/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/CustomerProfileContract.java b/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/CustomerProfileContract.java index 485d6275..04ef53f8 100644 --- a/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/CustomerProfileContract.java +++ b/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/CustomerProfileContract.java @@ -10,7 +10,7 @@ public interface CustomerProfileContract { interface View extends MvpView { - void checkCameraPermission(); + void checkWriteExternalStoragePermission(); void requestPermission();