dashpay / dash-wallet

Dash Wallet for Android
https://dash.org
173 stars 168 forks source link

fix: refactor WalletActivity permission launcher to avoid InvalidStat… #1239

Closed HashEngineering closed 6 months ago

HashEngineering commented 6 months ago

…eException

Issue being fixed or feature implemented

Fix:

Fatal Exception: java.lang.IllegalStateException
LifecycleOwner de.schildbach.wallet.ui.main.WalletActivity@1e0e6df is attempting to register while current state is RESUMED. LifecycleOwners must call register before they are STARTED.

androidx.activity.result.ActivityResultRegistry.register (ActivityResultRegistry.java:123)
androidx.activity.ComponentActivity.registerForActivityResult (ComponentActivity.java:842)
de.schildbach.wallet.ui.main.WalletActivityExt.getRequestPermissionLauncher (WalletActivityExt.kt:207)
de.schildbach.wallet.ui.main.WalletActivityExt.explainPushNotifications (WalletActivityExt.kt:224)
de.schildbach.wallet.ui.main.WalletActivity.onLockScreenDeactivated (WalletActivity.java:362) 

Related PR's and Dependencies

none

Screenshots / Videos

How Has This Been Tested?

Checklist: