Skip to content

Conversation

@Deskana
Copy link
Contributor

@Deskana Deskana commented May 19, 2019

Refactor onRequestPermissionsResult to be simpler

onRequestPermissionsResult has a switch statement with a single case, and a functionally empty default; this patch refactors it into an if statement to simplify the code. This patch also changes a C-style array declaration (String permissions[]) to the more standard Java style (String[] permissions). There's no change in functionality, just in code style.

Tests performed

Tested prodDebug on Pixel 2 emulator with API level 25.

Screenshots showing what changed

No change in functionality, so no screenshots.

onRequestPermissionsResult has a switch statement with a single case, and a functionally empty default; this patch refactors it into an if statement to simplify the code. This patch also changes a C-style array declaration (String permissions[]) to the more standard Java style (String[] permissions).
@codecov-io
Copy link

Codecov Report

Merging #2965 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2965      +/-   ##
=========================================
+ Coverage    3.69%   3.69%   +<.01%     
=========================================
  Files         247     247              
  Lines       12214   12213       -1     
  Branches     1081    1081              
=========================================
  Hits          451     451              
+ Misses      11729   11728       -1     
  Partials       34      34
Impacted Files Coverage Δ
...r/free/nrw/commons/contributions/MainActivity.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 877c669...80b3b21. Read the comment docs.

Copy link
Collaborator

@neslihanturan neslihanturan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Deskana !

@neslihanturan neslihanturan merged commit 5f35102 into commons-app:master May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants