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..a23af7e3 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 @@ -125,13 +125,13 @@ public Uri getImageUri(Context inContext, Bitmap inImage) { @Override public void checkCameraPermission() { - if (CheckSelfPermissionAndRequest.checkSelfPermission(this, - Manifest.permission.WRITE_EXTERNAL_STORAGE)) { - shareImage(); - } else { - requestPermission(); + if (CheckSelfPermissionAndRequest.checkSelfPermission(this, + Manifest.permission.WRITE_EXTERNAL_STORAGE)) { + shareImage(); + } else { + requestPermission(); + } } - } @Override public void requestPermission() { @@ -156,18 +156,19 @@ public void loadCustomerPortrait() { public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { switch (requestCode) { - case ConstantKeys.PERMISSIONS_REQUEST_CAMERA: { - if (grantResults.length > 0 - && grantResults[0] == PackageManager.PERMISSION_GRANTED) { - shareImage(); - } else { - Toaster.show(findViewById(android.R.id.content), - getString(R.string.permission_denied_write)); - } + case ConstantKeys.PERMISSIONS_REQUEST_CAMERA: {switch (requestCode) { + case ConstantKeys.PERMISSION_REQUEST_WRITE_EXTERNAL_STORAGE: { + if (grantResults.length > 0 + && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + shareImage(); + } else { + Toaster.show(findViewById(android.R.id.content), + getString(R.string.permission_denied_write)); + } + }} } } } - @Override public void refreshUI() { loadCustomerPortrait();