Fix to this commmit: Add listener to the class PatternRequestActivity to reuse the on success or fail password event
This commit is contained in:
parent
ba96d999ff
commit
753a4a5943
1 changed files with 6 additions and 3 deletions
|
@ -42,7 +42,7 @@ public class PatternRequestActivity extends AppCompatActivity {
|
|||
/*
|
||||
* External listener for success or fail
|
||||
* */
|
||||
private OnResponse onResponse;
|
||||
private static OnResponse onResponse;
|
||||
|
||||
/*
|
||||
* Contains the bad tries
|
||||
|
@ -108,6 +108,7 @@ public class PatternRequestActivity extends AppCompatActivity {
|
|||
|
||||
if(onResponse != null){
|
||||
onResponse.onSuccess();
|
||||
onResponse = null;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -115,6 +116,7 @@ public class PatternRequestActivity extends AppCompatActivity {
|
|||
|
||||
if(onResponse != null){
|
||||
onResponse.onSuccess();
|
||||
onResponse = null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -122,6 +124,7 @@ public class PatternRequestActivity extends AppCompatActivity {
|
|||
|
||||
if(onResponse != null){
|
||||
onResponse.onFailed();
|
||||
onResponse = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -140,8 +143,8 @@ public class PatternRequestActivity extends AppCompatActivity {
|
|||
});
|
||||
}
|
||||
|
||||
public void setOnResponse(OnResponse onResponse) {
|
||||
this.onResponse = onResponse;
|
||||
public static void setOnResponse(OnResponse onResponse) {
|
||||
onResponse = onResponse;
|
||||
}
|
||||
|
||||
private void incorrect(){
|
||||
|
|
Loading…
Reference in a new issue