BackPressHandler
Handles "press back twice to confirm" flows.
This keeps the temporary confirmation state outside an Activity or Fragment, avoiding ad-hoc boolean flags and delayed reset jobs in UI code.
Functions
Link copied to clipboard
Runs onFirstPress for the first press and onSecondPress when called again within the configured confirmation window.