Skip to content

Commit

Permalink
use ERROR_EXTRA constant
Browse files Browse the repository at this point in the history
  • Loading branch information
lbalmaceda committed Aug 18, 2016
1 parent 96a8551 commit 1252d0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/src/main/java/com/auth0/android/lock/Lock.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ private void processEvent(Intent data) {
switch (action) {
case Constants.AUTHENTICATION_ACTION:
Log.v(TAG, "AUTHENTICATION action received in our BroadcastReceiver");
if (data.getExtras().containsKey("error")) {
callback.onError(new LockException(data.getStringExtra("error")));
if (data.getExtras().containsKey(Constants.ERROR_EXTRA)) {
callback.onError(new LockException(data.getStringExtra(Constants.ERROR_EXTRA)));
} else {
callback.onEvent(LockEvent.AUTHENTICATION, data);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ private void processEvent(Intent data) {
switch (action) {
case Constants.AUTHENTICATION_ACTION:
Log.v(TAG, "AUTHENTICATION action received in our BroadcastReceiver");
if (data.getExtras().containsKey("error")) {
callback.onError(new LockException(data.getStringExtra("error")));
if (data.getExtras().containsKey(Constants.ERROR_EXTRA)) {
callback.onError(new LockException(data.getStringExtra(Constants.ERROR_EXTRA)));
} else {
callback.onEvent(LockEvent.AUTHENTICATION, data);
}
Expand Down

0 comments on commit 1252d0e

Please sign in to comment.