You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2017/01/31 00:00:14 UTC
cordova-plugin-camera git commit: CB-12368: Fix permission check on
Android
Repository: cordova-plugin-camera
Updated Branches:
refs/heads/master 0ad5bdd9f -> d29c767f0
CB-12368: Fix permission check on Android
The plugin was checking whether camera permission was granted but then
actually requested permission for external storage.
Surprisingly enough this fixed CB-12368.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/d29c767f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/d29c767f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/d29c767f
Branch: refs/heads/master
Commit: d29c767f07a238eccdf74062d45578712d8d0e34
Parents: 0ad5bdd
Author: Sergey Zolotarev <sr...@yandex.com>
Authored: Fri Jan 27 01:41:56 2017 +0600
Committer: Julio C�sar <jc...@gmail.com>
Committed: Mon Jan 30 23:52:54 2017 +0100
----------------------------------------------------------------------
src/android/CameraLauncher.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/d29c767f/src/android/CameraLauncher.java
----------------------------------------------------------------------
diff --git a/src/android/CameraLauncher.java b/src/android/CameraLauncher.java
index e3ee20b..3970634 100644
--- a/src/android/CameraLauncher.java
+++ b/src/android/CameraLauncher.java
@@ -185,7 +185,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
}
else if ((this.srcType == PHOTOLIBRARY) || (this.srcType == SAVEDPHOTOALBUM)) {
// FIXME: Stop always requesting the permission
- if(!PermissionHelper.hasPermission(this, permissions[0])) {
+ if(!PermissionHelper.hasPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
PermissionHelper.requestPermission(this, SAVE_TO_ALBUM_SEC, Manifest.permission.READ_EXTERNAL_STORAGE);
} else {
this.getImage(this.srcType, destType, encodingType);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org