-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 8602, Reviewer startActivityForResult Migration (#14842)
* Issue 8602, Reviewer startActivityForResult Migration - In AbstractFlashcardViewer, -- Created common FlashCardViewerResultCallback inner class to pass to registerForActivityResult function. This will capture the common result code check behavior that was being done in onActivityResult and apply it to every ActivityResultLauncher when using the new registerForActivityResult API. There was only one request code being processed, but the pattern is consistent with the other classes that were updated. -- In FlashCardViewerResultCallback, gave the lambda a default do-nothing implementation. The ADD_NOTE request code used in Reviewer doesn't specifically do anything with a result, but the common checks that FlashCardViewerResultCallback does still needs to be done for every activity result. -- Replaced startActivityForResult for EDIT_CURRENT_CARD with registerForActivityResult API implementation. -- Removed the now unused onActivityResult function override - In Reviewer, -- Replaced startActivityForResult for ADD_NOTE with registerForActivityResult API implementation. * - removed unused const - formatting
- Loading branch information
1 parent
da2c694
commit 8718479
Showing
2 changed files
with
48 additions
and
34 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