Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAR-232: (android) Camera plugin code cleanup - Part #2 #425

Merged
merged 1 commit into from Mar 1, 2019

Conversation

hazems
Copy link
Member

@hazems hazems commented Feb 24, 2019

Platforms affected

Android

What does this PR do?

  1. Organizing CameraLauncher imports.
  2. Replacing Repeated String literals with final variables in CameraLauncher for having better maintainability and easier changes.
  3. Fixing a mis-formatted comment.

What testing has been done on this change?

Making sure that everything builds fine, also, run my own tests for Android Camera and all pass fine.

Checklist

  • [*] I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • [*] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • [*] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • [] I've updated the documentation if necessary

@@ -18,34 +18,13 @@ Licensed to the Apache Software Foundation (ASF) under one
*/
package org.apache.cordova.camera;

Copy link
Member Author

Choose a reason for hiding this comment

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

Organizing imports

@@ -87,13 +81,19 @@ Licensed to the Apache Software Foundation (ASF) under one

private static final int JPEG = 0; // Take a picture of type JPEG
private static final int PNG = 1; // Take a picture of type PNG
Copy link
Member Author

Choose a reason for hiding this comment

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

Organizing hard coded literal strings.

//I have no idea what type of URI is being passed in
this.imageUri = new CordovaUri(Uri.parse(state.getString("imageUri")));
this.imageUri = new CordovaUri(Uri.parse(state.getString(IMAGE_URI_KEY)));
}

this.callbackContext = callbackContext;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixing mis-formatted comment.

@macdonst macdonst merged commit a13665d into apache:master Mar 1, 2019
@hazems
Copy link
Member Author

hazems commented Mar 2, 2019

Thanks @macdonst

@hazems hazems changed the title AAR-232: (android) Enhancement: Camera plugin code cleanup AAR-232: (android) Enhancement: Camera plugin code cleanup - Part #2 Mar 3, 2019
@hazems hazems changed the title AAR-232: (android) Enhancement: Camera plugin code cleanup - Part #2 AAR-232: (android) Camera plugin code cleanup - Part #2 Mar 3, 2019
DavidWiesner pushed a commit to DavidWiesner/cordova-plugin-camera that referenced this pull request Dec 7, 2021
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.

None yet

2 participants