Skip to content

Comments

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

Merged
macdonst merged 1 commit intoapache:masterfrom
hazems:hazems/AAR-232
Mar 1, 2019
Merged

AAR-232: (android) Camera plugin code cleanup - Part #2#425
macdonst merged 1 commit intoapache:masterfrom
hazems:hazems/AAR-232

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 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect

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.


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.

2 participants