forked from androidx/media
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing Future cancellation checks
Future.isDone and getDone doesn't imply the Future was successful and it may have been cancelled or failed. In case where we handle failure, we should also handle cancellation to avoid CancellationException to bubble up unchecked. In demo app code where we use isDone for field initialization, we want to crash in the failure case (usually security exception where the connection is disallowed), but we want to gracefully handle cancellation. Cancellation of these variables usually happens in Activity.onDestroy/onStop, but methods may be called after this point. #minor-release PiperOrigin-RevId: 572178018
- Loading branch information
1 parent
dc859ea
commit fe7c62a
Showing
5 changed files
with
8 additions
and
6 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