Add support to launch Edit Screenshot Flow #93
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Support
FlowType.FeedbackType#newIntentwith new parameter for flow type and further store it in intent extras to distinguish between feedback and edit screenshot flow.ActionConstants#ACTION_START_SCREENSHOT_EDIT_FLOWto trigger the screenshot edit flow manually.startDrawFragmentfor both Bug Report and Edit Screenshot actions when screenshot is available inFeedbackActivity#onCreate.FeedbackActivity#changeToFragmentto prevent adding the fragment transaction for edit screenshot flow thus ensuring editor closes once the flow completes, instead of returning to an empty screen.FeedbackActivity#submitEditScreenshotIntentto send broadcast using intent actionACTION_COMPLETE_EDIT_SCREENSHOTof the edited screenshot URI and updated the BroadcastReceiver to receive the intent for edit screenshot flow type.Shake#startEditScreenshotFlowto start the flow based on whether a screenshot is available, otherwise starts the standard feedback flow.ShakeDelegate#submitScreenshotto provide a callback for handling the edited screenshot result after the flow completes.FeedbackActivity#createReceiverand to notify that flow is completed.activity_demo.xmland invoked the edit screenshot flow on its tapped action inShakyDemo#onCreate.Testing Done
Feedback Flowis launched when the screenshot is not available (null).Edit Screenshot Flowis launched when screenshot is available.FeedbackFlow.mp4
EditScreenshotFlow.mp4