Skip to content

Commit

Permalink
check for empty array on permission granted
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Brateman committed Apr 22, 2016
1 parent 7337535 commit 034fa1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions card.io/src/main/java/io/card/payment/CardIOActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,8 @@ public void onRequestPermissionsResult(int requestCode,
switch (requestCode) {
case PERMISSION_REQUEST_ID: {
waitingForPermission = false;
if (grantResults[0] ==
PackageManager.PERMISSION_GRANTED){
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED){
showCameraScannerOverlay();

} else {
Expand Down
4 changes: 4 additions & 0 deletions sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
card.io Android SDK change log and release notes
================================================

5.3.4
-----
* Fix crash on Android 23 and above where `onRequestPermissionsResult()` returns an empty array [card.io-Android-source#70](https://github.com/card-io/card.io-Android-source/issues/70).

5.3.3
-----
* Fix newline issue in ES locale [#142](https://github.com/card-io/card.io-Android-SDK/issues/142).
Expand Down

0 comments on commit 034fa1b

Please sign in to comment.