Skip to content

Commit

Permalink
Safer dismiss of Fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick Marion committed Apr 10, 2017
1 parent 8229269 commit 2617e48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/android/FingerprintAuthenticationDialogFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
@Override
public void onClick(View view) {
FingerprintAuth.onCancelled();
dismiss();
dismissAllowingStateLoss();
}
});

Expand Down Expand Up @@ -187,7 +187,7 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
// operation. Go to error/cancellation flow.
FingerprintAuth.onCancelled();
}
dismiss();
dismissAllowingStateLoss();
}
}

Expand All @@ -196,12 +196,12 @@ public void onAuthenticated() {
// Callback from FingerprintUiHelper. Let the activity know that authentication was
// successful.
mFingerPrintAuth.onAuthenticated(true /* withFingerprint */);
dismiss();
dismissAllowingStateLoss();
}

@Override
public void onError() {

dismissAllowingStateLoss();
}

@Override
Expand Down

0 comments on commit 2617e48

Please sign in to comment.