forked from BitBoxSwiss/bitbox-wallet-app
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
android: handle device disconnect while the app is in the background
The ACTION_USB_DEVICE_ATTACHED intent in MainActivity was not handled by the app while it was in the background. Resulting bug: - when you disconnect an unlocked device while the app is in the background, and bring the app to the foreground again, the previous unlocked keystore is visible, as the backend didn't register the disconnet. - same when the user disconnects the device while the app is in the background, and reconnects it before bringing it to the foreground. Ths is a special case, simply calling `updateDevice()` in `onResume()` would not handle this correctly, as a device would be connected, and an intermediate disconnect could not be detected. To fix this, we detect the DETACH intent in the service, and trigger the backend to handle it.
- Loading branch information
Showing
6 changed files
with
81 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters