Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

fix: Change permission from CAMERA to WRITE EXTERNAL STORAGE #78

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public interface CustomerProfileContract {

interface View extends MvpView {

void checkCameraPermission();
void checkWriteExternalStoragePermission();

void requestPermission();

Expand Down