Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Disable Back button for biometrics and passcode modal. #654

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

jessgusclark
Copy link
Member

This PR removes the hardware back button functionality to close the Fingerprint and Passcode modal.

With other parts of the app, such as the Dapp Browser, disabling the back button can be done with the BackHandler. However, since this a modal, and is visible, BackHandler events will not fire. See the first warning in the BackHandler link above. As such, the onRequestClose event will fire when the Back Button is pressed.

In the previous code, if the user clicked the back button, it fired the onRequestClose event, which in the end, would hide the modal's contents, closing the modal. See removed lines 127 and 132.

The biometrics component already had the functionality to fallback to a passcode. Therefore, the required function onRequestClose should always return false.

Tested on:

  • Samsung A20e (passcode)
  • Emulator Pixel 3 (emulated fingerprint)

How to test:

  • Start the app with a passcode, click back. Nothing should happen. Enter passcode
  • Enable Fingerprint, close the app, start the app, click back. Nothing should happen. Enter fingerprint.

iOS Note: I am unable to test iOS. Please make sure you can log in with existing login options.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 5, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@itofarina itofarina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - tested on iOS

@patogallaiovlabs patogallaiovlabs added this to the v1.4.1 milestone Apr 6, 2021
@patogallaiovlabs patogallaiovlabs merged commit 5efebfe into master Apr 7, 2021
@patogallaiovlabs patogallaiovlabs deleted the bio-back-back branch April 7, 2021 17:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants