You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2020/03/10 16:58:14 UTC

[GitHub] [fineract-cn-mobile] garvit984 opened a new pull request #82: Update CustomerProfileActivity.java

garvit984 opened a new pull request #82: Update CustomerProfileActivity.java
URL: https://github.com/apache/fineract-cn-mobile/pull/82
 
 
   Fixes #78 FIN-203
   
   Checking for Camera Permission instead of Write Permission in CustomerProfileActivity
   
   Click on "Customer" inside the drawer.
   Click on any item in the list of customers.
   Click on the profile picture (by default it's the Mifos Logo)
   Click on the "Share" option in the app bar.
   Supposing the permission to write to external storage is not given, it'll ask for permission. When granted it should ideally call the "share image" method, but nothing happens. This is because when the Permission is being granted, it's checking for "CAMERA" permission instead of "WRITE_EXTERNAL_STORAGE" permission.
   It occurs when the permission is being granted initially and later, this error does not occur.
   Please make sure these boxes are checked before submitting your pull request - thanks!
   
    Apply the AndroidStyle.xml style template to your code in Android Studio.
   
    Run the unit tests with ./gradlew check to make sure you didn't break anything.
   
    If you have multiple commits please combine them into one commit by squashing them.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fineract-cn-mobile] jawidMuhammadi commented on a change in pull request #82: Update CustomerProfileActivity.java

Posted by GitBox <gi...@apache.org>.
jawidMuhammadi commented on a change in pull request #82: Update CustomerProfileActivity.java
URL: https://github.com/apache/fineract-cn-mobile/pull/82#discussion_r391088637
 
 

 ##########
 File path: app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/CustomerProfileActivity.java
 ##########
 @@ -164,6 +168,16 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
                     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: {
 
 Review comment:
   why we are using two switches? It is too complicated, even by that, as I see in both cases we are doing the same thing. Instead, add only  `case ConstantKeys.PERMISSION_REQUEST_WRITE_EXTERNAL_STORAGE:` before `case ConstantKeys.PERMISSIONS_REQUEST_CAMERA:` at line number 163 without adding `break` after the first case. It will do the same work as your boilerplate codes are doing at line numbers[171-180].

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services