Skip to content

Commit

Permalink
chore: update plugins to 3.0.0-alpha.14 (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlpoole authored Jan 13, 2021
1 parent 2c3776c commit 6be5d7d
Show file tree
Hide file tree
Showing 25 changed files with 66 additions and 70 deletions.
4 changes: 2 additions & 2 deletions action-sheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions app-launcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ private void showPhotos(final PluginCall call) {
private boolean checkCameraPermissions(PluginCall call) {
// if the manifest does not contain the camera permissions key, we don't need to ask the user
boolean needCameraPerms = hasDefinedPermissions(new String[] { Manifest.permission.CAMERA });
boolean hasCameraPerms = !needCameraPerms || hasPermission(Manifest.permission.CAMERA);
boolean hasPhotoPerms = hasPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE);
boolean hasCameraPerms = !needCameraPerms || getPermissionState("camera") == PermissionState.GRANTED;
boolean hasPhotoPerms = getPermissionState("photos") == PermissionState.GRANTED;

// If we want to save to the gallery, we need two permissions
if (settings.isSaveToGallery() && !(hasCameraPerms && hasPhotoPerms)) {
Expand All @@ -161,7 +161,7 @@ else if (!hasCameraPerms) {
}

private boolean checkPhotosPermissions(PluginCall call) {
if (!hasPermission(Manifest.permission.READ_EXTERNAL_STORAGE)) {
if (getPermissionState("photos") != PermissionState.GRANTED) {
requestPermissionForAlias("photos", call);
return false;
}
Expand All @@ -173,15 +173,14 @@ private boolean checkPhotosPermissions(PluginCall call) {
*
* @see #getPhoto(PluginCall)
* @param call the plugin call
* @param permissionStatus the results of the permission request
*/
private void cameraPermissionsCallback(PluginCall call, Map<String, PermissionState> permissionStatus) {
if (settings.getSource() == CameraSource.CAMERA && permissionStatus.get("camera") == PermissionState.DENIED) {
Logger.debug(getLogTag(), "User denied camera permission: " + permissionStatus.toString());
private void cameraPermissionsCallback(PluginCall call) {
if (settings.getSource() == CameraSource.CAMERA && getPermissionState("camera") != PermissionState.GRANTED) {
Logger.debug(getLogTag(), "User denied camera permission: " + getPermissionState("camera").toString());
call.reject(PERMISSION_DENIED_ERROR);
return;
} else if (settings.getSource() == CameraSource.PHOTOS && permissionStatus.get("photos") == PermissionState.DENIED) {
Logger.debug(getLogTag(), "User denied photos permission: " + permissionStatus.toString());
} else if (settings.getSource() == CameraSource.PHOTOS && getPermissionState("photos") != PermissionState.GRANTED) {
Logger.debug(getLogTag(), "User denied photos permission: " + getPermissionState("photos").toString());
call.reject(PERMISSION_DENIED_ERROR);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions camera/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions clipboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions device/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.getcapacitor.annotation.Permission;
import java.io.*;
import java.nio.charset.Charset;
import java.util.Map;
import org.json.JSONException;

@CapacitorPlugin(
Expand Down Expand Up @@ -349,8 +348,8 @@ private void _copy(PluginCall call, Boolean doRename) {
}
}

private void readPermissionsCallback(PluginCall call, Map<String, PermissionState> status) {
if (status.get(READ_STORAGE) != PermissionState.GRANTED) {
private void readPermissionsCallback(PluginCall call) {
if (getPermissionState(READ_STORAGE) != PermissionState.GRANTED) {
Logger.debug(getLogTag(), "User denied read storage permission");
call.reject(PERMISSION_DENIED_ERROR);
return;
Expand All @@ -372,8 +371,8 @@ private void readPermissionsCallback(PluginCall call, Map<String, PermissionStat
}
}

private void writePermissionsCallback(PluginCall call, Map<String, PermissionState> status) {
if (status.get(WRITE_STORAGE) != PermissionState.GRANTED) {
private void writePermissionsCallback(PluginCall call) {
if (getPermissionState(WRITE_STORAGE) != PermissionState.GRANTED) {
Logger.debug(getLogTag(), "User denied write storage permission");
call.reject(PERMISSION_DENIED_ERROR);
return;
Expand Down Expand Up @@ -408,7 +407,7 @@ private void writePermissionsCallback(PluginCall call, Map<String, PermissionSta
* @return Returns true if the permission is granted and false if it is denied.
*/
private boolean isStoragePermissionGranted(String alias) {
return getPermissionStates().get(alias) == PermissionState.GRANTED;
return getPermissionState(alias) == PermissionState.GRANTED;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions filesystem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void load() {

/**
* Gets a snapshot of the current device position if permission is granted. The call continues
* in the {@link #completeCurrentPosition(PluginCall, Map)} method if a permission request is required.
* in the {@link #completeCurrentPosition(PluginCall)} method if a permission request is required.
*
* @param call Plugin call
*/
Expand All @@ -48,10 +48,9 @@ public void getCurrentPosition(final PluginCall call) {
* Completes the getCurrentPosition plugin call after a permission request
* @see #getCurrentPosition(PluginCall)
* @param call the plugin call
* @param status the results of the permission request
*/
private void completeCurrentPosition(PluginCall call, Map<String, PermissionState> status) {
if (status.get("location") == PermissionState.GRANTED) {
private void completeCurrentPosition(PluginCall call) {
if (getPermissionState("location") == PermissionState.GRANTED) {
boolean enableHighAccuracy = call.getBoolean("enableHighAccuracy", false);
int timeout = call.getInt("timeout", 10000);

Expand All @@ -78,7 +77,7 @@ public void error(String message) {

/**
* Begins watching for live location changes if permission is granted. The call continues
* in the {@link #completeWatchPosition(PluginCall, Map)} method if a permission request is required.
* in the {@link #completeWatchPosition(PluginCall)} method if a permission request is required.
*
* @param call the plugin call
*/
Expand All @@ -96,10 +95,9 @@ public void watchPosition(PluginCall call) {
* Completes the watchPosition plugin call after a permission request
* @see #watchPosition(PluginCall)
* @param call the plugin call
* @param status the results of the permission request
*/
private void completeWatchPosition(PluginCall call, Map<String, PermissionState> status) {
if (status.get("location") == PermissionState.GRANTED) {
private void completeWatchPosition(PluginCall call) {
if (getPermissionState("location") == PermissionState.GRANTED) {
startWatch(call);
} else {
call.reject("Location permission was denied");
Expand Down
4 changes: 2 additions & 2 deletions geolocation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions haptics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
6 changes: 3 additions & 3 deletions keyboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/cli": "^3.0.0-alpha.13",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/cli": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions motion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"eslint": "^7.11.0",
Expand Down
4 changes: 2 additions & 2 deletions network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
6 changes: 3 additions & 3 deletions push-notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/cli": "^3.0.0-alpha.13",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/cli": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions screen-reader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions share/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
6 changes: 3 additions & 3 deletions splash-screen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/cli": "^3.0.0-alpha.13",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/cli": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions status-bar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.12",
"@capacitor/android": "^3.0.0-alpha.14",
"@capacitor/core": "^3.0.0-alpha.12",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.13",
"@capacitor/ios": "^3.0.0-alpha.14",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "~1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down
Loading

0 comments on commit 6be5d7d

Please sign in to comment.